ITK
5.0.0
Insight Segmentation and Registration Toolkit
|
#include <itkRGBPixel.h>
Represent Red, Green and Blue components for color images.
This class is templated over the representation used for each component.
The following syntax for assigning an index is allowed/suggested:
Since RGBPixel is a subclass of Array, you can access its components as: pixel[0], pixel[1], pixel[2]
Definition at line 58 of file itkRGBPixel.h.
Public Types | |
using | BaseArray = FixedArray< TComponent, 3 > |
using | ComponentType = TComponent |
using | LuminanceType = typename NumericTraits< ComponentType >::RealType |
using | Self = RGBPixel |
using | Superclass = FixedArray< TComponent, 3 > |
Public Types inherited from itk::FixedArray< TComponent, 3 > | |
typedef ValueType | CArray [VLength] |
using | const_pointer = const ValueType * |
using | const_reference = const ValueType & |
using | ConstIterator = const ValueType * |
using | Iterator = ValueType * |
using | pointer = ValueType * |
using | reference = ValueType & |
using | SizeType = unsigned int |
using | ValueType = TComponent |
Public Member Functions | |
const ComponentType & | GetBlue () const |
const ComponentType & | GetGreen () const |
LuminanceType | GetLuminance () const |
ComponentType | GetNthComponent (int c) const |
const ComponentType & | GetRed () const |
ComponentType | GetScalarValue () const |
bool | operator< (const Self &vec) const |
Self & | operator= (const ComponentType r[3]) |
bool | operator== (const Self &vec) const |
RGBPixel (const ComponentType &r) | |
void | SetBlue (ComponentType blue) |
void | SetGreen (ComponentType green) |
void | SetNthComponent (int c, const ComponentType &v) |
void | SetRed (ComponentType red) |
RGBPixel () | |
RGBPixel (const RGBPixel &)=default | |
RGBPixel (RGBPixel &&)=default | |
RGBPixel & | operator= (const RGBPixel &)=default |
RGBPixel & | operator= (RGBPixel &&)=default |
~RGBPixel ()=default | |
template<typename TRGBPixelValueType > | |
RGBPixel (const RGBPixel< TRGBPixelValueType > &r) | |
RGBPixel (const ComponentType r[3]) | |
template<typename TRGBPixelValueType > | |
Self & | operator= (const RGBPixel< TRGBPixelValueType > &r) |
Self | operator+ (const Self &vec) const |
Self | operator- (const Self &vec) const |
Self | operator* (const ComponentType &f) const |
Self | operator/ (const ComponentType &f) const |
const Self & | operator+= (const Self &vec) |
const Self & | operator-= (const Self &vec) |
const Self & | operator*= (const ComponentType &f) |
const Self & | operator/= (const ComponentType &f) |
void | Set (ComponentType red, ComponentType green, ComponentType blue) |
Public Member Functions inherited from itk::FixedArray< TComponent, 3 > | |
Iterator | Begin () |
ConstIterator | Begin () const |
Iterator | End () |
ConstIterator | End () const |
void | Fill (const ValueType &) |
FixedArray (const TScalarValue *r) | |
ValueType * | GetDataPointer () |
const ValueType * | GetDataPointer () const |
bool | operator!= (const FixedArray &r) const |
FixedArray & | operator= (const ValueType r[VLength]) |
bool | operator== (const FixedArray &r) const |
ReverseIterator | rBegin () |
ConstReverseIterator | rBegin () const |
ReverseIterator | rEnd () |
ConstReverseIterator | rEnd () const |
SizeType | Size () const |
void | swap (FixedArray &other) |
FixedArray ()=default | |
FixedArray (const FixedArray &)=default | |
FixedArray (FixedArray &&)=default | |
FixedArray & | operator= (const FixedArray &)=default |
FixedArray & | operator= (FixedArray &&)=default |
~FixedArray ()=default | |
FixedArray (const ValueType r[VLength]) | |
FixedArray (const ValueType &) | |
FixedArray (const FixedArray< TFixedArrayValueType, VLength > &r) | |
FixedArray & | operator= (const FixedArray< TFixedArrayValueType, VLength > &r) |
reference | operator[] (short index) |
const_reference | operator[] (short index) const |
reference | operator[] (unsigned short index) |
const_reference | operator[] (unsigned short index) const |
reference | operator[] (int index) |
const_reference | operator[] (int index) const |
reference | operator[] (unsigned int index) |
const_reference | operator[] (unsigned int index) const |
reference | operator[] (long index) |
const_reference | operator[] (long index) const |
reference | operator[] (unsigned long index) |
const_reference | operator[] (unsigned long index) const |
reference | operator[] (long long index) |
const_reference | operator[] (long long index) const |
reference | operator[] (unsigned long long index) |
const_reference | operator[] (unsigned long long index) const |
void | SetElement (unsigned short index, const_reference value) |
const_reference | GetElement (unsigned short index) const |
Static Public Member Functions | |
static unsigned int | GetNumberOfComponents () |
Static Public Member Functions inherited from itk::FixedArray< TComponent, 3 > | |
static FixedArray | Filled (const ValueType &) |
Static Public Attributes | |
static constexpr unsigned int | Dimension = 3 |
static constexpr unsigned int | Length = 3 |
Static Public Attributes inherited from itk::FixedArray< TComponent, 3 > | |
static constexpr unsigned int | Dimension |
static constexpr unsigned int | Length |
using itk::RGBPixel< TComponent >::BaseArray = FixedArray< TComponent, 3 > |
Convenience type alias.
Definition at line 66 of file itkRGBPixel.h.
using itk::RGBPixel< TComponent >::ComponentType = TComponent |
Define the component type.
Definition at line 75 of file itkRGBPixel.h.
using itk::RGBPixel< TComponent >::LuminanceType = typename NumericTraits< ComponentType >::RealType |
Definition at line 76 of file itkRGBPixel.h.
using itk::RGBPixel< TComponent >::Self = RGBPixel |
Standard class type aliases.
Definition at line 62 of file itkRGBPixel.h.
using itk::RGBPixel< TComponent >::Superclass = FixedArray< TComponent, 3 > |
Definition at line 63 of file itkRGBPixel.h.
|
inline |
Default constructors
Definition at line 79 of file itkRGBPixel.h.
|
default |
Default constructors
|
default |
Default constructors
|
default |
Default constructors
|
inline |
Constructor to fill Red=Blug=Green= r.
Definition at line 88 of file itkRGBPixel.h.
|
inline |
Pass-through constructor for the Array base class.
Definition at line 92 of file itkRGBPixel.h.
|
inline |
Pass-through constructor for the Array base class.
Definition at line 93 of file itkRGBPixel.h.
|
inline |
Get the Blue component.
Definition at line 174 of file itkRGBPixel.h.
Referenced by itk::BluePixelAccessor< T >::Get().
|
inline |
Get the Green component.
Definition at line 171 of file itkRGBPixel.h.
Referenced by itk::GreenPixelAccessor< T >::Get().
LuminanceType itk::RGBPixel< TComponent >::GetLuminance | ( | ) | const |
Get Luminance out of RGB
|
inline |
Return the value for the Nth component.
Definition at line 132 of file itkRGBPixel.h.
|
inlinestatic |
Return the number of components.
Definition at line 129 of file itkRGBPixel.h.
|
inline |
Get the Red component.
Definition at line 168 of file itkRGBPixel.h.
Referenced by itk::RedPixelAccessor< T >::Get().
|
inline |
Return the Euclidean norm of the vector defined by the RGB components.
Definition at line 135 of file itkRGBPixel.h.
Self itk::RGBPixel< TComponent >::operator* | ( | const ComponentType & | f | ) | const |
const Self& itk::RGBPixel< TComponent >::operator*= | ( | const ComponentType & | f | ) |
Arithmetic-assigment operators.
Self itk::RGBPixel< TComponent >::operator+ | ( | const Self & | vec | ) | const |
const Self& itk::RGBPixel< TComponent >::operator+= | ( | const Self & | vec | ) |
Arithmetic-assigment operators.
Self itk::RGBPixel< TComponent >::operator- | ( | const Self & | vec | ) | const |
const Self& itk::RGBPixel< TComponent >::operator-= | ( | const Self & | vec | ) |
Arithmetic-assigment operators.
Self itk::RGBPixel< TComponent >::operator/ | ( | const ComponentType & | f | ) | const |
const Self& itk::RGBPixel< TComponent >::operator/= | ( | const ComponentType & | f | ) |
Arithmetic-assigment operators.
bool itk::RGBPixel< TComponent >::operator< | ( | const Self & | vec | ) | const |
Implements strict weak ordering. For use in STL, e.g. std::map.
|
default |
Default constructors
|
default |
Default constructors
|
inline |
Pass-through assignment operator for the Array base class.
Definition at line 98 of file itkRGBPixel.h.
Self& itk::RGBPixel< TComponent >::operator= | ( | const ComponentType | r[3] | ) |
bool itk::RGBPixel< TComponent >::operator== | ( | const Self & | vec | ) | const |
|
inline |
Set the three components.
Definition at line 159 of file itkRGBPixel.h.
|
inline |
Set the Blue component.
Definition at line 156 of file itkRGBPixel.h.
Referenced by itk::BluePixelAccessor< T >::Set().
|
inline |
Set the Green component.
Definition at line 153 of file itkRGBPixel.h.
Referenced by itk::GreenPixelAccessor< T >::Set().
|
inline |
Set the Nth component to v.
Definition at line 147 of file itkRGBPixel.h.
|
inline |
Set the Red component.
Definition at line 150 of file itkRGBPixel.h.
Referenced by itk::RedPixelAccessor< T >::Set().
|
static |
Dimension of the vector space.
Definition at line 69 of file itkRGBPixel.h.
|
static |
Length of the pixel.
Definition at line 72 of file itkRGBPixel.h.