ITK  4.2.0
Insight Segmentation and Registration Toolkit
Classes | Namespaces | Macros | Functions
itkDefaultConvertPixelTraits.h File Reference

Go to the source code of this file.

Classes

class  itk::DefaultConvertPixelTraits< PixelType >
 Traits class used to by ConvertPixels to convert blocks of pixels. More...
class  itk::DefaultConvertPixelTraits< ::std::complex< TComponent > >
class  itk::DefaultConvertPixelTraits< Matrix< VComponent, VRows, VCols > >
class  itk::DefaultConvertPixelTraits< Offset< VDimension > >
class  itk::DefaultConvertPixelTraits< VariableLengthVector< VComponent > >

Namespaces

namespace  itk

Macros

#define ITK_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE(type)
#define ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(type)

Functions

 itk::ITK_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE (Vector)
 itk::ITK_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE (CovariantVector)
 itk::ITK_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE (Point)
 itk::ITK_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE (FixedArray)

Macro Definition Documentation

#define ITK_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE (   type)
Value:
template<typename TComponentType, unsigned VDimension > \
class DefaultConvertPixelTraits< type< TComponentType, VDimension > > \
{ \
public: \
typedef type< TComponentType, VDimension > TargetType; \
typedef TComponentType ComponentType; \
static unsigned int GetNumberOfComponents() \
{ \
return VDimension; \
} \
static unsigned int GetNumberOfComponents( const TargetType ) \
{ \
return VDimension; \
} \
static void SetNthComponent(int i, TargetType & pixel, \
const ComponentType &v) \
{ \
pixel[i] = v; \
} \
static ComponentType GetNthComponent(int i, const TargetType pixel) \
{ \
return pixel[i]; \
} \
static ComponentType GetScalarValue(const TargetType &pixel) \
{ \
return pixel[0]; \
} \
} \

Definition at line 138 of file itkDefaultConvertPixelTraits.h.

#define ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL (   type)
Value:
template< > \
class DefaultConvertPixelTraits< type > \
{ \
public: \
typedef type ComponentType; \
static unsigned int GetNumberOfComponents() \
{ \
return 1; \
} \
static unsigned int GetNumberOfComponents(const type) \
{ \
return 1; \
} \
static void SetNthComponent(int, type & pixel, const ComponentType &v) \
{ \
pixel = v; \
} \
static type GetNthComponent(int, const type pixel) \
{ \
return pixel; \
} \
static type GetScalarValue(const type &pixel) \
{ \
return pixel; \
} \
};

Definition at line 67 of file itkDefaultConvertPixelTraits.h.