Represent Red, Green and Blue component for color images. More...
#include <itkRGBPixel.h>
Public Types | |
typedef FixedArray< TComponent, 3 > | BaseArray |
typedef ValueType | CArray [VLength] |
typedef TComponent | ComponentType |
typedef const ValueType * | const_pointer |
typedef const ValueType & | const_reference |
typedef const ValueType * | ConstIterator |
typedef ValueType * | Iterator |
typedef ValueType * | pointer |
typedef ValueType & | reference |
typedef RGBPixel | Self |
typedef unsigned int | SizeType |
typedef FixedArray< TComponent, 3 > | Superclass |
typedef Superclass::ValueType | ValueType |
Public Member Functions | |
const ComponentType & | GetBlue (void) const |
const ComponentType & | GetGreen (void) const |
ComponentType | GetLuminance (void) const |
ComponentType | GetNthComponent (int c) const |
const ComponentType & | GetRed (void) 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) | |
RGBPixel () | |
void | Set (ComponentType red, ComponentType green, ComponentType blue) |
void | SetBlue (ComponentType blue) |
void | SetGreen (ComponentType green) |
void | SetNthComponent (int c, const ComponentType &v) |
void | SetRed (ComponentType red) |
template<class TRGBPixelValueType > | |
RGBPixel (const RGBPixel< TRGBPixelValueType > &r) | |
RGBPixel (const ComponentType r[3]) | |
template<class TRGBPixelValueType > | |
Self & | operator= (const RGBPixel< TRGBPixelValueType > &r) |
Self | operator+ (const Self &vec) const |
Self | operator- (const Self &vec) const |
const Self & | operator+= (const Self &vec) |
const Self & | operator-= (const Self &vec) |
Self | operator* (const ComponentType &f) const |
bool | operator== (const FixedArray &r) const |
bool | operator!= (const FixedArray &r) const |
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 |
void | SetElement (unsigned short index, const_reference value) |
const_reference | GetElement (unsigned short index) const |
ValueType * | GetDataPointer () |
const ValueType * | GetDataPointer () const |
Iterator | Begin () |
ConstIterator | Begin () const |
Iterator | End () |
ConstIterator | End () const |
ReverseIterator | rBegin () |
ConstReverseIterator | rBegin () const |
ReverseIterator | rEnd () |
ConstReverseIterator | rEnd () const |
SizeType | Size () const |
void | Fill (const ValueType &) |
Static Public Member Functions | |
static FixedArray | Filled (const ValueType &) |
static unsigned int | GetNumberOfComponents () |
Static Public Attributes | |
static const unsigned int | Dimension = 3 |
static const unsigned int | Length = 3 |
Represent Red, Green and Blue component for color images.
This class is templated over the representation used for each component.
The following syntax for assigning an index is allowed/suggested:
RGBPixel<float> pixel; pixel = 1.0f, 0.0f, .5f; RGBPixel<char> pixelArray[2]; pixelArray[0] = 255, 255, 255; pixelArray[1] = 255, 255, 244;
Since RGBPixel is a subclass of Array, you can access its components as: pixel[0], pixel[1], pixel[2]
DataRepresentation/Image/RGBImage.cxx, Examples/Iterators/ImageLinearIteratorWithIndex.cxx, and Iterators/ImageRegionIteratorWithIndex.cxx.
Definition at line 51 of file itkRGBPixel.h.
typedef FixedArray<TComponent, 3> itk::RGBPixel< TComponent >::BaseArray |
Convenience typedefs.
Definition at line 59 of file itkRGBPixel.h.
typedef ValueType itk::FixedArray< TComponent , VLength >::CArray[VLength] [inherited] |
A type representing the C-array version of this FixedArray.
Definition at line 77 of file itkFixedArray.h.
typedef TComponent itk::RGBPixel< TComponent >::ComponentType |
Define the component type.
Definition at line 78 of file itkRGBPixel.h.
typedef const ValueType* itk::FixedArray< TComponent , VLength >::const_pointer [inherited] |
A const pointer to the ValueType.
Definition at line 129 of file itkFixedArray.h.
typedef const ValueType& itk::FixedArray< TComponent , VLength >::const_reference [inherited] |
A const reference to the ValueType.
Definition at line 135 of file itkFixedArray.h.
typedef const ValueType* itk::FixedArray< TComponent , VLength >::ConstIterator [inherited] |
A const iterator through the array.
Definition at line 83 of file itkFixedArray.h.
typedef ValueType* itk::FixedArray< TComponent , VLength >::Iterator [inherited] |
An iterator through the array.
Definition at line 80 of file itkFixedArray.h.
typedef ValueType* itk::FixedArray< TComponent , VLength >::pointer [inherited] |
A pointer to the ValueType.
Definition at line 126 of file itkFixedArray.h.
typedef ValueType& itk::FixedArray< TComponent , VLength >::reference [inherited] |
A reference to the ValueType.
Definition at line 132 of file itkFixedArray.h.
typedef RGBPixel itk::RGBPixel< TComponent >::Self |
Standard class typedefs.
Definition at line 55 of file itkRGBPixel.h.
typedef unsigned int itk::FixedArray< TComponent , VLength >::SizeType [inherited] |
Definition at line 137 of file itkFixedArray.h.
typedef FixedArray<TComponent, 3> itk::RGBPixel< TComponent >::Superclass |
Definition at line 56 of file itkRGBPixel.h.
typedef Superclass::ValueType itk::RGBPixel< TComponent >::ValueType |
The element type stored at each location in the FixedArray.
Reimplemented from itk::FixedArray< TComponent, 3 >.
Definition at line 79 of file itkRGBPixel.h.
itk::RGBPixel< TComponent >::RGBPixel | ( | ) | [inline] |
Default constructor has nothing to do
Definition at line 82 of file itkRGBPixel.h.
itk::RGBPixel< TComponent >::RGBPixel | ( | const ComponentType & | r | ) | [inline] |
Constructor to fill Red=Blug=Green= r.
Definition at line 85 of file itkRGBPixel.h.
itk::RGBPixel< TComponent >::RGBPixel | ( | const RGBPixel< TRGBPixelValueType > & | r | ) | [inline] |
Pass-through constructor for the Array base class.
Definition at line 89 of file itkRGBPixel.h.
itk::RGBPixel< TComponent >::RGBPixel | ( | const ComponentType | r[3] | ) | [inline] |
Pass-through constructor for the Array base class.
Definition at line 90 of file itkRGBPixel.h.
Iterator itk::FixedArray< TComponent , VLength >::Begin | ( | void | ) | [inherited] |
Get various iterators to the array.
ConstIterator itk::FixedArray< TComponent , VLength >::Begin | ( | void | ) | const [inherited] |
Get various iterators to the array.
Iterator itk::FixedArray< TComponent , VLength >::End | ( | void | ) | [inherited] |
Get various iterators to the array.
ConstIterator itk::FixedArray< TComponent , VLength >::End | ( | void | ) | const [inherited] |
Get various iterators to the array.
void itk::FixedArray< TComponent , VLength >::Fill | ( | const ValueType & | ) | [inherited] |
Get various iterators to the array.
Referenced by itk::RGBPixel< TPixel >::RGBPixel().
static FixedArray itk::FixedArray< TComponent , VLength >::Filled | ( | const ValueType & | ) | [static, inherited] |
const ComponentType& itk::RGBPixel< TComponent >::GetBlue | ( | void | ) | const [inline] |
Get the Blue component.
Definition at line 155 of file itkRGBPixel.h.
Referenced by itk::BluePixelAccessor< T >::Get().
const ValueType* itk::FixedArray< TComponent , VLength >::GetDataPointer | ( | ) | const [inline, inherited] |
Return a pointer to the data.
Definition at line 223 of file itkFixedArray.h.
ValueType* itk::FixedArray< TComponent , VLength >::GetDataPointer | ( | ) | [inline, inherited] |
Return a pointer to the data.
Definition at line 222 of file itkFixedArray.h.
const_reference itk::FixedArray< TComponent , VLength >::GetElement | ( | unsigned short | index | ) | const [inline, inherited] |
Set/Get element methods are more convenient in wrapping languages
Definition at line 218 of file itkFixedArray.h.
const ComponentType& itk::RGBPixel< TComponent >::GetGreen | ( | void | ) | const [inline] |
Get the Green component.
Definition at line 152 of file itkRGBPixel.h.
Referenced by itk::GreenPixelAccessor< T >::Get().
ComponentType itk::RGBPixel< TComponent >::GetLuminance | ( | void | ) | const |
Get Luminance out of RGB
ComponentType itk::RGBPixel< TComponent >::GetNthComponent | ( | int | c | ) | const [inline] |
Return the value for the Nth component.
Definition at line 119 of file itkRGBPixel.h.
static unsigned int itk::RGBPixel< TComponent >::GetNumberOfComponents | ( | ) | [inline, static] |
Return the number of components.
Definition at line 116 of file itkRGBPixel.h.
const ComponentType& itk::RGBPixel< TComponent >::GetRed | ( | void | ) | const [inline] |
Get the Red component.
Definition at line 149 of file itkRGBPixel.h.
Referenced by itk::RedPixelAccessor< T >::Get().
ComponentType itk::RGBPixel< TComponent >::GetScalarValue | ( | ) | const [inline] |
Return the value for the Nth component.
Definition at line 123 of file itkRGBPixel.h.
bool itk::FixedArray< TComponent , VLength >::operator!= | ( | const FixedArray< TComponent, 3 > & | r | ) | const [inline, inherited] |
Operators == and != are used to compare whether two arrays are equal. Note that arrays are equal when the number of components (size) is the same, and each component value is equal.
Definition at line 194 of file itkFixedArray.h.
Self itk::RGBPixel< TComponent >::operator* | ( | const ComponentType & | f | ) | const |
Aritmetic operations between pixels. Return a new RGBPixel.
Self itk::RGBPixel< TComponent >::operator+ | ( | const Self & | vec | ) | const |
Aritmetic operations between pixels. Return a new RGBPixel.
const Self& itk::RGBPixel< TComponent >::operator+= | ( | const Self & | vec | ) |
Aritmetic operations between pixels. Return a new RGBPixel.
Self itk::RGBPixel< TComponent >::operator- | ( | const Self & | vec | ) | const |
Aritmetic operations between pixels. Return a new RGBPixel.
const Self& itk::RGBPixel< TComponent >::operator-= | ( | const Self & | vec | ) |
Aritmetic operations between pixels. Return a new RGBPixel.
bool itk::RGBPixel< TComponent >::operator< | ( | const Self & | vec | ) | const |
Self& itk::RGBPixel< TComponent >::operator= | ( | const ComponentType | r[3] | ) |
Self& itk::RGBPixel< TComponent >::operator= | ( | const RGBPixel< TRGBPixelValueType > & | r | ) | [inline] |
Pass-through assignment operator for the Array base class.
Definition at line 95 of file itkRGBPixel.h.
bool itk::RGBPixel< TComponent >::operator== | ( | const Self & | vec | ) | const |
bool itk::FixedArray< TComponent , VLength >::operator== | ( | const FixedArray< TComponent, 3 > & | r | ) | const [inherited] |
Operators == and != are used to compare whether two arrays are equal. Note that arrays are equal when the number of components (size) is the same, and each component value is equal.
const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned int | index | ) | const [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 208 of file itkFixedArray.h.
reference itk::FixedArray< TComponent , VLength >::operator[] | ( | long | index | ) | [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 209 of file itkFixedArray.h.
reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned long | index | ) | [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 211 of file itkFixedArray.h.
const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | int | index | ) | const [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 206 of file itkFixedArray.h.
reference itk::FixedArray< TComponent , VLength >::operator[] | ( | short | index | ) | [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 201 of file itkFixedArray.h.
Referenced by itk::RGBPixel< TPixel >::GetBlue(), itk::RGBPixel< TPixel >::GetGreen(), itk::RGBPixel< TPixel >::GetNthComponent(), itk::RGBPixel< TPixel >::GetRed(), itk::RGBPixel< TPixel >::Set(), itk::RGBPixel< TPixel >::SetBlue(), itk::RGBPixel< TPixel >::SetGreen(), itk::RGBPixel< TPixel >::SetNthComponent(), and itk::RGBPixel< TPixel >::SetRed().
const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | short | index | ) | const [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 202 of file itkFixedArray.h.
const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned long | index | ) | const [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 212 of file itkFixedArray.h.
reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned short | index | ) | [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 203 of file itkFixedArray.h.
const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned short | index | ) | const [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 204 of file itkFixedArray.h.
reference itk::FixedArray< TComponent , VLength >::operator[] | ( | unsigned int | index | ) | [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 207 of file itkFixedArray.h.
const_reference itk::FixedArray< TComponent , VLength >::operator[] | ( | long | index | ) | const [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 210 of file itkFixedArray.h.
reference itk::FixedArray< TComponent , VLength >::operator[] | ( | int | index | ) | [inline, inherited] |
Allow the FixedArray to be indexed normally. No bounds checking is done. The separate versions are a work-around for an integer conversion bug in Visual C++.
Definition at line 205 of file itkFixedArray.h.
ConstReverseIterator itk::FixedArray< TComponent , VLength >::rBegin | ( | ) | const [inherited] |
Get various iterators to the array.
ReverseIterator itk::FixedArray< TComponent , VLength >::rBegin | ( | ) | [inherited] |
Get various iterators to the array.
ConstReverseIterator itk::FixedArray< TComponent , VLength >::rEnd | ( | ) | const [inherited] |
Get various iterators to the array.
ReverseIterator itk::FixedArray< TComponent , VLength >::rEnd | ( | ) | [inherited] |
Get various iterators to the array.
void itk::RGBPixel< TComponent >::Set | ( | ComponentType | red, | |
ComponentType | green, | |||
ComponentType | blue | |||
) | [inline] |
Set the three components.
Definition at line 145 of file itkRGBPixel.h.
Referenced by itk::Function::ComposeRGB< TInputImage::PixelType >::operator()().
void itk::RGBPixel< TComponent >::SetBlue | ( | ComponentType | blue | ) | [inline] |
Set the Blue component.
Definition at line 142 of file itkRGBPixel.h.
Referenced by itk::BluePixelAccessor< T >::Set().
void itk::FixedArray< TComponent , VLength >::SetElement | ( | unsigned short | index, | |
const_reference | value | |||
) | [inline, inherited] |
Set/Get element methods are more convenient in wrapping languages
Definition at line 216 of file itkFixedArray.h.
void itk::RGBPixel< TComponent >::SetGreen | ( | ComponentType | green | ) | [inline] |
Set the Green component.
Definition at line 139 of file itkRGBPixel.h.
Referenced by itk::GreenPixelAccessor< T >::Set().
void itk::RGBPixel< TComponent >::SetNthComponent | ( | int | c, | |
const ComponentType & | v | |||
) | [inline] |
Set the Nth component to v.
Definition at line 132 of file itkRGBPixel.h.
void itk::RGBPixel< TComponent >::SetRed | ( | ComponentType | red | ) | [inline] |
Set the Red component.
Definition at line 136 of file itkRGBPixel.h.
Referenced by itk::RedPixelAccessor< T >::Set().
SizeType itk::FixedArray< TComponent , VLength >::Size | ( | void | ) | const [inherited] |
Get various iterators to the array.
const unsigned int itk::RGBPixel< TComponent >::Dimension = 3 [static] |
Dimension of the vector space.
Reimplemented from itk::FixedArray< TComponent, 3 >.
Definition at line 65 of file itkRGBPixel.h.
const unsigned int itk::RGBPixel< TComponent >::Length = 3 [static] |
Length of the pixel.
Reimplemented from itk::FixedArray< TComponent, 3 >.
Definition at line 73 of file itkRGBPixel.h.