[Insight-developers] Python wrapping of IO plugin

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Dec 13 13:18:23 EST 2012


Hello David,

The standard place to place local modules is in:

ITK/Modules/External

If you add some file to the wrapping subdirectory along the lines of the other IO modules when you compile ITK, with you module turned on along with WrapITK, the you IO should be there to manually register.

https://github.com/Kitware/ITK/tree/master/Modules/IO/Meta/wrapping

Alternatively you could do what is described as an IO Plugin, by building ITK shared and, adding the itkLoad method to you module.

I would not do both.

With the python method the library is manually linked in at compile time and loaded, also you need to manually register the IO factory. Where as with the IO Plugin, if the library is in the ITK_AUTOLOAD_PATH, it'll be loaded at linked time and the factory registered then.

Brad


On Dec 13, 2012, at 12:09 PM, David Froger <david.froger at gmail.com> wrote:

> Hi all,
> 
> I'm writting a IO module named INR [1].
> 
> If I put the plugin in the ITK sources, like this:
>    InsightToolkit-4.2.1/Modules/IO/INR/include/...
>    InsightToolkit-4.2.1/Modules/IO/INR/src/...
>    InsightToolkit-4.2.1/Modules/IO/INR/wrapping/...
> 
> Python wrapping will be automatically generated "for free".
> 
> I now want the IO module to be a plugin [2].
> What is the simple way to generated the Python wrapping?
> 
> Thanks,
> David
> 
> 
> [1] http://inrimage.gforge.inria.fr/WWW/index.html (french pages)
> [2] http://www.paraview.org/Wiki/Plugin_IO_mechanisms
> _______________________________________________
> 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://www.itk.org/mailman/listinfo/insight-developers



More information about the Insight-developers mailing list