ITK/Python Wrapping

From KitwarePublic
< ITK
Revision as of 16:25, 21 April 2012 by Matt.mccormick (talk | contribs)
Jump to navigationJump to search

Python Wrapping

This section describes how to wrap ITK classes for being used from Python.

Step 1: Make sure the python headers are installed

Python will need to be installed along with the Python development headers (Python.h).

If you need to specify a specific Python version or a custom location of the headers, the following CMake configuration variables can be modified:

  • PYTHON_INCLUDE_DIR
  • PYTHON_LIBRARY
  • PYTHON_EXECUTABLE
  • PY_SITE_PACKAGES_PATH

Step 2: Turn on Python wrapping in the ITK configuration

Turn ON the CMake configuration ITK_WRAP_PYTHON.

Step 3: Select the pixel types and dimensions to build

You can choose what pixel types and dimensions to build into the wrapped interface.

For the dimensions to support, set the CMake configuration variable ITK_WRAP_DIMS. This is a semi-colon delimiting string containing the dimensions to support (Image dimensions, etc). The default is 2;3.



ITK: [Welcome | Site Map]