Hi all,

I’m an old ITK / VTK user (in time not age!). I was very enthusiatic when I found out ITK.js, VTK.js and the ITK-VTK-image-Viewer.js. I’m now a bit confused on what could be achieved…
VTK.js looks like a powerful visualisation toolkit for browser, ok.
Regarding ITK.js, is it actually ITK or only image importers and connector to display them into VTK.js?
Can I write advanced filters in javascript and run these in a web browser?
Thanks for enlightening me!

Hello Laurent,

Welcome to the New Age! :new:

Yes, the new JavaScript support is extremely exciting – interactive insights in your web browser without any installation! :star2::rainbow::zap:

itk.js, vtk.js, and itk-vtk-image-viewer will be some powerful tools available to work some magic.

You will be able to harness the power of all of ITK and deliver it via the browser! In practice, you will take an ITK C++ program and build it into WebAssembly.

This functionality still needs to be finalized and documented. I will follow up on this thread when it is available…


Does ITK.js provides all the image filters?

I’m interested in performing Otsu thresholding on a vtkImageData that I have. What is the best library for me to perform this calculation?

Hi @sedghi ,

Yes, ITK.js provides access to all ITK filters!

If the data is in a file itk.js can be used to read the file.

If the data is in a vtk.js vtkImageData, it can be converted to an itk.js Image with the vtk.js convertVtkToItkImage.

For Otsu thresholding download the Threshold an Imaging Using Otsu example, and build it with ITK.js:

curl -O
cd ThresholdAnImageUsingOtsu

npm install --global itk
itk-js build .

Then run the pipeline in the browser using the runPipelineBrowser API. More information on how to provide access to the pipeline can be found in the examples.