Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::RGBPixel< TComponent > Class Template Reference
[Image Representation Objects]

#include <itkRGBPixel.h>

Inheritance diagram for itk::RGBPixel< TComponent >:

Inheritance graph
[legend]
Collaboration diagram for itk::RGBPixel< TComponent >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename TComponent = unsigned short>
class itk::RGBPixel< TComponent >

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.

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 ComponentTypeGetBlue (void) const
const ComponentTypeGetGreen (void) const
ComponentType GetLuminance (void) const
ComponentType GetNthComponent (int c) const
const ComponentTypeGetRed (void) const
ComponentType GetScalarValue () const
 itkStaticConstMacro (Length, unsigned int, 3)
Dimension of the vector space * itkStaticConstMacro (Dimension, unsigned int, 3)
Self operator * (const ComponentType &f) const
Pass through assignment operator for the Array base class.*/template (const RGBPixel< TRGBPixelValueType > &r)
Aritmetic operations between
pixels Return a new RGBPixel
*Self 
operator+ (const Self &vec) const
const Selfoperator+= (const Self &vec)
Self operator- (const Self &vec) const
const Selfoperator-= (const Self &vec)
Selfoperator= (const ComponentType r[3])
 RGBPixel (const ComponentType r[3])
template<class TRGBPixelValueType>
Pass through constructor for
the Array base class
RGBPixel (const RGBPixel< TRGBPixelValueType > &r)
 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)

Static Public Member Functions

static unsigned int GetNumberOfComponents ()


Member Typedef Documentation

template<typename TComponent = unsigned short>
typedef FixedArray<TComponent, 3> itk::RGBPixel< TComponent >::BaseArray
 

Convenience typedefs.

Definition at line 64 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
typedef TComponent itk::RGBPixel< TComponent >::ComponentType
 

Define the component type.

Definition at line 67 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
typedef RGBPixel itk::RGBPixel< TComponent >::Self
 

Standard class typedefs.

Definition at line 55 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
typedef FixedArray<TComponent, 3> itk::RGBPixel< TComponent >::Superclass
 

Definition at line 56 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
typedef Superclass::ValueType itk::RGBPixel< TComponent >::ValueType
 

Definition at line 68 of file itkRGBPixel.h.


Constructor & Destructor Documentation

template<typename TComponent = unsigned short>
itk::RGBPixel< TComponent >::RGBPixel  )  [inline]
 

Default constructor has nothing to do

Definition at line 71 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
itk::RGBPixel< TComponent >::RGBPixel const ComponentType r  )  [inline]
 

Constructor to fill Red=Blug=Green= r.

Definition at line 74 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
template<class TRGBPixelValueType>
Pass through constructor for the Array base class* itk::RGBPixel< TComponent >::RGBPixel const RGBPixel< TRGBPixelValueType > &  r  )  [inline]
 

Definition at line 78 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
itk::RGBPixel< TComponent >::RGBPixel const ComponentType  r[3]  )  [inline]
 

Definition at line 79 of file itkRGBPixel.h.


Member Function Documentation

template<typename TComponent = unsigned short>
const ComponentType& itk::RGBPixel< TComponent >::GetBlue void   )  const [inline]
 

Get the Blue component.

Definition at line 142 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
const ComponentType& itk::RGBPixel< TComponent >::GetGreen void   )  const [inline]
 

Get the Green component.

Definition at line 139 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
ComponentType itk::RGBPixel< TComponent >::GetLuminance void   )  const
 

Get Luminance out of RGB

template<typename TComponent = unsigned short>
ComponentType itk::RGBPixel< TComponent >::GetNthComponent int  c  )  const [inline]
 

Return the value for the Nth component.

Definition at line 106 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
static unsigned int itk::RGBPixel< TComponent >::GetNumberOfComponents  )  [inline, static]
 

Return the number of components.

Definition at line 103 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
const ComponentType& itk::RGBPixel< TComponent >::GetRed void   )  const [inline]
 

Get the Red component.

Definition at line 136 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
ComponentType itk::RGBPixel< TComponent >::GetScalarValue  )  const [inline]
 

Return the value for the Nth component.

Definition at line 110 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
itk::RGBPixel< TComponent >::itkStaticConstMacro Length  ,
unsigned  int,
 

template<typename TComponent = unsigned short>
Dimension of the vector space* itk::RGBPixel< TComponent >::itkStaticConstMacro Dimension  ,
unsigned  int,
 

template<typename TComponent = unsigned short>
Self itk::RGBPixel< TComponent >::operator * const ComponentType f  )  const
 

template<typename TComponent = unsigned short>
Pass through assignment itk::RGBPixel< TComponent >::operator for the Array base class.*/template const RGBPixel< TRGBPixelValueType > &  r  )  [inline]
 

Definition at line 84 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
Aritmetic operations between pixels Return a new RGBPixel* Self itk::RGBPixel< TComponent >::operator+ const Self vec  )  const
 

template<typename TComponent = unsigned short>
const Self& itk::RGBPixel< TComponent >::operator+= const Self vec  ) 
 

template<typename TComponent = unsigned short>
Self itk::RGBPixel< TComponent >::operator- const Self vec  )  const
 

template<typename TComponent = unsigned short>
const Self& itk::RGBPixel< TComponent >::operator-= const Self vec  ) 
 

template<typename TComponent = unsigned short>
Self& itk::RGBPixel< TComponent >::operator= const ComponentType  r[3]  ) 
 

template<typename TComponent = unsigned short>
void itk::RGBPixel< TComponent >::Set ComponentType  red,
ComponentType  green,
ComponentType  blue
[inline]
 

Set the three components.

Definition at line 132 of file itkRGBPixel.h.

Referenced by itk::Function::ComposeRGB< TInput >::operator()().

template<typename TComponent = unsigned short>
void itk::RGBPixel< TComponent >::SetBlue ComponentType  blue  )  [inline]
 

Set the Blue component.

Definition at line 129 of file itkRGBPixel.h.

Referenced by itk::BluePixelAccessor< T >::Set().

template<typename TComponent = unsigned short>
void itk::RGBPixel< TComponent >::SetGreen ComponentType  green  )  [inline]
 

Set the Green component.

Definition at line 126 of file itkRGBPixel.h.

Referenced by itk::GreenPixelAccessor< T >::Set().

template<typename TComponent = unsigned short>
void itk::RGBPixel< TComponent >::SetNthComponent int  c,
const ComponentType v
[inline]
 

Set the Nth component to v.

Definition at line 119 of file itkRGBPixel.h.

template<typename TComponent = unsigned short>
void itk::RGBPixel< TComponent >::SetRed ComponentType  red  )  [inline]
 

Set the Red component.

Definition at line 123 of file itkRGBPixel.h.

Referenced by itk::RedPixelAccessor< T >::Set().


The documentation for this class was generated from the following file:
Generated at Sun Jul 9 21:17:38 2006 for ITK by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2000