ITK  5.0.0
Insight Segmentation and Registration Toolkit
Classes | Namespaces | Macros | Functions
itkDefaultConvertPixelTraits.h File Reference
#include "itkOffset.h"
#include "itkVector.h"
#include "itkMatrix.h"
#include "itkVariableLengthVector.h"
#include "itkVariableSizeMatrix.h"
+ Include dependency graph for itkDefaultConvertPixelTraits.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  itk::DefaultConvertPixelTraits< PixelType >
 
class  itk::DefaultConvertPixelTraits< ::std::complex< TComponent > >
 
class  itk::DefaultConvertPixelTraits< Matrix< VComponent, VRows, VCols > >
 
class  itk::DefaultConvertPixelTraits< Offset< VDimension > >
 
class  itk::DefaultConvertPixelTraits< VariableLengthVector< VComponent > >
 
class  itk::DefaultConvertPixelTraits< VariableSizeMatrix< VComponent > >
 

Namespaces

 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 ITK_TEMPLATE_EXPORT DefaultConvertPixelTraits< type< TComponentType, VDimension > > \
{ \
public: \
using TargetType = type< TComponentType, VDimension >; \
using ComponentType = TComponentType; \
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 142 of file itkDefaultConvertPixelTraits.h.

#define ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL (   type)
Value:
template< > \
class ITK_TEMPLATE_EXPORT DefaultConvertPixelTraits< type > \
{ \
public: \
using ComponentType = type; \
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 68 of file itkDefaultConvertPixelTraits.h.