Summer2009:Using ITK in python
From NAMIC Wiki
Home < Summer2009:Using ITK in python
- GE: Jim Miller
- Isomics: Steve Pieper
- INRIA: Demian Wassermann
Develop strategies for embedding ITK filters in python code. See if this would be a workable strategy for creating slicer modules.
- Look at how numpy arrays are passed to C/C++ code using techniques like cython, weave, etc.
- Figure out what is needed to compile ITK code in these environments.
- Compare and contrast this approach to WrapITK
- Some pre-project week progress is shown on this page in the slicer.org wiki
- Debugging of python internals with Demian and discussion of future directions.
- Basic possibilities (all are somewhat convoluted):
- WrapITK - combinatorial explosion; large libraries; C++ no longer available
- Cython - yet another language; not clear how to use C++ idioms
- Ctypeslib - good for teem.py, not good for C++
- Weave - clear access to C++; can pass numpy arrays
- Invoke CLI - clear distinction of C++ and python; easily supports multiple calling languages; CLIs are reusable executables/libraries; clear how to deploy; ITK IO requires one memcopy; approach is pretty indirect.
- Confirmation that weave is a promising approach, but CLI still seems to be preferred approach.