[Insight-users] Concept checking warnings when using BinaryThinningImageFilter with unsigned int image

David Doria daviddoria at gmail.com
Tue Apr 26 16:20:53 EDT 2011


Hi David,

>
> It should work. Do you get other warning?
> Maybe the Concept Check is a bit too strict in that class.
>
> Gaëtan
>
> --
> Gaëtan Lehmann
> Biologie du Développement et de la Reproduction
> INRA de Jouy-en-Josas (France)
> tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
> http://voxel.jouy.inra.fr  http://www.itk.org
> http://www.mandriva.org  http://www.bepo.fr
>
>
These warnings are fixed by changing line 125 of BinaryImageThinningFilter
from

itkConceptMacro( InputIntComparableCheck,
( Concept::Comparable< PixelType, int > ) );

to

( Concept::Comparable< PixelType, unsigned int > ) );

However, then (of course!) the warnings come back if you try to instantiate
a

typedef itk::Image<int, 2>  ImageType;
typedef itk::BinaryThinningImageFilter <ImageType, ImageType>
          BinaryThinningImageFilterType;

(the reverse problem of comparing an int to an unsigned int vs comparing an
unsigned int to an int).

Is there a way to change this to allow both types to be instantiated without
warnings? Of course removing that concept check all together does the trick,
but I assume it's there for a reason?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110426/830c939a/attachment.htm>


More information about the Insight-users mailing list