[Insight-users] Status of NumericTraits<RGBPixel<unsigned char> >

Julien Lamy julien.lamy at ircad.u-strasbg.fr
Mon Jan 3 11:59:27 EST 2005


Le lundi 03 janvier 2005 à 11:34 -0500, Julien Jomier a écrit :
> Hi Julien,
> 
> Just after the 1.8 version, we have added the function ZeroValue() in 
> the itkNumericTraitsRGBPixel.h (the .cxx is not used at all in ITK and 
> might be removed).
> 
> Now, the correct way to assign a Zero value to a pixel is to do:
> m_DefaultPixelValue = NumericTraits<OutputPixelType>::ZeroValue();
> 
> I'm not sure if the One() function works for the moment...
> Let us know if this modification works for you,

That's was I was looking for, thanks. However, what was the rationale
behind not implementing the Zero/One data member for
NumericTraits<RGBPixel>, which could have allowed to keep existing code
generic w.r.t pixel type without modification ?
-- 
Julien



More information about the Insight-users mailing list