ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes
itk::RGBAPixel< TComponent > Class Template Reference

#include <itkRGBAPixel.h>

+ Inheritance diagram for itk::RGBAPixel< TComponent >:
+ Collaboration diagram for itk::RGBAPixel< TComponent >:

List of all members.

Public Types

typedef FixedArray< TComponent, 4 > BaseArray
typedef TComponent ComponentType
typedef RGBAPixel Self
typedef FixedArray< TComponent, 4 > Superclass

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
Self operator* (const ComponentType &f) const
Self operator+ (const Self &vec) const
const Selfoperator+= (const Self &vec)
Self operator- (const Self &vec) const
const Selfoperator-= (const Self &vec)
RGBAPixeloperator= (const Self &r)
RGBAPixeloperator= (const ComponentType r[4])
bool operator== (const Self &vec) const
void SetAlpha (ComponentType alpha)
void SetBlue (ComponentType blue)
void SetGreen (ComponentType green)
void SetNthComponent (int c, const ComponentType &v)
void SetRed (ComponentType red)
 RGBAPixel ()
 RGBAPixel (const ComponentType &r)
template<class TRGBAPixelValueType >
 RGBAPixel (const RGBAPixel< TRGBAPixelValueType > &r)
 RGBAPixel (const ComponentType r[4])
void Set (ComponentType red, ComponentType green, ComponentType blue, ComponentType alpha)

Static Public Member Functions

static unsigned int GetNumberOfComponents ()

Static Public Attributes

static const unsigned int Dimension = 4
static const unsigned int Length = 4

Detailed Description

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

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

    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]

Wiki Examples:

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

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

Define the component type.

Definition at line 76 of file itkRGBAPixel.h.

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

Standard class typedefs.

Definition at line 63 of file itkRGBAPixel.h.

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

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

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

Default constructor has nothing to do.

Definition at line 80 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 85 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 86 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 160 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 157 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 154 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 111 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 108 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 151 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 114 of file itkRGBAPixel.h.

template<typename TComponent = unsigned short>
Self itk::RGBAPixel< TComponent >::operator* ( const ComponentType f) const
template<typename TComponent = unsigned short>
Self itk::RGBAPixel< TComponent >::operator+ ( const Self vec) const

Aritmetic operations between pixels. Return a new RGBPixel.

template<typename TComponent = unsigned short>
const Self& itk::RGBAPixel< TComponent >::operator+= ( const Self vec)
template<typename TComponent = unsigned short>
Self itk::RGBAPixel< TComponent >::operator- ( const Self vec) const
template<typename TComponent = unsigned short>
const Self& itk::RGBAPixel< TComponent >::operator-= ( const Self vec)
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>
RGBAPixel& itk::RGBAPixel< TComponent >::operator= ( const ComponentType  r[4])
template<typename TComponent = unsigned short>
bool itk::RGBAPixel< TComponent >::operator== ( const Self vec) const
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 141 of file itkRGBAPixel.h.

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

Set the Alpha component.

Definition at line 138 of file itkRGBAPixel.h.

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

Set the Blue component.

Definition at line 135 of file itkRGBAPixel.h.

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

Set the Green component.

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

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

Set the Red component.

Definition at line 129 of file itkRGBAPixel.h.


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


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