18 #ifndef __itkRGBPixel_h
19 #define __itkRGBPixel_h
28 #include "vnl/vnl_math.h"
57 template<
typename TComponent =
unsigned short >
72 itkStaticConstMacro(
Length,
unsigned int, 3);
85 template<
class TRGBPixelValueType >
91 template<
class TRGBPixelValueType >
126 static_cast< double >( this->
operator[](0) )
127 * static_cast< double >( this->
operator[](0) )
128 + static_cast< double >( this->
operator[](1) )
129 * static_cast< double >( this->
operator[](1) )
130 + static_cast< double >( this->
operator[](2) )
131 * static_cast< double >( this->
operator[](2) ) ) );
168 template<
typename TComponent >
169 ITK_EXPORT std::ostream &
operator<<(std::ostream & os,
170 const RGBPixel< TComponent > & c);
172 template<
typename TComponent >
173 ITK_EXPORT std::istream &
operator>>(std::istream & is,
174 RGBPixel< TComponent > & c);
178 #define ITK_TEMPLATE_RGBPixel(_, EXPORT, TypeX, TypeY) \
181 _( 1 ( class EXPORT RGBPixel< ITK_TEMPLATE_1 TypeX > ) ) \
182 namespace Templates \
184 typedef RGBPixel< ITK_TEMPLATE_1 TypeX > RGBPixel##TypeY; \
188 #if ITK_TEMPLATE_EXPLICIT
189 #include "Templates/itkRGBPixel+-.h"
203 #include "itkRGBPixel.hxx"