Commit 45da06b9 authored by Cresson Remi's avatar Cresson Remi

FIX: req region outside largest region issue

parent 45dce74e
......@@ -337,8 +337,8 @@ TensorflowMultisourceModelFilter<TInputImage, TOutputImage>
SizeType toPad(this->GetInputReceptiveFields().at(i));
for(unsigned int dim = 0; dim<ImageType::ImageDimension; ++dim)
{
int valToPad = 1 + (this->GetOutputExpressionFields().at(0)[dim] - 1) * m_OutputSpacingScale * this->GetInput(i)->GetSpacing()[dim] / this->GetInput(0)->GetSpacing()[dim];
if (valToPad>toPad[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])
itkExceptionMacro("The input requested region of image #" << i << " is not consistent. Please check RF, EF, SF vs physical spacing.");
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