]> Creatis software - clitk.git/blobdiff - tools/clitkImageConvertGenericFilter.h
kept only the "most relevant" vector conversions
[clitk.git] / tools / clitkImageConvertGenericFilter.h
index 71ef2c93360e398606f23027b1b650429e0916e3..20717144431725a5f793d061467e10f170dc61bb 100644 (file)
 // clitk include
 #include "clitkImageToImageGenericFilter.h"
 
+// itk include
+#include "itkCastImageFilter.h"
+#include "itkVectorCastImageFilter.h"
+
 
 namespace clitk {
   
+  template <class TPixel>
+  class ImageConvertTraits
+  {
+  public:
+    enum { IS_VECTOR = false };
+    ImageConvertTraits() {
+      TPixel p = "SCALAR";
+    }
+  };
+
+  template < class TPixel, unsigned int Comp > 
+  class ImageConvertTraits< itk::Vector<TPixel, Comp> > 
+  { 
+  public: 
+    enum { IS_VECTOR = true }; 
+  };
+
   class ImageConvertGenericFilter: 
     public clitk::ImageToImageGenericFilter<ImageConvertGenericFilter> {
     
@@ -49,6 +70,8 @@ namespace clitk {
     itkNewMacro(Self);
     
     // Members functions
+    std::string GetInputPixelTypeName() { return m_PixelTypeName; }
+    std::string GetOutputPixelTypeName() { return mOutputPixelTypeName; }
     void SetOutputPixelType(std::string p) { mOutputPixelTypeName = p; }
     bool IsWarningOccur() { return mWarningOccur; }
     std::string & GetWarning() { return mWarning; }
@@ -59,329 +82,137 @@ namespace clitk {
     template<class InputImageType>  
     void UpdateWithInputImageType();
 
+    template<class PixelType, class OutputPixelType>
+    void CheckTypes(std::string inType, std::string outType);
+    
   protected:
+
     template<unsigned int Dim> void InitializeImageType();
     std::string mOutputPixelTypeName;
     std::string mWarning;
     bool mWarningOccur;
     bool mDisplayWarning;
 
-    template<class InputImageType, class OutputPixelType> void UpdateWithOutputType();
-    template<class InputImageType, class OutputPixelType> void UpdateWithOutputVectorType();
-
+  private:
+    template <class InputImageType, bool isVector>
+    class UpdateWithSelectiveOutputType
+    {
+    public:
+      static bool Run(ImageConvertGenericFilter& filter, std::string outputPixelType)
+      {
+          if (IsSameType<char>(outputPixelType))
+            UpdateWithOutputType<char>(filter);
+          else if (IsSameType<uchar>(outputPixelType))
+            UpdateWithOutputType<uchar>(filter);
+          else if (IsSameType<short>(outputPixelType))
+            UpdateWithOutputType<short>(filter);
+          else if (IsSameType<ushort>(outputPixelType))
+            UpdateWithOutputType<ushort>(filter);
+          else if (IsSameType<int>(outputPixelType))
+            UpdateWithOutputType<int>(filter);
+          else if (IsSameType<float>(outputPixelType))
+            UpdateWithOutputType<float>(filter);
+          else if (IsSameType<double>(outputPixelType))
+            UpdateWithOutputType<double>(filter);
+          else
+          {
+            std::string list = CreateListOfTypes<float, double>();
+            std::cerr << "Error, I don't know the vector output type '" << outputPixelType 
+                      << "'. " << std::endl << "Known types are " << list << "." << std::endl;
+            return false;
+          }
+          
+          return true;
+      }
+
+    private:
+      
+      template <class OutputPixelType> 
+      static void UpdateWithOutputType(ImageConvertGenericFilter& filter)
+      {
+        // Read
+        typename InputImageType::Pointer input =filter.template GetInput<InputImageType>(0);
+
+        // Typedef
+        typedef typename InputImageType::PixelType PixelType;
+
+        // Warning
+        filter.CheckTypes<PixelType, OutputPixelType>(filter.GetInputPixelTypeName(), filter.GetOutputPixelTypeName());
+
+        // Cast
+        typedef itk::Image<OutputPixelType,InputImageType::ImageDimension> OutputImageType;
+        typedef itk::CastImageFilter<InputImageType, OutputImageType> FilterType;
+        typename FilterType::Pointer cast_filter = FilterType::New();
+        cast_filter->SetInput(input);
+        cast_filter->Update();
+
+        // Write
+        filter.SetNextOutput<OutputImageType>(cast_filter->GetOutput());
+      }
+    };
+    
+    template <class InputImageType>
+    class UpdateWithSelectiveOutputType<InputImageType, true>
+    {
+    public:
+      static bool Run(ImageConvertGenericFilter& filter, std::string outputPixelType)
+      {
+        /*
+        // RP: future conversions? 
+        if (IsSameType<char>(outputPixelType))
+          UpdateWithOutputVectorType<char>();
+        else if (IsSameType<uchar>(outputPixelType))
+          UpdateWithOutputVectorType<uchar>();
+        else if (IsSameType<short>(outputPixelType))
+          UpdateWithOutputVectorType<short>();
+        else if (IsSameType<ushort>(outputPixelType))
+          UpdateWithOutputVectorType<ushort>();
+        else if (IsSameType<int>(outputPixelType))
+          UpdateWithOutputVectorType<int>();
+        else 
+          */
+        if (IsSameType<float>(outputPixelType))
+          UpdateWithOutputVectorType<float>(filter);
+        else if (IsSameType<double>(outputPixelType))
+          UpdateWithOutputVectorType<double>(filter);
+        else
+        {
+          std::string list = CreateListOfTypes<float, double>();
+          std::cerr << "Error, I don't know the vector output type '" << outputPixelType  
+                    << "'. " << std::endl << "Known types are " << list << "." << std::endl;
+          return false;
+        }
+        
+        return true;
+      }
+      
+    private:
+      
+      template <class OutputPixelType> 
+      static void UpdateWithOutputVectorType(ImageConvertGenericFilter& filter)
+      {
+        // Read
+        typename InputImageType::Pointer input =filter.template GetInput<InputImageType>(0);
+
+        // Typedef
+        typedef typename InputImageType::PixelType::ValueType PixelType;
+
+        // Warning
+        filter.CheckTypes<PixelType, OutputPixelType>(filter.GetInputPixelTypeName(), filter.GetOutputPixelTypeName());
+        
+        // Cast
+        typedef itk::Image<itk::Vector<OutputPixelType, InputImageType::PixelType::Dimension>, InputImageType::ImageDimension> OutputImageType;
+        typedef itk::VectorCastImageFilter<InputImageType, OutputImageType> FilterType;
+        typename FilterType::Pointer cast_filter = FilterType::New();
+        cast_filter->SetInput(input);
+        cast_filter->Update();
+
+        // Write
+        filter.SetNextOutput<OutputImageType>(cast_filter->GetOutput());
+      }
+    };
   }; // end class ImageConvertGenericFilter
 
-#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