Commit 71e3dcb4 authored by Julien Michel's avatar Julien Michel

REFAC: Small refactoring to make code easier to read (from PR review)

parent 86fabd1f
Pipeline #2586 failed with stages
in 11 minutes and 15 seconds
......@@ -238,15 +238,17 @@ StreamingWarpImageFilter<TInputImage, TOutputImage, TDisplacementField>
for(auto dim = 0U; dim < InputImageType::ImageDimension; ++dim)
{
if(inputPtr->GetLargestPossibleRegion().GetSize()[dim]>1)
auto largestInputRegion = inputPtr->GetLargestPossibleRegion();
if(largestInputRegion.GetSize()[dim]>1)
{
inputFinalIndex[dim] = inputPtr->GetLargestPossibleRegion().GetIndex()[dim]+1;
inputFinalSize[dim] = 0;
inputFinalIndex[dim] = largestInputRegion.GetIndex()[dim]+1;
inputFinalSize[dim] = 0;
}
else
{
inputFinalIndex[dim] = inputPtr->GetLargestPossibleRegion().GetIndex()[dim];
inputFinalSize[dim] = inputPtr->GetLargestPossibleRegion().GetSize()[dim];
inputFinalIndex[dim] = largestInputRegion.GetIndex()[dim];
inputFinalSize[dim] = largestInputRegion.GetSize()[dim];
}
}
......
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