13 #ifndef PIXELTYPETRAITS_H 14 #define PIXELTYPETRAITS_H 16 #include <itkDiffusionTensor3D.h> 18 #include <itkImageIOBase.h> 19 #include <itkRGBAPixel.h> 20 #include <itkRGBPixel.h> 21 #include <itkVectorImage.h> 33 template <
typename TValueType>
37 #define MITK_PIXEL_COMPONENT_TYPE(type, ctype, name) \ 39 struct mitk::MapPixelComponentType<type> \ 41 static const int value = ctype; \ 43 std::string mitk::PixelComponentTypeToString() \ 61 static const int value = itk::ImageIOBase::MapPixelType<T>::CType;
71 static const bool value =
false;
75 #define DEFINE_TYPE_PRIMITIVE(_TYPEIN) \ 77 struct isPrimitiveType<_TYPEIN> \ 79 static const bool value = true; \ 105 template <
typename TPixelType,
unsigned int VDimension = 0>
109 static const bool IsVectorImage =
false;
112 template <
typename TPixelType,
unsigned int VDimension>
115 typedef itk::VectorImage<TPixelType, VDimension>
ImageType;
116 static const bool IsVectorImage =
true;
119 template <
typename T>
123 static const bool IsVectorImage =
false;
126 template <
typename TPixelType,
unsigned int VDimension>
129 typedef itk::VectorImage<TPixelType, VDimension>
ImageType;
130 static const bool IsVectorImage =
true;
134 template <
bool flag,
typename T>
144 template <
typename T>
151 template <
typename T>
161 template <
bool V,
typename T>
164 static const size_t Size = 1;
168 template <
typename T>
171 static const size_t Size = T::ValueType::Length;
187 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::UNKNOWNPIXELTYPE;
197 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::RGB;
203 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::RGBA;
209 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::DIFFUSIONTENSOR3D;
215 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::VECTOR;
221 template <
class C,
unsigned int N>
224 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::VECTOR;
227 template <
class C,
unsigned int N>
230 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::COVARIANTVECTOR;
233 template <
class C,
unsigned int N>
236 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::COVARIANTVECTOR;
239 template <
class C,
unsigned int N>
242 static const itkIOPixelType IOCompositeType = itk::ImageIOBase::MATRIX;
254 template <
class T,
bool Primitive>
265 static const itkIOPixelType IOPixelType = itk::ImageIOBase::SCALAR;
271 #endif // PIXELTYPETRAITS_H
PixelTypeTrait< isPrimitiveType< T >::value, T >::ValueType ComponentType
itk::VectorImage< TPixelType, VDimension > ImageType
DataCollection - Class to facilitate loading/accessing structured data.
itk::ImageIOBase::IOPixelType itkIOPixelType
static const int PixelComponentUserType
Object for compile-time translation of a composite pixel type into an itk::ImageIOBase::IOPixelType i...
itk::Image< TPixelType, VDimension > ImageType
Object for compile-time resolving of the number of components for given type.
itk::VectorImage< TPixelType, VDimension > ImageType
ValueType
Type of the value held by a Value object.
#define DEFINE_TYPE_PRIMITIVE(_TYPEIN)
Provides a partial specialization for the.
This is an implementation of a type trait to provide a compile-time check for PixelType used in the i...
Compile time resolving of the type of a component.
Compile-time trait for resolving the ValueType from an ItkImageType.
Object for compile-time translation of a pixel type into an itk::ImageIOBase::IOPixelType information...
static const int PixelUserType