Skip to content
Snippets Groups Projects
Commit 11964ef6 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

Ajout d'une exception si la taille du pixel de ref et le nombre de canaux ne...

Ajout d'une exception si la taille du pixel de ref et le nombre de canaux ne correspondent pas. cf mail d'Emmanuel.
parent a75c2f05
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,14 @@ SpectralAngleDistanceImageFilter<TInputImage,TOutputImage>
InputImageConstPointerType inputPtr = this->GetInput();
OutputImagePointerType outputPtr = this->GetOutput();
//inputPtr->UpdateOutputInformation();
// Check if the reference pixel size matches the input image number of components.
if (m_ReferencePixel.GetSize() != inputPtr->GetNumberOfComponentsPerPixel())
{
itkExceptionMacro(<<"Reference pixel size ("<<m_ReferencePixel.GetSize()<<" and input image pixel size ("
<<inputPtr->GetNumberOfComponentsPerPixel()<<") don't match!");
}
// Define the portion of the input to walk for this thread, using
// the CallCopyOutputRegionToInputRegion method allows for the input
......
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