18 #ifndef __itkLabelToRGBFunctor_h
19 #define __itkLabelToRGBFunctor_h
40 template<
class TLabel,
class TRGBPixel >
51 typedef typename TRGBPixel::ValueType ValueType;
115 void AddColor(
unsigned char r,
unsigned char g,
unsigned char b)
118 typedef typename TRGBPixel::ValueType ValueType;
120 ValueType m = NumericTraits< ValueType >::max();
122 rgbPixel.Set( static_cast< ValueType >( static_cast< double >( r ) / 255 * m ),
123 static_cast< ValueType >( static_cast< double >( g ) / 255 * m ),
124 static_cast< ValueType >( static_cast< double >( b ) / 255 * m ) );
149 return !(*
this != other);