From de0c500755f798a2ff44bbda3269b9c6c5e065e8 Mon Sep 17 00:00:00 2001 From: dsarrut Date: Wed, 15 Dec 2010 08:47:28 +0000 Subject: [PATCH] add exception if error --- common/clitkImageToImageGenericFilterBase.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/clitkImageToImageGenericFilterBase.cxx b/common/clitkImageToImageGenericFilterBase.cxx index ee9dcf8..afb4ad1 100644 --- a/common/clitkImageToImageGenericFilterBase.cxx +++ b/common/clitkImageToImageGenericFilterBase.cxx @@ -149,8 +149,10 @@ void clitk::ImageToImageGenericFilterBase::GetInputImageDimensionAndPixelType(un pixeltype = m_InputVVImages[0]->GetScalarTypeAsITKString(); dim = m_InputVVImages[0]->GetNumberOfDimensions(); components = m_InputVVImages[0]->GetNumberOfScalarComponents(); - } else + } else { + clitkExceptionMacro("No input given in this ImageToImageGenericFilter."); assert(false); //No input image, shouldn't happen + } } if (m_IOVerbose) { std::cout << "Input is " << m_Dim << "D " << m_PixelTypeName << "." << std::endl; -- 2.47.1