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

FIX: req region outside largest region issue

No related merge requests found
Showing with 7 additions and 1 deletion
+7 -1
......@@ -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;
}
......
Supports Markdown
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