|
ITK
6.0.0
Insight Toolkit
|
Go to the documentation of this file.
57 template <
typename TComponent =
unsigned short>
72 static constexpr
unsigned int Length = 3;
80 #ifdef ITK_FUTURE_LEGACY_REMOVE
92 #if defined(ITK_LEGACY_REMOVE)
102 RGBPixel(
const ComponentType & r) { this->Fill(r); }
106 template <
typename TRGBPixelValueType>
116 template <
typename TRGBPixelValueType>
120 BaseArray::operator=(r);
126 operator=(
const ComponentType r[3]);
134 operator*(
const ComponentType & r)
const;
136 operator/(
const ComponentType & r)
const;
141 operator+=(
const Self & r);
143 operator-=(
const Self & r);
145 operator*=(
const ComponentType & r);
147 operator/=(
const ComponentType & r);
168 return this->operator[](c);
175 return static_cast<ComponentType>(
176 std::sqrt(static_cast<double>(this->
operator[](0)) * static_cast<double>(this->
operator[](0)) +
177 static_cast<double>(this->
operator[](1)) * static_cast<double>(this->
operator[](1)) +
178 static_cast<double>(this->
operator[](2)) * static_cast<double>(this->
operator[](2))));
185 this->operator[](c) = v;
192 this->operator[](0) = red;
199 this->operator[](1) = green;
206 this->operator[](2) = blue;
213 this->operator[](0) = red;
214 this->operator[](1) = green;
215 this->operator[](2) = blue;
220 const ComponentType &
223 return this->operator[](0);
227 const ComponentType &
230 return this->operator[](1);
234 const ComponentType &
237 return this->operator[](2);
242 GetLuminance()
const;
245 template <
typename TComponent>
247 operator<<(std::ostream & os,
const RGBPixel<TComponent> & c);
249 template <
typename TComponent>
251 operator>>(std::istream & is, RGBPixel<TComponent> & c);
253 template <
typename T>
273 #ifndef ITK_MANUAL_INSTANTIATION
274 # 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
CovariantVector< T, VVectorDimension > operator*(const T &scalar, const CovariantVector< T, VVectorDimension > &v)
void Set(ComponentType red, ComponentType green, ComponentType blue)
typename NumericTraits< ComponentType >::RealType LuminanceType
Self & operator=(const RGBPixel< TRGBPixelValueType > &r)
ConstNeighborhoodIterator< TImage > operator-(const ConstNeighborhoodIterator< TImage > &it, const typename ConstNeighborhoodIterator< TImage >::OffsetType &ind)
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
RGBPixel(const ComponentType &r)
const ComponentType & GetGreen() const
ComponentType GetScalarValue() const
const ComponentType & GetBlue() const
RGBPixel(const ComponentType r[3])
bool operator==(const Index< VDimension > &one, const Index< VDimension > &two)
Simulate a standard C array with copy semantics.
void SetGreen(ComponentType green)
RGBPixel(const RGBPixel< TRGBPixelValueType > &r)
void SetNthComponent(int c, const ComponentType &v)
ComponentType GetNthComponent(int c) const
void swap(Array< T > &a, Array< T > &b) noexcept
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
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)
std::istream & operator>>(std::istream &is, Point< T, VPointDimension > &vct)