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 https://itk.org/ITKExamples/src/Filtering/Thresholding/ThresholdAnImageUsingOtsu/ThresholdAnImageUsingOtsu.zip
unzip ThresholdAnImageUsingOtsu.zip
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.