[Insight-users] Wrapping of new label processing filters

Lassi Paavolainen lassi.paavolainen at jyu.fi
Tue Jan 26 17:23:45 EST 2010


Hi,

Where can I find working wrap_itk*.cmake files for new label processing 
filters available in ITK 3.16 for wrapping in WrapITK 0.3? Those aren't 
in ITK 3.16 nor in CVS head. I have used those files from Gaetan's Insight 
Journal article: http://insight-journal.org/browse/publication/176
but to get those to work I need to remove about 10 cmake files or I get 
errors like this:
/home/lopaavol/ITK/wrapitk-0.3.0/Libraries/Review/wrap_itkBinaryClosingByReconstructionImageFilter.cxx:20:57: 
error: itkBinaryClosingByReconstructionImageFilter.h: No such file or 
directory
/home/lopaavol/ITK/wrapitk-0.3.0/Libraries/Review/wrap_itkBinaryClosingByReconstructionImageFilter.cxx:30: 
error: expected initializer before '<' token

Have I just forgot to set some cmake parameter or are those cmake files 
outdated for WrapITK 0.3 and latest label filters?

Reason for doing this again and not being satisfied with the version I 
already had (build correctly after removing about 10 of those cmake 
files), is that I get following error in Python:

import itk
Dimension = 2
LabelObjectType = itk.StatisticsLabelObject[itk.UL, Dimension]
Warning: Unknown parameter 'itk::LabelMap< itk::StatisticsLabelObject< 
unsigned long, 2 > >' in template 'itk::ImageSource'
Warning: Unknown parameter 'itk::LabelMap< itk::StatisticsLabelObject< 
unsigned long, 3 > >' in template 'itk::ImageSource'
...
LabelMapType = itk.LabelMap[LabelObjectType]
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/local/lib/InsightToolkit/WrapITK/Python/itkTemplate.py", line 
212, in __getitem__
     raise KeyError, 'itkTemplate : No template %s for the %s class' % 
(str(parameters), self.__name__)
KeyError: "itkTemplate : No template [<class 
'itkStatisticsLabelObjectPython.itkStatisticsLabelObjectUL2'>] for the 
itk::LabelMap class"

Everything works if I define type of those filters manually but I really 
don't want to add bunch of ifs in my code as it should work automatically.

Cheers,
Lassi


More information about the Insight-users mailing list