|
ITK
5.2.0
Insight Toolkit
|
Go to the documentation of this file.
57 template <
typename TComponent =
unsigned short>
72 static constexpr
unsigned int Length = 3;
83 operator=(
const RGBPixel &) =
default;
93 template <
typename TRGBPixelValueType>
103 template <
typename TRGBPixelValueType>
107 BaseArray::operator=(r);
113 operator=(
const ComponentType r[3]);
120 Self
operator*(
const ComponentType & r)
const;
122 operator/(
const ComponentType & r)
const;
127 operator+=(
const Self & r);
129 operator-=(
const Self & r);
131 operator*=(
const ComponentType & r);
133 operator/=(
const ComponentType & r);
154 return this->operator[](c);
161 return static_cast<ComponentType>(
162 std::sqrt(static_cast<double>(this->
operator[](0)) * static_cast<double>(this->
operator[](0)) +
163 static_cast<double>(this->
operator[](1)) * static_cast<double>(this->
operator[](1)) +
164 static_cast<double>(this->
operator[](2)) * static_cast<double>(this->
operator[](2))));
171 this->operator[](c) = v;
178 this->operator[](0) = red;
185 this->operator[](1) = green;
192 this->operator[](2) = blue;
199 this->operator[](0) = red;
200 this->operator[](1) = green;
201 this->operator[](2) = blue;
206 const ComponentType &
209 return this->operator[](0);
213 const ComponentType &
216 return this->operator[](1);
220 const ComponentType &
223 return this->operator[](2);
228 GetLuminance()
const;
231 template <
typename TComponent>
233 operator<<(std::ostream & os,
const RGBPixel<TComponent> & c);
235 template <
typename TComponent>
237 operator>>(std::istream & is, RGBPixel<TComponent> & c);
239 template <
typename T>
259 #ifndef ITK_MANUAL_INSTANTIATION
260 # include "itkRGBPixel.hxx"
static unsigned int GetNumberOfComponents()
Represent Red, Green and Blue components for color images.
bool operator<(const Index< VDimension > &one, const Index< VDimension > &two)
const ComponentType & GetRed() const
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
void Set(ComponentType red, ComponentType green, ComponentType blue)
typename NumericTraits< ComponentType >::RealType LuminanceType
Self & operator=(const RGBPixel< TRGBPixelValueType > &r)
void swap(Array< T > &a, Array< T > &b)
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
RGBPixel(const ComponentType &r)
const ComponentType & GetGreen() const
ComponentType GetScalarValue() const
const ComponentType & GetBlue() const
std::istream & operator>>(std::istream &is, Point< T, NPointDimension > &vct)
RGBPixel(const ComponentType r[3])
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
Simulate a standard C array with copy semantics.
CovariantVector< T, NVectorDimension > operator*(const T &scalar, const CovariantVector< T, NVectorDimension > &v)
void SetGreen(ComponentType green)
RGBPixel(const RGBPixel< TRGBPixelValueType > &r)
void SetNthComponent(int c, const ComponentType &v)
ComponentType GetNthComponent(int c) const
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
void swap(FixedArray &other)
ConstNeighborhoodIterator< TImage > operator+(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
void SetRed(ComponentType red)
constexpr unsigned int Dimension
void SetBlue(ComponentType blue)