Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ DiffusionTensor3DReconstructionImageFilter<TReferenceImagePixelType,
const typename ReferenceImageType::Pointer refImage =
static_cast<ReferenceImageType *>(this->ProcessObject::GetInput(0));
ImageRegionConstIteratorWithIndex<ReferenceImageType> it(refImage, outputRegionForThread);
it.GoToBegin();

using GradientIteratorType = ImageRegionConstIterator<GradientImageType>;
std::vector<GradientIteratorType *> gradientItContainer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ HalfToFullHermitianImageFilter<TInputImage>::DynamicThreadedGenerateData(
conjugateRegionSize[0] = outputRegionMaximumIndex[0] - conjugateRegionIndex[0];
const OutputImageRegionType conjugateRegion(conjugateRegionIndex, conjugateRegionSize);

ImageRegionIteratorWithIndex<OutputImageType> oIt(outputPtr, conjugateRegion);
for (oIt.GoToBegin(); !oIt.IsAtEnd(); ++oIt)
for (ImageRegionIteratorWithIndex<OutputImageType> oIt(outputPtr, conjugateRegion); !oIt.IsAtEnd(); ++oIt)
{
OutputImageIndexType conjugateIndex = oIt.GetIndex();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,6 @@ HessianRecursiveGaussianImageFilter<TInputImage, TOutputImage>::GenerateData()

const RealType factor = spacingA * spacingB;

it.GoToBegin();
ot.GoToBegin();
while (!it.IsAtEnd())
{
ot.Set(it.Get() / factor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,6 @@ GradientRecursiveGaussianImageFilter<TInputImage, TOutputImage>::GenerateData()

const ScalarRealType spacing = inputImage->GetSpacing()[dim];

it.GoToBegin();
ot.GoToBegin();
while (!it.IsAtEnd())
{
auto outValue = static_cast<OutputComponentType>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ PadImageFilterBase<TInputImage, TOutputImage>::DynamicThreadedGenerateData(
{
// There is no overlap. Apply to the boundary condition for every pixel.
ImageRegionIteratorWithIndex<TOutputImage> outIter(outputPtr, outputRegionForThread);
outIter.GoToBegin();
while (!outIter.IsAtEnd())
{
auto value = static_cast<OutputImagePixelType>(m_BoundaryCondition->GetPixel(outIter.GetIndex(), inputPtr));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ RobustAutomaticThresholdCalculator<TInputImage, TGradientImage>::Compute()
itkExceptionStringMacro("Input or gradient image(s) not set.");
}

ImageRegionConstIteratorWithIndex<InputImageType> iIt(m_Input, m_Input->GetRequestedRegion());
iIt.GoToBegin();
ImageRegionConstIteratorWithIndex<InputImageType> iIt(m_Input, m_Input->GetRequestedRegion());
ImageRegionConstIteratorWithIndex<GradientImageType> gIt(m_Gradient, m_Gradient->GetRequestedRegion());
gIt.GoToBegin();

// Init the values
double n = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,6 @@ EigenAnalysis2DImageFilter<TInputImage, TEigenValueImage, TEigenVectorImage>::Ge
// support progress methods/callbacks
ProgressReporter progress(this, 0, region.GetNumberOfPixels());

inputIt1.GoToBegin();
inputIt2.GoToBegin();
inputIt3.GoToBegin();

outputIt1.GoToBegin();
outputIt2.GoToBegin();
outputIt3.GoToBegin();

EigenVectorType eigenVector;

while (!inputIt1.IsAtEnd())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ BSplineSyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform, T

if (this->m_AverageMidPointGradients)
{
ImageRegionIteratorWithIndex<DisplacementFieldType> ItF(
fixedToMiddleSmoothUpdateField, fixedToMiddleSmoothUpdateField->GetLargestPossibleRegion());
for (ItF.GoToBegin(); !ItF.IsAtEnd(); ++ItF)
for (ImageRegionIteratorWithIndex<DisplacementFieldType> ItF(
fixedToMiddleSmoothUpdateField, fixedToMiddleSmoothUpdateField->GetLargestPossibleRegion());
!ItF.IsAtEnd();
++ItF)
{
ItF.Set(ItF.Get() - movingToMiddleSmoothUpdateField->GetPixel(ItF.GetIndex()));
movingToMiddleSmoothUpdateField->SetPixel(ItF.GetIndex(), -ItF.Get());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -944,8 +944,9 @@ ImageRegistrationMethodv4<TFixedImage, TMovingImage, TTransform, TVirtualImage,
static_cast<unsigned long>(std::ceil(1.0 / this->m_MetricSamplingPercentagePerLevel[this->m_CurrentLevel]));
unsigned long count =
sampleCount; // Start at sampleCount to keep behavior backwards identical, using first element.
ImageRegionConstIteratorWithIndex<VirtualDomainImageType> It(virtualImage, virtualDomainRegion);
for (It.GoToBegin(); !It.IsAtEnd(); ++It)
for (ImageRegionConstIteratorWithIndex<VirtualDomainImageType> It(virtualImage, virtualDomainRegion);
!It.IsAtEnd();
++It)
{
if (count == sampleCount)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform, TVirtual

if (this->m_AverageMidPointGradients)
{
ImageRegionIteratorWithIndex<DisplacementFieldType> ItF(
fixedToMiddleSmoothUpdateField, fixedToMiddleSmoothUpdateField->GetLargestPossibleRegion());
for (ItF.GoToBegin(); !ItF.IsAtEnd(); ++ItF)
for (ImageRegionIteratorWithIndex<DisplacementFieldType> ItF(
fixedToMiddleSmoothUpdateField, fixedToMiddleSmoothUpdateField->GetLargestPossibleRegion());
!ItF.IsAtEnd();
++ItF)
{
ItF.Set(ItF.Get() - movingToMiddleSmoothUpdateField->GetPixel(ItF.GetIndex()));
movingToMiddleSmoothUpdateField->SetPixel(ItF.GetIndex(), -ItF.Get());
Expand Down Expand Up @@ -783,9 +784,10 @@ typename SyNImageRegistrationMethod<TFixedImage, TMovingImage, TOutputTransform,
const typename DisplacementFieldType::SizeType size = region.GetSize();
const typename DisplacementFieldType::IndexType startIndex = region.GetIndex();

ImageRegionConstIteratorWithIndex<DisplacementFieldType> ItF(field, field->GetLargestPossibleRegion());
ImageRegionIteratorWithIndex<DisplacementFieldType> ItS(smoothField, smoothField->GetLargestPossibleRegion());
for (ItF.GoToBegin(), ItS.GoToBegin(); !ItF.IsAtEnd(); ++ItF, ++ItS)
ImageRegionIteratorWithIndex<DisplacementFieldType> ItS(smoothField, smoothField->GetLargestPossibleRegion());
for (ImageRegionConstIteratorWithIndex<DisplacementFieldType> ItF(field, field->GetLargestPossibleRegion());
!ItF.IsAtEnd();
++ItF, ++ItS)
{
typename DisplacementFieldType::IndexType index = ItF.GetIndex();
bool isOnBoundary = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ LevelSetEvolutionBase<TEquationContainer, TLevelSet>::InitializeIteration()
using LevelSetListImageDomainType = typename DomainMapImageFilterType::LevelSetDomain;
const LevelSetListImageDomainType & levelSetListImageDomain = mapIt->second;
ImageRegionConstIteratorWithIndex<InputImageType> it(inputImage, *(levelSetListImageDomain.GetRegion()));
it.GoToBegin();

while (!it.IsAtEnd())
{
Expand Down Expand Up @@ -180,7 +179,6 @@ LevelSetEvolutionBase<TEquationContainer, TLevelSet>::InitializeIteration()
{
const TermContainerPointer termContainer = this->m_EquationContainer->GetEquation(0);
ImageRegionConstIteratorWithIndex<InputImageType> it(inputImage, inputImage->GetRequestedRegion());
it.GoToBegin();
while (!it.IsAtEnd())
{
termContainer->Initialize(it.GetIndex());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ LevelSetEvolutionComputeIterationThreader<LevelSetDenseImage<TImage>,
const RegionType subRegion(index, imageSubRegion.GetSize());

ImageRegionConstIteratorWithIndex<LevelSetImageType> imageIt(levelSetImage, subRegion);
imageIt.GoToBegin();

if (this->m_Associate->m_LevelSetContainer->HasDomainMap())
{
Expand Down Expand Up @@ -118,7 +117,6 @@ LevelSetEvolutionComputeIterationThreader<
while (mapIt != imageSubDomain.End())
{
ImageRegionConstIteratorWithIndex<InputImageType> it(inputImage, *(mapIt->second.GetRegion()));
it.GoToBegin();

while (!it.IsAtEnd())
{
Expand Down
Loading