18 #ifndef __itkRGBAPixel_h
19 #define __itkRGBAPixel_h
28 #include "vnl/vnl_math.h"
58 template<
typename TComponent =
unsigned short >
70 itkStaticConstMacro(
Length,
unsigned int, 4);
85 template<
typename TRGBAPixelValueType >
118 static_cast< double >( this->
operator[](0) )
119 * static_cast< double >( this->
operator[](0) )
120 + static_cast< double >( this->
operator[](1) )
121 * static_cast< double >( this->
operator[](1) )
122 + static_cast< double >( this->
operator[](2) )
123 * static_cast< double >( this->
operator[](2) ) ) );
167 template<
typename TComponent >
169 const RGBAPixel< TComponent > & c);
171 template<
typename TComponent >
173 RGBAPixel< TComponent > & c);
186 #ifndef ITK_MANUAL_INSTANTIATION
187 #include "itkRGBAPixel.hxx"
RGBAPixel(const ComponentType &r)
void Set(ComponentType red, ComponentType green, ComponentType blue, ComponentType alpha)
Self operator*(const ComponentType &f) const
const ComponentType & GetBlue(void) const
RGBAPixel(const ComponentType r[4])
reference operator[](short index)
Represent Red, Green, Blue and Alpha components for color images.
std::istream & operator>>(std::istream &is, Point< T, NPointDimension > &v)
Self operator-(const Self &vec) const
const Self & operator+=(const Self &vec)
Self operator+(const Self &vec) const
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
void SetRed(ComponentType red)
void Fill(const ValueType &)
static const unsigned int Length
Simulate a standard C array with copy semnatics.
FixedArray< TComponent, 4 > BaseArray
NumericTraits< ComponentType >::RealType LuminanceType
const ComponentType & GetRed(void) const
RGBAPixel & operator=(const Self &r)
bool operator==(const Self &vec) const
void SetGreen(ComponentType green)
void SetBlue(ComponentType blue)
LuminanceType GetLuminance(void) const
static const unsigned int Dimension
ComponentType GetScalarValue() const
void SetAlpha(ComponentType alpha)
const ComponentType & GetAlpha(void) const
static unsigned int GetNumberOfComponents()
FixedArray< TComponent, 4 > Superclass
const Self & operator-=(const Self &vec)
RGBAPixel(const RGBAPixel< TRGBAPixelValueType > &r)
ComponentType GetNthComponent(int c) const
void SetNthComponent(int c, const ComponentType &v)
const ComponentType & GetGreen(void) const