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< TComponent >:
Inheritance graph
[legend]
Collaboration diagram for itk::RGBAPixel< TComponent >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef FixedArray< TComponent, 4 > BaseArray
typedef ValueType CArray [VLength]
typedef TComponent ComponentType
typedef const ValueTypeconst_pointer
typedef const ValueTypeconst_reference
typedef const ValueTypeConstIterator
typedef ValueTypeIterator
typedef ValueTypepointer
typedef ValueTypereference
typedef RGBAPixel Self
typedef unsigned int SizeType
typedef FixedArray< TComponent, 4 > Superclass
typedef TComponent ValueType

Public Member Functions

const ComponentTypeGetAlpha (void) const
const ComponentTypeGetBlue (void) const
const ComponentTypeGetGreen (void) const
ComponentType GetLuminance (void) const
ComponentType GetNthComponent (int c) const
const ComponentTypeGetRed (void) const
ComponentType GetScalarValue () const
void Set (ComponentType red, ComponentType green, ComponentType blue, ComponentType alpha)
void SetAlpha (ComponentType alpha)
void SetBlue (ComponentType blue)
void SetGreen (ComponentType green)
void SetNthComponent (int c, const ComponentType &v)
void SetRed (ComponentType red)



ConstIterator Begin () const
Iterator Begin ()
ConstIterator End () const
Iterator End ()
void Fill (const ValueType &)
const ValueTypeGetDataPointer () const
ValueTypeGetDataPointer ()
const_reference GetElement (unsigned short index) const
bool operator!= (const FixedArray &r) const
bool operator== (const FixedArray &r) const
const_reference operator[] (unsigned long index) const
reference operator[] (unsigned long index)
const_reference operator[] (long index) const
reference operator[] (long index)
const_reference operator[] (unsigned int index) const
reference operator[] (unsigned int index)
const_reference operator[] (int index) const
reference operator[] (int index)
const_reference operator[] (unsigned short index) const
reference operator[] (unsigned short index)
const_reference operator[] (short index) const
reference operator[] (short index)
ConstReverseIterator rBegin () const
ReverseIterator rBegin ()
ConstReverseIterator rEnd () const
ReverseIterator rEnd ()
void SetElement (unsigned short index, const_reference value)
SizeType Size () const

Static Public Member Functions

static FixedArray Filled (const ValueType &)
static unsigned int GetNumberOfComponents ()



static const unsigned int Dimension = 4
static const unsigned int Length = 4
RGBAPixeloperator= (const ComponentType r[4])
RGBAPixeloperator= (const Self &r)
 RGBAPixel (const ComponentType r[4])
template<class TRGBAPixelValueType >
 RGBAPixel (const RGBAPixel< TRGBAPixelValueType > &r)
 RGBAPixel (const ComponentType &r)
 RGBAPixel ()

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 76 of file itkRGBAPixel.h.

typedef ValueType itk::FixedArray< TComponent , VLength >::CArray[VLength] [inherited]

A type representing the C-array version of this FixedArray.

Definition at line 77 of file itkFixedArray.h.

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

Define the component type.

Definition at line 79 of file itkRGBAPixel.h.

typedef const ValueType* itk::FixedArray< TComponent , VLength >::const_pointer [inherited]

A const pointer to the ValueType.

Definition at line 129 of file itkFixedArray.h.

typedef const ValueType& itk::FixedArray< TComponent , VLength >::const_reference [inherited]

A const reference to the ValueType.

Definition at line 135 of file itkFixedArray.h.

typedef const ValueType* itk::FixedArray< TComponent , VLength >::ConstIterator [inherited]

A const iterator through the array.

Definition at line 83 of file itkFixedArray.h.

typedef ValueType* itk::FixedArray< TComponent , VLength >::Iterator [inherited]

An iterator through the array.

Definition at line 80 of file itkFixedArray.h.

typedef ValueType* itk::FixedArray< TComponent , VLength >::pointer [inherited]

A pointer to the ValueType.

Definition at line 126 of file itkFixedArray.h.

typedef ValueType& itk::FixedArray< TComponent , VLength >::reference [inherited]

A reference to the ValueType.

Definition at line 132 of file itkFixedArray.h.

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

Standard class typedefs.

Definition at line 56 of file itkRGBAPixel.h.

typedef unsigned int itk::FixedArray< TComponent , VLength >::SizeType [inherited]

Definition at line 137 of file itkFixedArray.h.

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

Definition at line 57 of file itkRGBAPixel.h.

typedef TComponent itk::FixedArray< TComponent , VLength >::ValueType [inherited]

The element type stored at each location in the FixedArray.

Definition at line 74 of file itkFixedArray.h.


Constructor & Destructor Documentation

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

Default constructor has nothing to do.

Definition at line 82 of file itkRGBAPixel.h.

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

Dimension of the vector space.

Definition at line 83 of file itkRGBAPixel.h.

template<typename TComponent = unsigned short>
template<class TRGBAPixelValueType >
itk::RGBAPixel< TComponent >::RGBAPixel ( const RGBAPixel< TRGBAPixelValueType > &  r  )  [inline]

Pass-through constructor for the Array base class.

Definition at line 89 of file itkRGBAPixel.h.

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

Dimension of the vector space.

Definition at line 90 of file itkRGBAPixel.h.


Member Function Documentation

ConstIterator itk::FixedArray< TComponent , VLength >::Begin ( void   )  const [inherited]

Get various iterators to the array.

Iterator itk::FixedArray< TComponent , VLength >::Begin ( void   )  [inherited]

Get various iterators to the array.

ConstIterator itk::FixedArray< TComponent , VLength >::End ( void   )  const [inherited]

Get various iterators to the array.

Iterator itk::FixedArray< TComponent , VLength >::End ( void   )  [inherited]

Get various iterators to the array.

void itk::FixedArray< TComponent , VLength >::Fill ( const ValueType &   )  [inherited]

Get various iterators to the array.

Referenced by itk::RGBAPixel< float >::RGBAPixel().

static FixedArray itk::FixedArray< TComponent , VLength >::Filled ( const ValueType &   )  [static, inherited]
template<typename TComponent = unsigned short>
const ComponentType& itk::RGBAPixel< TComponent >::GetAlpha ( void   )  const [inline]

Get the Alpha component.

Definition at line 144 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 141 of file itkRGBAPixel.h.

const ValueType* itk::FixedArray< TComponent , VLength >::GetDataPointer (  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 223 of file itkFixedArray.h.

ValueType* itk::FixedArray< TComponent , VLength >::GetDataPointer (  )  [inline, inherited]

Return a pointer to the data.

Definition at line 222 of file itkFixedArray.h.

const_reference itk::FixedArray< TComponent , VLength >::GetElement ( unsigned short  index  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 218 of file itkFixedArray.h.

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

Get the Green component.

Definition at line 138 of file itkRGBAPixel.h.

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

Get Luminance out of RGB

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

Return the value for the Nth component.

Definition at line 102 of file itkRGBAPixel.h.

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

Return the number of componentsxquery-rep.

Definition at line 99 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 135 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 106 of file itkRGBAPixel.h.

bool itk::FixedArray< TComponent , VLength >::operator!= ( const FixedArray< TComponent, 4 > &  r  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 194 of file itkFixedArray.h.

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

Dimension of the vector space.

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

Pass-through assignment operator for the Array base class.

bool itk::FixedArray< TComponent , VLength >::operator== ( const FixedArray< TComponent, 4 > &  r  )  const [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.

const_reference itk::FixedArray< TComponent , VLength >::operator[] ( unsigned long  index  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 212 of file itkFixedArray.h.

reference itk::FixedArray< TComponent , VLength >::operator[] ( unsigned long  index  )  [inline, inherited]

Get various iterators to the array.

Definition at line 211 of file itkFixedArray.h.

const_reference itk::FixedArray< TComponent , VLength >::operator[] ( long  index  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 210 of file itkFixedArray.h.

reference itk::FixedArray< TComponent , VLength >::operator[] ( long  index  )  [inline, inherited]

Get various iterators to the array.

Definition at line 209 of file itkFixedArray.h.

const_reference itk::FixedArray< TComponent , VLength >::operator[] ( unsigned int  index  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 208 of file itkFixedArray.h.

reference itk::FixedArray< TComponent , VLength >::operator[] ( unsigned int  index  )  [inline, inherited]

Get various iterators to the array.

Definition at line 207 of file itkFixedArray.h.

const_reference itk::FixedArray< TComponent , VLength >::operator[] ( int  index  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 206 of file itkFixedArray.h.

reference itk::FixedArray< TComponent , VLength >::operator[] ( int  index  )  [inline, inherited]

Get various iterators to the array.

Definition at line 205 of file itkFixedArray.h.

const_reference itk::FixedArray< TComponent , VLength >::operator[] ( unsigned short  index  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 204 of file itkFixedArray.h.

reference itk::FixedArray< TComponent , VLength >::operator[] ( unsigned short  index  )  [inline, inherited]

Get various iterators to the array.

Definition at line 203 of file itkFixedArray.h.

const_reference itk::FixedArray< TComponent , VLength >::operator[] ( short  index  )  const [inline, inherited]

Get various iterators to the array.

Definition at line 202 of file itkFixedArray.h.

reference itk::FixedArray< TComponent , VLength >::operator[] ( short  index  )  [inline, inherited]
ConstReverseIterator itk::FixedArray< TComponent , VLength >::rBegin (  )  const [inherited]

Get various iterators to the array.

ReverseIterator itk::FixedArray< TComponent , VLength >::rBegin (  )  [inherited]

Get various iterators to the array.

ConstReverseIterator itk::FixedArray< TComponent , VLength >::rEnd (  )  const [inherited]

Get various iterators to the array.

ReverseIterator itk::FixedArray< TComponent , VLength >::rEnd (  )  [inherited]

Get various iterators to the array.

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 131 of file itkRGBAPixel.h.

Referenced by itk::Functor::ComposeRGBA< TInputImage::PixelType >::operator()().

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

Set the Alpha component.

Definition at line 128 of file itkRGBAPixel.h.

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

Set the Blue component.

Definition at line 125 of file itkRGBAPixel.h.

void itk::FixedArray< TComponent , VLength >::SetElement ( unsigned short  index,
const_reference  value 
) [inline, inherited]

Set/Get element methods are more convenient in wrapping languages

Definition at line 216 of file itkFixedArray.h.

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

Set the Green component.

Definition at line 122 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 115 of file itkRGBAPixel.h.

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

Set the Red component.

Definition at line 119 of file itkRGBAPixel.h.

SizeType itk::FixedArray< TComponent , VLength >::Size ( void   )  const [inherited]

Get various iterators to the array.


Member Data Documentation

template<typename TComponent = unsigned short>
const unsigned int itk::RGBAPixel< TComponent >::Dimension = 4 [static]

Dimension of the vector space.

Reimplemented from itk::FixedArray< TComponent, 4 >.

Definition at line 63 of file itkRGBAPixel.h.

template<typename TComponent = unsigned short>
const unsigned int itk::RGBAPixel< TComponent >::Length = 4 [static]

Length of the pixel.

Reimplemented from itk::FixedArray< TComponent, 4 >.

Definition at line 71 of file itkRGBAPixel.h.


The documentation for this class was generated from the following file:

Generated at Sat Apr 17 00:10:11 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000