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

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Apr 15 03:12:30 EDT 2011


Le 14 avr. 11 à 22:26, David Doria a écrit :

> With this code:
>
> typedef itk::Image<unsigned int, 2>  ImageType;
>
> int main(int, char *[])
> {
>   ImageType::Pointer image = ImageType::New();
>
>   typedef itk::BinaryThinningImageFilter <ImageType, ImageType>
>           BinaryThinningImageFilterType;
>   BinaryThinningImageFilterType::Pointer filter
>           = BinaryThinningImageFilterType::New();
>   filter->SetInput(image);
>   filter->Update();
> }
>
> I get 6 signed/unsigned comparison concept check warnings:
>
> /home/doriad/src/ITK/Modules/Core/Common/include/ 
> itkConceptChecking.h: In member function ‘void  
> itk::Concept::Comparable<T1, T2>::Constraints::constraints() [with  
> T1 = unsigned int, T2 = int]’:
> /home/doriad/src/ITK/Modules/Core/Common/include/ 
> itkConceptChecking.h:289:   instantiated from  
> ‘itk::Concept::Comparable<unsigned int, int>’
> /home/doriad/src/ITK/Modules/Filtering/MathematicalMorphology/ 
> include/itkBinaryThinningImageFilter.h:123:   instantiated from  
> ‘itk::BinaryThinningImageFilter<itk::Image<unsigned int, 2u>,  
> itk::Image<unsigned int, 2u> >’
> /media/portable/Examples/c++/src/ITK/BinaryThinningImageFilter/ 
> BinaryThinningImageFilter.cxx:17:   instantiated from here
> /home/doriad/src/ITK/Modules/Core/Common/include/ 
> itkConceptChecking.h:277: warning: comparison between signed and  
> unsigned integer expressions
> /home/doriad/src/ITK/Modules/Core/Common/include/ 
> itkConceptChecking.h:289:   instantiated from  
> ‘itk::Concept::Comparable<unsigned int, int>’
>
> Is there a reason that BinaryThinningImageFilter can't be used with  
> an unsigned int image?

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110415/2e9bb085/attachment.pgp>


More information about the Insight-users mailing list