[Insight-developers] Wrong signature for min and max in NumericTraits[RGBPixel, RGBAPixel, VariableLengthVectorPixel]?

Luis Ibanez luis.ibanez at kitware.com
Fri Jul 10 10:01:02 EDT 2009


Hi Gaetan,


I'm having trouble finding the patch that you attached to this email.

Could you please resend it ?


    Thanks


       Luis



----------------------------
Gaëtan Lehmann wrote:
> 
> Dear developers,
> 
> I'm trying to fix the last warnings reported by WrapITK builds. Three  
> of them are about a non wrapped type, which can be fixed by wrapping  
> those types.
> 
>   http://www.cdash.org/CDash/viewBuildError.php?type=1&buildid=364485
> 
> I'm not sure that the method signature is the right one, though, so a  
> better fix may be to fix the methods which are triggering those  warnings.
> 
> max( const Self & a ) and min( const Self & a ) in those file are  
> returning a value of type RGBPixel/RGBAPixel/ 
> VariableLengthVector<double> for all the ValueType. NumericTraits<  
> RGBPixel< unsigned char > >::max( const Self & a ) returns a RGBPixel<  
> double >.
> 
>   Is it intentional to not return a value of type Self?
> 
> I think those methods were added in 
> http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkNumericTraitsVariableLengthVectorPixel.h?root=Insight&r1=1.3&r2=1.4 
>  and propagated in the other files later.
> 
> ITK builds fine with the attached patch which change the signature of  
> min and max in those files, and all the tests are green.
> 
> Regards,
> 
> Gaëtan
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.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-developers


More information about the Insight-developers mailing list