18 #ifndef itkRGBAPixel_h
19 #define itkRGBAPixel_h
58 template<
typename TComponent =
unsigned short >
70 itkStaticConstMacro(Length,
unsigned int, 4);
85 template<
typename TRGBAPixelValueType >
93 RGBAPixel & operator=(
const ComponentType r[4]);
100 const Self & operator+=(
const Self & vec);
102 const Self & operator-=(
const Self & vec);
104 Self
operator *(
const ComponentType & f)
const;
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) ) ) );
144 this->operator[](0) = red;
145 this->operator[](1) = green;
146 this->operator[](2) = blue;
147 this->operator[](3) = alpha;
164 LuminanceType GetLuminance()
const;
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)
const ComponentType & GetBlue(void) const
RGBAPixel(const ComponentType r[4])
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
Represent Red, Green, Blue and Alpha components for color images.
std::istream & operator>>(std::istream &is, Point< T, NPointDimension > &v)
CovariantVector< T, NVectorDimension > operator*(const T &scalar, const CovariantVector< T, NVectorDimension > &v)
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
void SetRed(ComponentType red)
Simulate a standard C array with copy semnatics.
FixedArray< TComponent, 4 > BaseArray
NumericTraits< ComponentType >::RealType LuminanceType
const ComponentType & GetRed(void) const
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
void SetGreen(ComponentType green)
void SetBlue(ComponentType blue)
const unsigned int Dimension
ComponentType GetScalarValue() const
void SetAlpha(ComponentType alpha)
const ComponentType & GetAlpha(void) const
static unsigned int GetNumberOfComponents()
FixedArray< TComponent, 4 > Superclass
RGBAPixel(const RGBAPixel< TRGBAPixelValueType > &r)
ComponentType GetNthComponent(int c) const
void SetNthComponent(int c, const ComponentType &v)
bool ITKIOXML_EXPORT operator==(itk::FancyString &s, const std::string &)
const ComponentType & GetGreen(void) const