ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkRGBPixel.h>
Public Types | |
typedef FixedArray< TComponent, 3 > | BaseArray |
typedef TComponent | ComponentType |
typedef RGBPixel | Self |
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 |
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 |
Self & | operator= (const ComponentType r[3]) |
bool | operator== (const Self &vec) const |
RGBPixel () | |
RGBPixel (const ComponentType &r) | |
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) |
void | Set (ComponentType red, ComponentType green, ComponentType blue) |
Static Public Member Functions | |
static unsigned int | GetNumberOfComponents () |
Static Public Attributes | |
static const unsigned int | Dimension = 3 |
static const unsigned int | Length = 3 |
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:
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 58 of file itkRGBPixel.h.
typedef FixedArray< TComponent, 3 > itk::RGBPixel< TComponent >::BaseArray |
Convenience typedefs.
Definition at line 66 of file itkRGBPixel.h.
typedef TComponent itk::RGBPixel< TComponent >::ComponentType |
Define the component type.
Definition at line 75 of file itkRGBPixel.h.
typedef RGBPixel itk::RGBPixel< TComponent >::Self |
Standard class typedefs.
Definition at line 62 of file itkRGBPixel.h.
typedef FixedArray< TComponent, 3 > itk::RGBPixel< TComponent >::Superclass |
Definition at line 63 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 76 of file itkRGBPixel.h.
itk::RGBPixel< TComponent >::RGBPixel | ( | ) | [inline] |
Default constructor has nothing to do
Definition at line 79 of file itkRGBPixel.h.
itk::RGBPixel< TComponent >::RGBPixel | ( | const ComponentType & | r | ) | [inline] |
Constructor to fill Red=Blug=Green= r.
Definition at line 82 of file itkRGBPixel.h.
itk::RGBPixel< TComponent >::RGBPixel | ( | const RGBPixel< TRGBPixelValueType > & | r | ) | [inline] |
Pass-through constructor for the Array base class.
Definition at line 86 of file itkRGBPixel.h.
itk::RGBPixel< TComponent >::RGBPixel | ( | const ComponentType | r[3] | ) | [inline] |
Pass-through constructor for the Array base class.
Definition at line 87 of file itkRGBPixel.h.
const ComponentType& itk::RGBPixel< TComponent >::GetBlue | ( | void | ) | const [inline] |
Get the Blue component.
Definition at line 162 of file itkRGBPixel.h.
Referenced by itk::BluePixelAccessor< T >::Get().
const ComponentType& itk::RGBPixel< TComponent >::GetGreen | ( | void | ) | const [inline] |
Get the Green component.
Definition at line 159 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 120 of file itkRGBPixel.h.
static unsigned int itk::RGBPixel< TComponent >::GetNumberOfComponents | ( | ) | [inline, static] |
Return the number of components.
Definition at line 117 of file itkRGBPixel.h.
const ComponentType& itk::RGBPixel< TComponent >::GetRed | ( | void | ) | const [inline] |
Get the Red component.
Definition at line 156 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.
Self itk::RGBPixel< TComponent >::operator* | ( | const ComponentType & | f | ) | const |
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 | ) |
Self itk::RGBPixel< TComponent >::operator- | ( | const Self & | vec | ) | const |
const Self& itk::RGBPixel< TComponent >::operator-= | ( | const Self & | vec | ) |
bool itk::RGBPixel< TComponent >::operator< | ( | const Self & | vec | ) | const |
Self& itk::RGBPixel< TComponent >::operator= | ( | const RGBPixel< TRGBPixelValueType > & | r | ) | [inline] |
Pass-through assignment operator for the Array base class.
Definition at line 92 of file itkRGBPixel.h.
Self& itk::RGBPixel< TComponent >::operator= | ( | const ComponentType | r[3] | ) |
bool itk::RGBPixel< TComponent >::operator== | ( | const Self & | vec | ) | const |
void itk::RGBPixel< TComponent >::Set | ( | ComponentType | red, |
ComponentType | green, | ||
ComponentType | blue | ||
) | [inline] |
Set the three components.
Definition at line 147 of file itkRGBPixel.h.
Referenced by itk::Functor::ComposeRGB< TInputImage::PixelType >::operator()().
void itk::RGBPixel< TComponent >::SetBlue | ( | ComponentType | blue | ) | [inline] |
Set the Blue component.
Definition at line 144 of file itkRGBPixel.h.
Referenced by itk::BluePixelAccessor< T >::Set().
void itk::RGBPixel< TComponent >::SetGreen | ( | ComponentType | green | ) | [inline] |
Set the Green component.
Definition at line 141 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 135 of file itkRGBPixel.h.
void itk::RGBPixel< TComponent >::SetRed | ( | ComponentType | red | ) | [inline] |
Set the Red component.
Definition at line 138 of file itkRGBPixel.h.
Referenced by itk::RedPixelAccessor< T >::Set().
const unsigned int itk::RGBPixel< TComponent >::Dimension = 3 [static] |
Dimension of the vector space.
Reimplemented from itk::FixedArray< TComponent, 3 >.
Definition at line 69 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 72 of file itkRGBPixel.h.