[prev in list] [next in list] [prev in thread] [next in thread] 

List:       insight-users
Subject:    Re: [Insight-users] Concept checking warnings when using
From:       Bill Lorensen <bill.lorensen () gmail ! com>
Date:       2011-04-26 20:26:51
Message-ID: BANLkTi=m3+G=JtsXU0uMj9jfdq5QZDaRtg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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=EBtan
>>
>> --
>> Ga=EBtan Lehmann
>> Biologie du D=E9veloppement 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 BinaryImageThinningFilte=
r
> 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 instantia=
te
> 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
>
>

[Attachment #5 (text/html)]

David,<br><br>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.<br> <br>Bill<br><br><div class="gmail_quote">On \
Tue, Apr 26, 2011 at 4:20 PM, David Doria <span dir="ltr">&lt;<a \
href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div class="im">Hi \
David,<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt \
0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <br>
It should work. Do you get other warning?<br>
Maybe the Concept Check is a bit too strict in that class.<br>
<br>
Gaëtan<br><font color="#888888">
<br>
-- <br>
Gaëtan Lehmann<br>
Biologie du Développement et de la Reproduction<br>
INRA de Jouy-en-Josas (France)<br>
tel: <a href="tel:%2B33%201%2034%2065%2029%2066" value="+33134652966" \
target="_blank">+33 1 34 65 29 66</a>    fax: 01 34 65 29 09<br> <a \
href="http://voxel.jouy.inra.fr" target="_blank">http://voxel.jouy.inra.fr</a>  <a \
href="http://www.itk.org" target="_blank">http://www.itk.org</a><br> <a \
href="http://www.mandriva.org" target="_blank">http://www.mandriva.org</a>  <a \
href="http://www.bepo.fr" target="_blank">http://www.bepo.fr</a><br> <br>
</font></blockquote></div><br></div>These warnings are fixed by changing line 125 of \
BinaryImageThinningFilter from<br><br>itkConceptMacro( InputIntComparableCheck,<br>( \
Concept::Comparable&lt; PixelType, int &gt; ) );<br> <br>
to<br><br>( Concept::Comparable&lt; PixelType, unsigned int &gt; ) );<br \
clear="all"><br>However, then (of course!) the warnings come back if you try to \
instantiate a <br><br>typedef itk::Image&lt;int, 2&gt;  ImageType;<div class="im"> \
<br> typedef itk::BinaryThinningImageFilter &lt;ImageType, ImageType&gt;<br>          \
BinaryThinningImageFilterType;<br><br></div>(the reverse problem of comparing an int \
to an unsigned int vs comparing an unsigned int to an int).<br>

<br>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&#39;s there for a reason?<br><br>Thanks,<br><font color="#888888"><br>

David<br>
</font><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" \
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> <br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" \
target="_blank">http://www.kitware.com/products/protraining.html</a><br> <br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" \
target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br> <br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" \
target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br> \
<br></blockquote></div><br>



_____________________________________
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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic