]> Creatis software - clitk.git/commitdiff
Correct VFResample (now should work)
authordsarrut <dsarrut>
Thu, 24 Mar 2011 15:46:41 +0000 (15:46 +0000)
committerdsarrut <dsarrut>
Thu, 24 Mar 2011 15:46:41 +0000 (15:46 +0000)
tools/clitkVFResampleGenericFilter.cxx
tools/clitkVFResampleGenericFilter.h

index 2cd6b7d58de51940ce383925687bbf9535c96345..6bbcff55a70da893d35bebd54b0f69e5f57b4bc1 100755 (executable)
 ======================================================================-====*/
 #ifndef CLITKVFRESAMPLEGENERICFILTER_CXX
 #define CLITKVFRESAMPLEGENERICFILTER_CXX
-/**
- -------------------------------------------------------------------
- * @file   clitkVFResampleGenericFilter.cxx
- * @author David Sarrut <David.Sarrut@creatis.insa-lyon.fr>
- * @date   23 Feb 2008 08:37:53
-
- * @brief
-
- -------------------------------------------------------------------*/
 
 #include "clitkVFResampleGenericFilter.h"
 
@@ -35,7 +26,7 @@ clitk::VFResampleGenericFilter::VFResampleGenericFilter():
 {
   InitializeImageType<2>();
   InitializeImageType<3>();
-  InitializeImageType<4>();
+  //  InitializeImageType<4>();
   mApplyGaussianFilterBefore = false;
   mDefaultPixelValue = 0.0;
   mInterpolatorName = "NN";
@@ -48,7 +39,9 @@ clitk::VFResampleGenericFilter::VFResampleGenericFilter():
 template<unsigned int Dim>
 void clitk::VFResampleGenericFilter::InitializeImageType()
 {
-  ADD_IMAGE_TYPE(Dim, float);
+  //typedef itk::Vector<float,Dim> v3f;
+  //ADD_IMAGE_TYPE(Dim, v3f);
+  ADD_VEC_IMAGE_TYPE(Dim, Dim, float)
 }
 //--------------------------------------------------------------------
 
@@ -75,7 +68,8 @@ template<unsigned int Dim, class PixelType, unsigned int DimCompo>
 void clitk::VFResampleGenericFilter::Update_WithDimAndPixelTypeAndComponent()
 {
   // Reading input
-  typedef itk::Vector<PixelType, DimCompo> DisplacementType;
+  //  typedef itk::Vector<PixelType, DimCompo> DisplacementType;
+  typedef PixelType DisplacementType;
   typedef itk::Image< DisplacementType, Dim > ImageType;
 
   typename ImageType::Pointer input = clitk::readImage<ImageType>(m_InputFilenames, m_IOVerbose);
index 351a6fc1e1166b63e86c9de21c7e29b8135a9e4e..b98d2008c9a87b8ccf7408a852a1432566299d51 100755 (executable)
@@ -100,8 +100,6 @@ namespace clitk {
   }; // end class VFResampleGenericFilter
   //--------------------------------------------------------------------
     
-#include "clitkVFResampleGenericFilter.txx"
-
 } // end namespace
 //--------------------------------------------------------------------