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

Go to the source code of this file.

Classes

class  itk::MeshConvertPixelTraits< PixelType >
 

Namespaces

namespace  itk
 

Macros

#define ITK_DEFAULTCONVERTTRAITS_NATIVE_SPECIAL(type)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(type, componenttype)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE_ALL_TYPES_MACRO(ArrayType)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE(componenttype)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE(type, componenttype, dimension)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, Type)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_TYPES_MACRO(ArrayType)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE(type, componenttype, rows, cols)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, Type)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_TYPES_MACRO(ArrayType)
 
#define ITK_MESH_DEFAULTCONVERTTRAITS_OFFSET_TYPE(dimension)
 

Functions

 itk::ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE_ALL_TYPES_MACRO (Array)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE_ALL_TYPES_MACRO (VariableLengthVector)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE (float)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE (double)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE (signed int)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE (unsigned int)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_TYPES_MACRO (Vector)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_TYPES_MACRO (CovariantVector)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_TYPES_MACRO (Point)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_TYPES_MACRO (FixedArray)
 
 itk::ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_TYPES_MACRO (Matrix)
 

Macro Definition Documentation

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

Definition at line 72 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE (   type,
  componenttype 
)
Value:
template<> \
class MeshConvertPixelTraits< type< componenttype> > \
{ \
public: \
typedef type< componenttype > TargetType; \
typedef componenttype ComponentType; \
static unsigned int GetNumberOfComponents() \
{ \
return 0; \
} \
static unsigned int GetNumberOfComponents(const TargetType& pixel) \
{ \
return pixel.Size(); \
} \
static ComponentType GetNthComponent(int c, const TargetType& pixel) \
{ \
return pixel[c]; \
} \
static void SetNthComponent(int i, TargetType & pixel, const ComponentType& v) \
{ \
pixel[i] = v; \
} \
static ComponentType GetScalarValue(const TargetType& pixel) \
{ \
return pixel[0]; \
} \
}; \

Definition at line 357 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE_ALL_TYPES_MACRO (   ArrayType)
Value:
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, signed char); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, unsigned char); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, short); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, unsigned short); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, int); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, unsigned int); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, long); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, unsigned long); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, float); \
ITK_MESH_DEFAULTCONVERTTRAITS_ARRAY_TYPE(ArrayType, double);

Definition at line 386 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_COMPLEX_TYPE (   componenttype)

Definition at line 305 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE (   type,
  componenttype,
  dimension 
)
Value:
template<> \
class MeshConvertPixelTraits< type< componenttype, dimension> > \
{ \
public: \
typedef type< componenttype, dimension > TargetType; \
typedef componenttype ComponentType; \
static unsigned int GetNumberOfComponents() \
{ \
return dimension; \
} \
static unsigned int GetNumberOfComponents(const TargetType& itkNotUsed(pixel)) \
{ \
return dimension; \
} \
static ComponentType GetNthComponent(int c, const TargetType& pixel) \
{ \
return pixel[c]; \
} \
static void SetNthComponent(int i, TargetType & pixel, const ComponentType& v) \
{ \
pixel[i] = v; \
} \
static ComponentType GetScalarValue(const TargetType& pixel) \
{ \
return pixel[0]; \
} \
}; \

Definition at line 160 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO (   ArrayType,
  Type 
)
Value:
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE(ArrayType,Type,2) \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE(ArrayType,Type,3) \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE(ArrayType,Type,4) \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE(ArrayType,Type,5) \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE(ArrayType,Type,6)

Definition at line 195 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_TYPES_MACRO (   ArrayType)
Value:
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, signed char); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, unsigned char); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, short); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, unsigned short); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, int); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, unsigned int); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, long); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, unsigned long); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, float); \
ITK_MESH_DEFAULTCONVERTTRAITS_FIXEDARRAY_TYPE_ALL_MACRO(ArrayType, double);

Definition at line 203 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE (   type,
  componenttype,
  rows,
  cols 
)

Definition at line 231 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO (   ArrayType,
  Type 
)
Value:
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE(ArrayType,Type,2,2) \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE(ArrayType,Type,3,3) \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE(ArrayType,Type,4,4) \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE(ArrayType,Type,5,5) \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE(ArrayType,Type,6,6)

Definition at line 269 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_TYPES_MACRO (   ArrayType)
Value:
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, signed char); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, unsigned char); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, short); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, unsigned short); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, int); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, unsigned int); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, long); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, unsigned long); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, float); \
ITK_MESH_DEFAULTCONVERTTRAITS_MATRIX_TYPE_ALL_MACRO(ArrayType, double);

Definition at line 277 of file itkMeshConvertPixelTraits.h.

#define ITK_MESH_DEFAULTCONVERTTRAITS_OFFSET_TYPE (   dimension)
Value:
template<> \
class MeshConvertPixelTraits< Offset<dimension> > \
{ \
public: \
typedef Offset<dimension> TargetType; \
typedef TargetType::OffsetValueType ComponentType; \
static unsigned int GetNumberOfComponents() \
{ \
return dimension; \
} \
static unsigned int GetNumberOfComponents(const TargetType& itkNotUsed(pixel)) \
{ \
return dimension; \
} \
static ComponentType GetNthComponent(int c, const TargetType& pixel) \
{ \
return pixel[c]; \
} \
static void SetNthComponent(int i, TargetType & pixel, const ComponentType& v) \
{ \
pixel[i] = v; \
} \
static ComponentType GetScalarValue(const TargetType& pixel) \
{ \
return pixel[0]; \
} \
}; \

Definition at line 119 of file itkMeshConvertPixelTraits.h.