Skip to content

Commit 14d5eb0

Browse files
authored
Merge pull request InsightSoftwareConsortium#5987 from N-Dekker/CTAD-ImageRegionConstIterator-hxx
STYLE: Use CTAD for `ImageRegionConstIterator` variables in hxx files
2 parents 887f9f2 + ce1caaf commit 14d5eb0

86 files changed

Lines changed: 213 additions & 228 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ FloodFilledFunctionConditionalConstIterator<TImage, TFunction>::FindSeedPixel()
109109
// Now we search the input image for the first pixel which is inside
110110
// the function of interest
111111
m_Seeds.clear();
112-
for (ImageRegionConstIterator<TImage> it(this->m_Image, this->m_Image->GetBufferedRegion()); !it.IsAtEnd(); ++it)
112+
for (ImageRegionConstIterator it(this->m_Image, this->m_Image->GetBufferedRegion()); !it.IsAtEnd(); ++it)
113113
{
114114
if (this->IsPixelIncluded(it.GetIndex()))
115115
{
@@ -133,7 +133,7 @@ FloodFilledFunctionConditionalConstIterator<TImage, TFunction>::FindSeedPixels()
133133
// the function of interest
134134
m_Seeds.clear();
135135
bool found = false;
136-
for (ImageRegionConstIterator<TImage> it(this->m_Image, this->m_Image->GetBufferedRegion()); !it.IsAtEnd(); ++it)
136+
for (ImageRegionConstIterator it(this->m_Image, this->m_Image->GetBufferedRegion()); !it.IsAtEnd(); ++it)
137137
{
138138
if (this->IsPixelIncluded(it.GetIndex()))
139139
{

Modules/Core/Common/include/itkImageAlgorithm.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ ImageAlgorithm::ReferenceCopy(const InputImageType * inIma
5353
return;
5454
}
5555

56-
ImageRegionConstIterator<InputImageType> it(inImage, inRegion);
57-
ImageRegionIterator ot(outImage, outRegion);
56+
ImageRegionConstIterator it(inImage, inRegion);
57+
ImageRegionIterator ot(outImage, outRegion);
5858

5959
while (!it.IsAtEnd())
6060
{

Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ ShapedFloodFilledFunctionConditionalConstIterator<TImage, TFunction>::FindSeedPi
116116
// Now we search the input image for the first pixel which is inside
117117
// the function of interest
118118
m_Seeds.clear();
119-
for (ImageRegionConstIterator<TImage> it(this->m_Image, this->m_Image->GetBufferedRegion()); !it.IsAtEnd(); ++it)
119+
for (ImageRegionConstIterator it(this->m_Image, this->m_Image->GetBufferedRegion()); !it.IsAtEnd(); ++it)
120120
{
121121
if (this->IsPixelIncluded(it.GetIndex()))
122122
{
@@ -140,7 +140,7 @@ ShapedFloodFilledFunctionConditionalConstIterator<TImage, TFunction>::FindSeedPi
140140
// the function of interest
141141
m_Seeds.clear();
142142
bool found = false;
143-
for (ImageRegionConstIterator<TImage> it(this->m_Image, this->m_Image->GetBufferedRegion()); !it.IsAtEnd(); ++it)
143+
for (ImageRegionConstIterator it(this->m_Image, this->m_Image->GetBufferedRegion()); !it.IsAtEnd(); ++it)
144144
{
145145
if (this->IsPixelIncluded(it.GetIndex()))
146146
{

Modules/Core/FiniteDifference/include/itkDenseFiniteDifferenceImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ DenseFiniteDifferenceImageFilter<TInputImage, TOutputImage>::CopyInputToOutput()
4747
return;
4848
}
4949

50-
ImageRegionConstIterator<TInputImage> in(input, output->GetRequestedRegion());
51-
ImageRegionIterator out(output, output->GetRequestedRegion());
50+
ImageRegionConstIterator in(input, output->GetRequestedRegion());
51+
ImageRegionIterator out(output, output->GetRequestedRegion());
5252

5353
while (!out.IsAtEnd())
5454
{

Modules/Core/Mesh/include/itkImageToParametricSpaceFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ ImageToParametricSpaceFilter<TInputImage, TOutputMesh>::GenerateData()
104104
for (unsigned int component = 0; component < PointDimension; ++component)
105105
{
106106
image = this->GetInput(component);
107-
ImageRegionConstIterator<InputImageType> itr(image, image->GetRequestedRegion());
107+
ImageRegionConstIterator itr(image, image->GetRequestedRegion());
108108

109109
PointsContainerIterator point = points->Begin();
110110

Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ MetaImageConverter<VDimension, PixelType, TSpatialObjectType>::SpatialObjectToMe
157157
imageMO->ElementOrigin(origin);
158158
imageMO->ElementDirection(direction);
159159

160-
ImageRegionConstIterator<ImageType> it(SOImage, SOImage->GetLargestPossibleRegion());
160+
ImageRegionConstIterator it(SOImage, SOImage->GetLargestPossibleRegion());
161161
for (unsigned int i = 0; !it.IsAtEnd(); i++, ++it)
162162
{
163163
imageMO->ElementData(i, it.Get());

Modules/Core/TestKernel/include/itkTestingComparisonImageFilter.hxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ ComparisonImageFilter<TInputImage, TOutputImage>::DynamicThreadedGenerateData(
128128
// Process the internal face and each of the boundary faces.
129129
for (auto face = faceList.begin(); face != faceList.end(); ++face)
130130
{
131-
SmartIterator test(radius, testImage, *face); // Iterate over test image.
132-
ImageRegionConstIterator<InputImageType> valid(validImage, *face); // Iterate over valid image.
133-
ImageRegionIterator out(outputPtr, *face); // Iterate over output image.
131+
SmartIterator test(radius, testImage, *face); // Iterate over test image.
132+
ImageRegionConstIterator valid(validImage, *face); // Iterate over valid image.
133+
ImageRegionIterator out(outputPtr, *face); // Iterate over output image.
134134
if (!test.GetNeedToUseBoundaryCondition() || !m_IgnoreBoundaryPixels)
135135
{
136136
test.OverrideBoundaryCondition(&nbc);

Modules/Core/TestKernel/include/itkTestingExtractSliceImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ ExtractSliceImageFilter<TInputImage, TOutputImage>::DynamicThreadedGenerateData(
251251
this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
252252

253253

254-
ImageRegionIterator outIt(outputPtr, outputRegionForThread);
255-
ImageRegionConstIterator<TInputImage> inIt(inputPtr, inputRegionForThread);
254+
ImageRegionIterator outIt(outputPtr, outputRegionForThread);
255+
ImageRegionConstIterator inIt(inputPtr, inputRegionForThread);
256256

257257
// walk the output region, and sample the input image
258258
while (!outIt.IsAtEnd())

Modules/Core/TestKernel/include/itkTestingStretchIntensityImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ StretchIntensityImageFilter<TInputImage, TOutputImage>::DynamicThreadedGenerateD
106106

107107
const InputImageRegionType inputRegionForThread = outputRegionForThread;
108108

109-
ImageRegionConstIterator<TInputImage> inputIt(inputPtr, inputRegionForThread);
110-
ImageRegionIterator outputIt(outputPtr, outputRegionForThread);
109+
ImageRegionConstIterator inputIt(inputPtr, inputRegionForThread);
110+
ImageRegionIterator outputIt(outputPtr, outputRegionForThread);
111111

112112
while (!inputIt.IsAtEnd())
113113
{

Modules/Filtering/BiasCorrection/include/itkMRASlabIdentifier.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ MRASlabIdentifier<TInputImage>::GenerateSlabRegions()
7777
index[m_SlicingDirection] = currentSlice;
7878
region.SetIndex(index);
7979

80-
ImageRegionConstIterator<TInputImage> iter(m_Image, region);
80+
ImageRegionConstIterator iter(m_Image, region);
8181
iter.GoToBegin();
8282

8383
std::priority_queue<ImagePixelType> mins;

0 commit comments

Comments
 (0)