[ITK Community] Wrapping itkTileImageFilter for 3D output

Matt McCormick matt.mccormick at kitware.com
Sun Dec 1 20:04:06 EST 2013


Hi Michka,

Please review this patch [1], which adds the required instantiations, and
this patch [2], which provides an example.

Thanks,
Matt

[1] http://review.source.kitware.com/#/c/13664/
[2] http://review.source.kitware.com/#/c/13662/


On Mon, Nov 25, 2013 at 3:29 AM, Michka Popoff <michkapopoff at gmail.com>wrote:

> Hi, just re-posting this, if someone has an idea ?
>
> I can open a ticket on the bug tracker if fixing this involves some bigger
> coding effort.
>
> Michka
>
>
> Le 20 nov. 2013 à 22:25, Michka Popoff a écrit :
>
> > Hi
> >
> > I want to use the TileImageFilter (wrapped with python) to take two 2D
> images and make a 3D stack out of it, like described in this example :
> >
> http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/TileImageFilter_CreateVolume
> >
> > The example works nicely with c++, but not with python.
> > Here is some basic code to reproduce the error :
> >
> > import itk
> > inputtype = itk.Image[itk.UC, 2]
> > outputtype = itk.Image[itk.UC, 3]
> > tile_filter = itk.TileImageFilter[inputtype, outputtype].New()
> >
> > Here is the error message :
> >
> > Traceback (most recent call last):
> >  File "tiletest.py", line 4, in <module>
> >    filt = itk.TileImageFilter[inputtype, outputtype].New()
> >  File "/usr/local/lib/ITK-4.4/Python/itkTemplate.py", line 233, in
> __getitem__
> >    raise KeyError, 'itkTemplate : No template %s for the %s class' %
> (str(parameters), self.__name__)
> > KeyError: "itkTemplate : No template (<class
> 'itkImagePython.itkImageUC2'>, <class 'itkImagePython.itkImageUC3'>) for
> the itk::TileImageFilter class"
> >
> > I tried to modify the itkTileImageFilter.wrap file to accept 2 and 3
> dimensional images (with itk_wrap_image_filter_combinations), but I was not
> able to get anything working.
> >
> > Am I doing something wrong, or if not, what would be the way to fix this
> ?
> >
> > Michka
> >
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20131201/e3421ccf/attachment.html>


More information about the Community mailing list