ITK  4.9.0
Insight Segmentation and Registration Toolkit
Public Types | Static Public Member Functions | List of all members
itk::DefaultConvertPixelTraits< PixelType > Class Template Reference

#include <itkDefaultConvertPixelTraits.h>

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 inferred 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.

Examples:
WikiExamples/Images/ConvertPixelBuffer.cxx.

Definition at line 41 of file itkDefaultConvertPixelTraits.h.

Public Types

typedef PixelType::ComponentType ComponentType
 

Static Public Member Functions

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

Member Typedef Documentation

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

Determine the pixel data type.

Definition at line 45 of file itkDefaultConvertPixelTraits.h.

Member Function Documentation

template<typename PixelType>
static ComponentType itk::DefaultConvertPixelTraits< PixelType >::GetNthComponent ( int  c,
const PixelType &  pixel 
)
inlinestatic
template<typename PixelType>
static unsigned int itk::DefaultConvertPixelTraits< PixelType >::GetNumberOfComponents ( )
inlinestatic

Return the number of components per pixel.

Definition at line 48 of file itkDefaultConvertPixelTraits.h.

Referenced by itk::ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL().

template<typename PixelType>
static unsigned int itk::DefaultConvertPixelTraits< PixelType >::GetNumberOfComponents ( const PixelType   itkNotUsedpixel)
inlinestatic

Definition at line 51 of file itkDefaultConvertPixelTraits.h.

template<typename PixelType>
static ComponentType itk::DefaultConvertPixelTraits< PixelType >::GetScalarValue ( const PixelType &  pixel)
inlinestatic

Return a single scalar value from this pixel.

Definition at line 63 of file itkDefaultConvertPixelTraits.h.

Referenced by itk::ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL().

template<typename PixelType>
static void itk::DefaultConvertPixelTraits< PixelType >::SetNthComponent ( int  c,
PixelType &  pixel,
const ComponentType v 
)
inlinestatic

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