From: Vivien Delmon Date: Tue, 3 May 2011 14:49:15 +0000 (+0200) Subject: Add error message to prevent bad use of vvImageReader X-Git-Tag: v1.2.0~3 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8df51d54a1774008d30619248a3887b8afbe411b;p=clitk.git Add error message to prevent bad use of vvImageReader * vvImageReader had the same behaviour when used with MERGEDWITHTIME and with IMAGEWITHTIME in case of multiple images to load. The second is less effective since it composes multiple images to decompose them after. I added an error message asking to use MERGEDWITHTIME in this case. --- diff --git a/common/vvImageReader.txx b/common/vvImageReader.txx index 01fc707..3a38719 100644 --- a/common/vvImageReader.txx +++ b/common/vvImageReader.txx @@ -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 ) {