Difference between revisions of "Summer2009:Using ITK in python"
From NAMIC Wiki
Line 34: | Line 34: | ||
<h3>Progress</h3> | <h3>Progress</h3> | ||
* Some pre-project week progress is shown [http://www.slicer.org/slicerWiki/index.php/Slicer3:Python:pitky on this page in the slicer.org wiki] | * Some pre-project week progress is shown [http://www.slicer.org/slicerWiki/index.php/Slicer3:Python:pitky 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. | ||
</div> | </div> |
Revision as of 12:04, 26 June 2009
Home < Summer2009:Using ITK in python
Key Investigators
- GE: Jim Miller
- Isomics: Steve Pieper
- INRIA: Demian Wassermann
Objective
Develop strategies for embedding ITK filters in python code. See if this would be a workable strategy for creating slicer modules.
Approach, Plan
- 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
Progress
- 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.