Commit 2c4508ef authored by Cresson Remi's avatar Cresson Remi

FIX: req region outside largest region issue

parent 45da06b9
...@@ -339,7 +339,13 @@ TensorflowMultisourceModelFilter<TInputImage, TOutputImage> ...@@ -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] ; 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]) 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; toPad[dim] -= valToPad;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment