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

Julien Jomier jjomier at cs.unc.edu
Mon Jan 3 11:34:29 EST 2005


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,

Julien

Julien Lamy wrote:
> Hello,
> What is the status of the class NumericTraits<RGBPixel<unsigned char>> ?
> In the 1.8.1 release, it is not included in the compilation, and is not
> compilable as is (there's a #include directive missing in the cxx).
> Moreover, the Zero and One traits are not consistent with the other
> specializations of NumericTraits : they are member functions for
> RGBPixel and member variables for the others.
> Is this a feature ?
> If not, I have written a version that respects the Zero/One convention
> of integer types. Patch available if anybody is interested.


More information about the Insight-users mailing list