![]() | {{#switch:|User|User talk=This user {{#ifeq:ITK|ITK/Python Wrapping||sub}}page is currently inactive and is retained for historical reference. {{#if: |It was last updated {{{last}}}.}} If you want to revive discussion regarding the subject, you might try contacting the user in question or seeking broader input via a forum such as the village pump.|#default={{#switch:{{{type}}}|policy=This former Wikipedia policy, no longer backed by community consensus, is retained for historical reference.|guideline=This former Wikipedia guideline, no longer backed by community consensus, is retained for historical reference.| |section=This section is currently out-of-date and may contain errors but is retained for historical reference. {{#if: || For peer-reviewed, authoritative guidance on ITK, see The ITK Software Guide.. Additional guidance can be found via the mailing lists.}} |woundup=This page has been closed down by community consensus, and is retained only for historical reference. For peer-reviewed, authoritative guidance on ITK, see The ITK Software Guide. If you wish to restart discussion on the status of this page, seek community input via the mailing lists].|#default=This section is currently out-of-date and may contain errors but is retained for historical reference. {{#if: || For peer-reviewed, authoritative guidance on ITK, see The ITK Software Guide. Additional guidance can be found via the ITK Discourse.}}}} {{#if: |{{{comment}}}|}} {{#if: |It was last updated {{{last}}}.}} }} | {{#if: | {{#if:| }}{{#if:| }}{{#if:| }}{{#if:| }}{{#if: | }}Shortcut{{#if:|s}}: {{#if:
| {{#ifexist: | | }}}} }} |
{{#switch:|User|User talk=|#default={{#ifeq:{{{category}}}|no||}}}}
This section describes how to wrap ITK classes for being used from Python.
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:
Turn ON the CMake configuration ITK_WRAP_PYTHON.
You can choose what pixel types and dimensions to build into the wrapped interface. There is a trade-off between the number of pixel types and images dimensions supported and the amount of compilation time required and the size of the wrapping libraries.
For the dimensions to support, set the CMake configuration variable ITK_WRAP_DIMS. This is a semi-colon delimited string containing the dimensions to support (Image dimensions, etc). The default is 2;3.
The pixel types to support are boolean variables in the pattern ITK_WRAP_<pixel type>. For instance,