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

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Mon Jul 6 18:06:26 EDT 2009


Le 26 juin 09 à 09:51, Gaëtan Lehmann a écrit :

>
> 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.


No idea why this type is returned in max and min in those traits?
No objection to change it?

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/mailman/private/insight-developers/attachments/20090707/6e8f7c43/attachment.pgp>


More information about the Insight-developers mailing list