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

Bill Lorensen bill.lorensen at gmail.com
Tue Apr 26 16:26:51 EDT 2011


David,

Many of the concept checks are too aggressive. A massive concept check pass
was made through itk many years ago. In general, some sort  of checking
needs to be applied in those filters. The challenge is to understand the
algorithm and apply the minimum checks that make sense.

Bill

On Tue, Apr 26, 2011 at 4:20 PM, David Doria <daviddoria at gmail.com> wrote:

> 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
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20110426/9a090e31/attachment.htm>


More information about the Insight-developers mailing list