ITK Python Package

This project provides a setup.py script to build ITK Python binary packages and infrastructure to build ITK external module Python packages.

ITK is an open-source, cross-platform system that provides developers with an extensive suite of software tools for image analysis.

Installation

To install the ITK Python package:

    $ pip install itk

or:

    $ conda install -c conda-forge itk

Usage

Simple example script

    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)

See also the ITK Python Quick Start Guide. There are also many downloadable examples documented in Sphinx.

GitHub

https://github.com/InsightSoftwareConsortium/ITKPythonPackage

Source: https://pythonawesome.com/a-setup-script-to-generate-itk-python-wheels/