Does simple ITK (python) offers all the functionalities as the C++ ITK?

A question:
Does simple ITK (python) offers all the functionalities as the C++ ITK?

SimpleITK provides a higher level interface to ITK image filters, IO, and registration framework with broad support for pixel types, and images of 2,3, and limited 4D support.

More information can be found on read the docs, and the example notebooks.

1 Like

Thanks for answering my questions.
What I really wanted to ask is if SIMPLE ITK can do/perform all the functionalities of the standard ITK. Can it? Or simple ITK is somewhat limited?


Hello @machadoL,
SimpleITK supports most (not all) ITK filters and the registration framework. It exposes fewer settings than ITK, hence the Simple.
Generally speaking, if you are not dependent upon an existing code base, I would start my path into the ITK world using SimpleITK, and when you encounter something that is not doable in SimpleITK move to ITK. This type of transition does not mean that you need to rewrite your SimpleITK code base as mixing SimpleITK and ITK code is straightforward.

1 Like

Here are the filters available in SimpleITK:

To augment what @zivy said, SimpleITK does not expose ITK’s pipeline architecture. I, personally, prefer to keep that hidden, but there are situations where performance could suffer.

ITK-python wraps almost all of ITK (I think) and does expose the pipeline, if you need that. On the other hand, dealing with the templated pixel-type stuff in python is not fun (IMHO).

Note that with ITK Python you no longer need to deal with “templated pixel-type stuff” :slight_smile:

In fact, you can apply ITK Python filters directly to Numpy arrays and such. It is quite amazing what can now be done in a very python-esq manner using ITK-Python:

Here is a snippet of ITK Python code working on ITK images

import itk
import sys

input_filename = sys.argv[1]
output_filename = sys.argv[2]

image = itk.imread(input_filename)
median = itk.median_image_filter(image, radius=2)
itk.imwrite(median, output_filename)

Here is a snippet of ITK Python code working on Numpy.ndarrays

import numpy as np
import itk

image = itk.imread('/path/to/image.tif')
array = np.asarray(image)
smoothed = itk.median_image_filter(array, radius=2)

The variable smoothed will be an numpy.ndarray, since array (passed to the itk filter) was a numpy.ndarray.

Enjoy itk!



A few of the additional fun and useful data structures and filters available in the ITK Python wrapping are SpatialObject’s, PointSet’s, and Mesh’s.

1 Like