Skip to content
Snippets Groups Projects
Commit 9b72708f authored by Victor Poughon's avatar Victor Poughon
Browse files

BUG: clarify GetImage() error message

parent 93fcba52
No related branches found
No related tags found
No related merge requests found
......@@ -144,9 +144,11 @@ InputImageParameter::GetImage()
return dynamic_cast<TImageType*> (m_Image.GetPointer());
}
else
{
itkExceptionMacro("Cannot ask a different image type");
}
{
itkExceptionMacro(
"GetImage() was already called with a different type, "
"probably due to two calls to GetParameter<Type>Image with different types in application code.");
}
}
}
}
......@@ -173,8 +175,10 @@ InputImageParameter::GetImage()
( m_OutputCaster.GetPointer() )->GetOutput();
}
else
{
CLAMP_IMAGE_BASE( TImageType, m_Image.GetPointer() );
}
}
}
/** declare a specialization for ImageBaseType */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment