Go to the documentation of this file. 3 #include <itkImageIOBase.h> 6 #include <itkVectorImage.h> 16 #define ANIMA_RETRIEVE_COMPONENT_TYPE(imageIO, function, ...) \ 17 switch (imageIO->GetComponentType())\ 19 case itk::ImageIOBase::UCHAR:\ 20 function<unsigned char>(__VA_ARGS__);\ 22 case itk::ImageIOBase::CHAR:\ 23 function<char>(__VA_ARGS__);\ 25 case itk::ImageIOBase::USHORT:\ 26 function<unsigned short>(__VA_ARGS__);\ 28 case itk::ImageIOBase::SHORT:\ 29 function<short>(__VA_ARGS__);\ 31 case itk::ImageIOBase::UINT:\ 32 std::cerr << "Component type detected is 'unsigned int', anima will use 'double' instead." << std::endl;\ 33 function<double>(__VA_ARGS__);\ 35 case itk::ImageIOBase::INT:\ 36 std::cerr << "Component type detected is 'int', anima will use 'double' instead." << std::endl;\ 37 function<double>(__VA_ARGS__);\ 39 case itk::ImageIOBase::FLOAT:\ 40 function<float>(__VA_ARGS__);\ 42 case itk::ImageIOBase::DOUBLE:\ 43 function<double>(__VA_ARGS__);\ 46 itk::ExceptionObject excp(__FILE__, __LINE__, "Component type not supported.", ITK_LOCATION);\ 60 #define ANIMA_RETRIEVE_NUMBER_OF_DIMENSIONS(imageIO, ComponentType, function, ...) \ 61 switch (imageIO->GetNumberOfDimensions())\ 64 function<ComponentType, 3>(__VA_ARGS__);\ 67 function<ComponentType, 4>(__VA_ARGS__);\ 70 itk::ExceptionObject excp(__FILE__, __LINE__, "Number of type not supported.", ITK_LOCATION);\ 88 #define ANIMA_CHECK_IF_COMPONENTS_ARE_VECTORS(imageIO, ComponentType, Dimension, function, ...) \ 89 switch (imageIO->GetNumberOfComponents())\ 93 itk::ExceptionObject excp(__FILE__, __LINE__, "Number of Component not supported.", ITK_LOCATION);\ 99 typedef itk::Image<ComponentType, Dimension> ImageType;\ 100 function<ImageType>(__VA_ARGS__);\ 105 typedef itk::VectorImage<ComponentType, Dimension> VectorImageType;\ 106 function<VectorImageType>(__VA_ARGS__);\ 121 #define ANIMA_RETRIEVE_NUMBER_OF_COMPONENTS(imageIO, ComponentType, dimension, function, ...) \ 122 switch (imageIO->GetNumberOfComponents())\ 125 function<itk::Image<ComponentType, dimension>(__VA_ARGS__);\ 128 function<itk::Image<itk::Vector<ComponentType, 3>, 1>(__VA_ARGS__);\ 130 function<itk::Image<itk::Vector<ComponentType, 6>, 1>(__VA_ARGS__);\ 132 itk::ExceptionObject excp(__FILE__, __LINE__, "Number of Component not supported.", ITK_LOCATION);\