Skip to content

Commit

Permalink
STYLE: Use ImageRegion auto [index, size] = region structured bindings
Browse files Browse the repository at this point in the history
Replaced initializations of the form:

    SizeType size = region.GetSize();
    IndexType index = region.GetIndex();

By using structured binding of the form `auto [index, size] = region`, as was
introduced by pull request InsightSoftwareConsortium#4367
commit 72aa9a6 "ENH: `ImageRegion` support C++17
structured binding"

Did so by Notepad++ Replace in Files, using regular expressions:

    Find what: ^([ ]+)const (.*)\w.+[ ]+(\w+) = (.+)\.GetIndex\(\);\r\n\1const \2\w+[ ]+(\w+) = \4\.GetSize\(\);$
    Replace with: $1const auto [$3, $5] = $4;

    Find what: ^([ ]+)const (.*)\w.+[ ]+(\w+) = (.+)\.GetSize\(\);\r\n\1const \2\w+[ ]+(\w+) = \4\.GetIndex\(\);$
    Replace with: $1const auto [$5, $3] = $4;

    Find what: ^([ ]+)(.*)\w.+[ ]+(\w+) = (.+)\.GetIndex\(\);\r\n\1\2\w+[ ]+(\w+) = \4\.GetSize\(\);$
    Replace with: $1auto [$3, $5] = $4;

    Find what: ^([ ]+)(.*)\w.+[ ]+(\w+) = (.+)\.GetSize\(\);\r\n\1\2\w+[ ]+(\w+) = \4\.GetIndex\(\);$
    Replace with: $1auto [$5, $3] = $4;

Manually added `const` to bindings in `SetBound(const SizeType &)` member
functions, excluded `ImageIORegion`, and removed `Index` and `Size` type aliases
that are no longer used after this commit.
  • Loading branch information
N-Dekker committed Jan 1, 2024
1 parent 72aa9a6 commit 4598b02
Show file tree
Hide file tree
Showing 51 changed files with 97 additions and 183 deletions.
6 changes: 2 additions & 4 deletions Modules/Bridge/VTK/include/itkVTKImageExport.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,7 @@ VTKImageExport<TInputImage>::WholeExtentCallback()
}

InputRegionType region = input->GetLargestPossibleRegion();
InputSizeType size = region.GetSize();
InputIndexType index = region.GetIndex();
auto [index, size] = region;

unsigned int i = 0;
// Fill in the known portion of the extent.
Expand Down Expand Up @@ -387,8 +386,7 @@ VTKImageExport<TInputImage>::DataExtentCallback()
}

InputRegionType region = input->GetBufferedRegion();
InputSizeType size = region.GetSize();
InputIndexType index = region.GetIndex();
auto [index, size] = region;

unsigned int i = 0;
for (; i < InputImageDimension; ++i)
Expand Down
3 changes: 1 addition & 2 deletions Modules/Bridge/VTK/include/itkVTKImageImport.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ VTKImageImport<TOutputImage>::PropagateRequestedRegion(DataObject * outputPtr)
if (m_PropagateUpdateExtentCallback)
{
OutputRegionType region = output->GetRequestedRegion();
OutputSizeType size = region.GetSize();
OutputIndexType index = region.GetIndex();
auto [index, size] = region;

int updateExtent[6];
unsigned int i = 0;
Expand Down
9 changes: 3 additions & 6 deletions Modules/Core/Common/include/itkConstNeighborhoodIterator.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,8 @@ ConstNeighborhoodIterator<TImage, TBoundaryCondition>::SetRegion(const RegionTyp
m_End = m_ConstImage->GetBufferPointer() + m_ConstImage->ComputeOffset(m_EndIndex);

// now determine whether boundary conditions are going to be needed
const IndexType bStart = m_ConstImage->GetBufferedRegion().GetIndex();
const SizeType bSize = m_ConstImage->GetBufferedRegion().GetSize();
const IndexType rStart = region.GetIndex();
const SizeType rSize = region.GetSize();
const auto [bStart, bSize] = m_ConstImage->GetBufferedRegion();
const auto [rStart, rSize] = region;

m_NeedToUseBoundaryCondition = false;
for (DimensionValueType i = 0; i < Dimension; ++i)
Expand Down Expand Up @@ -627,8 +625,7 @@ ConstNeighborhoodIterator<TImage, TBoundaryCondition>::SetBound(const SizeType &
{
SizeType radius = this->GetRadius();
const OffsetValueType * offset = m_ConstImage->GetOffsetTable();
const IndexType imageBRStart = m_ConstImage->GetBufferedRegion().GetIndex();
SizeType imageBRSize = m_ConstImage->GetBufferedRegion().GetSize();
const auto [imageBRStart, imageBRSize] = m_ConstImage->GetBufferedRegion();

// Set the bounds and the wrapping offsets. Inner bounds are the loop
// indices where the iterator will begin to overlap the edge of the image
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,8 @@ ConstNeighborhoodIteratorWithOnlyIndex<TImage>::Initialize(const SizeType & ra
this->SetEndIndex();

// now determine whether boundary conditions are going to be needed
const IndexType bStart = ptr->GetBufferedRegion().GetIndex();
const SizeType bSize = ptr->GetBufferedRegion().GetSize();
const IndexType rStart = region.GetIndex();
const SizeType rSize = region.GetSize();
const auto [bStart, bSize] = ptr->GetBufferedRegion();
const auto [rStart, rSize] = region;

m_NeedToUseBoundaryCondition = false;
for (DimensionValueType i = 0; i < Dimension; ++i)
Expand Down Expand Up @@ -456,9 +454,8 @@ template <typename TImage>
void
ConstNeighborhoodIteratorWithOnlyIndex<TImage>::SetBound(const SizeType & size)
{
SizeType radius = this->GetRadius();
const IndexType imageBRStart = m_ConstImage->GetBufferedRegion().GetIndex();
SizeType imageBRSize = m_ConstImage->GetBufferedRegion().GetSize();
SizeType radius = this->GetRadius();
const auto [imageBRStart, imageBRSize] = m_ConstImage->GetBufferedRegion();

// Set the bounds and the wrapping offsets. Inner bounds are the loop
// indices where the iterator will begin to overlap the edge of the image
Expand Down
6 changes: 2 additions & 4 deletions Modules/Core/Common/include/itkNeighborhoodAlgorithm.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ ImageBoundaryFacesCalculator<TImage>::Compute(const TImage & img, RegionType reg
return result;
}

const IndexType bStart = bufferedRegion.GetIndex();
const SizeType bSize = bufferedRegion.GetSize();
const IndexType rStart = regionToProcess.GetIndex();
const SizeType rSize = regionToProcess.GetSize();
const auto [bStart, bSize] = bufferedRegion;
const auto [rStart, rSize] = regionToProcess;

SizeType nbSize = rSize; // Non-boundary region
IndexType nbStart = rStart; // data.
Expand Down
9 changes: 3 additions & 6 deletions Modules/Core/Common/include/itkPeriodicBoundaryCondition.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,9 @@ PeriodicBoundaryCondition<TInputImage, TOutputImage>::GetInputRequestedRegion(
const RegionType & inputLargestPossibleRegion,
const RegionType & outputRequestedRegion) const -> RegionType
{
IndexType imageIndex = inputLargestPossibleRegion.GetIndex();
SizeType imageSize = inputLargestPossibleRegion.GetSize();
auto [imageIndex, imageSize] = inputLargestPossibleRegion;

IndexType outputIndex = outputRequestedRegion.GetIndex();
SizeType outputSize = outputRequestedRegion.GetSize();
auto [outputIndex, outputSize] = outputRequestedRegion;

IndexType inputRequestedIndex;
SizeType inputRequestedSize;
Expand Down Expand Up @@ -184,8 +182,7 @@ PeriodicBoundaryCondition<TInputImage, TOutputImage>::GetPixel(const IndexType &
-> OutputPixelType
{
RegionType imageRegion = image->GetLargestPossibleRegion();
IndexType imageIndex = imageRegion.GetIndex();
SizeType imageSize = imageRegion.GetSize();
auto [imageIndex, imageSize] = imageRegion;

IndexType lookupIndex;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ ZeroFluxNeumannBoundaryCondition<TInputImage, TOutputImage>::GetInputRequestedRe
const RegionType & inputLargestPossibleRegion,
const RegionType & outputRequestedRegion) const -> RegionType
{
IndexType inputIndex = inputLargestPossibleRegion.GetIndex();
SizeType inputSize = inputLargestPossibleRegion.GetSize();
auto [inputIndex, inputSize] = inputLargestPossibleRegion;

IndexType outputIndex = outputRequestedRegion.GetIndex();
SizeType outputSize = outputRequestedRegion.GetSize();
auto [outputIndex, outputSize] = outputRequestedRegion;

IndexType requestIndex;
SizeType requestSize;
Expand Down Expand Up @@ -156,8 +154,7 @@ ZeroFluxNeumannBoundaryCondition<TInputImage, TOutputImage>::GetPixel(const Inde
-> OutputPixelType
{
RegionType imageRegion = image->GetLargestPossibleRegion();
IndexType imageIndex = imageRegion.GetIndex();
SizeType imageSize = imageRegion.GetSize();
auto [imageIndex, imageSize] = imageRegion;

IndexType lookupIndex;

Expand Down
3 changes: 1 addition & 2 deletions Modules/Core/GPUCommon/include/itkGPUImageDataManager.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ GPUImageDataManager<ImageType>::SetImagePointer(ImageType * img)
using SizeType = typename ImageType::SizeType;

RegionType region = m_Image->GetBufferedRegion();
IndexType index = region.GetIndex();
SizeType size = region.GetSize();
auto [index, size] = region;

for (unsigned int d = 0; d < ImageDimension; ++d)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ GaussianInterpolateImageFunction<TImageType, TCoordRep>::ComputeBoundingBox()

typename InputImageType::ConstPointer input = this->GetInputImage();
typename InputImageType::SpacingType spacing = input->GetSpacing();
typename InputImageType::IndexType index = input->GetLargestPossibleRegion().GetIndex();
typename InputImageType::SizeType size = input->GetLargestPossibleRegion().GetSize();
auto [index, size] = input->GetLargestPossibleRegion();

for (unsigned int d = 0; d < ImageDimension; ++d)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,9 @@ SpatialObjectToImageStatisticsCalculator<TInputImage, TInputSpatialObject, TSamp
ptMin[i] = bounds[i * 2];
ptMax[i] = bounds[i * 2 + 1];
}
auto indMin = m_Image->TransformPhysicalPointToIndex(ptMin);
auto indMax = m_Image->TransformPhysicalPointToIndex(ptMax);
IndexType imageIndex = m_Image->GetLargestPossibleRegion().GetIndex();
SizeType imageSize = m_Image->GetLargestPossibleRegion().GetSize();
auto indMin = m_Image->TransformPhysicalPointToIndex(ptMin);
auto indMax = m_Image->TransformPhysicalPointToIndex(ptMax);
auto [imageIndex, imageSize] = m_Image->GetLargestPossibleRegion();
for (unsigned int i = 0; i < Self::ObjectDimension; ++i)
{
if (indMin[i] > indMax[i])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,7 @@ MRIBiasFieldCorrectionFilter<TInputImage, TOutputImage, TMaskImage>::CorrectInte
IndexValueType lastSlice =
region.GetIndex()[m_SlicingDirection] + static_cast<IndexValueType>(region.GetSize()[m_SlicingDirection]);
InputImageRegionType sliceRegion;
InputImageIndexType index = region.GetIndex();
InputImageSizeType size = region.GetSize();
auto [index, size] = region;

sliceRegion.SetSize(size);
BiasFieldType bias = this->EstimateBiasField(sliceRegion, 0, m_InterSliceCorrectionMaximumIteration);
Expand Down Expand Up @@ -882,8 +881,7 @@ MRIBiasFieldCorrectionFilter<TInputImage, TOutputImage, TMaskImage>::AdjustSlabR
SlabRegionVectorType & slabs,
OutputImageRegionType requestedRegion)
{
OutputImageIndexType indexFirst = requestedRegion.GetIndex();
OutputImageSizeType size = requestedRegion.GetSize();
auto [indexFirst, size] = requestedRegion;
OutputImageIndexType indexLast = indexFirst;

for (SizeValueType i = 0; i < ImageDimension; ++i)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ ConvolutionImageFilterBase<TInputImage, TKernelImage, TOutputImage>::GetValidReg

InputRegionType inputLargestPossibleRegion = inputPtr->GetLargestPossibleRegion();

OutputIndexType validIndex = inputLargestPossibleRegion.GetIndex();
OutputSizeType validSize = inputLargestPossibleRegion.GetSize();
auto [validIndex, validSize] = inputLargestPossibleRegion;

// Shrink the output largest possible region by the kernel radius.
KernelSizeType kernelSize = this->GetKernelImage()->GetLargestPossibleRegion().GetSize();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,12 @@ FFTConvolutionImageFilter<TInputImage, TKernelImage, TOutputImage, TInternalPrec
{
float remainingProgress = 1.0f;

InputRegionType inputLargestRegion = input->GetLargestPossibleRegion();
InputSizeType inputLargestSize = inputLargestRegion.GetSize();
InputIndexType inputLargestIndex = inputLargestRegion.GetIndex();
InputRegionType inputRequestedRegion = input->GetRequestedRegion();
InputSizeType inputRequestedSize = inputRequestedRegion.GetSize();
InputIndexType inputRequestedIndex = inputRequestedRegion.GetIndex();
InputRegionType inputLargestRegion = input->GetLargestPossibleRegion();
auto [inputLargestIndex, inputLargestSize] = inputLargestRegion;
InputRegionType inputRequestedRegion = input->GetRequestedRegion();
auto [inputRequestedIndex, inputRequestedSize] = inputRequestedRegion;
OutputRegionType outputRequestedRegion = this->GetOutput()->GetRequestedRegion();
OutputSizeType outputRequestedSize = outputRequestedRegion.GetSize();
OutputIndexType outputRequestedIndex = outputRequestedRegion.GetIndex();
auto [outputRequestedIndex, outputRequestedSize] = outputRequestedRegion;

// Pad the input image such that the requested region, expanded by
// twice the kernel radius, lies entirely within the buffered region.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ GaussianExponentialDiffeomorphicTransform<TParametersValueType, VDimension>::Gau
ScalarType weight2 = 1.0 - weight1;

const typename ConstantVelocityFieldType::RegionType region = field->GetLargestPossibleRegion();
const typename ConstantVelocityFieldType::SizeType size = region.GetSize();
const typename ConstantVelocityFieldType::IndexType startIndex = region.GetIndex();
const auto [startIndex, size] = region;

ImageRegionIteratorWithIndex<ConstantVelocityFieldType> fieldIt(field, field->GetLargestPossibleRegion());
ImageRegionConstIteratorWithIndex<ConstantVelocityFieldType> smoothedFieldIt(smoothField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@ GaussianSmoothingOnUpdateDisplacementFieldTransform<TParametersValueType, VDimen
ScalarType weight2 = 1.0 - weight1;

const typename DisplacementFieldType::RegionType region = field->GetLargestPossibleRegion();
const typename DisplacementFieldType::SizeType size = region.GetSize();
const typename DisplacementFieldType::IndexType startIndex = region.GetIndex();
const auto [startIndex, size] = region;

ImageRegionIteratorWithIndex<DisplacementFieldType> fieldIt(field, field->GetLargestPossibleRegion());
ImageRegionConstIteratorWithIndex<DisplacementFieldType> smoothedFieldIt(smoothField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,9 @@ GaussianSmoothingOnUpdateTimeVaryingVelocityFieldTransform<TParametersValueType,
}
ScalarType weight2 = 1.0 - weight1;

using TimeVaryingVelocityFieldSizeType = typename VelocityFieldType::SizeType;
using TimeVaryingVelocityFieldIndexType = typename VelocityFieldType::IndexType;

TimeVaryingVelocityFieldSizeType size = field->GetLargestPossibleRegion().GetSize();
TimeVaryingVelocityFieldIndexType startIndex = field->GetLargestPossibleRegion().GetIndex();
auto [startIndex, size] = field->GetLargestPossibleRegion();

ImageRegionIteratorWithIndex<VelocityFieldType> fieldIt(field, field->GetLargestPossibleRegion());
ImageRegionConstIteratorWithIndex<VelocityFieldType> smoothedFieldIt(smoothField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,8 @@ void
InvertDisplacementFieldImageFilter<TInputImage, TOutputImage>::DynamicThreadedGenerateData(const RegionType & region)
{
const typename DisplacementFieldType::RegionType fullRegion = this->m_ComposedField->GetRequestedRegion();
const typename DisplacementFieldType::SizeType size = fullRegion.GetSize();
const typename DisplacementFieldType::IndexType startIndex = fullRegion.GetIndex();
const typename DisplacementFieldType::PixelType zeroVector{};
const auto [startIndex, size] = fullRegion;
const typename DisplacementFieldType::PixelType zeroVector{};

ImageRegionIterator<DisplacementFieldType> ItE(this->m_ComposedField, region);
ImageRegionIterator<RealImageType> ItS(this->m_ScaledNormImage, region);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ TimeVaryingVelocityFieldIntegrationImageFilter<TTimeVaryingVelocityField, TDispl
using RegionType = typename TimeVaryingVelocityFieldType::RegionType;
RegionType region = inputField->GetLargestPossibleRegion();

typename RegionType::IndexType lastIndex = region.GetIndex();
typename RegionType::SizeType size = region.GetSize();
auto [lastIndex, size] = region;
for (unsigned int d = 0; d < InputImageDimension; ++d)
{
lastIndex[d] += (size[d] - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,7 @@ SignedMaurerDistanceMapImageFilter<TInputImage, TOutputImage>::SplitRequestedReg

const OutputSizeType & requestedRegionSize = splitRegion.GetSize();

OutputIndexType splitIndex = splitRegion.GetIndex();
OutputSizeType splitSize = splitRegion.GetSize();
auto [splitIndex, splitSize] = splitRegion;

// split on the outermost dimension available
// and avoid the current dimension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ HalfToFullHermitianImageFilter<TInputImage>::DynamicThreadedGenerateData(

// Now copy the redundant complex conjugate region, if there is one
// in this thread's output region.
OutputImageIndexType outputRegionIndex = outputRegionForThread.GetIndex();
OutputImageSizeType outputRegionSize = outputRegionForThread.GetSize();
auto [outputRegionIndex, outputRegionSize] = outputRegionForThread;
OutputImageIndexType outputRegionMaximumIndex = outputRegionIndex + outputRegionSize;

if (outputRegionMaximumIndex[0] > inputRegionMaximumIndex[0])
Expand All @@ -141,8 +140,7 @@ HalfToFullHermitianImageFilter<TInputImage>::DynamicThreadedGenerateData(
for (unsigned int i = 0; i < ImageDimension; ++i)
{
OutputImageRegionType outputLargestPossibleRegion = outputPtr->GetLargestPossibleRegion();
OutputImageIndexType outputLargestPossibleRegionIndex = outputLargestPossibleRegion.GetIndex();
OutputImageSizeType outputLargestPossibleRegionSize = outputLargestPossibleRegion.GetSize();
auto [outputLargestPossibleRegionIndex, outputLargestPossibleRegionSize] = outputLargestPossibleRegion;
if (conjugateIndex[i] != outputLargestPossibleRegionIndex[i])
{
index[i] = outputLargestPossibleRegionSize[i] - conjugateIndex[i] + 2 * outputLargestPossibleRegionIndex[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ RealToHalfHermitianForwardFFTImageFilter<TInputImage, TOutputImage>::GenerateOut
// This is all based on the same function in itk::ShrinkImageFilter
// ShrinkImageFilter also modifies the image spacing, but spacing
// has no meaning in the result of an FFT.
const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize();
const InputIndexType inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex();
const auto [inputStartIndex, inputSize] = inputPtr->GetLargestPossibleRegion();

OutputSizeType outputSize;
OutputIndexType outputStartIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ VnlHalfHermitianToRealInverseFFTImageFilter<TInputImage, TOutputImage>::Generate
// reports the beginning and the end of the process.
ProgressReporter progress(this, 0, 1);

const InputSizeType inputSize = inputPtr->GetLargestPossibleRegion().GetSize();
const InputIndexType inputIndex = inputPtr->GetLargestPossibleRegion().GetIndex();
const OutputSizeType outputSize = outputPtr->GetLargestPossibleRegion().GetSize();
const OutputIndexType outputIndex = outputPtr->GetLargestPossibleRegion().GetIndex();
const auto [inputIndex, inputSize] = inputPtr->GetLargestPossibleRegion();
const auto [outputIndex, outputSize] = outputPtr->GetLargestPossibleRegion();

// Allocate output buffer memory
outputPtr->SetBufferedRegion(outputPtr->GetRequestedRegion());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ MaskFeaturePointSelectionFilter<TImage, TMask, TFeatures>::GenerateData()
}

// set safe region for picking feature points depending on whether tensors are computed
IndexType safeIndex = region.GetIndex();
SizeType safeSize = region.GetSize();
auto [safeIndex, safeSize] = region;

if (m_ComputeStructureTensors)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,7 @@ class ITK_TEMPLATE_EXPORT FrequencyShiftedFFTLayoutImageRegionConstIteratorWithI
void
Init()
{
IndexType minIndex = this->m_Image->GetLargestPossibleRegion().GetIndex();
SizeType sizeImage = this->m_Image->GetLargestPossibleRegion().GetSize();
auto [minIndex, sizeImage] = this->m_Image->GetLargestPossibleRegion();
for (unsigned int dim = 0; dim < ImageType::ImageDimension; ++dim)
{
this->m_ZeroFrequencyIndex[dim] =
Expand Down
3 changes: 1 addition & 2 deletions Modules/Filtering/ImageGrid/include/itkCropImageFilter.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ CropImageFilter<TInputImage, TOutputImage>::GenerateOutputInformation()
SizeType sz;
OutputImageIndexType idx;

InputImageSizeType input_sz = inputPtr->GetLargestPossibleRegion().GetSize();
InputImageIndexType input_idx = inputPtr->GetLargestPossibleRegion().GetIndex();
auto [input_idx, input_sz] = inputPtr->GetLargestPossibleRegion();

for (unsigned int i = 0; i < InputImageDimension; ++i)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ CyclicShiftImageFilter<TInputImage, TOutputImage>::DynamicThreadedGenerateData(
const InputImageType * inputImage = this->GetInput();

// The index and size of the image needed to compute the shift
const IndexType outIdx = this->GetOutput()->GetLargestPossibleRegion().GetIndex();
const SizeType outSize = this->GetOutput()->GetLargestPossibleRegion().GetSize();
const auto [outIdx, outSize] = this->GetOutput()->GetLargestPossibleRegion();

TotalProgressReporter progress(this, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels());

Expand Down
Loading

0 comments on commit 4598b02

Please sign in to comment.