Skip to content

Commit e168c03

Browse files
authored
Merge pull request InsightSoftwareConsortium#5818 from N-Dekker/STYLE-Using-Iterator
Remove `itk::`, when using Iterator type in `itk` namespace
2 parents b03b677 + 36df565 commit e168c03

27 files changed

Lines changed: 61 additions & 67 deletions

Modules/Core/Common/include/itkFloodFilledFunctionConditionalConstIterator.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void
105105
FloodFilledFunctionConditionalConstIterator<TImage, TFunction>::FindSeedPixel()
106106
{
107107
// Create an iterator that will walk the input image
108-
using IRIType = itk::ImageRegionConstIterator<TImage>;
108+
using IRIType = ImageRegionConstIterator<TImage>;
109109

110110
// Now we search the input image for the first pixel which is inside
111111
// the function of interest
@@ -129,7 +129,7 @@ void
129129
FloodFilledFunctionConditionalConstIterator<TImage, TFunction>::FindSeedPixels()
130130
{
131131
// Create an iterator that will walk the input image
132-
using IRIType = typename itk::ImageRegionConstIterator<TImage>;
132+
using IRIType = ImageRegionConstIterator<TImage>;
133133

134134
// Now we search the input image for the first pixel which is inside
135135
// the function of interest

Modules/Core/Common/include/itkImageAlgorithm.hxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ ImageAlgorithm::ReferenceCopy(const InputImageType * inIma
3636
{
3737
if (inRegion.GetSize()[0] == outRegion.GetSize()[0])
3838
{
39-
itk::ImageScanlineConstIterator<InputImageType> it(inImage, inRegion);
40-
itk::ImageScanlineIterator ot(outImage, outRegion);
39+
ImageScanlineConstIterator<InputImageType> it(inImage, inRegion);
40+
ImageScanlineIterator ot(outImage, outRegion);
4141

4242
while (!it.IsAtEnd())
4343
{
@@ -53,8 +53,8 @@ ImageAlgorithm::ReferenceCopy(const InputImageType * inIma
5353
return;
5454
}
5555

56-
itk::ImageRegionConstIterator<InputImageType> it(inImage, inRegion);
57-
itk::ImageRegionIterator<OutputImageType> ot(outImage, outRegion);
56+
ImageRegionConstIterator<InputImageType> it(inImage, inRegion);
57+
ImageRegionIterator<OutputImageType> 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
@@ -112,7 +112,7 @@ void
112112
ShapedFloodFilledFunctionConditionalConstIterator<TImage, TFunction>::FindSeedPixel()
113113
{
114114
// Create an iterator that will walk the input image
115-
using IRIType = typename itk::ImageRegionConstIterator<TImage>;
115+
using IRIType = ImageRegionConstIterator<TImage>;
116116

117117
// Now we search the input image for the first pixel which is inside
118118
// the function of interest
@@ -136,7 +136,7 @@ void
136136
ShapedFloodFilledFunctionConditionalConstIterator<TImage, TFunction>::FindSeedPixels()
137137
{
138138
// Create an iterator that will walk the input image
139-
using IRIType = typename itk::ImageRegionConstIterator<TImage>;
139+
using IRIType = ImageRegionConstIterator<TImage>;
140140

141141
// Now we search the input image for the first pixel which is inside
142142
// the function of interest

Modules/Core/ImageFunction/include/itkGaussianBlurImageFunction.hxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ GaussianBlurImageFunction<TInputImage, TOutput>::EvaluateAtIndex(const IndexType
231231
typename InternalImageType::RegionType regionS = region;
232232
regionS.Crop(inputImage->GetBufferedRegion());
233233

234-
itk::ImageLinearConstIteratorWithIndex<InputImageType> it(inputImage, regionS);
235-
itk::ImageLinearIteratorWithIndex<InternalImageType> itN(m_InternalImage, regionN);
234+
ImageLinearConstIteratorWithIndex<InputImageType> it(inputImage, regionS);
235+
ImageLinearIteratorWithIndex<InternalImageType> itN(m_InternalImage, regionN);
236236
it.SetDirection(1);
237237
itN.SetDirection(1);
238238
it.GoToBeginOfLine();
@@ -266,7 +266,7 @@ GaussianBlurImageFunction<TInputImage, TOutput>::EvaluateAtIndex(const IndexType
266266
m_OperatorInternalImageFunction->SetInputImage(m_InternalImage);
267267
m_OperatorInternalImageFunction->SetOperator(operatorArray[direction]);
268268

269-
itk::ImageLinearIteratorWithIndex<InternalImageType> itr(m_InternalImage, region);
269+
ImageLinearIteratorWithIndex<InternalImageType> itr(m_InternalImage, region);
270270

271271
unsigned int dir = direction + 1;
272272
if (dir == Self::ImageDimension)

Modules/Core/SpatialObjects/include/itkMetaImageConverter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ MetaImageConverter<VDimension, PixelType, TSpatialObjectType>::MetaObjectToSpati
105105

106106
this->MetaObjectToSpatialObjectBase(imageMO, imageSO);
107107

108-
itk::ImageRegionIteratorWithIndex<ImageType> it(myImage, myImage->GetLargestPossibleRegion());
108+
ImageRegionIteratorWithIndex<ImageType> it(myImage, myImage->GetLargestPossibleRegion());
109109
for (unsigned int i = 0; !it.IsAtEnd(); i++, ++it)
110110
{
111111
it.Set(static_cast<typename ImageType::PixelType>(imageMO->ElementData(i)));
@@ -158,7 +158,7 @@ MetaImageConverter<VDimension, PixelType, TSpatialObjectType>::SpatialObjectToMe
158158
imageMO->ElementOrigin(origin);
159159
imageMO->ElementDirection(direction);
160160

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

Modules/Core/SpatialObjects/include/itkSpatialObjectToImageFilter.hxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ SpatialObjectToImageFilter<TInputSpatialObject, TOutputImage>::GenerateData()
277277
OutputImage->SetDirection(m_Direction);
278278
OutputImage->Allocate(); // allocate the image
279279

280-
using myIteratorType = itk::ImageRegionIteratorWithIndex<OutputImageType>;
280+
using myIteratorType = ImageRegionIteratorWithIndex<OutputImageType>;
281281

282282
myIteratorType it(OutputImage, region);
283283

Modules/Filtering/FFT/include/itkFFTWComplexToComplex1DFFTImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ FFTWComplexToComplex1DFFTImageFilter<TInputImage, TOutputImage>::ThreadedGenerat
142142
const typename OutputImageType::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize();
143143
const unsigned int lineSize = outputSize[this->m_Direction];
144144

145-
using InputIteratorType = itk::ImageLinearConstIteratorWithIndex<InputImageType>;
146-
using OutputIteratorType = itk::ImageLinearIteratorWithIndex<OutputImageType>;
145+
using InputIteratorType = ImageLinearConstIteratorWithIndex<InputImageType>;
146+
using OutputIteratorType = ImageLinearIteratorWithIndex<OutputImageType>;
147147
InputIteratorType inputIt(inputPtr, outputRegion);
148148
// the output region should be the same as the input region in the non-fft directions
149149
OutputIteratorType outputIt(outputPtr, outputRegion);

Modules/Filtering/FFT/include/itkFFTWForward1DFFTImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ FFTWForward1DFFTImageFilter<TInputImage, TOutputImage>::ThreadedGenerateData(con
130130
const InputImageType * inputPtr = this->GetInput();
131131
OutputImageType * outputPtr = this->GetOutput();
132132

133-
using InputIteratorType = itk::ImageLinearConstIteratorWithIndex<InputImageType>;
134-
using OutputIteratorType = itk::ImageLinearIteratorWithIndex<OutputImageType>;
133+
using InputIteratorType = ImageLinearConstIteratorWithIndex<InputImageType>;
134+
using OutputIteratorType = ImageLinearIteratorWithIndex<OutputImageType>;
135135
InputIteratorType inputIt(inputPtr, outputRegion);
136136
OutputIteratorType outputIt(outputPtr, outputRegion);
137137

Modules/Filtering/FFT/include/itkFFTWInverse1DFFTImageFilter.hxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ FFTWInverse1DFFTImageFilter<TInputImage, TOutputImage>::ThreadedGenerateData(con
134134
const typename OutputImageType::SizeType & outputSize = outputPtr->GetRequestedRegion().GetSize();
135135
const unsigned int lineSize = outputSize[this->m_Direction];
136136

137-
using InputIteratorType = itk::ImageLinearConstIteratorWithIndex<InputImageType>;
138-
using OutputIteratorType = itk::ImageLinearIteratorWithIndex<OutputImageType>;
137+
using InputIteratorType = ImageLinearConstIteratorWithIndex<InputImageType>;
138+
using OutputIteratorType = ImageLinearIteratorWithIndex<OutputImageType>;
139139
InputIteratorType inputIt(inputPtr, outputRegion);
140140
OutputIteratorType outputIt(outputPtr, outputRegion);
141141

Modules/Filtering/ImageFeature/include/itkHoughTransform2DLinesImageFilter.hxx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,8 @@ HoughTransform2DLinesImageFilter<TInputPixelType, TOutputPixelType>::GetLines()
250250
const InternalImageType::Pointer postProcessImage = gaussianFilter->GetOutput();
251251

252252
using MinMaxCalculatorType = MinimumMaximumImageCalculator<InternalImageType>;
253-
auto minMaxCalculator = MinMaxCalculatorType::New();
254-
itk::ImageRegionIterator<InternalImageType> it_input(postProcessImage,
255-
postProcessImage->GetLargestPossibleRegion());
253+
auto minMaxCalculator = MinMaxCalculatorType::New();
254+
ImageRegionIterator<InternalImageType> it_input(postProcessImage, postProcessImage->GetLargestPossibleRegion());
256255

257256

258257
itk::Index<2> index;

0 commit comments

Comments
 (0)