From: dsarrut Date: Wed, 15 Dec 2010 08:47:28 +0000 (+0000) Subject: add exception if error X-Git-Tag: v1.2.0~292 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=de0c500755f798a2ff44bbda3269b9c6c5e065e8;p=clitk.git add exception if error --- 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;