From cc2f3e22307a2ddb835c4ae15dbe5302a143653f Mon Sep 17 00:00:00 2001 From: Romulo Pinho Date: Tue, 21 Feb 2012 15:26:05 +0100 Subject: [PATCH] Revert "corrected error when opening 4D vector fields" This reverts commit 832f2cee39cf5f9c4eab850124dff5c96ea0b15c. --- common/vvImageReader.txx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/common/vvImageReader.txx b/common/vvImageReader.txx index 6a4333f..e15e6d7 100644 --- a/common/vvImageReader.txx +++ b/common/vvImageReader.txx @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include @@ -36,12 +36,7 @@ template void vvImageReader::UpdateWithDim(std::string InputPixelType) { if (mType == VECTORFIELD || mType == VECTORFIELDWITHTIME) - { - if (VImageDimension == 4) - UpdateWithDimAndInputVectorPixelType,VImageDimension>(); - else - UpdateWithDimAndInputVectorPixelType,VImageDimension>(); - } + UpdateWithDimAndInputVectorPixelType,VImageDimension>(); else if (InputPixelType == "short") UpdateWithDimAndInputPixelType(); else if (InputPixelType == "unsigned_short") @@ -240,15 +235,14 @@ void vvImageReader::UpdateWithDimAndInputVectorPixelType() } analyzeImageIO = dynamic_cast( reader->GetImageIO() ); } - + typedef itk::Image< itk::Vector, VImageDimension > VectorImageType; - typedef itk::FlexibleVectorCastImageFilter CasterType; + typedef itk::VectorCastImageFilter CasterType; typename VectorImageType::Pointer casted_input; typename CasterType::Pointer caster = CasterType::New(); caster->SetInput(input); - caster->Update(); casted_input = caster->GetOutput(); - + mImage = vvImageFromITK >(casted_input, mType == IMAGEWITHTIME || mType == VECTORFIELDWITHTIME); // For unknown analyze orientations, we set identity -- 2.45.1