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

FIX: req region outside largest region issue

No related merge requests found
Showing with 2 additions and 2 deletions
+2 -2
...@@ -337,8 +337,8 @@ TensorflowMultisourceModelFilter<TInputImage, TOutputImage> ...@@ -337,8 +337,8 @@ TensorflowMultisourceModelFilter<TInputImage, TOutputImage>
SizeType toPad(this->GetInputReceptiveFields().at(i)); SizeType toPad(this->GetInputReceptiveFields().at(i));
for(unsigned int dim = 0; dim<ImageType::ImageDimension; ++dim) 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]; 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 image #" << i << " is not consistent. Please check RF, EF, SF vs physical spacing.");
toPad[dim] -= valToPad; 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