19 #include <itkDiffusionTensor3D.h>
20 #include <itkRGBPixel.h>
24 typedef itk::Image<itk::RGBPixel<unsigned char>, 2>
itkImageRGBUC2;
25 typedef itk::Image<itk::DiffusionTensor3D<float>, 2>
itkImageDTIF2;
26 typedef itk::Image<itk::DiffusionTensor3D<double>, 2>
itkImageDTID2;
31 typedef itkImageRGBUC2 ItkOutputImageType;
34 (itk::RGBPixel<unsigned char>),
35 (ItkOutputImageType::ImageDimension),
41 typedef itkImageDTIF2 ItkOutputImageType;
44 (itk::DiffusionTensor3D<float>),
45 (ItkOutputImageType::ImageDimension),
51 typedef itkImageDTID2 ItkOutputImageType;
54 (itk::DiffusionTensor3D<double>),
55 (ItkOutputImageType::ImageDimension),
59 typedef itk::Image<itk::RGBPixel<unsigned char>, 3>
itkImageRGBUC3;
60 typedef itk::Image<itk::DiffusionTensor3D<float>, 3>
itkImageDTIF3;
61 typedef itk::Image<itk::DiffusionTensor3D<double>, 3>
itkImageDTID3;
66 typedef itkImageRGBUC3 ItkOutputImageType;
69 (itk::RGBPixel<unsigned char>),
70 (ItkOutputImageType::ImageDimension),
76 typedef itkImageDTIF3 ItkOutputImageType;
79 (itk::DiffusionTensor3D<float>),
80 (ItkOutputImageType::ImageDimension),
86 typedef itkImageDTID3 ItkOutputImageType;
89 (itk::DiffusionTensor3D<double>),
90 (ItkOutputImageType::ImageDimension),
94 #define TYPE_VECS(HUN) \
96 TYPE_TEN_VECS(HUN + 10) \
97 TYPE_TEN_VECS(HUN + 20) \
98 TYPE_TEN_VECS(HUN + 30) \
99 TYPE_TEN_VECS(HUN + 40) \
100 TYPE_TEN_VECS(HUN + 50) \
101 TYPE_TEN_VECS(HUN + 60) \
102 TYPE_TEN_VECS(HUN + 70) \
103 TYPE_TEN_VECS(HUN + 80) \
104 TYPE_TEN_VECS(HUN + 90)
106 #define TYPE_TEN_VECS(HUN) \
107 TYPE_N_VEC(HUN + 1) \
108 TYPE_N_VEC(HUN + 2) \
109 TYPE_N_VEC(HUN + 3) \
110 TYPE_N_VEC(HUN + 4) \
111 TYPE_N_VEC(HUN + 5) \
112 TYPE_N_VEC(HUN + 6) \
113 TYPE_N_VEC(HUN + 7) \
114 TYPE_N_VEC(HUN + 8) \
115 TYPE_N_VEC(HUN + 9) \
118 #define TYPE_N_VEC(N_DIRS) \
119 _TYPE_N_VEC(N_DIRS, double) \
120 _TYPE_N_VEC(N_DIRS, float) \
121 _TYPE_N_VEC(N_DIRS, short)
123 #define _TYPE_N_VEC(N_DIRS, PIXTYPE) \
125 void MITKCORE_EXPORT CastToItkImage(const mitk::Image *mitkImage, \
126 itk::SmartPointer<itk::Image<itk::Vector<PIXTYPE, N_DIRS>, 2>> &itkOutputImage) \
129 typedef itk::Vector<PIXTYPE, N_DIRS> VECTORTYPE; \
130 typedef itk::Image<VECTORTYPE, 2> ItkOutputImageType2; \
131 AccessFixedTypeByItk_1( \
132 mitkImage, _CastToItkImage2Access, (VECTORTYPE), (ItkOutputImageType2::ImageDimension), itkOutputImage); \
135 void MITKCORE_EXPORT CastToItkImage(const mitk::Image *mitkImage, \
136 itk::SmartPointer<itk::Image<itk::Vector<PIXTYPE, N_DIRS>, 3>> &itkOutputImage) \
139 typedef itk::Vector<PIXTYPE, N_DIRS> VECTORTYPE; \
140 typedef itk::Image<VECTORTYPE, 3> ItkOutputImageType3; \
141 AccessFixedTypeByItk_1( \
142 mitkImage, _CastToItkImage2Access, (VECTORTYPE), (ItkOutputImageType3::ImageDimension), itkOutputImage); \
178 #endif // DOXYGEN_SKIP
itk::Image< itk::DiffusionTensor3D< float >, 2 > itkImageDTIF2
itk::Image< itk::DiffusionTensor3D< double >, 3 > itkImageDTID3
itk::Image< itk::RGBPixel< unsigned char >, 2 > itkImageRGBUC2
DataCollection - Class to facilitate loading/accessing structured data.
#define TYPE_N_VEC(N_DIRS)
itk::Image< itk::DiffusionTensor3D< float >, 3 > itkImageDTIF3
itk::Image< itk::DiffusionTensor3D< double >, 2 > itkImageDTID2
#define AccessFixedTypeByItk_1(mitkImage, itkImageTypeFunction, pixelTypeSeq, dimSeq, arg1)
Image class for storing images.
void _CastToItkImage2Access(const itk::Image< TPixel, VImageDimension > *itkInputImage, itk::SmartPointer< ItkOutputImageType > &itkOutputImage)
void MITKCORE_EXPORT CastToItkImage(const mitk::Image *mitkImage, itk::SmartPointer< ItkOutputImageType > &itkOutputImage)
Cast an mitk::Image to an itk::Image with a specific type.
itk::Image< itk::RGBPixel< unsigned char >, 3 > itkImageRGBUC3