]> Creatis software - clitk.git/blobdiff - common/vvImageReader.txx
Add error message to prevent bad use of vvImageReader
[clitk.git] / common / vvImageReader.txx
index 01fc707ed910373e5b96af38544083e0f7d4b03b..3a38719c2d4a16eedaed620bccd77ebb3aa58510 100644 (file)
@@ -139,7 +139,12 @@ void vvImageReader::UpdateWithDimAndInputPixelType()
 
       try {
         if (mType == IMAGEWITHTIME)
-          mImage=vvImageFromITK<VImageDimension,InputPixelType>(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<VImageDimension,InputPixelType>(reader->GetOutput());
       } catch ( itk::ExceptionObject & err ) {