X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FvvImageReader.txx;h=2d7d5b573f3c9a2985bfef023c21f4a542c53537;hb=69667910c62b2c9e30d795a9af668855a8de78d3;hp=01fc707ed910373e5b96af38544083e0f7d4b03b;hpb=f90f148d7763ad4ccc855f7d7dedc4f4ebd8f325;p=clitk.git diff --git a/common/vvImageReader.txx b/common/vvImageReader.txx index 01fc707..2d7d5b5 100644 --- a/common/vvImageReader.txx +++ b/common/vvImageReader.txx @@ -34,7 +34,7 @@ template void vvImageReader::UpdateWithDim(std::string InputPixelType) { - if (mType == VECTORFIELD) + if (mType == VECTORFIELD || mType == VECTORFIELDWITHTIME) UpdateWithDimAndInputPixelType,VImageDimension>(); else if (InputPixelType == "short") UpdateWithDimAndInputPixelType(); @@ -139,7 +139,12 @@ void vvImageReader::UpdateWithDimAndInputPixelType() try { if (mType == IMAGEWITHTIME) - mImage=vvImageFromITK(reader->GetOutput(),true); + { + std::cerr << "We should never come here:" << std::endl + << " Calling vvImageReader with multiple images and IMAGEWITHTIME is undefined." << std::endl + << " You are probably looking for MERGEDWITHTIME Type." << std::endl; + return; + } else mImage=vvImageFromITK(reader->GetOutput()); } catch ( itk::ExceptionObject & err ) { @@ -157,7 +162,7 @@ void vvImageReader::UpdateWithDimAndInputPixelType() reader->ReleaseDataFlagOn(); try { - if (mType == IMAGEWITHTIME) + if (mType == IMAGEWITHTIME || mType == VECTORFIELDWITHTIME) mImage=vvImageFromITK(reader->GetOutput(),true); else mImage=vvImageFromITK(reader->GetOutput());