57 template<
typename TComponent =
unsigned short >
72 static constexpr
unsigned int Length = 3;
91 template<
typename TRGBPixelValueType >
97 template<
typename TRGBPixelValueType >
100 BaseArray::operator=(r);
105 Self & operator=(
const ComponentType r[3]);
112 Self
operator *(
const ComponentType & f)
const;
113 Self operator /(
const ComponentType & f)
const;
117 const Self & operator+=(
const Self & vec);
118 const Self & operator-=(
const Self & vec);
119 const Self & operator*=(
const ComponentType & f);
120 const Self & operator/=(
const ComponentType & f);
138 static_cast< double >( this->
operator[](0) )
139 * static_cast< double >( this->
operator[](0) )
140 + static_cast< double >( this->
operator[](1) )
141 * static_cast< double >( this->
operator[](1) )
142 + static_cast< double >( this->
operator[](2) )
143 * static_cast< double >( this->
operator[](2) ) ) );
161 this->operator[](0) = red;
162 this->operator[](1) = green;
163 this->operator[](2) = blue;
177 LuminanceType GetLuminance()
const;
180 template<
typename TComponent >
181 std::ostream & operator<<(std::ostream & os, const RGBPixel< TComponent > & c);
183 template<
typename TComponent >
184 std::istream &
operator>>(std::istream & is, RGBPixel< TComponent > & c);
205 #ifndef ITK_MANUAL_INSTANTIATION
206 #include "itkRGBPixel.hxx"
void swap(FixedArray &other)
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
Define numeric traits for std::vector.
std::istream & operator>>(std::istream &is, Point< T, NPointDimension > &v)
RGBPixel(const ComponentType r[3])
CovariantVector< T, NVectorDimension > operator*(const T &scalar, const CovariantVector< T, NVectorDimension > &v)
void Set(ComponentType red, ComponentType green, ComponentType blue)
RGBPixel(const RGBPixel< TRGBPixelValueType > &r)
constexpr unsigned int Dimension
void SetNthComponent(int c, const ComponentType &v)
Simulate a standard C array with copy semnatics.
void swap(Array< T > &a, Array< T > &b)
const ComponentType & GetBlue() const
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
const ComponentType & GetGreen() const
ComponentType GetScalarValue() const
RGBPixel(const ComponentType &r)
Represent Red, Green and Blue components for color images.
Self & operator=(const RGBPixel< TRGBPixelValueType > &r)
ComponentType GetNthComponent(int c) const
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
void SetGreen(ComponentType green)
const ComponentType & GetRed() const
static unsigned int GetNumberOfComponents()
typename NumericTraits< ComponentType >::RealType LuminanceType
void SetRed(ComponentType red)
void SetBlue(ComponentType blue)