use ITK on the web

Hi, I’m new to ITK and interested in medical image processing on the web. I tried using itk-js ( to read a dicom series, then showed them on the web through vtk.js. It worked. However, when I want to do some image segmentation, I can’t find the API like itkConnectedThresholdFilter. Is it because ITK mainly targets desktop software and is there a more suitable solution? Any suggestions will be helpful. Thanks in advance.

All ITK filters should be exposed. More insight here:

Thank you @dzenanz , the message you provided helps me a lot! But when I tried some example like Hello World step by step, I failed to realize it because I only get a 0kb file named itk-js-build-env in the ./web-build after run npx itk-js build . Is it because I miss something? As a beginner, this confuses me a lot.

@matt.mccormick should be able to help.

Hi @zrxiaojie

Are there any errors or messages when running the example?

What operating system are you using?

Hi @matt.mccormick , my operating system is Windows 10 home version, and the docker seems to be running normally. After I run npx itk-js build . of the itkjs Hello World example, a folder named web-build is created but there is only one file itk-js-build-env in the result

Additionally, I try it on another computer with Ubuntu just now. I got the same result.

@zrxiaojie thanks for the follow-up!

There was an error in the default image in the most recent version. A patch is being released to correct the version and to also improve error reporting when this occurs. In the meantime,

npx itk-js build  --image insighttoolkit/itk-js:20210520-bafb1b5 .

Can be used to explicitly specify the image.

On Windows, make sure that shared folders are enabled on the drive.

Thank you for your reply! Maybe there are some problems with my device or I haven’t mastered the use of the dock yet, I haven’t successfully built it with that version of image. But it’s okay, I think I should first learn the knowledge and principles of itk and itkjs. Then I will try a few more times!

1 Like

@zrxiaojie keep up the effort! We are here to help.

itk.js 14.1.1 is now available with the corrected default image.