[Insight-users] python wrapping InsightToolkit versus itk

Richard Beare richard.beare at gmail.com
Sun Jul 12 05:08:15 EDT 2009


The new version (WrapITK, from google code, that uses "import itk")
has quite a lot of features that make it much nicer to use. An extract
from the guide that comes with it might give you an idea:

Python with current ITK wrappers:
image = itk.ImageUS2_Pointer(itk.ImageUS2_New())
witer = itk.ImageFileWriterIUS2_Pointer(itk.ImageFileWriterIUS2_New())
writer.SetInput(image);
writer.SetFileName("foo.tif");

Python with WrapITK:
image = itk.Image[itk.US, 2].New()
writer = itk.ImageFileWriter[image].New(Input=image, FileName="foo.tif")


On Sun, Jul 12, 2009 at 6:22 PM, Rick Giuly<rgiuly at gmail.com> wrote:
>
> Hello All,
>
> I apologize for the naivety of this question... python ITK files apparently
> have two forms, one that uses "import InsightToolkit" and one that uses
> "import itk" which different syntax to go with each. Is the "InsightToolkit"
> form now obsolete? In general, with old (or new) code that uses
> InsightToolkit, can InsightToolkit simply be replaced with the "itk" module
> - or are they actually different? Has the itk module taken over all the
> functionality of InsightToolkit module?
>
>
> -Rick
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> 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-users
>


More information about the Insight-users mailing list