ITK or SimpleITK in Python?

Hi all,

I know this question has been asked before. I have started developing commercial solutions for medical image analysis in python. I have used both ITK and SimpleITK but would like to use only one of them. It seemed more professional to use ITK for commercial purposes because of its capabilities and I started using it, but later I realized ITK had some limitations which made me sometimes use SimpleITK as well. For example, I was not able to use ITK for processing 4D data types (dynamic MRI, for example). Also, I was not able to read transformation file (*.tfm) that I generated by ITK registration and ended up using SimpleITK to read it (it seemed to me that something was not implemented in ITK). Should I keep using ITK and post my problems here, or should I completely switch to SimpleITK since these problems have no solution? In other words, is there any problem using SimpleITK in a commercial solution? I would like to make a decision before I write too many scripts and having to rewrite them in future.

Thanks a lot!

Hello @mridev,

There is no problem using SimpleITK in a commercial solution. There are several companies that do.

With respect to differences between SimpleITK and ITK in Python, from the SimpleITK FAQ:
" SimpleITK supports most ITK image filters (see list) and the IO and registration frameworks. It exposes fewer settings than ITK, hence the Simple in the name. The main ITK elements ommited from SimpleITK are the pipeline architecture, spatial objects framework, point sets, and the mesh framework."

In the end it is up to you to make the judgement based on the functionality you need.

2 Likes

As @zivy mentioned, both SimpleITK and ITK support commercial development; they are distributed under an Apache 2.0.

ITK Python wrapping supports writing and reading transformation files, but the interface has not been convenient in the past; ITK 5.1 will provide Pythonic itk.transformread and itk.transformwrite functions similar to the itk.imread, itk.imwrite, itk.meshread, itk.meshwrite functions for images and meshes.

ITK has a Video framework for processing timeseries in real time. Wrapping has not been added, but it could be added.

ITK 5.1 supports working with xarray DataArray’s. These are essentially NumPy arrays with associated metadata. xarray includes support for a dimension, which could have a label t, whose coordinates are NumPy datetime64 values. This serves many times series processing needs well.

Thank you for your responses! Regarding itk.transformread and itk.transformwrite, my itk in Python does not recognize these functions. Does that mean it is not properly installed and maybe that is why I do not get some other functionalities of itk either? I updated my itk module by running the following command (I’m using Mac) but it did not make any difference:

pip install -I --pre itk

itk.transformread and itk.transformwrite will hopefully be included in the next release.

These will have to come in the next pre-release of ITK 5.2. Tracking issue.