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);
188 #ifndef ITK_MANUAL_INSTANTIATION
189 #include "itkRGBPixel.hxx"