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

itk::DefaultConvertPixelTraits< PixelType > Class Template Reference

Traits class used to by ConvertPixels to convert blocks of pixels. More...

#include <itkDefaultConvertPixelTraits.h>

List of all members.

Public Types

typedef PixelType::ComponentType ComponentType

Static Public Member Functions

unsigned int GetNumberOfComponents ()
ComponentType GetNthComponent (int c, const PixelType &pixel)
void SetNthComponent (int c, PixelType &pixel, const ComponentType &v)
ComponentType GetScalarValue (const PixelType &pixel)


Detailed Description

template<typename PixelType>
class itk::DefaultConvertPixelTraits< PixelType >

Traits class used to by ConvertPixels to convert blocks of pixels.

TOutputPixelType is the destination type. The input type is infered by the templated static function Convert.

This implementaion, does a simple assignment operator, so if you are going from from a higher bit representation to a lower bit one (int to char), you may want to specialize and add some sort of transfer function.

Definition at line 39 of file itkDefaultConvertPixelTraits.h.


Member Typedef Documentation

template<typename PixelType>
typedef PixelType::ComponentType itk::DefaultConvertPixelTraits< PixelType >::ComponentType
 

Determine the pixel data type. Definition at line 43 of file itkDefaultConvertPixelTraits.h.

Referenced by itk::DefaultConvertPixelTraits< PixelType >::GetNthComponent(), itk::DefaultConvertPixelTraits< PixelType >::GetScalarValue(), and itk::DefaultConvertPixelTraits< PixelType >::SetNthComponent().


Member Function Documentation

template<typename PixelType>
ComponentType itk::DefaultConvertPixelTraits< PixelType >::GetNthComponent int  c,
const PixelType &  pixel
[inline, static]
 

Return the nth component of the pixel. Definition at line 50 of file itkDefaultConvertPixelTraits.h.

References itk::DefaultConvertPixelTraits< PixelType >::ComponentType.

template<typename PixelType>
unsigned int itk::DefaultConvertPixelTraits< PixelType >::GetNumberOfComponents  )  [inline, static]
 

Return the number of components per pixel. Definition at line 46 of file itkDefaultConvertPixelTraits.h.

template<typename PixelType>
ComponentType itk::DefaultConvertPixelTraits< PixelType >::GetScalarValue const PixelType &  pixel  )  [inline, static]
 

Return a single scalar value from this pixel. Definition at line 58 of file itkDefaultConvertPixelTraits.h.

References itk::DefaultConvertPixelTraits< PixelType >::ComponentType.

template<typename PixelType>
void itk::DefaultConvertPixelTraits< PixelType >::SetNthComponent int  c,
PixelType &  pixel,
const ComponentType v
[inline, static]
 

Set the nth component of the pixel. Definition at line 54 of file itkDefaultConvertPixelTraits.h.

References itk::DefaultConvertPixelTraits< PixelType >::ComponentType.


The documentation for this class was generated from the following file:
Generated at Sat Mar 31 03:01:57 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000