// clitk include
#include "clitkImageToImageGenericFilter.h"
-// itk include
-#include "itkCastImageFilter.h"
namespace clitk {
bool mDisplayWarning;
template<class InputImageType, class OutputPixelType> void UpdateWithOutputType();
+ template<class InputImageType, class OutputPixelType> void UpdateWithOutputVectorType();
}; // end class ImageConvertGenericFilter
- //#include "clitkImageConvertGenericFilter.txx"
+#define VEC_UPDATE_DECL(TYPE_IN, COMP, DIM, TYPE_OUT) \
+ template<> void ImageConvertGenericFilter::UpdateWithOutputType<itk::Image<itk::Vector<TYPE_IN, COMP>, DIM>, TYPE_OUT>()
+
+VEC_UPDATE_DECL(char, 2, 2, unsigned char);
+VEC_UPDATE_DECL(char, 2, 3, unsigned char);
+VEC_UPDATE_DECL(char, 2, 4, unsigned char);
+VEC_UPDATE_DECL(char, 2, 2, char);
+VEC_UPDATE_DECL(char, 2, 3, char);
+VEC_UPDATE_DECL(char, 2, 4, char);
+VEC_UPDATE_DECL(char, 2, 2, unsigned short);
+VEC_UPDATE_DECL(char, 2, 3, unsigned short);
+VEC_UPDATE_DECL(char, 2, 4, unsigned short);
+VEC_UPDATE_DECL(char, 2, 2, short);
+VEC_UPDATE_DECL(char, 2, 3, short);
+VEC_UPDATE_DECL(char, 2, 4, short);
+VEC_UPDATE_DECL(char, 2, 2, int);
+VEC_UPDATE_DECL(char, 2, 3, int);
+VEC_UPDATE_DECL(char, 2, 4, int);
+VEC_UPDATE_DECL(char, 2, 2, float);
+VEC_UPDATE_DECL(char, 2, 3, float);
+VEC_UPDATE_DECL(char, 2, 4, float);
+VEC_UPDATE_DECL(char, 2, 2, double);
+VEC_UPDATE_DECL(char, 2, 3, double);
+VEC_UPDATE_DECL(char, 2, 4, double);
+
+VEC_UPDATE_DECL(char, 3, 2, unsigned char);
+VEC_UPDATE_DECL(char, 3, 3, unsigned char);
+VEC_UPDATE_DECL(char, 3, 4, unsigned char);
+VEC_UPDATE_DECL(char, 3, 2, char);
+VEC_UPDATE_DECL(char, 3, 3, char);
+VEC_UPDATE_DECL(char, 3, 4, char);
+VEC_UPDATE_DECL(char, 3, 2, unsigned short);
+VEC_UPDATE_DECL(char, 3, 3, unsigned short);
+VEC_UPDATE_DECL(char, 3, 4, unsigned short);
+VEC_UPDATE_DECL(char, 3, 2, short);
+VEC_UPDATE_DECL(char, 3, 3, short);
+VEC_UPDATE_DECL(char, 3, 4, short);
+VEC_UPDATE_DECL(char, 3, 2, int);
+VEC_UPDATE_DECL(char, 3, 3, int);
+VEC_UPDATE_DECL(char, 3, 4, int);
+VEC_UPDATE_DECL(char, 3, 2, float);
+VEC_UPDATE_DECL(char, 3, 3, float);
+VEC_UPDATE_DECL(char, 3, 4, float);
+VEC_UPDATE_DECL(char, 3, 2, double);
+VEC_UPDATE_DECL(char, 3, 3, double);
+VEC_UPDATE_DECL(char, 3, 4, double);
+
+VEC_UPDATE_DECL(unsigned char, 2, 2, unsigned char);
+VEC_UPDATE_DECL(unsigned char, 2, 3, unsigned char);
+VEC_UPDATE_DECL(unsigned char, 2, 4, unsigned char);
+VEC_UPDATE_DECL(unsigned char, 2, 2, char);
+VEC_UPDATE_DECL(unsigned char, 2, 3, char);
+VEC_UPDATE_DECL(unsigned char, 2, 4, char);
+VEC_UPDATE_DECL(unsigned char, 2, 2, unsigned short);
+VEC_UPDATE_DECL(unsigned char, 2, 3, unsigned short);
+VEC_UPDATE_DECL(unsigned char, 2, 4, unsigned short);
+VEC_UPDATE_DECL(unsigned char, 2, 2, short);
+VEC_UPDATE_DECL(unsigned char, 2, 3, short);
+VEC_UPDATE_DECL(unsigned char, 2, 4, short);
+VEC_UPDATE_DECL(unsigned char, 2, 2, int);
+VEC_UPDATE_DECL(unsigned char, 2, 3, int);
+VEC_UPDATE_DECL(unsigned char, 2, 4, int);
+VEC_UPDATE_DECL(unsigned char, 2, 2, float);
+VEC_UPDATE_DECL(unsigned char, 2, 3, float);
+VEC_UPDATE_DECL(unsigned char, 2, 4, float);
+VEC_UPDATE_DECL(unsigned char, 2, 2, double);
+VEC_UPDATE_DECL(unsigned char, 2, 3, double);
+VEC_UPDATE_DECL(unsigned char, 2, 4, double);
+
+VEC_UPDATE_DECL(unsigned char, 3, 2, unsigned char);
+VEC_UPDATE_DECL(unsigned char, 3, 3, unsigned char);
+VEC_UPDATE_DECL(unsigned char, 3, 4, unsigned char);
+VEC_UPDATE_DECL(unsigned char, 3, 2, char);
+VEC_UPDATE_DECL(unsigned char, 3, 3, char);
+VEC_UPDATE_DECL(unsigned char, 3, 4, char);
+VEC_UPDATE_DECL(unsigned char, 3, 2, unsigned short);
+VEC_UPDATE_DECL(unsigned char, 3, 3, unsigned short);
+VEC_UPDATE_DECL(unsigned char, 3, 4, unsigned short);
+VEC_UPDATE_DECL(unsigned char, 3, 2, short);
+VEC_UPDATE_DECL(unsigned char, 3, 3, short);
+VEC_UPDATE_DECL(unsigned char, 3, 4, short);
+VEC_UPDATE_DECL(unsigned char, 3, 2, int);
+VEC_UPDATE_DECL(unsigned char, 3, 3, int);
+VEC_UPDATE_DECL(unsigned char, 3, 4, int);
+VEC_UPDATE_DECL(unsigned char, 3, 2, float);
+VEC_UPDATE_DECL(unsigned char, 3, 3, float);
+VEC_UPDATE_DECL(unsigned char, 3, 4, float);
+VEC_UPDATE_DECL(unsigned char, 3, 2, double);
+VEC_UPDATE_DECL(unsigned char, 3, 3, double);
+VEC_UPDATE_DECL(unsigned char, 3, 4, double);
+
+VEC_UPDATE_DECL(short, 2, 2, unsigned char);
+VEC_UPDATE_DECL(short, 2, 3, unsigned char);
+VEC_UPDATE_DECL(short, 2, 4, unsigned char);
+VEC_UPDATE_DECL(short, 2, 2, char);
+VEC_UPDATE_DECL(short, 2, 3, char);
+VEC_UPDATE_DECL(short, 2, 4, char);
+VEC_UPDATE_DECL(short, 2, 2, unsigned short);
+VEC_UPDATE_DECL(short, 2, 3, unsigned short);
+VEC_UPDATE_DECL(short, 2, 4, unsigned short);
+VEC_UPDATE_DECL(short, 2, 2, short);
+VEC_UPDATE_DECL(short, 2, 3, short);
+VEC_UPDATE_DECL(short, 2, 4, short);
+VEC_UPDATE_DECL(short, 2, 2, int);
+VEC_UPDATE_DECL(short, 2, 3, int);
+VEC_UPDATE_DECL(short, 2, 4, int);
+VEC_UPDATE_DECL(short, 2, 2, float);
+VEC_UPDATE_DECL(short, 2, 3, float);
+VEC_UPDATE_DECL(short, 2, 4, float);
+VEC_UPDATE_DECL(short, 2, 2, double);
+VEC_UPDATE_DECL(short, 2, 3, double);
+VEC_UPDATE_DECL(short, 2, 4, double);
+
+VEC_UPDATE_DECL(short, 3, 2, unsigned char);
+VEC_UPDATE_DECL(short, 3, 3, unsigned char);
+VEC_UPDATE_DECL(short, 3, 4, unsigned char);
+VEC_UPDATE_DECL(short, 3, 2, char);
+VEC_UPDATE_DECL(short, 3, 3, char);
+VEC_UPDATE_DECL(short, 3, 4, char);
+VEC_UPDATE_DECL(short, 3, 2, unsigned short);
+VEC_UPDATE_DECL(short, 3, 3, unsigned short);
+VEC_UPDATE_DECL(short, 3, 4, unsigned short);
+VEC_UPDATE_DECL(short, 3, 2, short);
+VEC_UPDATE_DECL(short, 3, 3, short);
+VEC_UPDATE_DECL(short, 3, 4, short);
+VEC_UPDATE_DECL(short, 3, 2, int);
+VEC_UPDATE_DECL(short, 3, 3, int);
+VEC_UPDATE_DECL(short, 3, 4, int);
+VEC_UPDATE_DECL(short, 3, 2, float);
+VEC_UPDATE_DECL(short, 3, 3, float);
+VEC_UPDATE_DECL(short, 3, 4, float);
+VEC_UPDATE_DECL(short, 3, 2, double);
+VEC_UPDATE_DECL(short, 3, 3, double);
+VEC_UPDATE_DECL(short, 3, 4, double);
+
+VEC_UPDATE_DECL(unsigned short, 2, 2, unsigned char);
+VEC_UPDATE_DECL(unsigned short, 2, 3, unsigned char);
+VEC_UPDATE_DECL(unsigned short, 2, 4, unsigned char);
+VEC_UPDATE_DECL(unsigned short, 2, 2, char);
+VEC_UPDATE_DECL(unsigned short, 2, 3, char);
+VEC_UPDATE_DECL(unsigned short, 2, 4, char);
+VEC_UPDATE_DECL(unsigned short, 2, 2, unsigned short);
+VEC_UPDATE_DECL(unsigned short, 2, 3, unsigned short);
+VEC_UPDATE_DECL(unsigned short, 2, 4, unsigned short);
+VEC_UPDATE_DECL(unsigned short, 2, 2, short);
+VEC_UPDATE_DECL(unsigned short, 2, 3, short);
+VEC_UPDATE_DECL(unsigned short, 2, 4, short);
+VEC_UPDATE_DECL(unsigned short, 2, 2, int);
+VEC_UPDATE_DECL(unsigned short, 2, 3, int);
+VEC_UPDATE_DECL(unsigned short, 2, 4, int);
+VEC_UPDATE_DECL(unsigned short, 2, 2, float);
+VEC_UPDATE_DECL(unsigned short, 2, 3, float);
+VEC_UPDATE_DECL(unsigned short, 2, 4, float);
+VEC_UPDATE_DECL(unsigned short, 2, 2, double);
+VEC_UPDATE_DECL(unsigned short, 2, 3, double);
+VEC_UPDATE_DECL(unsigned short, 2, 4, double);
+
+VEC_UPDATE_DECL(unsigned short, 3, 2, unsigned char);
+VEC_UPDATE_DECL(unsigned short, 3, 3, unsigned char);
+VEC_UPDATE_DECL(unsigned short, 3, 4, unsigned char);
+VEC_UPDATE_DECL(unsigned short, 3, 2, char);
+VEC_UPDATE_DECL(unsigned short, 3, 3, char);
+VEC_UPDATE_DECL(unsigned short, 3, 4, char);
+VEC_UPDATE_DECL(unsigned short, 3, 2, unsigned short);
+VEC_UPDATE_DECL(unsigned short, 3, 3, unsigned short);
+VEC_UPDATE_DECL(unsigned short, 3, 4, unsigned short);
+VEC_UPDATE_DECL(unsigned short, 3, 2, short);
+VEC_UPDATE_DECL(unsigned short, 3, 3, short);
+VEC_UPDATE_DECL(unsigned short, 3, 4, short);
+VEC_UPDATE_DECL(unsigned short, 3, 2, int);
+VEC_UPDATE_DECL(unsigned short, 3, 3, int);
+VEC_UPDATE_DECL(unsigned short, 3, 4, int);
+VEC_UPDATE_DECL(unsigned short, 3, 2, float);
+VEC_UPDATE_DECL(unsigned short, 3, 3, float);
+VEC_UPDATE_DECL(unsigned short, 3, 4, float);
+VEC_UPDATE_DECL(unsigned short, 3, 2, double);
+VEC_UPDATE_DECL(unsigned short, 3, 3, double);
+VEC_UPDATE_DECL(unsigned short, 3, 4, double);
+
+VEC_UPDATE_DECL(int, 2, 2, unsigned char);
+VEC_UPDATE_DECL(int, 2, 3, unsigned char);
+VEC_UPDATE_DECL(int, 2, 4, unsigned char);
+VEC_UPDATE_DECL(int, 2, 2, char);
+VEC_UPDATE_DECL(int, 2, 3, char);
+VEC_UPDATE_DECL(int, 2, 4, char);
+VEC_UPDATE_DECL(int, 2, 2, unsigned short);
+VEC_UPDATE_DECL(int, 2, 3, unsigned short);
+VEC_UPDATE_DECL(int, 2, 4, unsigned short);
+VEC_UPDATE_DECL(int, 2, 2, short);
+VEC_UPDATE_DECL(int, 2, 3, short);
+VEC_UPDATE_DECL(int, 2, 4, short);
+VEC_UPDATE_DECL(int, 2, 2, int);
+VEC_UPDATE_DECL(int, 2, 3, int);
+VEC_UPDATE_DECL(int, 2, 4, int);
+VEC_UPDATE_DECL(int, 2, 2, float);
+VEC_UPDATE_DECL(int, 2, 3, float);
+VEC_UPDATE_DECL(int, 2, 4, float);
+VEC_UPDATE_DECL(int, 2, 2, double);
+VEC_UPDATE_DECL(int, 2, 3, double);
+VEC_UPDATE_DECL(int, 2, 4, double);
+
+VEC_UPDATE_DECL(int, 3, 2, unsigned char);
+VEC_UPDATE_DECL(int, 3, 3, unsigned char);
+VEC_UPDATE_DECL(int, 3, 4, unsigned char);
+VEC_UPDATE_DECL(int, 3, 2, char);
+VEC_UPDATE_DECL(int, 3, 3, char);
+VEC_UPDATE_DECL(int, 3, 4, char);
+VEC_UPDATE_DECL(int, 3, 2, unsigned short);
+VEC_UPDATE_DECL(int, 3, 3, unsigned short);
+VEC_UPDATE_DECL(int, 3, 4, unsigned short);
+VEC_UPDATE_DECL(int, 3, 2, short);
+VEC_UPDATE_DECL(int, 3, 3, short);
+VEC_UPDATE_DECL(int, 3, 4, short);
+VEC_UPDATE_DECL(int, 3, 2, int);
+VEC_UPDATE_DECL(int, 3, 3, int);
+VEC_UPDATE_DECL(int, 3, 4, int);
+VEC_UPDATE_DECL(int, 3, 2, float);
+VEC_UPDATE_DECL(int, 3, 3, float);
+VEC_UPDATE_DECL(int, 3, 4, float);
+VEC_UPDATE_DECL(int, 3, 2, double);
+VEC_UPDATE_DECL(int, 3, 3, double);
+VEC_UPDATE_DECL(int, 3, 4, double);
+
+VEC_UPDATE_DECL(float, 2, 2, unsigned char);
+VEC_UPDATE_DECL(float, 2, 3, unsigned char);
+VEC_UPDATE_DECL(float, 2, 4, unsigned char);
+VEC_UPDATE_DECL(float, 2, 2, char);
+VEC_UPDATE_DECL(float, 2, 3, char);
+VEC_UPDATE_DECL(float, 2, 4, char);
+VEC_UPDATE_DECL(float, 2, 2, unsigned short);
+VEC_UPDATE_DECL(float, 2, 3, unsigned short);
+VEC_UPDATE_DECL(float, 2, 4, unsigned short);
+VEC_UPDATE_DECL(float, 2, 2, short);
+VEC_UPDATE_DECL(float, 2, 3, short);
+VEC_UPDATE_DECL(float, 2, 4, short);
+VEC_UPDATE_DECL(float, 2, 2, int);
+VEC_UPDATE_DECL(float, 2, 3, int);
+VEC_UPDATE_DECL(float, 2, 4, int);
+VEC_UPDATE_DECL(float, 2, 2, float);
+VEC_UPDATE_DECL(float, 2, 3, float);
+VEC_UPDATE_DECL(float, 2, 4, float);
+VEC_UPDATE_DECL(float, 2, 2, double);
+VEC_UPDATE_DECL(float, 2, 3, double);
+VEC_UPDATE_DECL(float, 2, 4, double);
+
+VEC_UPDATE_DECL(float, 3, 2, unsigned char);
+VEC_UPDATE_DECL(float, 3, 3, unsigned char);
+VEC_UPDATE_DECL(float, 3, 4, unsigned char);
+VEC_UPDATE_DECL(float, 3, 2, char);
+VEC_UPDATE_DECL(float, 3, 3, char);
+VEC_UPDATE_DECL(float, 3, 4, char);
+VEC_UPDATE_DECL(float, 3, 2, unsigned short);
+VEC_UPDATE_DECL(float, 3, 3, unsigned short);
+VEC_UPDATE_DECL(float, 3, 4, unsigned short);
+VEC_UPDATE_DECL(float, 3, 2, short);
+VEC_UPDATE_DECL(float, 3, 3, short);
+VEC_UPDATE_DECL(float, 3, 4, short);
+VEC_UPDATE_DECL(float, 3, 2, int);
+VEC_UPDATE_DECL(float, 3, 3, int);
+VEC_UPDATE_DECL(float, 3, 4, int);
+VEC_UPDATE_DECL(float, 3, 2, float);
+VEC_UPDATE_DECL(float, 3, 3, float);
+VEC_UPDATE_DECL(float, 3, 4, float);
+VEC_UPDATE_DECL(float, 3, 2, double);
+VEC_UPDATE_DECL(float, 3, 3, double);
+VEC_UPDATE_DECL(float, 3, 4, double);
+
+VEC_UPDATE_DECL(double, 2, 2, unsigned char);
+VEC_UPDATE_DECL(double, 2, 3, unsigned char);
+VEC_UPDATE_DECL(double, 2, 4, unsigned char);
+VEC_UPDATE_DECL(double, 2, 2, char);
+VEC_UPDATE_DECL(double, 2, 3, char);
+VEC_UPDATE_DECL(double, 2, 4, char);
+VEC_UPDATE_DECL(double, 2, 2, unsigned short);
+VEC_UPDATE_DECL(double, 2, 3, unsigned short);
+VEC_UPDATE_DECL(double, 2, 4, unsigned short);
+VEC_UPDATE_DECL(double, 2, 2, short);
+VEC_UPDATE_DECL(double, 2, 3, short);
+VEC_UPDATE_DECL(double, 2, 4, short);
+VEC_UPDATE_DECL(double, 2, 2, int);
+VEC_UPDATE_DECL(double, 2, 3, int);
+VEC_UPDATE_DECL(double, 2, 4, int);
+VEC_UPDATE_DECL(double, 2, 2, float);
+VEC_UPDATE_DECL(double, 2, 3, float);
+VEC_UPDATE_DECL(double, 2, 4, float);
+VEC_UPDATE_DECL(double, 2, 2, double);
+VEC_UPDATE_DECL(double, 2, 3, double);
+VEC_UPDATE_DECL(double, 2, 4, double);
+
+VEC_UPDATE_DECL(double, 3, 2, unsigned char);
+VEC_UPDATE_DECL(double, 3, 3, unsigned char);
+VEC_UPDATE_DECL(double, 3, 4, unsigned char);
+VEC_UPDATE_DECL(double, 3, 2, char);
+VEC_UPDATE_DECL(double, 3, 3, char);
+VEC_UPDATE_DECL(double, 3, 4, char);
+VEC_UPDATE_DECL(double, 3, 2, unsigned short);
+VEC_UPDATE_DECL(double, 3, 3, unsigned short);
+VEC_UPDATE_DECL(double, 3, 4, unsigned short);
+VEC_UPDATE_DECL(double, 3, 2, short);
+VEC_UPDATE_DECL(double, 3, 3, short);
+VEC_UPDATE_DECL(double, 3, 4, short);
+VEC_UPDATE_DECL(double, 3, 2, int);
+VEC_UPDATE_DECL(double, 3, 3, int);
+VEC_UPDATE_DECL(double, 3, 4, int);
+VEC_UPDATE_DECL(double, 3, 2, float);
+VEC_UPDATE_DECL(double, 3, 3, float);
+VEC_UPDATE_DECL(double, 3, 4, float);
+VEC_UPDATE_DECL(double, 3, 2, double);
+VEC_UPDATE_DECL(double, 3, 3, double);
+VEC_UPDATE_DECL(double, 3, 4, double);
+
+//#include "clitkImageConvertGenericFilter.txx"
} // end namespace