[ITK Community] Wrapping itkTileImageFilter for 3D output

Michka Popoff michkapopoff at gmail.com
Mon Nov 25 03:29:55 EST 2013


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
> 




More information about the Community mailing list