# ITK or SimpleITK in Python?

**URL:** https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926
**Category:** Beginner Questions
**Tags:** python
**Created:** [April 10, 2020, 9:25pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926 "2020-04-10T21:25:53Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![mridev](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mridev](https://discourse.itk.org/u/mridev)
#### Post date: [April 10, 2020, 9:25pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/1 "2020-04-10T21:25:53Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![zivy](https://discourse.itk.org/user_avatar/discourse.itk.org/zivy/32/1726_2.png) [@zivy](https://discourse.itk.org/u/zivy)
#### Post date: [April 10, 2020, 11:02pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/2 "2020-04-10T23:02:20Z")

</div>

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](https://simpleitk.readthedocs.io/en/master/filters.html#lbl-filter)) 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.

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [April 13, 2020, 7:20pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/3 "2020-04-13T19:20:25Z")

</div>

As @zivy mentioned, both SimpleITK and ITK support commercial development; they are distributed under an [Apache 2.0](https://github.com/InsightSoftwareConsortium/ITK/blob/master/LICENSE).

> [@mridev](#):
>
> Also, I was not able to read transformation file (\*.tfm) that I generated by ITK registratio

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`](https://github.com/InsightSoftwareConsortium/ITK/issues/1249) functions similar to the `itk.imread`, `itk.imwrite`, `itk.meshread`, `itk.meshwrite` functions for images and meshes.

> [@mridev](#):
>
> ITK for processing 4D data types (dynamic MRI, for example)

ITK has a [Video](https://itk.org/Doxygen/html/group__Group-Video.html) 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](https://discourse.itk.org/t/itk-5-1-release-candidate-2-available-for-testing/2803/4). 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](https://xarray.pydata.org/en/stable/time-series.html) well.

---

<div class="post-metadata">

### Author: ![mridev](https://discourse.itk.org/letter_avatar_proxy/v4/letter/m/8e7dd6/32.png) [@mridev](https://discourse.itk.org/u/mridev)
#### Post date: [April 15, 2020, 2:59pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/4 "2020-04-15T14:59:12Z")

</div>

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

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [April 17, 2020, 1:21pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/5 "2020-04-17T13:21:23Z")

</div>

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

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [April 23, 2020, 5:56pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/6 "2020-04-23T17:56:23Z")

</div>

These will have to come in the next pre-release of ITK 5.2. [Tracking issue](https://github.com/InsightSoftwareConsortium/ITK/issues/1249).

---

<div class="post-metadata">

### Author: ![constantine](https://discourse.itk.org/user_avatar/discourse.itk.org/constantine/32/3915_2.png) [@constantine](https://discourse.itk.org/u/constantine)
#### Post date: [June 13, 2024, 2:01am UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/7 "2024-06-13T02:01:33Z")

</div>

@matt.mccormick — returning to this conversation, is there a page in the documentation to look up what’s wrapped in Python and what’s not? This changes from release to release, but I can’t find an easy way of searching ITK Python API.

For Example, there’s class itk::VideoFileReader in ITK 5.0 documentation, but I don’t see it in dir(itk) in Python. What is the easiest way of looking up something of this sort?

Also, I’m wondering am I being dumb, or is Google being coy with me — I can’t get to ITK 5.4 Doxygen documentation. I can see 6.0 Doxygen pages, but not 5.4.

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [June 13, 2024, 12:54pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/8 "2024-06-13T12:54:43Z")

</div>

The usual way for me to answer a question “is this class wrapped for Python” is to search for existence of `itkClassName.wrap` file in ITK source tree. Note that there are a few exceptions to this rule, mostly for important classes (e.g. `itkImageToImageFilterA.wrap` + `itkImageToImageFilterB.wrap`).

---

<div class="post-metadata">

### Author: ![constantine](https://discourse.itk.org/user_avatar/discourse.itk.org/constantine/32/3915_2.png) [@constantine](https://discourse.itk.org/u/constantine)
#### Post date: [June 24, 2024, 5:59am UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/9 "2024-06-24T05:59:06Z")

</div>

> [@constantine](#):
>
> Also, I’m wondering am I being dumb, or is Google being coy with me — I can’t get to ITK 5.4 Doxygen documentation. I can see 6.0 Doxygen pages, but not 5.4.

I’ve found, finally, how to get to previous ITK Doxygen pages, and it requires sharp eyesight — right at the very bottom of [ITK: Insight Toolkit](https://itk.org/Doxygen/html/) top level page there’s this:

![image](https://discourse.itk.org/uploads/default/original/2X/3/3113618bff100379feb2d25138e30050a6cf6033.png)

Phew! I thought the world was moving forward too fast and too far and I was falling behind, hopelessly… But instead I’d say we need to celebrate the tiniest font being discovered on Interwebs, afresh! 🏆

Maybe it would be worth putting those links somewhere closer to the header, for the sake of those who search…

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [June 24, 2024, 1:27pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/10 "2024-06-24T13:27:31Z")

</div>

ITK is rather stable now, and the documentation doesn’t change much between versions. So putting links to old versions prominently does not make much sense.

5.4 has not been announced yet, as some things haven’t been finished, such as creation of dedicated 5.4 documentation pages.

---

<div class="post-metadata">

### Author: ![constantine](https://discourse.itk.org/user_avatar/discourse.itk.org/constantine/32/3915_2.png) [@constantine](https://discourse.itk.org/u/constantine)
#### Post date: [June 25, 2024, 1:19am UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/11 "2024-06-25T01:19:52Z")

</div>

OK, ok. But then, should 6.0 Doxygen be the default landing page if 5.4 hasn’t been announced yet?

---

<div class="post-metadata">

### Author: ![dzenanz](https://discourse.itk.org/user_avatar/discourse.itk.org/dzenanz/32/1093_2.png) [@dzenanz](https://discourse.itk.org/u/dzenanz)
#### Post date: [June 25, 2024, 12:37pm UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/12 "2024-06-25T12:37:45Z")

</div>

Ideally, it would not be long between tagging and doing all the release-related work. But we are thin on resources, and this deviation from ideal is one of the consequences. @matt.mccormick is this the right explanation?

---

<div class="post-metadata">

### Author: ![constantine](https://discourse.itk.org/user_avatar/discourse.itk.org/constantine/32/3915_2.png) [@constantine](https://discourse.itk.org/u/constantine)
#### Post date: [July 2, 2024, 5:08am UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/13 "2024-07-02T05:08:44Z")

</div>

Yes, I do have a feeling there’s a bit more work, especially at the moment. Anyway — I’m just getting my head around and really glad to have access to all this amazing work, and even more — looking forward to the upcoming releases! 😻

---

<div class="post-metadata">

### Author: ![matt.mccormick](https://discourse.itk.org/user_avatar/discourse.itk.org/matt.mccormick/32/7_2.png) [@matt.mccormick](https://discourse.itk.org/u/matt.mccormick)
#### Post date: [July 10, 2024, 2:30am UTC](https://discourse.itk.org/t/itk-or-simpleitk-in-python/2926/14 "2024-07-10T02:30:24Z")

</div>

We are continuously improving our release process for faster and continuous releases. We are also gaining an additional release manager (@phcerdan). The ongoing status for finalization of the 5.4 release can be found here:

> <https://github.com/InsightSoftwareConsortium/ITK/issues/4694>
>
> Release checklist and status:
> 
> \- \[x\] Check dashboard and CI
> \- \[x\] Tag the ITK… repository
> \- \[x\] Bump ITK's version
> \- \[x\] Update \`release\` branches
> \- \[x\] Update .zenodo.json
> \- \[x\] Bump the ITKPythonPackage version
> \- \[x\] Bump the ITKSoftwareGuide version
> \- \[\] Bump ITKSphinxExamples version: WIP: https://github.com/InsightSoftwareConsortium/ITKSphinxExamples/pull/424
> \- \[x\] Generate \*InsightToolkit\* and \*InsightData\* tarballs
> \- \[x\] Archive testing data
> \- \[\] Write release notes
> \- \[\] Tarballs archived on ITK data.kitware.com Releases
> \- \[\] Publish Doxygen HTML
> \- \[x\] Generate Python packages and ITKPythonBuilds
> \- \[x\] Upload Python packages to PyPI
> \- \[x\] conda-forge libitk package updated
> \- \[\] Post on Discourse
> \- \[\] Post on Kitware Blog
> 
> \------------
> 
> 👋 looks like 5.4.0 did not get marked as latest release? Create this issue to raise some awareness. Thanks!
> 
> !\[image\](https://github.com/InsightSoftwareConsortium/ITK/assets/1580956/f70b93f1-6a5c-4d55-a8f5-dc28e4d8ece9)
> 
> cc @phcerdan
