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]

Represent Red, Green and Blue component for color images. More...

#include <itkRGBPixel.h>

Inheritance diagram for itk::RGBPixel:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef RGBPixel Self
typedef FixedArray< TComponent, 3 > Super
typedef FixedArray< TComponent, 3 > BaseArray
typedef TComponent ComponentType

Public Methods

ComponentType GetNthComponent (int c) const
ComponentType GetScalarValue () const
void SetNthComponent (int c, const ComponentType &v)
void SetRed (ComponentType red)
void SetGreen (ComponentType green)
void SetBlue (ComponentType blue)
void Set (ComponentType red, ComponentType green, ComponentType blue)
const ComponentTypeGetRed (void) const
const ComponentTypeGetGreen (void) const
const ComponentTypeGetBlue (void) const
 RGBPixel ()
 RGBPixel (const ComponentType &r)
 RGBPixel (const Self &r)
 RGBPixel (const ComponentType r[3])
RGBPixel & operator= (const Self &r)
RGBPixel & operator= (const ComponentType r[3])

Static Public Methods

int GetNumberOfComponents ()

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.


Member Typedef Documentation

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

Convenience typedefs.

Definition at line 59 of file itkRGBPixel.h.

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

Define the component type.

Definition at line 62 of file itkRGBPixel.h.

Referenced by itk::RGBPixel< TPixel >::GetGreen(), itk::RGBPixel< TPixel >::GetNumberOfComponents(), itk::RGBPixel< TPixel >::GetRed(), itk::RGBPixel< TPixel >::RGBPixel(), itk::RGBPixel< TPixel >::SetBlue(), itk::RGBPixel< TPixel >::SetGreen(), and itk::RGBPixel< TPixel >::SetRed().

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 >::Super
 

Definition at line 56 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 65 of file itkRGBPixel.h.

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

Default constructor has nothing to do.

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

Pass-through constructor for the Array base class.

Definition at line 70 of file itkRGBPixel.h.

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

Pass-through constructor for the Array base class.

Definition at line 71 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 119 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 116 of file itkRGBPixel.h.

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

Return the value for the Nth component.

Definition at line 83 of file itkRGBPixel.h.

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

Return the number of components.

Definition at line 80 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 113 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 87 of file itkRGBPixel.h.

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

Pass-through assignment operator for the Array base class.

template<typename TComponent = unsigned short>
RGBPixel& itk::RGBPixel< TComponent >::operator= const Self   r
 

Pass-through assignment operator for the Array base class.

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

Set the three components.

Definition at line 109 of file itkRGBPixel.h.

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

Set the Blue component.

Definition at line 106 of file itkRGBPixel.h.

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

Set the Green component.

Definition at line 103 of file itkRGBPixel.h.

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 96 of file itkRGBPixel.h.

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

Set the Red component.

Definition at line 100 of file itkRGBPixel.h.


The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:20:35 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000