24 #ifndef mitkPixelTypeList_h
25 #define mitkPixelTypeList_h
58 template <
typename T0,
101 template <
typename TypeList>
106 value = TypeList::length
122 template <
typename TypeList,
125 bool Stop = (Index == Step),
134 template <
typename TypeList,
int Index,
int Step,
bool Stop>
142 template <
typename TypeList,
int Index,
int Step,
bool OutOfRange>
147 typedef typename TypeList::head
type;
165 template <
typename TypeList,
int Index = 0,
bool Stop = (Index == PixelTypeLength<TypeList>::value)>
168 template <
typename TypeList,
int Index,
bool Stop>
171 template <
typename F>
186 template <
typename TypeList,
int Index>
189 template <
typename F>
192 throw std::out_of_range(
"Index out of range");
209 template <
typename X,
int VDimension,
typename T1 = EmptyType,
typename T2 = EmptyType,
typename T3 = EmptyType>
215 X *cl,
CallBack callBack,
const mitk::Image *mitkImage, T1 t1 = T1(), T2 t2 = T2(), T3 t3 = T3())
216 : cl(cl), callBack(callBack), mitkImage(mitkImage), pixelType(mitkImage->
GetPixelType()), t1(t1), t2(t2), t3(t3)
220 template <
typename PixelType>
230 typedef itk::Image<PixelType, VDimension> ImageType;
233 imagetoitk->SetInput(mitkImage);
234 imagetoitk->Update();
235 cl->*callBack(imagetoitk->GetOutput(), t1, t2, t3);
Image class for storing multi-dimensional medical image data.
unsigned int GetDimension() const
Get the number of dimensions of the image.
Describes the data type of image pixels.
Find image slices visible on a given plane.
Functor that converts a mitk::Image to an itk::Image and invokes a callback.
void(* CallBack)(T1, T2, T3)
AccessItkImageFunctor(X *cl, CallBack callBack, const mitk::Image *mitkImage, T1 t1=T1(), T2 t2=T2(), T3 t3=T3())
Sentinel type used to mark unused slots in a PixelTypeList.
Compile-time accessor that retrieves the type at position Index in a PixelTypeList.
GetPixelType< typename TypeList::tail, Index, Step+1 >::type type
Compile-time query for the number of types in a PixelTypeList.
Compile-time list of pixel types (up to 10 types).
PixelTypeList< T1, T2, T3, T4, T5, T6, T7, T8, T9 > tail
bool operator()(int, F &)
Run-time type switch over a PixelTypeList.
bool operator()(int i, F &f)