![]() |
Orfeo Toolbox
3.16
|
Represent Red, Green and Blue component for color images. More...
#include <itkRGBPixel.h>
Inheritance diagram for itk::RGBPixel< TComponent >:
Collaboration diagram for itk::RGBPixel< TComponent >: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 | |
| RGBPixel () | |
| RGBPixel (const ComponentType &r) | |
| template<class TRGBPixelValueType > | |
| RGBPixel (const RGBPixel< TRGBPixelValueType > &r) | |
| RGBPixel (const ComponentType r[3]) | |
| Iterator | Begin () |
| ConstIterator | Begin () const |
| Iterator | End () |
| ConstIterator | End () const |
| void | Fill (const ValueType &) |
| const ComponentType & | GetBlue (void) const |
| ValueType * | GetDataPointer () |
| const ValueType * | GetDataPointer () const |
| const_reference | GetElement (unsigned short index) 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 FixedArray &r) const |
| Self | operator* (const ComponentType &f) const |
| Self | operator+ (const Self &vec) const |
| const Self & | operator+= (const Self &vec) |
| Self | operator- (const Self &vec) const |
| const Self & | operator-= (const Self &vec) |
| bool | operator< (const Self &vec) const |
| template<class TRGBPixelValueType > | |
| Self & | operator= (const RGBPixel< TRGBPixelValueType > &r) |
| Self & | operator= (const ComponentType r[3]) |
| bool | operator== (const Self &vec) 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 |
| ReverseIterator | rBegin () |
| ConstReverseIterator | rBegin () const |
| ReverseIterator | rEnd () |
| ConstReverseIterator | rEnd () const |
| void | Set (ComponentType red, ComponentType green, ComponentType blue) |
| void | SetBlue (ComponentType blue) |
| void | SetElement (unsigned short index, const_reference value) |
| void | SetGreen (ComponentType green) |
| void | SetNthComponent (int c, const ComponentType &v) |
| void | SetRed (ComponentType red) |
| SizeType | Size () const |
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]
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.
|
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 76 of file itkRGBPixel.h.
|
inherited |
A const pointer to the ValueType.
Definition at line 129 of file itkFixedArray.h.
|
inherited |
A const reference to the ValueType.
Definition at line 135 of file itkFixedArray.h.
|
inherited |
A const iterator through the array.
Definition at line 83 of file itkFixedArray.h.
|
inherited |
An iterator through the array.
Definition at line 80 of file itkFixedArray.h.
|
inherited |
A pointer to the ValueType.
Definition at line 126 of file itkFixedArray.h.
|
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.
|
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 77 of file itkRGBPixel.h.
|
inline |
Default constructor has nothing to do
Definition at line 80 of file itkRGBPixel.h.
|
inline |
Constructor to fill Red=Blug=Green= r.
Definition at line 82 of file itkRGBPixel.h.
|
inline |
Pass-through constructor for the Array base class.
Definition at line 86 of file itkRGBPixel.h.
|
inline |
Definition at line 87 of file itkRGBPixel.h.
|
inherited |
Get various iterators to the array.
Get an Iterator for the beginning of the FixedArray.
|
inherited |
Get a ConstIterator for the beginning of the FixedArray.
|
inherited |
Get an Iterator for the end of the FixedArray.
|
inherited |
Get a ConstIterator for the end of the FixedArray.
|
inherited |
Fill all elements of the array with the given value.
Referenced by itk::RGBPixel< TPixel >::RGBPixel().
|
staticinherited |
Return an FixedArray with all elements assigned to the given value.
|
inline |
Get the Blue component.
Definition at line 149 of file itkRGBPixel.h.
Referenced by itk::BluePixelAccessor< T >::Get(), and itk::BMPImageIO::Read().
|
inlineinherited |
Return a pointer to the data.
Definition at line 216 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 217 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 213 of file itkFixedArray.h.
|
inline |
Get the Green component.
Definition at line 146 of file itkRGBPixel.h.
Referenced by itk::GreenPixelAccessor< T >::Get(), and itk::BMPImageIO::Read().
| RGBPixel< T >::ComponentType itk::RGBPixel< T >::GetLuminance | ( | void | ) | const |
|
inline |
Return the value for the Nth component.
Definition at line 113 of file itkRGBPixel.h.
|
inlinestatic |
Return the number of components.
Definition at line 110 of file itkRGBPixel.h.
|
inline |
Get the Red component.
Definition at line 143 of file itkRGBPixel.h.
Referenced by RedChannelPixelAccessor::Get(), itk::RedPixelAccessor< T >::Get(), and itk::BMPImageIO::Read().
|
inline |
Return the value for the Nth component.
Definition at line 117 of file itkRGBPixel.h.
|
inlineinherited |
Definition at line 191 of file itkFixedArray.h.
| RGBPixel< T > itk::RGBPixel< T >::operator* | ( | const ComponentType & | r | ) | const |
Returns a temporary copy of a vector
Definition at line 109 of file itkRGBPixel.txx.
| RGBPixel< T > itk::RGBPixel< T >::operator+ | ( | const Self & | r | ) | const |
Aritmetic operations between pixels. Return a new RGBPixel.
Returns a temporary copy of a vector
Definition at line 45 of file itkRGBPixel.txx.
| const RGBPixel< T > & itk::RGBPixel< T >::operator+= | ( | const Self & | r | ) |
Returns a temporary copy of a vector
Definition at line 79 of file itkRGBPixel.txx.
| RGBPixel< T > itk::RGBPixel< T >::operator- | ( | const Self & | r | ) | const |
Returns a temporary copy of a vector
Definition at line 61 of file itkRGBPixel.txx.
| const RGBPixel< T > & itk::RGBPixel< T >::operator-= | ( | const Self & | r | ) |
Returns a temporary copy of a vector
Definition at line 94 of file itkRGBPixel.txx.
| bool itk::RGBPixel< T >::operator< | ( | const Self & | r | ) | const |
Returns the results from a test for less than (all components must be less than)
Definition at line 144 of file itkRGBPixel.txx.
|
inline |
Pass-through assignment operator for the Array base class.
Definition at line 91 of file itkRGBPixel.h.
| RGBPixel< T > & itk::RGBPixel< T >::operator= | ( | const ComponentType | r[3] | ) |
Assigment from a plain array
Definition at line 31 of file itkRGBPixel.txx.
| bool itk::RGBPixel< T >::operator== | ( | const Self & | r | ) | const |
Returns the results from a test for equality (all components must be equal)
Definition at line 126 of file itkRGBPixel.txx.
|
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.
Operator != compares different types of arrays.
|
inlineinherited |
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 197 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().
|
inlineinherited |
Definition at line 198 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 199 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 200 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 201 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 202 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 203 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 204 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 205 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 206 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 207 of file itkFixedArray.h.
|
inlineinherited |
Definition at line 208 of file itkFixedArray.h.
|
inherited |
Get a begin ReverseIterator.
|
inherited |
Get a begin ConstReverseIterator.
|
inherited |
Get an end ReverseIterator.
|
inherited |
Get an end ConstReverseIterator.
|
inline |
Set the three components.
Definition at line 139 of file itkRGBPixel.h.
Referenced by itk::Function::ComposeRGB< TInputImage::PixelType >::operator()(), and itk::ColorTable< TPixel >::UseDiscreteColors().
|
inline |
Set the Blue component.
Definition at line 136 of file itkRGBPixel.h.
Referenced by itk::bio::CellularAggregate< NSpaceDimension >::CellularAggregate(), main(), itk::operator>>(), itk::BMPImageIO::Read(), itk::BMPImageIO::ReadImageInformation(), and itk::BluePixelAccessor< T >::Set().
|
inlineinherited |
Set/Get element methods are more convenient in wrapping languages
Definition at line 211 of file itkFixedArray.h.
|
inline |
Set the Green component.
Definition at line 133 of file itkRGBPixel.h.
Referenced by itk::bio::CellularAggregate< NSpaceDimension >::CellularAggregate(), main(), itk::operator>>(), itk::BMPImageIO::Read(), itk::BMPImageIO::ReadImageInformation(), and itk::GreenPixelAccessor< T >::Set().
|
inline |
Set the Nth component to v.
Definition at line 126 of file itkRGBPixel.h.
|
inline |
Set the Red component.
Definition at line 130 of file itkRGBPixel.h.
Referenced by itk::bio::CellularAggregate< NSpaceDimension >::CellularAggregate(), main(), itk::operator>>(), itk::BMPImageIO::Read(), itk::BMPImageIO::ReadImageInformation(), itk::RedPixelAccessor< T >::Set(), itk::ColorTable< TPixel >::UseHeatColors(), and itk::ColorTable< TPixel >::UseRandomColors().
|
inherited |
Get the size of the FixedArray.
|
static |
Dimension of the vector space.
Reimplemented from itk::FixedArray< TComponent, 3 >.
Definition at line 65 of file itkRGBPixel.h.
|
static |
Length of the pixel.
Reimplemented from itk::FixedArray< TComponent, 3 >.
Definition at line 72 of file itkRGBPixel.h.