diff --git a/include/otbTensorflowMultisourceModelFilter.hxx b/include/otbTensorflowMultisourceModelFilter.hxx index c09850bfe8dd71c6b4bfc25abbad4b9e3acdec86..4d9d93766dee3f87019dc7733527848926d06590 100644 --- a/include/otbTensorflowMultisourceModelFilter.hxx +++ b/include/otbTensorflowMultisourceModelFilter.hxx @@ -339,7 +339,13 @@ TensorflowMultisourceModelFilter<TInputImage, TOutputImage> { int valToPad = 1 + (this->GetOutputExpressionFields().at(0)[dim] - 1) * m_OutputSpacingScale * this->GetInput(0)->GetSpacing()[dim] / this->GetInput(i)->GetSpacing()[dim] ; if (valToPad > toPad[dim]) - itkExceptionMacro("The input requested region of image #" << i << " is not consistent. Please check RF, EF, SF vs physical spacing."); + itkExceptionMacro("The input requested region of source #" << i << " is not consistent (dim "<< dim<< ")." << + "Please check RF, EF, SF vs physical spacing of your image!" << + "\nReceptive field: " << this->GetInputReceptiveFields().at(i)[dim] << + "\nExpression field: " << this->GetOutputExpressionFields().at(0)[dim] << + "\nScale factor: " << m_OutputSpacingScale << + "\nReference image spacing: " << this->GetInput(0)->GetSpacing()[dim] << + "\nImage " << i << " spacing: " << this->GetInput(i)->GetSpacing()[dim]); toPad[dim] -= valToPad; }