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

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

Represent Red, Green, Blue cand Alpha component for color images. More...

#include <itkRGBAPixel.h>

Inheritance diagram for itk::RGBAPixel:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef RGBAPixel Self
typedef FixedArray< TComponent, 4 > Super
typedef FixedArray< TComponent, 4 > 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 SetAlpha (ComponentType alpha)
void Set (ComponentType red, ComponentType green, ComponentType blue, ComponentType alpha)
const ComponentTypeGetRed (void) const
const ComponentTypeGetGreen (void) const
const ComponentTypeGetBlue (void) const
const ComponentTypeGetAlpha (void) const
 RGBAPixel ()
 RGBAPixel (const ComponentType &r)
 RGBAPixel (const Self &r)
 RGBAPixel (const ComponentType r[4])
RGBAPixel & operator= (const Self &r)
RGBAPixel & operator= (const ComponentType r[4])

Static Public Methods

int GetNumberOfComponents ()

Detailed Description

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

Represent Red, Green, Blue cand Alpha 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:

RGBAPixel<float> pixel; pixel = 1.0f, 0.0f, .5f, .8; RGBAPixel<char> pixelArray[2]; pixelArray[0] = 255, 255, 255, 230; pixelArray[1] = 255, 255, 244, 255;

Since RGBAPixel is a subclass of Array, you can access its components as: pixel[0], pixel[1], pixel[2], pixel[3]

Definition at line 52 of file itkRGBAPixel.h.


Member Typedef Documentation

template<typename TComponent = unsigned short>
typedef FixedArray<TComponent, 4> itk::RGBAPixel< TComponent >::BaseArray
 

Convenience typedefs.

Definition at line 60 of file itkRGBAPixel.h.

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

Define the component type.

Definition at line 63 of file itkRGBAPixel.h.

Referenced by itk::RGBAPixel< float >::GetBlue(), itk::RGBAPixel< float >::GetGreen(), itk::RGBAPixel< float >::GetNumberOfComponents(), itk::RGBAPixel< float >::GetRed(), itk::RGBAPixel< float >::RGBAPixel(), itk::RGBAPixel< float >::SetAlpha(), itk::RGBAPixel< float >::SetBlue(), itk::RGBAPixel< float >::SetGreen(), and itk::RGBAPixel< float >::SetRed().

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

Standard class typedefs.

Definition at line 56 of file itkRGBAPixel.h.

template<typename TComponent = unsigned short>
typedef FixedArray<TComponent, 4> itk::RGBAPixel< TComponent >::Super
 

Definition at line 57 of file itkRGBAPixel.h.


Constructor & Destructor Documentation

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

Default constructor has nothing to do.

Definition at line 66 of file itkRGBAPixel.h.

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

Default constructor has nothing to do.

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

Pass-through constructor for the Array base class.

Definition at line 71 of file itkRGBAPixel.h.

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

Pass-through constructor for the Array base class.

Definition at line 72 of file itkRGBAPixel.h.


Member Function Documentation

template<typename TComponent = unsigned short>
const ComponentType& itk::RGBAPixel< TComponent >::GetAlpha void    const [inline]
 

Get the Alpha component.

Definition at line 126 of file itkRGBAPixel.h.

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

Get the Blue component.

Definition at line 123 of file itkRGBAPixel.h.

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

Get the Green component.

Definition at line 120 of file itkRGBAPixel.h.

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

Return the value for the Nth component.

Definition at line 84 of file itkRGBAPixel.h.

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

Return the number of componentsxquery-rep.

Definition at line 81 of file itkRGBAPixel.h.

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

Get the Red component.

Definition at line 117 of file itkRGBAPixel.h.

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

Return the value for the Nth component.

Definition at line 88 of file itkRGBAPixel.h.

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

Pass-through assignment operator for the Array base class.

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

Pass-through assignment operator for the Array base class.

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

Set the four components.

Definition at line 113 of file itkRGBAPixel.h.

template<typename TComponent = unsigned short>
void itk::RGBAPixel< TComponent >::SetAlpha ComponentType    alpha [inline]
 

Set the Alpha component.

Definition at line 110 of file itkRGBAPixel.h.

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

Set the Blue component.

Definition at line 107 of file itkRGBAPixel.h.

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

Set the Green component.

Definition at line 104 of file itkRGBAPixel.h.

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

Set the Nth component to v.

Definition at line 97 of file itkRGBAPixel.h.

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

Set the Red component.

Definition at line 101 of file itkRGBAPixel.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