# Python wrapping of plastimatch

**URL:** <https://discourse.slicer.org/t/python-wrapping-of-plastimatch/6722>\
**Category:** Development\
**Created:** [May 7, 2019, 3:17pm UTC](https://discourse.slicer.org/t/python-wrapping-of-plastimatch/6722 "2019-05-07T15:17:04Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [May 7, 2019, 3:41pm UTC](https://discourse.slicer.org/t/python-wrapping-of-plastimatch/6722/2 "2019-05-07T15:41:44Z")

</div>

> 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](https://github.com/InsightSoftwareConsortium/ITKModuleTemplate) as a starting point. See also [https://blog.kitware.com/python-packages-for-itk-modules/](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/](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](https://github.com/pybind/pybind11#readme) along [https://scikit-build.readthedocs.io](https://scikit-build.readthedocs.io)

---

_[View the full topic](https://discourse.slicer.org/t/python-wrapping-of-plastimatch/6722)._
