I just finished creating an interface between numpy/slicer and my ITK C++ project module using SWIG. I use pointers to avoid copying and it works well. Happy to share what I have.

- David

On 02/04/2016 02:36 PM, Hyun Jae Kang wrote:
Hi all,

To support data transparency between the functions of SimpleITK and NumPy, SimpleITK provides functional integration with NumPy-based script and a method of data-conversion between SimpleITK’s image data and the N-dimensional array object of NumPy. But, there is a significant performance bottleneck in the data-conversion which is based on the operation of data copy. The performance bottleneck can be increased with the size of handling image data and the number of data-conversion.

The performance bottle can be removed by allowing SimpleITK’s image and the arrays of NumPy to share pointers to the same memory symmetrically with copy-on-write semantics. That is, reduce data-copy operations in the data conversion. This approach can be accomplished by developing and/or improving existing data handling methods in ITK and SimpleITK to enable copy-on-write sharing of data between SimpleITK’s image data and other common data object of Python libraries used for scientific computing and image processing.

For more detail information, please check the following website:
http://www.itk.org/Wiki/SimpleITK/Design_And_Proposals/SIP_002

Any your valuable comments are welcome.

Thanks,

Hyun Jae



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-developers

Reply via email to