Python wrapping of plastimatch

investigating python wrapping for plastimatch

This is good to hear. Are you thinking about creating a dedicated “pythonic” API or a one-to-one mapping with the C++ one ?

It looks feasible to use the ITK wrapping method

This is suitable for projects providing ITK filters and/or classes (or having functionality that could be wrapped in such a way).

If that makes sense, you could look at using the GitHub - InsightSoftwareConsortium/ITKModuleTemplate: A template to start an ITK Module as a starting point. See also https://blog.kitware.com/python-packages-for-itk-modules/

Would this be a reasonable approach for eventually allowing python interaction within 3D Slicer?

Since python packages distributed on http://pypi.org/ can now be installed on Linux, macOS and windows. This would work.

Slicer’s build it seems ITK itself is not wrapped

This is correct, while there is an option called Slicer_BUILD_ITKPython, it not enabled by default.

ITK itself […] not available in Slicer python

following the recent transition of Slicer to python 3.6, running pip install itk would allow you to use it.

suggestions

You may want to look at using GitHub - pybind/pybind11: Seamless operability between C++11 and Python along https://scikit-build.readthedocs.io

1 Like