Skip to content

Commit dbab3e0

Browse files
committed
STYLE: Use CTAD when assigning an Image Iterator, in hxx files
Used class template argument deduction (CTAD) when assigning a temporary Image Iterator. Using Notepad++, Replace in Files, doing: Find what: ( = Image\w+Iterator)<\w+>([\({]) Replace with: $1$2 Files: itk*.hxx [v] Match case (*) Regular expression Follow-up to pull request InsightSoftwareConsortium#5982 commit b6a38b1 "STYLE: Use CTAD for `ImageRegionIterator` variables in hxx files"
1 parent 350447b commit dbab3e0

26 files changed

+38
-38
lines changed

Modules/Core/Transform/include/itkBSplineDeformableTransform.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ BSplineDeformableTransform<TParametersValueType, VDimension, VSplineOrder>::Tran
501501
const ParametersValueType * basePointer = this->m_CoefficientImages[0]->GetBufferPointer();
502502
for (unsigned int j = 0; j < SpaceDimension; ++j)
503503
{
504-
coeffIterator[j] = ImageScanlineConstIterator<ImageType>(this->m_CoefficientImages[j], supportRegion);
504+
coeffIterator[j] = ImageScanlineConstIterator(this->m_CoefficientImages[j], supportRegion);
505505
}
506506

507507
while (!coeffIterator[0].IsAtEnd())

Modules/Core/Transform/include/itkBSplineTransform.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ BSplineTransform<TParametersValueType, VDimension, VSplineOrder>::TransformPoint
545545
const ParametersValueType * basePointer = this->m_CoefficientImages[0]->GetBufferPointer();
546546
for (unsigned int j = 0; j < SpaceDimension; ++j)
547547
{
548-
coeffIterator[j] = ImageScanlineConstIterator<ImageType>(this->m_CoefficientImages[j], supportRegion);
548+
coeffIterator[j] = ImageScanlineConstIterator(this->m_CoefficientImages[j], supportRegion);
549549
}
550550

551551
while (!coeffIterator[0].IsAtEnd())

Modules/Filtering/BinaryMathematicalMorphology/include/itkBinaryMorphologyImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ BinaryMorphologyImageFilter<TInputImage, TOutputImage, TKernel>::AnalyzeKernel()
115115

116116
// copy
117117
ImageRegionIterator<BoolImageType> kernelImageIt; // iterator on image
118-
kernelImageIt = ImageRegionIterator<BoolImageType>(tmpSEImage, tmpSEImage->GetRequestedRegion());
118+
kernelImageIt = ImageRegionIterator(tmpSEImage, tmpSEImage->GetRequestedRegion());
119119

120120
kernel_it = KernelBegin;
121121

Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ ObjectMorphologyImageFilter<TInputImage, TOutputImage, TKernel>::BeforeThreadedG
9898

9999
const RegionType requestedRegion = this->GetOutput()->GetRequestedRegion();
100100

101-
auto iRegIter = ImageRegionConstIterator<InputImageType>(this->GetInput(), requestedRegion);
102-
auto oRegIter = ImageRegionIterator<OutputImageType>(this->GetOutput(), requestedRegion);
101+
auto iRegIter = ImageRegionConstIterator(this->GetInput(), requestedRegion);
102+
auto oRegIter = ImageRegionIterator(this->GetOutput(), requestedRegion);
103103
/* Copy the input image to the output image - then only boundary pixels
104104
* need to be changed in the output image */
105105
while (!oRegIter.IsAtEnd())

Modules/Filtering/DisplacementField/include/itkDisplacementFieldJacobianDeterminantFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ DisplacementFieldJacobianDeterminantFilter<TInputImage, TRealType, TOutputImage>
189189
{
190190
bit = ConstNeighborhoodIteratorType(
191191
m_NeighborhoodRadius, dynamic_cast<const RealVectorImageType *>(m_RealValuedInputImage.GetPointer()), face);
192-
it = ImageRegionIterator<TOutputImage>(this->GetOutput(), face);
192+
it = ImageRegionIterator(this->GetOutput(), face);
193193
bit.OverrideBoundaryCondition(&nbc);
194194
bit.GoToBegin();
195195

Modules/Filtering/ImageCompare/include/itkSTAPLEImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ STAPLEImageFilter<TInputImage, TOutputImage>::GenerateData()
170170
// segmentation
171171
for (unsigned int i = 0; i < number_of_input_files; ++i)
172172
{
173-
D_it[i] = ImageScanlineConstIterator<TInputImage>(this->GetInput(i), W->GetRequestedRegion());
173+
D_it[i] = ImageScanlineConstIterator(this->GetInput(i), W->GetRequestedRegion());
174174
}
175175

176176
ImageScanlineIterator out(W, W->GetRequestedRegion());

Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ CannyEdgeDetectionImageFilter<TInputImage, TOutputImage>::ThreadedCompute2ndDeri
118118
{
119119
NeighborhoodType bit(radius, input, face);
120120

121-
it = ImageRegionIterator<OutputImageType>(this->m_OutputImage, face);
121+
it = ImageRegionIterator(this->m_OutputImage, face);
122122
bit.OverrideBoundaryCondition(&nbc);
123123
bit.GoToBegin();
124124

@@ -416,7 +416,7 @@ CannyEdgeDetectionImageFilter<TInputImage, TOutputImage>::ThreadedCompute2ndDeri
416416
{
417417
bit = ConstNeighborhoodIterator<InputImageType>(radius, input, face);
418418
bit1 = ConstNeighborhoodIterator<InputImageType>(radius, input1, face);
419-
it = ImageRegionIterator<OutputImageType>(output, face);
419+
it = ImageRegionIterator(output, face);
420420
bit.OverrideBoundaryCondition(&nbc);
421421
bit.GoToBegin();
422422
bit1.GoToBegin();

Modules/Filtering/ImageFeature/include/itkHessian3DToVesselnessMeasureImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Hessian3DToVesselnessMeasureImageFilter<TPixel>::GenerateData()
5555
ImageRegionConstIterator it(eigenImage, eigenImage->GetRequestedRegion());
5656
ImageRegionIterator<OutputImageType> oit;
5757
this->AllocateOutputs();
58-
oit = ImageRegionIterator<OutputImageType>(output, output->GetRequestedRegion());
58+
oit = ImageRegionIterator(output, output->GetRequestedRegion());
5959
while (!it.IsAtEnd())
6060
{
6161
// Get the eigen value

Modules/Filtering/ImageFeature/include/itkMultiScaleHessianBasedMeasureImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,12 @@ MultiScaleHessianBasedMeasureImageFilter<TInputImage, THessianImage, TOutputImag
224224

225225
if (m_GenerateScalesOutput)
226226
{
227-
osit = ImageRegionIterator<ScalesImageType>(scalesImage, outputRegion);
227+
osit = ImageRegionIterator(scalesImage, outputRegion);
228228
osit.GoToBegin();
229229
}
230230
if (m_GenerateHessianOutput)
231231
{
232-
ohit = ImageRegionIterator<HessianImageType>(hessianImage, outputRegion);
232+
ohit = ImageRegionIterator(hessianImage, outputRegion);
233233
ohit.GoToBegin();
234234
}
235235

Modules/Filtering/ImageFeature/include/itkZeroCrossingImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ ZeroCrossingImageFilter<TInputImage, TOutputImage>::DynamicThreadedGenerateData(
125125

126126
static constexpr SizeValueType neighborhoodSize = Math::UnsignedPower(3, ImageDimension);
127127
static constexpr SizeValueType center = neighborhoodSize / 2;
128-
ImageRegionIterator<TOutputImage> it = ImageRegionIterator<OutputImageType>(output, face);
128+
ImageRegionIterator<TOutputImage> it = ImageRegionIterator(output, face);
129129
while (!bit.IsAtEnd())
130130
{
131131
const InputImagePixelType this_one = bit.GetPixel(center);

0 commit comments

Comments
 (0)