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

Julien Jomier jjomier at cs.unc.edu
Sun Jan 9 12:30:46 EST 2005


Hi Julien,

You are right, there is no reason to have ZeroValue(). I've replaced 
ZeroValue() by the data member Zero and fixed the 
itkNumericTraitsRGBPixel.cxx accordingly.

Thanks for the input,

Julien

Julien Lamy wrote:
> 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 ?


More information about the Insight-users mailing list