]> Creatis software - clitk.git/commitdiff
Revert "corrected error when opening 4D vector fields"
authorRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Tue, 21 Feb 2012 14:26:05 +0000 (15:26 +0100)
committerRomulo Pinho <romulo.pinho@lyon.unicancer.fr>
Tue, 21 Feb 2012 14:27:35 +0000 (15:27 +0100)
This reverts commit 832f2cee39cf5f9c4eab850124dff5c96ea0b15c.

common/vvImageReader.txx

index 6a4333ff3c59c055c704117954747e7f656a133b..e15e6d7688ff4a6a202e8f9e62bd42d133128ca5 100644 (file)
@@ -24,7 +24,7 @@
 #include <itkImageSeriesReader.h>
 #include <itkImageToVTKImageFilter.h>
 #include <itkAnalyzeImageIO.h>
-#include <itkFlexibleVectorCastImageFilter.h>
+#include <itkVectorCastImageFilter.h>
 
 #include <vtkTransform.h>
 
@@ -36,12 +36,7 @@ template<unsigned int VImageDimension>
 void vvImageReader::UpdateWithDim(std::string InputPixelType)
 {
   if (mType == VECTORFIELD || mType == VECTORFIELDWITHTIME)
-  {
-    if (VImageDimension == 4)
-      UpdateWithDimAndInputVectorPixelType<itk::Vector<float,3>,VImageDimension>();
-    else
-      UpdateWithDimAndInputVectorPixelType<itk::Vector<float,VImageDimension>,VImageDimension>();
-  }
+    UpdateWithDimAndInputVectorPixelType<itk::Vector<float,VImageDimension>,VImageDimension>();
   else if (InputPixelType == "short")
     UpdateWithDimAndInputPixelType<short,VImageDimension>();
   else if (InputPixelType == "unsigned_short")
@@ -240,15 +235,14 @@ void vvImageReader::UpdateWithDimAndInputVectorPixelType()
     }
     analyzeImageIO = dynamic_cast<itk::AnalyzeImageIO*>( reader->GetImageIO() );
   }
-  
+
   typedef itk::Image< itk::Vector<float , 3>, VImageDimension > VectorImageType;
-  typedef itk::FlexibleVectorCastImageFilter<InputImageType, VectorImageType> CasterType;
+  typedef itk::VectorCastImageFilter<InputImageType, VectorImageType> CasterType;
   typename VectorImageType::Pointer casted_input;
   typename CasterType::Pointer caster = CasterType::New();
   caster->SetInput(input);
-  caster->Update();
   casted_input = caster->GetOutput();
-  
+
   mImage = vvImageFromITK<VImageDimension, itk::Vector<float, 3> >(casted_input, mType == IMAGEWITHTIME || mType == VECTORFIELDWITHTIME);
 
   // For unknown analyze orientations, we set identity