diff --git a/Documentation/docs/migration_guides/itk_6_migration_guide.md b/Documentation/docs/migration_guides/itk_6_migration_guide.md index 0e04193c968..f6cbd48016f 100644 --- a/Documentation/docs/migration_guides/itk_6_migration_guide.md +++ b/Documentation/docs/migration_guides/itk_6_migration_guide.md @@ -172,6 +172,15 @@ reoriented_image = itk.orient_image_filter( ) ``` +`GetIndex()` replaced with `ComputeIndex()`, for iterators without index +------------------------------------------------------------------------ +`ImageConstIterator::GetIndex()` is marked to be removed in the future. This iterator does not have an index, +internally, so its `GetIndex()` member function does a potentially expensive computation. For an iterator that is +derived from `ImageConstIterator`, please use its newly introduced `ComputeIndex()` member function instead. Or use an +iterator _with_ index (like `ImageIteratorWithIndex`). + + + Remove support for Python wrapped `long double` types ----------------------------------------------------- diff --git a/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx b/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx index 3bfba1fe598..b81e758673c 100644 --- a/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx +++ b/Examples/DataRepresentation/Mesh/ImageToPointSet.cxx @@ -88,7 +88,7 @@ main(int argc, char * argv[]) { // Convert the pixel position into a Point - image->TransformIndexToPhysicalPoint(it.GetIndex(), point); + image->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); pointSet->SetPoint(pointId, point); // Transfer the pixel data to the value associated with the point. diff --git a/Examples/Filtering/GaussianBlurImageFunction.cxx b/Examples/Filtering/GaussianBlurImageFunction.cxx index d9edf099e4d..620a4b646dd 100644 --- a/Examples/Filtering/GaussianBlurImageFunction.cxx +++ b/Examples/Filtering/GaussianBlurImageFunction.cxx @@ -72,7 +72,7 @@ main(int argc, char * argv[]) while (!it.IsAtEnd()) { - out.Set(gaussianFunction->EvaluateAtIndex(it.GetIndex())); + out.Set(gaussianFunction->EvaluateAtIndex(it.ComputeIndex())); ++it; ++out; } diff --git a/Examples/RegistrationITKv4/BSplineWarping1.cxx b/Examples/RegistrationITKv4/BSplineWarping1.cxx index bf6db1cf6fc..c8ef43b02df 100644 --- a/Examples/RegistrationITKv4/BSplineWarping1.cxx +++ b/Examples/RegistrationITKv4/BSplineWarping1.cxx @@ -334,7 +334,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = bsplineTransform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Examples/RegistrationITKv4/BSplineWarping2.cxx b/Examples/RegistrationITKv4/BSplineWarping2.cxx index d53826196b8..6eeb4eab23b 100644 --- a/Examples/RegistrationITKv4/BSplineWarping2.cxx +++ b/Examples/RegistrationITKv4/BSplineWarping2.cxx @@ -334,7 +334,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = bsplineTransform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Examples/RegistrationITKv4/DeformableRegistration12.cxx b/Examples/RegistrationITKv4/DeformableRegistration12.cxx index 8edb123ae24..ea7ded48cb9 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration12.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration12.cxx @@ -460,7 +460,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = transform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Examples/RegistrationITKv4/DeformableRegistration13.cxx b/Examples/RegistrationITKv4/DeformableRegistration13.cxx index a8711d5596e..254d0c16d33 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration13.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration13.cxx @@ -449,7 +449,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = transform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Examples/RegistrationITKv4/DeformableRegistration14.cxx b/Examples/RegistrationITKv4/DeformableRegistration14.cxx index 93beaab2a73..dc89f5c6a78 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration14.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration14.cxx @@ -435,7 +435,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = transform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Examples/RegistrationITKv4/DeformableRegistration15.cxx b/Examples/RegistrationITKv4/DeformableRegistration15.cxx index 78ff03d9af8..df12f177fa1 100644 --- a/Examples/RegistrationITKv4/DeformableRegistration15.cxx +++ b/Examples/RegistrationITKv4/DeformableRegistration15.cxx @@ -836,7 +836,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = bsplineTransformFine->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx b/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx index 92b9373919e..d0c27d4d268 100644 --- a/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx +++ b/Examples/RegistrationITKv4/ThinPlateSplineWarp.cxx @@ -179,7 +179,7 @@ ExampleMain(int argc, const char * const argv[]) FieldVectorType displacement; while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, point1); point2 = tps->TransformPoint(point1); for (unsigned int i = 0; i < ImageDimension; ++i) diff --git a/Modules/Core/Common/include/itkImageConstIterator.h b/Modules/Core/Common/include/itkImageConstIterator.h index 4b1d71eb941..c4f5dca2738 100644 --- a/Modules/Core/Common/include/itkImageConstIterator.h +++ b/Modules/Core/Common/include/itkImageConstIterator.h @@ -303,15 +303,17 @@ class ITK_TEMPLATE_EXPORT ImageConstIterator return m_Image->ComputeIndex(m_Offset); } +#ifndef ITK_FUTURE_LEGACY_REMOVE /** Computes and returns the index. This may be a relatively expensive operation. - * \note It is often preferable for users to call ComputeIndex() directly, to make it more clear that this function - * may be expensive. - * \sa ComputeIndex */ + * \deprecated Please use `ComputeIndex()` instead, or use an iterator with index, like `ImageIteratorWithIndex`! */ + ITK_FUTURE_DEPRECATED( + "Please use `ComputeIndex()` instead, or use an iterator with index, like `ImageIteratorWithIndex`!") [[nodiscard]] IndexType GetIndex() const { return this->ComputeIndex(); } +#endif /** Set the index. No bounds checking is performed. * \sa GetIndex */ diff --git a/Modules/Core/Common/test/itkConstNeighborhoodIteratorTest.cxx b/Modules/Core/Common/test/itkConstNeighborhoodIteratorTest.cxx index 5523992c75c..56430289c35 100644 --- a/Modules/Core/Common/test/itkConstNeighborhoodIteratorTest.cxx +++ b/Modules/Core/Common/test/itkConstNeighborhoodIteratorTest.cxx @@ -314,7 +314,7 @@ itkConstNeighborhoodIteratorTest(int, char *[]) // Set all pixels with first index == 0 to 0, and set the rest of the image to 255 while (!createImageIterator.IsAtEnd()) { - if (createImageIterator.GetIndex()[0] == 0) + if (createImageIterator.ComputeIndex()[0] == 0) { createImageIterator.Set(0); } diff --git a/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest.cxx b/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest.cxx index 06f167657a0..f9e1f7e3190 100644 --- a/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest.cxx +++ b/Modules/Core/Common/test/itkConstShapedNeighborhoodIteratorTest.cxx @@ -421,7 +421,7 @@ itkConstShapedNeighborhoodIteratorTest(int, char *[]) // Set all pixels with first index == 0 to 0, and set the rest of the image to 255 while (!createImageIterator.IsAtEnd()) { - if (createImageIterator.GetIndex()[0] == 0) + if (createImageIterator.ComputeIndex()[0] == 0) { createImageIterator.Set(0); } diff --git a/Modules/Core/Common/test/itkExtractImageTest.cxx b/Modules/Core/Common/test/itkExtractImageTest.cxx index 0feca7174a9..e181121dc3d 100644 --- a/Modules/Core/Common/test/itkExtractImageTest.cxx +++ b/Modules/Core/Common/test/itkExtractImageTest.cxx @@ -176,8 +176,8 @@ itkExtractImageTest(int, char *[]) for (; !iteratorIn1.IsAtEnd(); ++iteratorIn1) { - const ShortImage::IndexType::IndexValueType row = iteratorIn1.GetIndex()[0]; - const ShortImage::IndexType::IndexValueType column = iteratorIn1.GetIndex()[1]; + const ShortImage::IndexType::IndexValueType row = iteratorIn1.ComputeIndex()[0]; + const ShortImage::IndexType::IndexValueType column = iteratorIn1.ComputeIndex()[1]; if ((row < 0) || (row > 7) || (column < 0) || (column > 11)) { if (iteratorIn1.Get() != 13) @@ -251,8 +251,8 @@ itkExtractImageTest(int, char *[]) { for (; !iteratorIn2.IsAtEnd(); ++iteratorIn2) { - const ShortImage::IndexType::IndexValueType row = iteratorIn2.GetIndex()[0]; - const ShortImage::IndexType::IndexValueType column = iteratorIn2.GetIndex()[1]; + const ShortImage::IndexType::IndexValueType row = iteratorIn2.ComputeIndex()[0]; + const ShortImage::IndexType::IndexValueType column = iteratorIn2.ComputeIndex()[1]; if ((row < 0) || (row > 7) || (column < 0) || (column > 11)) { if (iteratorIn2.Get() != 13) @@ -318,7 +318,7 @@ itkExtractImageTest(int, char *[]) { const LineImage::PixelType linePixelValue = iteratorLineIn.Get(); testIndex[0] = extractIndex[0]; - testIndex[1] = iteratorLineIn.GetIndex()[0]; + testIndex[1] = iteratorLineIn.ComputeIndex()[0]; if (linePixelValue != if2->GetPixel(testIndex)) { passed = false; diff --git a/Modules/Core/Common/test/itkImageIteratorTest.cxx b/Modules/Core/Common/test/itkImageIteratorTest.cxx index baa20f7e5d0..3aba5f62bc2 100644 --- a/Modules/Core/Common/test/itkImageIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageIteratorTest.cxx @@ -150,7 +150,7 @@ itkImageIteratorTest(int, char *[]) } // Exercise GetIndex() - const VectorImageType::IndexType index1 = itr1.GetIndex(); + const VectorImageType::IndexType index1 = itr1.ComputeIndex(); if (index1 != startIndex3D) { std::cerr << "Error in GetIndex()" << std::endl; @@ -162,13 +162,13 @@ itkImageIteratorTest(int, char *[]) index2[0]++; VectorImageIterator itr5 = itr1; itr5.SetIndex(index2); - if (itr5.GetIndex() != index2) + if (itr5.ComputeIndex() != index2) { std::cerr << "Error in GetIndex() and/or SetIndex()" << std::endl; return EXIT_FAILURE; } - if (itr5.GetIndex() == itr1.GetIndex()) + if (itr5.ComputeIndex() == itr1.ComputeIndex()) { std::cerr << "Error in GetIndex() and/or SetIndex()" << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkImageRegionIteratorTest.cxx b/Modules/Core/Common/test/itkImageRegionIteratorTest.cxx index 3fc7ca3c165..213e53d3910 100644 --- a/Modules/Core/Common/test/itkImageRegionIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageRegionIteratorTest.cxx @@ -97,7 +97,7 @@ itkImageRegionIteratorTest(int, char *[]) std::cout << "Simple iterator loop: "; for (; !it.IsAtEnd(); ++it) { - const itk::Image, 3>::IndexType index = it.GetIndex(); + const itk::Image, 3>::IndexType index = it.ComputeIndex(); std::cout << index << std::endl; } @@ -109,7 +109,7 @@ itkImageRegionIteratorTest(int, char *[]) std::cout << "Simple const iterator loop: "; for (; !cit.IsAtEnd(); ++cit) { - const itk::Image, 3>::IndexType index = cit.GetIndex(); + const itk::Image, 3>::IndexType index = cit.ComputeIndex(); std::cout << index << std::endl; } @@ -122,7 +122,7 @@ itkImageRegionIteratorTest(int, char *[]) { --backIt; - itk::Image, 3>::IndexType index = backIt.GetIndex(); + itk::Image, 3>::IndexType index = backIt.ComputeIndex(); std::cout << "Simple iterator backwards loop: "; for (unsigned int i = 0; i < index.GetIndexDimension(); ++i) { @@ -147,7 +147,7 @@ itkImageRegionIteratorTest(int, char *[]) // Set all pixels with first index == 0 to 0, and set the rest of the image to 255 while (!createImageIterator.IsAtEnd()) { - if (createImageIterator.GetIndex()[0] == 0) + if (createImageIterator.ComputeIndex()[0] == 0) { createImageIterator.Set(0); } diff --git a/Modules/Core/Common/test/itkImageReverseIteratorTest.cxx b/Modules/Core/Common/test/itkImageReverseIteratorTest.cxx index 25125c7e97f..4d5d18cabcc 100644 --- a/Modules/Core/Common/test/itkImageReverseIteratorTest.cxx +++ b/Modules/Core/Common/test/itkImageReverseIteratorTest.cxx @@ -99,7 +99,7 @@ itkImageReverseIteratorTest(int, char *[]) for (; !it.IsAtEnd(); ++it) { - ImageType::IndexType index = it.GetIndex(); + ImageType::IndexType index = it.ComputeIndex(); std::cout << "Simple iterator loop: "; for (unsigned int i = 0; i < index.GetIndexDimension(); ++i) { @@ -115,7 +115,7 @@ itkImageReverseIteratorTest(int, char *[]) { --backIt; - ImageType::IndexType index = backIt.GetIndex(); + ImageType::IndexType index = backIt.ComputeIndex(); std::cout << "Simple iterator backwards loop: "; for (unsigned int i = 0; i < index.GetIndexDimension(); ++i) { @@ -183,7 +183,7 @@ itkImageReverseIteratorTest(int, char *[]) for (; !it.IsAtEnd(); ++it) { --castBackReverseIt; - itk::Image, 3>::IndexType index = it.GetIndex(); + itk::Image, 3>::IndexType index = it.ComputeIndex(); itk::Image, 3>::IndexType rindex = castBackReverseIt.GetIndex(); for (unsigned int i = 0; i < index.GetIndexDimension(); ++i) { diff --git a/Modules/Core/Common/test/itkImageScanlineIteratorTest1.cxx b/Modules/Core/Common/test/itkImageScanlineIteratorTest1.cxx index 022938c10fe..7c3afafc595 100644 --- a/Modules/Core/Common/test/itkImageScanlineIteratorTest1.cxx +++ b/Modules/Core/Common/test/itkImageScanlineIteratorTest1.cxx @@ -162,7 +162,7 @@ itkImageScanlineIteratorTest1(int, char *[]) { while (!createImageIterator.IsAtEndOfLine()) { - if (createImageIterator.GetIndex()[0] == 0) + if (createImageIterator.ComputeIndex()[0] == 0) { createImageIterator.Set(0); } diff --git a/Modules/Core/Common/test/itkImportImageTest.cxx b/Modules/Core/Common/test/itkImportImageTest.cxx index 4100c5cda99..24e1a997c27 100644 --- a/Modules/Core/Common/test/itkImportImageTest.cxx +++ b/Modules/Core/Common/test/itkImportImageTest.cxx @@ -96,18 +96,19 @@ itkImportImageTest(int, char *[]) bool passed = true; for (; !iterator2.IsAtEnd(); ++iterator2) { - std::cout << "Pixel " << iterator2.GetIndex() << " = " << iterator2.Get() << std::endl; + std::cout << "Pixel " << iterator2.ComputeIndex() << " = " << iterator2.Get() << std::endl; if (iterator2.Get() != itk::Math::RoundHalfIntegerUp(static_cast( - (shrink->GetShrinkFactors()[0] * iterator2.GetIndex()[0] + shrink->GetShrinkFactors()[0] / 2) + + (shrink->GetShrinkFactors()[0] * iterator2.ComputeIndex()[0] + shrink->GetShrinkFactors()[0] / 2) + (region.GetSize()[0] * - ((shrink->GetShrinkFactors()[1] / 2) + (shrink->GetShrinkFactors()[0] * iterator2.GetIndex()[1])))))) + ((shrink->GetShrinkFactors()[1] / 2) + (shrink->GetShrinkFactors()[0] * iterator2.ComputeIndex()[1])))))) { - std::cout << " iterator2.GetIndex() Get() " << iterator2.GetIndex() << ' ' << iterator2.Get() << " compare value " + std::cout << " iterator2.GetIndex() Get() " << iterator2.ComputeIndex() << ' ' << iterator2.Get() + << " compare value " << itk::Math::RoundHalfIntegerUp(static_cast( - (shrink->GetShrinkFactors()[0] * iterator2.GetIndex()[0] + shrink->GetShrinkFactors()[0] / 2) + + (shrink->GetShrinkFactors()[0] * iterator2.ComputeIndex()[0] + shrink->GetShrinkFactors()[0] / 2) + (region.GetSize()[0] * ((shrink->GetShrinkFactors()[1] / 2) + - (shrink->GetShrinkFactors()[0] * iterator2.GetIndex()[1]))))) + (shrink->GetShrinkFactors()[0] * iterator2.ComputeIndex()[1]))))) << '\n'; passed = false; } diff --git a/Modules/Core/Common/test/itkStreamingImageFilterTest.cxx b/Modules/Core/Common/test/itkStreamingImageFilterTest.cxx index c993e893f0a..9dd8dcf37af 100644 --- a/Modules/Core/Common/test/itkStreamingImageFilterTest.cxx +++ b/Modules/Core/Common/test/itkStreamingImageFilterTest.cxx @@ -121,17 +121,17 @@ itkStreamingImageFilterTest(int, char *[]) bool passed = true; for (; !iterator2.IsAtEnd(); ++iterator2) { - short col = (shrink->GetShrinkFactors()[0] * iterator2.GetIndex()[0] + (shrink->GetShrinkFactors()[0] - 1) / 2); + short col = (shrink->GetShrinkFactors()[0] * iterator2.ComputeIndex()[0] + (shrink->GetShrinkFactors()[0] - 1) / 2); col += colOffset; - short row = (shrink->GetShrinkFactors()[1] * iterator2.GetIndex()[1] + (shrink->GetShrinkFactors()[1] - 1) / 2); + short row = (shrink->GetShrinkFactors()[1] * iterator2.ComputeIndex()[1] + (shrink->GetShrinkFactors()[1] - 1) / 2); row += rowOffset; const short trueValue = col + region.GetSize()[0] * row; if (iterator2.Get() != trueValue) { passed = false; - std::cout << "Pixel " << iterator2.GetIndex() << " expected " << trueValue << " but got " << iterator2.Get() + std::cout << "Pixel " << iterator2.ComputeIndex() << " expected " << trueValue << " but got " << iterator2.Get() << std::endl; } } diff --git a/Modules/Core/Common/test/itkStreamingImageFilterTest2.cxx b/Modules/Core/Common/test/itkStreamingImageFilterTest2.cxx index e99d7d8e0e6..789d4f87568 100644 --- a/Modules/Core/Common/test/itkStreamingImageFilterTest2.cxx +++ b/Modules/Core/Common/test/itkStreamingImageFilterTest2.cxx @@ -120,18 +120,18 @@ itkStreamingImageFilterTest2(int, char *[]) for (; !iterator2.IsAtEnd(); ++iterator2) { auto col = itk::Math::RoundHalfIntegerUp(static_cast( - shrink->GetShrinkFactors()[0] * iterator2.GetIndex()[0] + (shrink->GetShrinkFactors()[0]) / 2.0)); + shrink->GetShrinkFactors()[0] * iterator2.ComputeIndex()[0] + (shrink->GetShrinkFactors()[0]) / 2.0)); col += colOffset; auto row = itk::Math::RoundHalfIntegerUp(static_cast( - shrink->GetShrinkFactors()[1] * iterator2.GetIndex()[1] + (shrink->GetShrinkFactors()[1]) / 2.0)); + shrink->GetShrinkFactors()[1] * iterator2.ComputeIndex()[1] + (shrink->GetShrinkFactors()[1]) / 2.0)); row += rowOffset; const short trueValue = col + region.GetSize()[0] * row; if (iterator2.Get() != trueValue) { passed = false; - std::cout << "Pixel " << iterator2.GetIndex() << " expected " << trueValue << " but got " << iterator2.Get() + std::cout << "Pixel " << iterator2.ComputeIndex() << " expected " << trueValue << " but got " << iterator2.Get() << std::endl; } } diff --git a/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageReadTest.cxx b/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageReadTest.cxx index 5ce849921ff..e2c7afd18fd 100644 --- a/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageReadTest.cxx +++ b/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageReadTest.cxx @@ -103,7 +103,7 @@ itkSymmetricSecondRankTensorImageReadTest(int argc, char * argv[]) if (itk::Math::abs(matrixPixel[i][j] - tensorPixel(i, j)) > tolerance) { std::cerr << "Tensor read does not match expected values " << std::endl; - std::cerr << "Index " << tItr.GetIndex() << std::endl; + std::cerr << "Index " << tItr.ComputeIndex() << std::endl; std::cerr << "Tensor value " << std::endl << tensorPixel << std::endl; std::cerr << "Matrix value " << std::endl << matrixPixel << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageWriteReadTest.cxx b/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageWriteReadTest.cxx index 27f5c07a7fc..b18adeeeb9f 100644 --- a/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageWriteReadTest.cxx +++ b/Modules/Core/Common/test/itkSymmetricSecondRankTensorImageWriteReadTest.cxx @@ -88,7 +88,7 @@ itkSymmetricSecondRankTensorImageWriteReadTest(int argc, char * argv[]) if (itk::Math::abs(tensorPixelInput[i] - tensorPixelOutput[i]) > tolerance) { std::cerr << "Tensor read does not match expected values " << std::endl; - std::cerr << "Index " << inIt.GetIndex() << std::endl; + std::cerr << "Index " << inIt.ComputeIndex() << std::endl; std::cerr << "Tensor input value " << std::endl << tensorPixelInput << std::endl; std::cerr << "Tensor output value " << std::endl << tensorPixelOutput << std::endl; return EXIT_FAILURE; diff --git a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx index 595f504353e..e165834b3fc 100644 --- a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx @@ -35,7 +35,7 @@ struct helper> static PositionType GetPosition(const TImage *, const TIterator & it) { - return it.GetIndex(); + return it.ComputeIndex(); } }; @@ -49,7 +49,7 @@ struct helper> GetPosition(const TImage * image, const TIterator & it) { typename TImage::PointType p; - image->TransformIndexToPhysicalPoint(it.GetIndex(), p); + image->TransformIndexToPhysicalPoint(it.ComputeIndex(), p); PositionType point; point.CastFrom(p); diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx index 0b9fa306728..9dfe406fd31 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest.cxx @@ -75,7 +75,7 @@ itkImageMaskSpatialObjectTest(int, char *[]) while (!itr.IsAtEnd()) { - const ImageType::IndexType constIndex = itr.GetIndex(); + const ImageType::IndexType constIndex = itr.ComputeIndex(); const bool reference = insideRegion.IsInside(constIndex); ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx index b8e692ed6e5..ac213e3633c 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx @@ -110,7 +110,7 @@ itkImageMaskSpatialObjectTest2(int, char *[]) itr.GoToBegin(); while (!itr.IsAtEnd()) { - const ImageType::IndexType constIndex = itr.GetIndex(); + const ImageType::IndexType constIndex = itr.ComputeIndex(); ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); @@ -135,7 +135,7 @@ itkImageMaskSpatialObjectTest2(int, char *[]) itr.GoToBegin(); while (!itr.IsAtEnd()) { - const ImageType::IndexType constIndex = itr.GetIndex(); + const ImageType::IndexType constIndex = itr.ComputeIndex(); const bool reference = insideRegion.IsInside(constIndex); ImageType::PointType point; diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest5.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest5.cxx index 325cdd9e0a3..123fe396ed3 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest5.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest5.cxx @@ -74,7 +74,7 @@ itkImageMaskSpatialObjectTest5(int, char *[]) itr.GoToBegin(); while (!itr.IsAtEnd()) { - const ImageType::IndexType constIndex = itr.GetIndex(); + const ImageType::IndexType constIndex = itr.ComputeIndex(); const bool reference = insideRegion.IsInside(constIndex); ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); @@ -95,7 +95,7 @@ itkImageMaskSpatialObjectTest5(int, char *[]) itr.GoToBegin(); while (!itr.IsAtEnd()) { - const ImageType::IndexType constIndex = itr.GetIndex(); + const ImageType::IndexType constIndex = itr.ComputeIndex(); const bool reference = insideRegion.IsInside(constIndex); ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); @@ -117,7 +117,7 @@ itkImageMaskSpatialObjectTest5(int, char *[]) itr.GoToBegin(); while (!itr.IsAtEnd()) { - const ImageType::IndexType constIndex = itr.GetIndex(); + const ImageType::IndexType constIndex = itr.ComputeIndex(); const bool reference = insideRegion.IsInside(constIndex); ImageType::PointType point; image->TransformIndexToPhysicalPoint(constIndex, point); diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx index 3693a98b9e9..4198e12f840 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest2.cxx @@ -213,7 +213,7 @@ class BSplineDeformableTransformTest2Helper while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = bsplineTransform->TransformPoint(fixedPoint); displacement[0] = movingPoint[0] - fixedPoint[0]; diff --git a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx index c8bf0cbba1a..c9802b53e86 100644 --- a/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineDeformableTransformTest3.cxx @@ -227,7 +227,7 @@ class BSplineDeformableTransformTest3Helper while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = bsplineTransform->TransformPoint(fixedPoint); displacement[0] = movingPoint[0] - fixedPoint[0]; diff --git a/Modules/Core/Transform/test/itkBSplineTransformGTest.cxx b/Modules/Core/Transform/test/itkBSplineTransformGTest.cxx index 47cad6a3239..5f58de75813 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformGTest.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformGTest.cxx @@ -77,7 +77,7 @@ bspline_eq(const itk::BSplineTransformTransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = bsplineTransform->TransformPoint(fixedPoint); bsplineTransform->ComputeJacobianWithRespectToParameters(fixedPoint, jacobian); diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx index f6ac9d387af..56a6e929267 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest2.cxx @@ -188,7 +188,7 @@ class BSplineTransformTest2Helper while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = bsplineTransform->TransformPoint(fixedPoint); displacement[0] = movingPoint[0] - fixedPoint[0]; diff --git a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx index b581a79398a..e9f124b00d2 100644 --- a/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx +++ b/Modules/Core/Transform/test/itkBSplineTransformTest3.cxx @@ -213,7 +213,7 @@ class BSplineTransformTest3Helper while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = bsplineTransform->TransformPoint(fixedPoint); displacement[0] = movingPoint[0] - fixedPoint[0]; diff --git a/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx b/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx index 4e9700ba2ef..e334692d503 100644 --- a/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx +++ b/Modules/Filtering/AnisotropicSmoothing/test/itkMinMaxCurvatureFlowImageFilterTest.cxx @@ -166,7 +166,7 @@ testMinMaxCurvatureFlow(itk::Size & size, // ND image s for (; !circleIter.IsAtEnd(); ++circleIter) { - typename ImageType::IndexType index = circleIter.GetIndex(); + typename ImageType::IndexType index = circleIter.ComputeIndex(); double lhs = 0.0; for (j = 0; j < ImageDimension; ++j) @@ -243,7 +243,7 @@ testMinMaxCurvatureFlow(itk::Size & size, // ND image s for (; !outIter.IsAtEnd(); ++outIter) { - typename ImageType::IndexType index = outIter.GetIndex(); + typename ImageType::IndexType index = outIter.ComputeIndex(); const PixelType value = outIter.Get(); double lhs = 0.0; diff --git a/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx b/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx index 951b90c6d51..5590cc06329 100644 --- a/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx +++ b/Modules/Filtering/CurvatureFlow/test/itkBinaryMinMaxCurvatureFlowImageFilterTest.cxx @@ -131,7 +131,7 @@ testBinaryMinMaxCurvatureFlow(itk::Size & size, // ND image siz for (IteratorType circleIter(circleImage, circleImage->GetBufferedRegion()); !circleIter.IsAtEnd(); ++circleIter) { - typename ImageType::IndexType index = circleIter.GetIndex(); + typename ImageType::IndexType index = circleIter.ComputeIndex(); double lhs = 0.0; for (int j = 0; j < ImageDimension; ++j) @@ -209,7 +209,7 @@ testBinaryMinMaxCurvatureFlow(itk::Size & size, // ND image siz unsigned long numPixelsWrong = 0; for (IteratorType outIter(swapPointer, swapPointer->GetBufferedRegion()); !outIter.IsAtEnd(); ++outIter) { - typename ImageType::IndexType index = outIter.GetIndex(); + typename ImageType::IndexType index = outIter.ComputeIndex(); const PixelType value = outIter.Get(); double lhs = 0.0; diff --git a/Modules/Filtering/FFT/test/itkFullToHalfHermitianImageFilterTest.cxx b/Modules/Filtering/FFT/test/itkFullToHalfHermitianImageFilterTest.cxx index e724f4856d9..572f78aa3ff 100644 --- a/Modules/Filtering/FFT/test/itkFullToHalfHermitianImageFilterTest.cxx +++ b/Modules/Filtering/FFT/test/itkFullToHalfHermitianImageFilterTest.cxx @@ -104,7 +104,7 @@ itkFullToHalfHermitianImageFilterTest(int argc, char * argv[]) { if (fftIt.Get() != f2hIt.Get()) { - std::cerr << "Pixel at index " << fftIt.GetIndex() << " does not match!" << std::endl; + std::cerr << "Pixel at index " << fftIt.ComputeIndex() << " does not match!" << std::endl; std::cerr << "FFT output: " << fftIt.Get() << ", full-to-half output: " << f2hIt.Get() << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx index bf2ad9e42eb..34b6af5c261 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingExtensionImageFilterTest.cxx @@ -253,7 +253,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) while (!iterator.IsAtEnd()) { - FloatImageType::IndexType tempIndex = iterator.GetIndex(); + FloatImageType::IndexType tempIndex = iterator.ComputeIndex(); tempIndex -= offset0; double distance = 0.0; for (int j = 0; j < 2; ++j) @@ -268,7 +268,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) { if (itk::Math::abs(outputValue) / distance > 1.42) { - std::cout << iterator.GetIndex() << ' '; + std::cout << iterator.ComputeIndex() << ' '; std::cout << itk::Math::abs(outputValue) / distance << ' '; std::cout << itk::Math::abs(outputValue) << ' ' << distance << std::endl; passed = false; @@ -277,7 +277,7 @@ itkFastMarchingExtensionImageFilterTest(int, char *[]) if (auxIterator.Get() != vector[0]) { - std::cout << auxIterator.GetIndex() << " got aux value of " << static_cast(auxIterator.Get()) + std::cout << auxIterator.ComputeIndex() << " got aux value of " << static_cast(auxIterator.Get()) << " but it should be " << static_cast(vector[0]) << std::endl; passed = false; break; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx index ed9caa40b79..ebb947c5e20 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest1.cxx @@ -171,7 +171,7 @@ itkFastMarchingImageFilterRealTest1(int itkNotUsed(argc), char * itkNotUsed(argv constexpr double outputValueThreshold{ 1.42 }; while (!iterator.IsAtEnd()) { - FloatImageType::IndexType tempIndex = iterator.GetIndex(); + FloatImageType::IndexType tempIndex = iterator.ComputeIndex(); tempIndex -= offset0; double distance = 0.0; @@ -187,7 +187,7 @@ itkFastMarchingImageFilterRealTest1(int itkNotUsed(argc), char * itkNotUsed(argv { if (itk::Math::abs(outputValue) / distance > outputValueThreshold) { - std::cout << "Error at index [" << iterator.GetIndex() << ']' << std::endl; + std::cout << "Error at index [" << iterator.ComputeIndex() << ']' << std::endl; std::cout << "Expected scaled output value be less than: " << outputValueThreshold << ", but got: " << itk::Math::abs(outputValue) / distance << ", where output: " << itk::Math::abs(outputValue) << "; scale factor: " << distance << std::endl; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx index 6d451dc307a..b991691658c 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingImageFilterRealTest2.cxx @@ -199,7 +199,7 @@ itkFastMarchingImageFilterRealTest2(int itkNotUsed(argc), char * itkNotUsed(argv constexpr double threshold{ 1.42 }; while (!iterator.IsAtEnd()) { - FloatImageType::IndexType tempIndex = iterator.GetIndex(); + FloatImageType::IndexType tempIndex = iterator.ComputeIndex(); auto outputValue = static_cast(iterator.Get()); if (((tempIndex[0] > 22) && (tempIndex[0] < 42) && (tempIndex[1] > 27) && (tempIndex[1] < 37)) || @@ -217,7 +217,7 @@ itkFastMarchingImageFilterRealTest2(int itkNotUsed(argc), char * itkNotUsed(argv { if (itk::Math::abs(outputValue) / distance > threshold) { - std::cout << "Error at index [" << iterator.GetIndex() << ']' << std::endl; + std::cout << "Error at index [" << iterator.ComputeIndex() << ']' << std::endl; std::cout << "Expected scaled output value be less than: " << threshold << ", but got: " << itk::Math::abs(outputValue) / distance << ", where output: " << itk::Math::abs(outputValue) << "; scale factor: " << distance << std::endl; @@ -229,7 +229,7 @@ itkFastMarchingImageFilterRealTest2(int itkNotUsed(argc), char * itkNotUsed(argv { if (outputValue != 0.) { - std::cout << "Error at index [" << iterator.GetIndex() << ']' << std::endl; + std::cout << "Error at index [" << iterator.ComputeIndex() << ']' << std::endl; std::cout << "Expected output value: " << 0. << ", but got: " << outputValue << std::endl; passed = false; } diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingTest.cxx index 93f9106811b..56c1dcf429d 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingTest.cxx @@ -200,7 +200,7 @@ itkFastMarchingTest(int argc, char * argv[]) for (; !iterator.IsAtEnd(); ++iterator) { - FloatImage::IndexType tempIndex = iterator.GetIndex(); + FloatImage::IndexType tempIndex = iterator.ComputeIndex(); tempIndex -= offset0; double distance = 0.0; for (int j = 0; j < 2; ++j) @@ -217,7 +217,7 @@ itkFastMarchingTest(int argc, char * argv[]) } if (itk::Math::abs(outputValue) / distance > 1.42) { - std::cout << iterator.GetIndex() << ' '; + std::cout << iterator.ComputeIndex() << ' '; std::cout << itk::Math::abs(outputValue) / distance << ' '; std::cout << itk::Math::abs(outputValue) << ' ' << distance << std::endl; passed = false; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingTest2.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingTest2.cxx index 4ef27ee3ac2..f74158118c5 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingTest2.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingTest2.cxx @@ -172,7 +172,7 @@ itkFastMarchingTest2(int, char *[]) bool passed = true; for (; !iterator.IsAtEnd(); ++iterator) { - FloatImage::IndexType tempIndex = iterator.GetIndex(); + FloatImage::IndexType tempIndex = iterator.ComputeIndex(); auto outputValue = static_cast(iterator.Get()); if (((tempIndex[0] > 22) && (tempIndex[0] < 42) && (tempIndex[1] > 27) && (tempIndex[1] < 37)) || @@ -193,7 +193,7 @@ itkFastMarchingTest2(int, char *[]) if (itk::Math::abs(outputValue) / distance > 1.42) { - std::cout << iterator.GetIndex() << ' '; + std::cout << iterator.ComputeIndex() << ' '; std::cout << itk::Math::abs(outputValue) / distance << ' '; std::cout << itk::Math::abs(outputValue) << ' ' << distance << std::endl; passed = false; @@ -203,7 +203,7 @@ itkFastMarchingTest2(int, char *[]) { if (outputValue != 0.) { - std::cout << iterator.GetIndex() << ' '; + std::cout << iterator.ComputeIndex() << ' '; std::cout << outputValue << ' ' << 0.; std::cout << std::endl; passed = false; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientBaseTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientBaseTest.cxx index ec490b60dff..5dee4df7fbe 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientBaseTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientBaseTest.cxx @@ -140,7 +140,7 @@ itkFastMarchingUpwindGradientBaseTest(int, char *[]) while (!iterator.IsAtEnd()) { - FloatGradientImage::IndexType tempIndex = iterator.GetIndex(); + FloatGradientImage::IndexType tempIndex = iterator.ComputeIndex(); tempIndex -= offset0; double distance = 0.0; for (int j = 0; j < 2; ++j) @@ -170,7 +170,7 @@ itkFastMarchingUpwindGradientBaseTest(int, char *[]) if ((outputPixelNorm < 0.9999) || (outputPixelNorm > 1.0001) || (dot < 0.99) || (dot > 1.01)) { - std::cout << iterator.GetIndex() << ' '; + std::cout << iterator.ComputeIndex() << ' '; std::cout << outputPixelNorm << ' '; std::cout << dot << std::endl; passed = false; diff --git a/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientTest.cxx b/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientTest.cxx index 93da224a14b..19d1584df75 100644 --- a/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientTest.cxx +++ b/Modules/Filtering/FastMarching/test/itkFastMarchingUpwindGradientTest.cxx @@ -180,7 +180,7 @@ itkFastMarchingUpwindGradientTest(int, char *[]) for (; !iterator.IsAtEnd(); ++iterator) { - FloatGradientImage::IndexType tempIndex = iterator.GetIndex(); + FloatGradientImage::IndexType tempIndex = iterator.ComputeIndex(); tempIndex -= offset0; double distance = 0.0; for (int j = 0; j < 2; ++j) @@ -210,7 +210,7 @@ itkFastMarchingUpwindGradientTest(int, char *[]) if (outputPixelNorm < 0.9999 || outputPixelNorm > 1.0001 || dot < 0.99 || dot > 1.01) { - std::cout << iterator.GetIndex() << ' '; + std::cout << iterator.ComputeIndex() << ' '; std::cout << outputPixelNorm << ' '; std::cout << dot << std::endl; passed = false; diff --git a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx index 6ccb8e991a4..a5cb4d5c5a8 100644 --- a/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx +++ b/Modules/Filtering/ImageCompose/test/itkJoinSeriesImageFilterTest.cxx @@ -184,7 +184,7 @@ itkJoinSeriesImageFilterTest(int, char *[]) if (outputIter.Get() != counter2) { passed = false; - std::cout << "Mismatch at index: " << outputIter.GetIndex() << std::endl; + std::cout << "Mismatch at index: " << outputIter.ComputeIndex() << std::endl; } ++counter2; ++outputIter; diff --git a/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest.cxx b/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest.cxx index 6a4f7d8fa1d..de441f23cca 100644 --- a/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkDiscreteGaussianDerivativeImageFilterScaleSpaceTest.cxx @@ -60,7 +60,7 @@ NormalizeSineWave(double frequencyPerImage, unsigned int order, double pixelSpac while (!iter.IsAtEnd()) { ImageType::PointType p; - image->TransformIndexToPhysicalPoint(iter.GetIndex(), p); + image->TransformIndexToPhysicalPoint(iter.ComputeIndex(), p); const double x = p[0]; const double value = std::sin(x * frequency); diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx index 413e2f464e6..211f93eeb57 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DCirclesImageTest.cxx @@ -492,23 +492,23 @@ itkHoughTransform2DCirclesImageTest(int, char *[]) if (itk::Math::ExactlyEquals(it_input.Get(), max)) { it_output.Set(255); - const double radius2 = radiusImage->GetPixel(it_output.GetIndex()); - centerResult[foundCircles][0] = it_output.GetIndex()[0]; - centerResult[foundCircles][1] = it_output.GetIndex()[1]; + const double radius2 = radiusImage->GetPixel(it_output.ComputeIndex()); + centerResult[foundCircles][0] = it_output.ComputeIndex()[0]; + centerResult[foundCircles][1] = it_output.ComputeIndex()[1]; radiusResult[foundCircles] = radius2; // Draw the circle for (double angle = 0; angle <= 2 * itk::Math::pi; angle += itk::Math::pi / 1000) { - index[0] = itk::Math::Round(it_output.GetIndex()[0] + radius2 * std::cos(angle)); - index[1] = itk::Math::Round(it_output.GetIndex()[1] + radius2 * std::sin(angle)); + index[0] = itk::Math::Round(it_output.ComputeIndex()[0] + radius2 * std::cos(angle)); + index[1] = itk::Math::Round(it_output.ComputeIndex()[1] + radius2 * std::sin(angle)); m_HoughSpaceImage->SetPixel(index, 255); // Remove the maximum from the accumulator for (double length = 0; length < discRadiusRatio * radius2; length += 1) { - index[0] = itk::Math::Round(it_output.GetIndex()[0] + length * std::cos(angle)); - index[1] = itk::Math::Round(it_output.GetIndex()[1] + length * std::sin(angle)); + index[0] = itk::Math::Round(it_output.ComputeIndex()[0] + length * std::cos(angle)); + index[1] = itk::Math::Round(it_output.ComputeIndex()[1] + length * std::sin(angle)); postProcessImage->SetPixel(index, 0); } } diff --git a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx index 10e1809928d..46e913c9bf8 100644 --- a/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx +++ b/Modules/Filtering/ImageFeature/test/itkHoughTransform2DLinesImageTest.cxx @@ -283,9 +283,9 @@ itkHoughTransform2DLinesImageTest(int, char *[]) if (itk::Math::ExactlyEquals(it_input.Get(), max)) { HoughPoint houghPoint; - houghPoint.radius = it_input.GetIndex()[0]; + houghPoint.radius = it_input.ComputeIndex()[0]; houghPoint.angle = - ((it_input.GetIndex()[1]) * 2 * itk::Math::pi / houghFilter->GetAngleResolution()) - itk::Math::pi; + ((it_input.ComputeIndex()[1]) * 2 * itk::Math::pi / houghFilter->GetAngleResolution()) - itk::Math::pi; linesList.push_back(houghPoint); @@ -294,8 +294,8 @@ itkHoughTransform2DLinesImageTest(int, char *[]) { for (double length = 0; length < discRadius; length += 1) { - index[0] = static_cast(it_input.GetIndex()[0] + length * std::cos(angle)); - index[1] = static_cast(it_input.GetIndex()[1] + length * std::sin(angle)); + index[0] = static_cast(it_input.ComputeIndex()[0] + length * std::cos(angle)); + index[1] = static_cast(it_input.ComputeIndex()[1] + length * std::sin(angle)); if (index[0] <= std::sqrt(400.0 * 400 + 400 * 400) && index[0] >= 0 && index[1] <= angleResolution && index[1] >= 0) { diff --git a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx index aaa29902c68..2c50a51577e 100644 --- a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx @@ -36,12 +36,12 @@ CheckValueIsPhysicalPoint(const TImageType * img) bool match = true; typename TImageType::PointType pt; - img->TransformIndexToPhysicalPoint(it.GetIndex(), pt); + img->TransformIndexToPhysicalPoint(it.ComputeIndex(), pt); while (!it.IsAtEnd()) { for (unsigned int i = 0; i < TImageType::ImageDimension; ++i) { - img->TransformIndexToPhysicalPoint(it.GetIndex(), pt); + img->TransformIndexToPhysicalPoint(it.ComputeIndex(), pt); if (!itk::Math::FloatAlmostEqual(pt[i], it.Get()[i])) { typename TImageType::PointType::VectorType diff; @@ -50,8 +50,8 @@ CheckValueIsPhysicalPoint(const TImageType * img) diff[j] = pt[j] - it.Get()[j]; } - std::cout << "Index: " << it.GetIndex() << " Point: " << pt << " Value: " << it.Get() << " Difference:" << diff - << std::endl; + std::cout << "Index: " << it.ComputeIndex() << " Point: " << pt << " Value: " << it.Get() + << " Difference:" << diff << std::endl; match = false; } } diff --git a/Modules/Filtering/ImageGrid/test/itkConstantPadImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkConstantPadImageTest.cxx index 3b84d852f57..c5f1f33b601 100644 --- a/Modules/Filtering/ImageGrid/test/itkConstantPadImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkConstantPadImageTest.cxx @@ -98,8 +98,8 @@ itkConstantPadImageTest(int, char *[]) !iteratorIn1.IsAtEnd(); ++iteratorIn1) { - const int row = iteratorIn1.GetIndex()[0]; - const int column = iteratorIn1.GetIndex()[1]; + const int row = iteratorIn1.ComputeIndex()[0]; + const int column = iteratorIn1.ComputeIndex()[1]; if ((row < 0) || (row > 7) || (column < 0) || (column > 11)) { if (itk::Math::NotExactlyEquals(iteratorIn1.Get(), constant)) @@ -171,8 +171,8 @@ itkConstantPadImageTest(int, char *[]) !iteratorIn2.IsAtEnd(); ++iteratorIn2) { - const int row = iteratorIn2.GetIndex()[0]; - const int column = iteratorIn2.GetIndex()[1]; + const int row = iteratorIn2.ComputeIndex()[0]; + const int column = iteratorIn2.ComputeIndex()[1]; if ((row < 0) || (row > 7) || (column < 0) || (column > 11)) { if (itk::Math::NotExactlyEquals(iteratorIn2.Get(), constant)) diff --git a/Modules/Filtering/ImageGrid/test/itkMirrorPadImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkMirrorPadImageTest.cxx index ab190b67b22..1c59bc6fd81 100644 --- a/Modules/Filtering/ImageGrid/test/itkMirrorPadImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkMirrorPadImageTest.cxx @@ -156,8 +156,8 @@ itkMirrorPadImageTest(int, char *[]) !iteratorIn1.IsAtEnd(); ++iteratorIn1) { - const int row = iteratorIn1.GetIndex()[0]; - const int column = iteratorIn1.GetIndex()[1]; + const int row = iteratorIn1.ComputeIndex()[0]; + const int column = iteratorIn1.ComputeIndex()[1]; if (!VerifyPixel(row, column, iteratorIn1.Get())) { std::cout << "Error: (" << row << ", " << column << "), got " << iteratorIn1.Get() << std::endl; @@ -209,8 +209,8 @@ itkMirrorPadImageTest(int, char *[]) !iteratorIn2.IsAtEnd(); ++iteratorIn2) { - const int row = iteratorIn2.GetIndex()[0]; - const int column = iteratorIn2.GetIndex()[1]; + const int row = iteratorIn2.ComputeIndex()[0]; + const int column = iteratorIn2.ComputeIndex()[1]; if (!VerifyPixel(row, column, iteratorIn2.Get())) { std::cout << "Error: (" << row << ", " << column << "), got " << iteratorIn2.Get() << std::endl; @@ -269,8 +269,8 @@ itkMirrorPadImageTest(int, char *[]) !iteratorIn3.IsAtEnd(); ++iteratorIn3) { - const int row = iteratorIn3.GetIndex()[0]; - const int column = iteratorIn3.GetIndex()[1]; + const int row = iteratorIn3.ComputeIndex()[0]; + const int column = iteratorIn3.ComputeIndex()[1]; if (!VerifyPixel(row, column, iteratorIn3.Get())) { std::cout << "Error: (" << row << ", " << column << "), got " << iteratorIn3.Get() << std::endl; diff --git a/Modules/Filtering/ImageGrid/test/itkRegionOfInterestImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkRegionOfInterestImageFilterTest.cxx index cebbf61bf7b..b996a236da3 100644 --- a/Modules/Filtering/ImageGrid/test/itkRegionOfInterestImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkRegionOfInterestImageFilterTest.cxx @@ -67,7 +67,7 @@ itkRegionOfInterestImageFilterTest(int, char *[]) intr.GoToBegin(); while (!intr.IsAtEnd()) { - intr.Set(intr.GetIndex()); + intr.Set(intr.ComputeIndex()); ++intr; } diff --git a/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx b/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx index 16c532a00aa..16f1f88060a 100644 --- a/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx +++ b/Modules/Filtering/ImageGrid/test/itkResampleImageTest7.cxx @@ -133,7 +133,7 @@ itkResampleImageTest7(int, char *[]) { std::cout << "Pixels differ " << itNoSDI.Value() << ' ' << itSDI.Value() << std::endl; std::cerr << "Test failed!" << std::endl; - std::cerr << "Error in pixel value at index [" << itNoSDI.GetIndex() << ']' << std::endl; + std::cerr << "Error in pixel value at index [" << itNoSDI.ComputeIndex() << ']' << std::endl; std::cerr << "Expected difference " << itNoSDI.Get() - itSDI.Get() << std::endl; std::cerr << " differs from 0 "; return EXIT_FAILURE; @@ -143,7 +143,7 @@ itkResampleImageTest7(int, char *[]) { std::cerr << "Test failed!" << std::endl; std::cerr << "Iterators don't agree on end of image" << std::endl; - std::cerr << "at index [" << itNoSDI.GetIndex() << ']' << std::endl; + std::cerr << "at index [" << itNoSDI.ComputeIndex() << ']' << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Filtering/ImageGrid/test/itkShrinkImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkShrinkImageTest.cxx index 8cb0eaa214b..0c300e22ae0 100644 --- a/Modules/Filtering/ImageGrid/test/itkShrinkImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkShrinkImageTest.cxx @@ -106,11 +106,11 @@ itkShrinkImageTest(int, char *[]) bool passed = true; for (; !iterator2.IsAtEnd(); ++iterator2) { - auto col = itk::Math::RoundHalfIntegerUp(shrink->GetShrinkFactors()[0] * iterator2.GetIndex()[0] + + auto col = itk::Math::RoundHalfIntegerUp(shrink->GetShrinkFactors()[0] * iterator2.ComputeIndex()[0] + (shrink->GetShrinkFactors()[0] - 1.0) / 2.0); col += colOffset; - auto row = itk::Math::RoundHalfIntegerUp(shrink->GetShrinkFactors()[1] * iterator2.GetIndex()[1] + + auto row = itk::Math::RoundHalfIntegerUp(shrink->GetShrinkFactors()[1] * iterator2.ComputeIndex()[1] + (shrink->GetShrinkFactors()[1] - 1.0) / 2.0); row += rowOffset; const short trueValue = col + region.GetSize()[0] * row; @@ -118,7 +118,7 @@ itkShrinkImageTest(int, char *[]) if (iterator2.Get() != trueValue) { passed = false; - std::cout << "Pixel " << iterator2.GetIndex() << " expected " << trueValue << " but got " << iterator2.Get() + std::cout << "Pixel " << iterator2.ComputeIndex() << " expected " << trueValue << " but got " << iterator2.Get() << std::endl; } } @@ -188,19 +188,19 @@ itkShrinkImageTest(int, char *[]) std::cout << std::flush; for (; !iterator2.IsAtEnd(); ++iterator2) { - std::cout << "Pixel " << iterator2.GetIndex() << " = " << iterator2.Get() << std::endl; + std::cout << "Pixel " << iterator2.ComputeIndex() << " = " << iterator2.Get() << std::endl; std::cout << std::flush; const short trueValue = itk::Math::RoundHalfIntegerUp( - (shrink->GetShrinkFactors()[0] * iterator2.GetIndex()[0] + (shrink->GetShrinkFactors()[0] - 1.0) / 2.0)) + + (shrink->GetShrinkFactors()[0] * iterator2.ComputeIndex()[0] + (shrink->GetShrinkFactors()[0] - 1.0) / 2.0)) + (region.GetSize()[0] * itk::Math::RoundHalfIntegerUp( - (shrink->GetShrinkFactors()[1] * iterator2.GetIndex()[1] + (shrink->GetShrinkFactors()[1] - 1.0) / 2.0))); + (shrink->GetShrinkFactors()[1] * iterator2.ComputeIndex()[1] + (shrink->GetShrinkFactors()[1] - 1.0) / 2.0))); if (iterator2.Get() != trueValue) { - std::cout << "B) Pixel " << iterator2.GetIndex() << " expected " << trueValue << " but got " << iterator2.Get() - << std::endl; + std::cout << "B) Pixel " << iterator2.ComputeIndex() << " expected " << trueValue << " but got " + << iterator2.Get() << std::endl; passed = false; } } diff --git a/Modules/Filtering/ImageGrid/test/itkSliceImageFilterTest.cxx b/Modules/Filtering/ImageGrid/test/itkSliceImageFilterTest.cxx index 6bd0ce1927f..5446c488978 100644 --- a/Modules/Filtering/ImageGrid/test/itkSliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkSliceImageFilterTest.cxx @@ -45,14 +45,14 @@ CheckValueIsPhysicalPoint(const TImageType * img) bool match = true; typename TImageType::PointType pt; - img->TransformIndexToPhysicalPoint(it.GetIndex(), pt); + img->TransformIndexToPhysicalPoint(it.ComputeIndex(), pt); while (!it.IsAtEnd()) { - img->TransformIndexToPhysicalPoint(it.GetIndex(), pt); + img->TransformIndexToPhysicalPoint(it.ComputeIndex(), pt); for (unsigned int i = 0; i < TImageType::ImageDimension; ++i) { EXPECT_DOUBLE_EQ(pt[i], it.Get()[i]) - << "Index: " << it.GetIndex() << " Point: " << pt << " Value: " << it.Get() << std::endl, + << "Index: " << it.ComputeIndex() << " Point: " << pt << " Value: " << it.Get() << std::endl, match = false; } diff --git a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest2.cxx index 63800c1e7bd..23cff006e46 100644 --- a/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWarpImageFilterTest2.cxx @@ -53,7 +53,7 @@ MakeCheckerboard() image->FillBuffer(0.0); for (IteratorType it(image, image->GetLargestPossibleRegion()); !it.IsAtEnd(); ++it) { - ImageType::IndexType ind(it.GetIndex()); + ImageType::IndexType ind(it.ComputeIndex()); // initially checkboard 4 pixels wide const int x = ind[0] / 4; const int y = ind[1] / 4; @@ -130,7 +130,7 @@ itkWarpImageFilterTest2(int, char *[]) if (itk::Math::NotAlmostEquals(it1.Value(), it2.Value())) { std::cerr << "Test failed!" << std::endl; - std::cerr << "Error in pixel value at index [" << it1.GetIndex() << "]" << std::endl; + std::cerr << "Error in pixel value at index [" << it1.ComputeIndex() << "]" << std::endl; std::cerr << "Expected value " << it1.Value() << std::endl; std::cerr << " differs from " << it2.Value(); return EXIT_FAILURE; @@ -163,7 +163,7 @@ itkWarpImageFilterTest2(int, char *[]) if (itk::Math::NotAlmostEquals(streamIt.Value(), it2.Value())) { std::cerr << "Test failed!" << std::endl; - std::cerr << "Error in pixel value at index [" << streamIt.GetIndex() << "]" << std::endl; + std::cerr << "Error in pixel value at index [" << streamIt.ComputeIndex() << "]" << std::endl; std::cerr << "Expected value " << it2.Value() << std::endl; std::cerr << " differs from " << streamIt.Value(); return EXIT_FAILURE; diff --git a/Modules/Filtering/ImageGrid/test/itkWrapPadImageTest.cxx b/Modules/Filtering/ImageGrid/test/itkWrapPadImageTest.cxx index d1db1bdacc4..73dd3de6ee4 100644 --- a/Modules/Filtering/ImageGrid/test/itkWrapPadImageTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkWrapPadImageTest.cxx @@ -160,8 +160,8 @@ itkWrapPadImageTest(int, char *[]) { for (; !itIn1.IsAtEnd(); ++itIn1, ++vitIn1) { - const int row = itIn1.GetIndex()[0]; - const int column = itIn1.GetIndex()[1]; + const int row = itIn1.ComputeIndex()[0]; + const int column = itIn1.ComputeIndex()[1]; FloatImage::PixelType expected = 0.0f; if (!VerifyPixel(row, column, static_cast(itIn1.Get()), expected)) @@ -225,8 +225,8 @@ itkWrapPadImageTest(int, char *[]) { for (; !itIn2.IsAtEnd(); ++itIn2, ++vitIn2) { - const int row = itIn2.GetIndex()[0]; - const int column = itIn2.GetIndex()[1]; + const int row = itIn2.ComputeIndex()[0]; + const int column = itIn2.ComputeIndex()[1]; FloatImage::PixelType expected = 0.0f; if (!VerifyPixel(row, column, static_cast(itIn2.Get()), expected)) @@ -302,8 +302,8 @@ itkWrapPadImageTest(int, char *[]) { for (; !itIn3.IsAtEnd(); ++itIn3, ++vitIn3) { - const int row = itIn3.GetIndex()[0]; - const int column = itIn3.GetIndex()[1]; + const int row = itIn3.ComputeIndex()[0]; + const int column = itIn3.ComputeIndex()[1]; FloatImage::PixelType expected = 0.0f; if (!VerifyPixel(row, column, static_cast(itIn3.Get()), expected)) diff --git a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx index 39be58a173e..154b98b6cd1 100644 --- a/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx +++ b/Modules/Filtering/ImageIntensity/include/itkPolylineMaskImageFilter.hxx @@ -465,7 +465,7 @@ PolylineMaskImageFilter::Generate while (!inputIt.IsAtEnd()) { - outputImagePtr->TransformIndexToPhysicalPoint(outputIt.GetIndex(), inputPoint); + outputImagePtr->TransformIndexToPhysicalPoint(outputIt.ComputeIndex(), inputPoint); outputPoint = this->TransformProjectPoint(inputPoint); projectionImageIndex = projectionImagePtr->TransformPhysicalPointToIndex(outputPoint); diff --git a/Modules/Filtering/ImageIntensity/test/itkBoundedReciprocalImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkBoundedReciprocalImageFilterTest.cxx index 5358c70b79a..268d003fb72 100644 --- a/Modules/Filtering/ImageIntensity/test/itkBoundedReciprocalImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkBoundedReciprocalImageFilterTest.cxx @@ -71,7 +71,7 @@ itkBoundedReciprocalImageFilterTest(int argc, char * argv[]) auto expectedValue = static_cast(1.0 / (1.0 + static_cast(inIter.Get()))); if (!itk::Math::FloatAlmostEqual(expectedValue, obtainedValue, 10, tolerance)) { - std::cerr << "Error at index " << inIter.GetIndex() << std::endl; + std::cerr << "Error at index " << inIter.ComputeIndex() << std::endl; std::cerr << " output " << obtainedValue << std::endl; std::cerr << " differs from " << expectedValue; std::cerr << " by more than " << tolerance << std::endl; diff --git a/Modules/Filtering/ImageIntensity/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx index 4511355ab0a..ea27310848a 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDiscreteGaussianDerivativeImageFunctionTest.cxx @@ -142,11 +142,11 @@ itkDiscreteGaussianDerivativeImageFunctionTestND(int argc, char * argv[]) // To test all available Evaluate functions, we split it in three parts. if (pixelNumber < nop / 3) { - out.Set(function->EvaluateAtIndex(it.GetIndex())); + out.Set(function->EvaluateAtIndex(it.ComputeIndex())); } else if (pixelNumber < nop * 2 / 3) { - inputImage->TransformIndexToPhysicalPoint(it.GetIndex(), point); + inputImage->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); out.Set(function->Evaluate(point)); } else @@ -154,7 +154,7 @@ itkDiscreteGaussianDerivativeImageFunctionTestND(int argc, char * argv[]) using ContinuousIndexType = typename GaussianDerivativeImageFunctionType::ContinuousIndexType; using ContinuousIndexValueType = typename ContinuousIndexType::ValueType; - inputImage->TransformIndexToPhysicalPoint(it.GetIndex(), point); + inputImage->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); const ContinuousIndexType cindex = inputImage->template TransformPhysicalPointToContinuousIndex(point); out.Set(function->EvaluateAtContinuousIndex(cindex)); diff --git a/Modules/Filtering/ImageIntensity/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx index 44a27169c81..d6ce3206d79 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDiscreteGradientMagnitudeGaussianImageFunctionTest.cxx @@ -144,11 +144,11 @@ itkDiscreteGradientMagnitudeGaussianImageFunctionTestND(int argc, char * argv[]) // To test all available Evaluate functions, we split it in three parts. if (pixelNumber < nop / 3) { - out.Set(function->EvaluateAtIndex(it.GetIndex())); + out.Set(function->EvaluateAtIndex(it.ComputeIndex())); } else if (pixelNumber < nop * 2 / 3) { - inputImage->TransformIndexToPhysicalPoint(it.GetIndex(), point); + inputImage->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); out.Set(function->Evaluate(point)); } else @@ -156,7 +156,7 @@ itkDiscreteGradientMagnitudeGaussianImageFunctionTestND(int argc, char * argv[]) using ContinuousIndexType = typename DiscreteGradientMagnitudeGaussianFunctionType::ContinuousIndexType; using ContinuousValueIndexType = typename ContinuousIndexType::ValueType; - inputImage->TransformIndexToPhysicalPoint(it.GetIndex(), point); + inputImage->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); const ContinuousIndexType cindex = inputImage->template TransformPhysicalPointToContinuousIndex(point); out.Set(function->EvaluateAtContinuousIndex(cindex)); diff --git a/Modules/Filtering/ImageIntensity/test/itkDiscreteHessianGaussianImageFunctionTest.cxx b/Modules/Filtering/ImageIntensity/test/itkDiscreteHessianGaussianImageFunctionTest.cxx index 6ec03bfd341..a3aea910a6b 100644 --- a/Modules/Filtering/ImageIntensity/test/itkDiscreteHessianGaussianImageFunctionTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkDiscreteHessianGaussianImageFunctionTest.cxx @@ -136,18 +136,18 @@ itkDiscreteHessianGaussianImageFunctionTestND(int argc, char * argv[]) { if (pixelNumber < nop / 3) { - hessian = function->EvaluateAtIndex(it.GetIndex()); + hessian = function->EvaluateAtIndex(it.ComputeIndex()); } else if (pixelNumber < nop * 2 / 3) { - reader->GetOutput()->TransformIndexToPhysicalPoint(it.GetIndex(), point); + reader->GetOutput()->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); hessian = function->Evaluate(point); } else { using ContinuousIndexValueType = typename ContinuousIndexType::ValueType; - reader->GetOutput()->TransformIndexToPhysicalPoint(it.GetIndex(), point); + reader->GetOutput()->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); const ContinuousIndexType cindex = reader->GetOutput()->template TransformPhysicalPointToContinuousIndex(point); hessian = function->EvaluateAtContinuousIndex(cindex); diff --git a/Modules/Filtering/ImageIntensity/test/itkHistogramMatchingImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkHistogramMatchingImageFilterTest.cxx index e9768c869c0..d9b038d0ddf 100644 --- a/Modules/Filtering/ImageIntensity/test/itkHistogramMatchingImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkHistogramMatchingImageFilterTest.cxx @@ -102,7 +102,7 @@ CompareImages(itk::ImageRegionIterator & refIter, itk::ImageRegionIte if (itk::Math::abs(diff) > 1) { passed = false; - std::cout << "Test failed at: " << outIter.GetIndex() << ' '; + std::cout << "Test failed at: " << outIter.ComputeIndex() << ' '; std::cout << "Output value: " << outIter.Get() << ' '; std::cout << "Ref value: " << refIter.Get() << std::endl; } diff --git a/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx b/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx index 21dcae4ce08..523b8d73a3f 100644 --- a/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkContourExtractor2DImageFilterTest.cxx @@ -499,12 +499,12 @@ showRegion(const itkContourExtractor2DImageFilterTestNamespace::ImageType::Const std::cout << " --> "; for (SizeValueType col = 0; col < toshowSize[0]; ++col) { - std::cout << std::setw(4) << static_cast(it.GetIndex()[0] + col); + std::cout << std::setw(4) << static_cast(it.ComputeIndex()[0] + col); } std::cout << std::endl; for (SizeValueType row = 0; row < toshowSize[1]; ++row) { - std::cout << std::setw(6) << static_cast(it.GetIndex()[1]) << ": "; + std::cout << std::setw(6) << static_cast(it.ComputeIndex()[1]) << ": "; for (SizeValueType col = 0; col < toshowSize[0]; ++col) { std::cout << std::setw(4) << static_cast(it.Get()); diff --git a/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx b/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx index cdc69701cff..a156012c3cf 100644 --- a/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkExtractOrthogonalSwath2DImageFilterTest.cxx @@ -73,7 +73,7 @@ itkExtractOrthogonalSwath2DImageFilterTest(int argc, char * argv[]) it.GoToBegin(); while (!it.IsAtEnd()) { - IndexType pixelIndex = it.GetIndex(); + IndexType pixelIndex = it.ComputeIndex(); if (pixelIndex[0] >= static_cast(size[0] / 4) && pixelIndex[0] < static_cast(size[0] * 3 / 4) && pixelIndex[1] >= static_cast(size[1] / 4) && pixelIndex[1] < static_cast(size[1] * 3 / 4)) { diff --git a/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx b/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx index 06338a82723..c3b3edd5b89 100644 --- a/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx +++ b/Modules/Filtering/Path/test/itkOrthogonalSwath2DPathFilterTest.cxx @@ -117,7 +117,7 @@ itkOrthogonalSwath2DPathFilterTest(int, char *[]) it.GoToBegin(); while (!it.IsAtEnd()) { - IndexType pixelIndex = it.GetIndex(); + IndexType pixelIndex = it.ComputeIndex(); if (pixelIndex[0] >= static_cast(size[0] / 4) && pixelIndex[0] < static_cast(size[0] * 3 / 4) && pixelIndex[1] >= static_cast(size[1] / 4) && pixelIndex[1] < static_cast(size[1] * 3 / 4)) { diff --git a/Modules/Filtering/Path/test/itkPathFunctionsTest.cxx b/Modules/Filtering/Path/test/itkPathFunctionsTest.cxx index 2476476bfde..ce6598f7e8b 100644 --- a/Modules/Filtering/Path/test/itkPathFunctionsTest.cxx +++ b/Modules/Filtering/Path/test/itkPathFunctionsTest.cxx @@ -65,7 +65,7 @@ itkPathFunctionsTest(int, char *[]) IndexType pixelIndex; while (!it.IsAtEnd()) { - pixelIndex = it.GetIndex(); + pixelIndex = it.ComputeIndex(); if (pixelIndex[0] >= static_cast(size[0] / 4) && pixelIndex[0] < static_cast(size[0] * 3 / 4) && pixelIndex[1] >= static_cast(size[1] / 4) && pixelIndex[1] < static_cast(size[1] * 3 / 4)) { diff --git a/Modules/Filtering/Path/test/itkPathIteratorTest.cxx b/Modules/Filtering/Path/test/itkPathIteratorTest.cxx index 0283992f81b..194d4c921dd 100644 --- a/Modules/Filtering/Path/test/itkPathIteratorTest.cxx +++ b/Modules/Filtering/Path/test/itkPathIteratorTest.cxx @@ -61,7 +61,7 @@ itkPathIteratorTest(int, char *[]) IndexType pixelIndex; while (!it.IsAtEnd()) { - pixelIndex = it.GetIndex(); + pixelIndex = it.ComputeIndex(); if (pixelIndex[0] >= static_cast(size[0] / 4) && pixelIndex[0] < static_cast(size[0] * 3 / 4) && pixelIndex[1] >= static_cast(size[1] / 4) && pixelIndex[1] < static_cast(size[1] * 3 / 4)) { diff --git a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianScaleSpaceTest1.cxx b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianScaleSpaceTest1.cxx index 026b8272efa..0778d0806b1 100644 --- a/Modules/Filtering/Smoothing/test/itkRecursiveGaussianScaleSpaceTest1.cxx +++ b/Modules/Filtering/Smoothing/test/itkRecursiveGaussianScaleSpaceTest1.cxx @@ -60,7 +60,7 @@ NormalizeSineWave(double frequencyPerImage, unsigned int order, double pixelSpac while (!iter.IsAtEnd()) { ImageType::PointType p; - image->TransformIndexToPhysicalPoint(iter.GetIndex(), p); + image->TransformIndexToPhysicalPoint(iter.ComputeIndex(), p); const double x = p[0]; const double value = std::sin(x * frequency); diff --git a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterTest.cxx b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterTest.cxx index 77802960f06..3cfaf72a969 100644 --- a/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterTest.cxx +++ b/Modules/Filtering/Smoothing/test/itkSmoothingRecursiveGaussianImageFilterTest.cxx @@ -81,7 +81,7 @@ InPlaceTest(char * inputFilename, bool normalizeAcrossScale, typename TFilter::S std::cerr.precision(static_cast(itk::Math::abs(std::log10(epsilon)))); std::cerr << "Test failed!" << std::endl; std::cerr << "Error in pixel value at index [" << std::endl; - std::cerr << "Error in pixel value at index [" << it1.GetIndex() << ']' << std::endl; + std::cerr << "Error in pixel value at index [" << it1.ComputeIndex() << ']' << std::endl; std::cerr << "Expected value " << it1.Get() << std::endl; std::cerr << " differs from " << it2.Get(); std::cerr << " by more than " << epsilon << std::endl; diff --git a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx index 02680764c58..34178fd7b5b 100644 --- a/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx +++ b/Modules/IO/HDF5/test/itkHDF5ImageIOStreamingReadWriteTest.cxx @@ -198,7 +198,7 @@ HDF5ReadWriteTest2(const char * fileName) typename ImageType::IndexType idx; for (it.GoToBegin(); !it.IsAtEnd(); ++it) { - idx = it.GetIndex(); + idx = it.ComputeIndex(); const TPixel origValue(idx[2] * 100 + idx[1] * 10 + idx[0]); if (itk::Math::NotAlmostEquals(it.Get(), origValue)) { diff --git a/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx b/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx index e87d5513157..bdceea7aab0 100644 --- a/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx +++ b/Modules/IO/ImageBase/test/itkLargeImageWriteReadTest.cxx @@ -129,7 +129,7 @@ ActualTest(std::string filename, typename TImageType::SizeType size) // if( ( oitr.Get() != ritr.Get() ) || ( oitr.Get() != pixelValue ) ) if (ritr.Get() != pixelValue) { - std::cerr << "Pixel comparison failed at index = " << ritr.GetIndex() << std::endl; + std::cerr << "Pixel comparison failed at index = " << ritr.ComputeIndex() << std::endl; std::cerr << "Expected pixel value " << pixelValue << std::endl; // std::cerr << "Original Image pixel value " << oitr.Get() << std::endl; std::cerr << "Read Image pixel value " << ritr.Get() << std::endl; diff --git a/Modules/IO/ImageBase/test/itkMatrixImageWriteReadTest.cxx b/Modules/IO/ImageBase/test/itkMatrixImageWriteReadTest.cxx index 2fe59138035..cdc2b94febe 100644 --- a/Modules/IO/ImageBase/test/itkMatrixImageWriteReadTest.cxx +++ b/Modules/IO/ImageBase/test/itkMatrixImageWriteReadTest.cxx @@ -131,7 +131,7 @@ itkMatrixImageWriteReadTest(int argc, char * argv[]) if (itk::Math::abs(matrixPixel1[i][j] - matrixPixel2[i][j]) > tolerance) { std::cerr << "Matrix read does not match expected values " << std::endl; - std::cerr << "Index " << tItr.GetIndex() << std::endl; + std::cerr << "Index " << tItr.ComputeIndex() << std::endl; std::cerr << "Matrix read " << std::endl << matrixPixel1 << std::endl; std::cerr << "Matrix expected " << std::endl << matrixPixel2 << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx b/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx index f217ebde225..ff31d062463 100644 --- a/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx +++ b/Modules/IO/Meta/test/itkLargeMetaImageWriteReadTest.cxx @@ -123,7 +123,7 @@ ActualTest(std::string filename, typename TImageType::SizeType size) { if (ritr.Get() != pixelValue) { - std::cerr << "Pixel comparison failed at index = " << ritr.GetIndex() << std::endl; + std::cerr << "Pixel comparison failed at index = " << ritr.ComputeIndex() << std::endl; std::cerr << "Expected pixel value " << pixelValue << std::endl; std::cerr << "Read Image pixel value " << ritr.Get() << std::endl; return EXIT_FAILURE; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx index 9b7a6395b0c..40540664a23 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx @@ -66,7 +66,7 @@ itkNiftiImageIOTest12(int argc, char * argv[]) itk::ImageRegionIterator ri(image, region); while (!ri.IsAtEnd()) { - ImageType::IndexType idx = ri.GetIndex(); + ImageType::IndexType idx = ri.ComputeIndex(); value[0] = idx[0] % 256; value[1] = idx[1] % 256; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx index f9b1aff98f4..0ea054c1be7 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest6.cxx @@ -75,8 +75,8 @@ itkNiftiImageIOTest6(int argc, char * argv[]) readbackP = readbackIt.Get(); if (p != readbackP) { - std::cout << "Pixel mismatch at index " << it.GetIndex() << " original = " << p << " read value = " << readbackP - << std::endl; + std::cout << "Pixel mismatch at index " << it.ComputeIndex() << " original = " << p + << " read value = " << readbackP << std::endl; success = EXIT_FAILURE; break; } diff --git a/Modules/IO/NRRD/test/itkNrrdImageIOTest.h b/Modules/IO/NRRD/test/itkNrrdImageIOTest.h index d96a2ef1300..4c415d44aad 100644 --- a/Modules/IO/NRRD/test/itkNrrdImageIOTest.h +++ b/Modules/IO/NRRD/test/itkNrrdImageIOTest.h @@ -167,7 +167,7 @@ itkNrrdImageIOTestReadWriteTest(const std::string & fn, { if (itk::Math::NotExactlyEquals(b.Get(), a.Get())) { - std::cerr << "At index " << b.GetIndex() << " value " << b.Get() << " should be " << a.Get() << std::endl; + std::cerr << "At index " << b.ComputeIndex() << " value " << b.Get() << " should be " << a.Get() << std::endl; return EXIT_FAILURE; } } diff --git a/Modules/IO/RAW/test/itkRawImageIOTest.cxx b/Modules/IO/RAW/test/itkRawImageIOTest.cxx index dcbfa83ca6d..1e1b4880024 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest.cxx @@ -120,7 +120,7 @@ itkRawImageIOTest(int argc, char * argv[]) const PixelType ov = ot.Get(); if (iv != ov) { - std::cerr << "Error in read/write of pixel " << it.GetIndex() << std::endl; + std::cerr << "Error in read/write of pixel " << it.ComputeIndex() << std::endl; std::cerr << "Read value is : " << iv << std::endl; std::cerr << "it should be : " << ov << std::endl; std::cerr << "Test FAILED ! " << std::endl; diff --git a/Modules/IO/RAW/test/itkRawImageIOTest3.cxx b/Modules/IO/RAW/test/itkRawImageIOTest3.cxx index 7844dbbd7a4..5186673e93f 100644 --- a/Modules/IO/RAW/test/itkRawImageIOTest3.cxx +++ b/Modules/IO/RAW/test/itkRawImageIOTest3.cxx @@ -97,7 +97,7 @@ itkRawImageIOTest3(int argc, char * argv[]) const PixelType ov = ot.Get(); if (iv != ov) { - std::cerr << "Error in read/write of pixel " << it.GetIndex() << std::endl; + std::cerr << "Error in read/write of pixel " << it.ComputeIndex() << std::endl; std::cerr << "Read value is : " << iv << std::endl; std::cerr << "it should be : " << ov << std::endl; std::cerr << "Test FAILED ! " << std::endl; diff --git a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx index aeecdf97b4b..c4ea138337f 100644 --- a/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx +++ b/Modules/IO/TIFF/test/itkLargeTIFFImageWriteReadTest.cxx @@ -124,7 +124,7 @@ itkLargeTIFFImageWriteReadTestHelper(std::string filename, typename TImage::Size if (ritr.Get() != pixelValue) { std::cerr << "Test failed!" << std::endl; - std::cerr << "Error while comparing pixel value at index: " << ritr.GetIndex() << std::endl; + std::cerr << "Error while comparing pixel value at index: " << ritr.ComputeIndex() << std::endl; std::cerr << "Expected: " << pixelValue << ", but got: " << ritr.Get() << std::endl; return EXIT_FAILURE; } diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx index f355789c7b1..2d102743c5b 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration12.cxx @@ -447,7 +447,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = transform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx index 5a01a05bd70..0e14c1b4c27 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration4.cxx @@ -373,7 +373,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = transform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx index b8d7d04bdf4..a9919e35ced 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration6.cxx @@ -434,7 +434,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = transformHigh->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx index 54108e8c8fa..11f0946a5d1 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration7.cxx @@ -419,7 +419,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = transform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx index bb202f45c24..3bc4d1a677b 100644 --- a/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx +++ b/Modules/Registration/Common/test/RegistrationITKv3/DeformableRegistration8.cxx @@ -469,7 +469,7 @@ main(int argc, char * argv[]) while (!fi.IsAtEnd()) { - index = fi.GetIndex(); + index = fi.ComputeIndex(); field->TransformIndexToPhysicalPoint(index, fixedPoint); movingPoint = transform->TransformPoint(fixedPoint); displacement = movingPoint - fixedPoint; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx index bc127950291..9bdeeb8594a 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_13.cxx @@ -168,7 +168,7 @@ itkImageRegistrationMethodTest_13(int, char *[]) { for (unsigned int j = 0; j < dimension; ++j) { - p[j] = mIter.GetIndex()[j]; + p[j] = mIter.ComputeIndex()[j]; } d = p - center; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx index 98710a0331c..49bcae6eb44 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_14.cxx @@ -172,7 +172,7 @@ itkImageRegistrationMethodTest_14(int, char *[]) itk::Point p; for (unsigned int j = 0; j < dimension; ++j) { - p[j] = mIter.GetIndex()[j]; + p[j] = mIter.ComputeIndex()[j]; } itk::Vector d = p - center; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx index 9e1c7338b81..4e057975728 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_15.cxx @@ -153,7 +153,7 @@ itkImageRegistrationMethodTest_15(int, char *[]) { for (unsigned int j = 0; j < dimension; ++j) { - p[j] = mIter.GetIndex()[j]; + p[j] = mIter.ComputeIndex()[j]; } d = p - center; diff --git a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx index 5175df12e37..561b540a773 100644 --- a/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx +++ b/Modules/Registration/Common/test/itkImageRegistrationMethodTest_17.cxx @@ -159,7 +159,7 @@ itkImageRegistrationMethodTest_17(int, char *[]) { for (unsigned int j = 0; j < dimension; ++j) { - p[j] = mIter.GetIndex()[j]; + p[j] = mIter.ComputeIndex()[j]; } d = p - center; diff --git a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx index 0d5c0f20f43..e0f6284690b 100644 --- a/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkKullbackLeiblerCompareHistogramImageToImageMetricTest.cxx @@ -99,8 +99,8 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) ri.GoToBegin(); while (!ri.IsAtEnd()) { - p[0] = ri.GetIndex()[0]; - p[1] = ri.GetIndex()[1]; + p[0] = ri.ComputeIndex()[0]; + p[1] = ri.ComputeIndex()[1]; d = p - center; d += displacement; const double x = d[0]; @@ -112,8 +112,8 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) ti.GoToBegin(); while (!ti.IsAtEnd()) { - p[0] = ti.GetIndex()[0]; - p[1] = ti.GetIndex()[1]; + p[0] = ti.ComputeIndex()[0]; + p[1] = ti.ComputeIndex()[1]; d = p - center; const double x = d[0]; const double y = d[1]; @@ -124,8 +124,8 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) gri.GoToBegin(); while (!gri.IsAtEnd()) { - p[0] = gri.GetIndex()[0]; - p[1] = gri.GetIndex()[1]; + p[0] = gri.ComputeIndex()[0]; + p[1] = gri.ComputeIndex()[1]; d = p - center; // d += displacement; const double x = d[0]; @@ -137,8 +137,8 @@ itkKullbackLeiblerCompareHistogramImageToImageMetricTest(int, char *[]) gti.GoToBegin(); while (!gti.IsAtEnd()) { - p[0] = gti.GetIndex()[0]; - p[1] = gti.GetIndex()[1]; + p[0] = gti.ComputeIndex()[0]; + p[1] = gti.ComputeIndex()[1]; d = p - center; const double x = d[0]; const double y = d[1]; diff --git a/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx index 4e811fd8f75..9c8676d1f4d 100644 --- a/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMattesMutualInformationImageToImageMetricTest.cxx @@ -106,8 +106,8 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, ri.GoToBegin(); while (!ri.IsAtEnd()) { - p[0] = ri.GetIndex()[0]; - p[1] = ri.GetIndex()[1]; + p[0] = ri.ComputeIndex()[0]; + p[1] = ri.ComputeIndex()[1]; d = p - center; d += displacement; const double x = d[0]; @@ -119,8 +119,8 @@ TestMattesMetricWithAffineTransform(TInterpolator * interpolator, ti.GoToBegin(); while (!ti.IsAtEnd()) { - p[0] = ti.GetIndex()[0]; - p[1] = ti.GetIndex()[1]; + p[0] = ti.ComputeIndex()[0]; + p[1] = ti.ComputeIndex()[1]; d = p - center; const double x = d[0]; const double y = d[1]; @@ -495,8 +495,8 @@ TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, ri.GoToBegin(); while (!ri.IsAtEnd()) { - p[0] = ri.GetIndex()[0]; - p[1] = ri.GetIndex()[1]; + p[0] = ri.ComputeIndex()[0]; + p[1] = ri.ComputeIndex()[1]; d = p - center; d += displacement; const double x = d[0]; @@ -508,8 +508,8 @@ TestMattesMetricWithBSplineTransform(TInterpolator * interpolator, ti.GoToBegin(); while (!ti.IsAtEnd()) { - p[0] = ti.GetIndex()[0]; - p[1] = ti.GetIndex()[1]; + p[0] = ti.ComputeIndex()[0]; + p[1] = ti.ComputeIndex()[1]; d = p - center; const double x = d[0]; const double y = d[1]; diff --git a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx index b714b8b8cd4..de0a2985fb0 100644 --- a/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanReciprocalSquareDifferencePointSetToImageMetricTest.cxx @@ -120,7 +120,7 @@ itkMeanReciprocalSquareDifferencePointSetToImageMetricTest(int, char *[]) { if (counter == 0) { - fixedImage->TransformIndexToPhysicalPoint(it.GetIndex(), point); + fixedImage->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); std::cout << "******************* " << pointId << ':' << point << std::endl; fixedPointSet->SetPoint(pointId, point); fixedPointSet->SetPointData(pointId, it.Get()); diff --git a/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx index 361ea0cacfb..a380c0aac6d 100644 --- a/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMeanSquaresPointSetToImageMetricTest.cxx @@ -119,7 +119,7 @@ itkMeanSquaresPointSetToImageMetricTest(int, char *[]) { if (counter == 0) { - fixedImage->TransformIndexToPhysicalPoint(it.GetIndex(), point); + fixedImage->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); std::cout << "******************* " << pointId << ':' << point << std::endl; fixedPointSet->SetPoint(pointId, point); fixedPointSet->SetPointData(pointId, it.Get()); diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx index 457d014e823..080a9963a50 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_1.cxx @@ -150,7 +150,7 @@ itkMultiResolutionImageRegistrationMethodTest_1(int, char *[]) { for (unsigned int j = 0; j < dimension; ++j) { - p[j] = mIter.GetIndex()[j]; + p[j] = mIter.ComputeIndex()[j]; } d = p - center; diff --git a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx index ecbc8c9bc1a..6c91929d41e 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionImageRegistrationMethodTest_2.cxx @@ -144,7 +144,7 @@ itkMultiResolutionImageRegistrationMethodTest_2(int, char *[]) itk::Point p; for (unsigned int j = 0; j < dimension; ++j) { - p[j] = mIter.GetIndex()[j]; + p[j] = mIter.ComputeIndex()[j]; } itk::Vector d = p - center; diff --git a/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx b/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx index a2063784dd9..ff49d51539f 100644 --- a/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkMultiResolutionPyramidImageFilterTest.cxx @@ -169,9 +169,9 @@ itkMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) while (!ti.IsAtEnd()) { - p[0] = ti.GetIndex()[0]; - p[1] = ti.GetIndex()[1]; - p[2] = ti.GetIndex()[2]; + p[0] = ti.ComputeIndex()[0]; + p[1] = ti.ComputeIndex()[1]; + p[2] = ti.ComputeIndex()[2]; d = p - center; const double x = d[0]; const double y = d[1]; diff --git a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx index 4d13861aade..bbca2e8d46b 100644 --- a/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx +++ b/Modules/Registration/Common/test/itkMutualInformationMetricTest.cxx @@ -82,8 +82,8 @@ itkMutualInformationMetricTest(int, char *[]) ri.GoToBegin(); while (!ri.IsAtEnd()) { - p[0] = ri.GetIndex()[0]; - p[1] = ri.GetIndex()[1]; + p[0] = ri.ComputeIndex()[0]; + p[1] = ri.ComputeIndex()[1]; d = p - center; d += displacement; const double x = d[0]; @@ -96,8 +96,8 @@ itkMutualInformationMetricTest(int, char *[]) ti.GoToBegin(); while (!ti.IsAtEnd()) { - p[0] = ti.GetIndex()[0]; - p[1] = ti.GetIndex()[1]; + p[0] = ti.ComputeIndex()[0]; + p[1] = ti.ComputeIndex()[1]; d = p - center; const double x = d[0]; const double y = d[1]; diff --git a/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx b/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx index 56996c0c825..17290652eb2 100644 --- a/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx +++ b/Modules/Registration/Common/test/itkNormalizedCorrelationPointSetToImageMetricTest.cxx @@ -120,7 +120,7 @@ itkNormalizedCorrelationPointSetToImageMetricTest(int, char *[]) { if (counter == 0) { - fixedImage->TransformIndexToPhysicalPoint(it.GetIndex(), point); + fixedImage->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); fixedPointSet->SetPoint(pointId, point); fixedPointSet->SetPointData(pointId, it.Get()); ++pointId; diff --git a/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx b/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx index c4cf622a241..55e5b78755f 100644 --- a/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx +++ b/Modules/Registration/Common/test/itkPointSetToImageRegistrationTest.cxx @@ -91,7 +91,7 @@ itkPointSetToImageRegistrationTest(int, char *[]) { if (counter == 0) { - fixedImage->TransformIndexToPhysicalPoint(it.GetIndex(), point); + fixedImage->TransformIndexToPhysicalPoint(it.ComputeIndex(), point); fixedPointSet->SetPoint(pointId, point); fixedPointSet->SetPointData(pointId, it.Get()); ++pointId; diff --git a/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx b/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx index cd7d3852bfc..dab2f353aeb 100644 --- a/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkRecursiveMultiResolutionPyramidImageFilterTest.cxx @@ -116,9 +116,9 @@ itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) while (!ti.IsAtEnd()) { itk::Point p; - p[0] = ti.GetIndex()[0]; - p[1] = ti.GetIndex()[1]; - p[2] = ti.GetIndex()[2]; + p[0] = ti.ComputeIndex()[0]; + p[1] = ti.ComputeIndex()[1]; + p[2] = ti.ComputeIndex()[2]; itk::Vector d = p - center; const double x = d[0]; const double y = d[1]; @@ -310,7 +310,7 @@ itkRecursiveMultiResolutionPyramidImageFilterTest(int argc, char * argv[]) if (!itk::Math::FloatAlmostEqual(iter1.Get(), iter2.Get(), 2)) { std::cerr << "Test failed!" << std::endl; - std::cerr << "Error in streamed output at index [" << iter1.GetIndex() << "]" << std::endl; + std::cerr << "Error in streamed output at index [" << iter1.ComputeIndex() << "]" << std::endl; std::cerr << "Expected value " << iter1.Get() << std::endl; std::cerr << " differs from " << iter2.Get() << std::endl; pass = false; diff --git a/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx index b298869f6fc..2d3de593709 100644 --- a/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkCorrelationImageToImageMetricv4Test.cxx @@ -154,7 +154,7 @@ itkCorrelationImageToImageMetricv4Test(int, char ** const) itFixed.GoToBegin(); while (!itFixed.IsAtEnd()) { - const IndexType ind = itFixed.GetIndex(); + const IndexType ind = itFixed.ComputeIndex(); const double v = itkCorrelationImageToImageMetricv4Test_GetToyImagePixelValue(ind, p0, imageDimensionality, 0); itFixed.Set(v); ++itFixed; diff --git a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx index e35205b64fa..581330a53e1 100644 --- a/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkImageToImageMetricv4Test.cxx @@ -238,7 +238,7 @@ ImageToImageMetricv4TestComputeIdentityTruthValues(const ImageToImageMetricv4Tes { const ImageToImageMetricv4TestMetricType::FixedImageGradientImageType::ConstPointer fixedGradientImage = metric->GetFixedImageGradientImage(); - fixedImageDerivative = fixedGradientImage->GetPixel(itFixed.GetIndex()); + fixedImageDerivative = fixedGradientImage->GetPixel(itFixed.ComputeIndex()); } else { @@ -246,7 +246,7 @@ ImageToImageMetricv4TestComputeIdentityTruthValues(const ImageToImageMetricv4Tes ImageToImageMetricv4TestMetricType::FixedImageGradientCalculatorType::ConstPointer; const FixedGradientCalculatorPointer fixedGradientCalculator = metric->GetFixedImageGradientCalculator(); ImageToImageMetricv4TestMetricType::FixedImagePointType point; - fixedImage->TransformIndexToPhysicalPoint(itFixed.GetIndex(), point); + fixedImage->TransformIndexToPhysicalPoint(itFixed.ComputeIndex(), point); fixedImageDerivative = fixedGradientCalculator->Evaluate(point); // We can skip the call to TransformCovariantVector since we're // working with identity transforms only. @@ -255,7 +255,7 @@ ImageToImageMetricv4TestComputeIdentityTruthValues(const ImageToImageMetricv4Tes { const ImageToImageMetricv4TestMetricType::MovingImageGradientImageType::ConstPointer movingGradientImage = metric->GetMovingImageGradientImage(); - movingImageDerivative = movingGradientImage->GetPixel(itMoving.GetIndex()); + movingImageDerivative = movingGradientImage->GetPixel(itMoving.ComputeIndex()); } else { @@ -263,7 +263,7 @@ ImageToImageMetricv4TestComputeIdentityTruthValues(const ImageToImageMetricv4Tes ImageToImageMetricv4TestMetricType::MovingImageGradientCalculatorType::ConstPointer; const MovingGradientCalculatorPointer movingGradientCalculator = metric->GetMovingImageGradientCalculator(); ImageToImageMetricv4TestMetricType::FixedImagePointType point; - movingImage->TransformIndexToPhysicalPoint(itMoving.GetIndex(), point); + movingImage->TransformIndexToPhysicalPoint(itMoving.ComputeIndex(), point); movingImageDerivative = movingGradientCalculator->Evaluate(point); } diff --git a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx index 9ac1fca1d13..6be6742f38f 100644 --- a/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx +++ b/Modules/Registration/Metricsv4/test/itkMattesMutualInformationImageToImageMetricv4Test.cxx @@ -110,8 +110,8 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo ri.GoToBegin(); while (!ri.IsAtEnd()) { - p[0] = ri.GetIndex()[0]; - p[1] = ri.GetIndex()[1]; + p[0] = ri.ComputeIndex()[0]; + p[1] = ri.ComputeIndex()[1]; itk::Vector d = p - center; d += displacement; const double x = d[0]; @@ -125,8 +125,8 @@ TestMattesMetricWithAffineTransform(TInterpolator * const interpolator, const bo ti.GoToBegin(); while (!ti.IsAtEnd()) { - p[0] = ti.GetIndex()[0]; - p[1] = ti.GetIndex()[1]; + p[0] = ti.ComputeIndex()[0]; + p[1] = ti.ComputeIndex()[1]; itk::Vector d = p - center; const double x = d[0]; const double y = d[1]; diff --git a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx index a0321ab654d..97749743bbf 100644 --- a/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx +++ b/Modules/Segmentation/Classifiers/test/itkScalarImageKmeansImageFilter3DTest.cxx @@ -283,7 +283,7 @@ itkScalarImageKmeansImageFilter3DTest(int argc, char * argv[]) if (it.Get() == static_cast(i)) { // Set Output Image - kmeansLabelImage->SetPixel(it.GetIndex(), currentLabel); + kmeansLabelImage->SetPixel(it.ComputeIndex(), currentLabel); } ++it; } @@ -311,7 +311,7 @@ itkScalarImageKmeansImageFilter3DTest(int argc, char * argv[]) if (it.Get() == static_cast(i)) { // Set Output Image - kmeansLabelImage->SetPixel(it.GetIndex(), currentLabel); + kmeansLabelImage->SetPixel(it.ComputeIndex(), currentLabel); } ++it; } diff --git a/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx index 735d8d25999..e5913477d17 100644 --- a/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkCollidingFrontsImageFilterTest.cxx @@ -123,7 +123,7 @@ itkCollidingFrontsImageFilterTest(int argc, char * argv[]) for (; !iterator.IsAtEnd(); ++iterator) { InternalImageType::IndexType tempIndex; - tempIndex = iterator.GetIndex(); + tempIndex = iterator.ComputeIndex(); tempIndex -= offset; double distance = 0.0; for (int j = 0; j < 2; ++j) diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx index b897f0f0464..0bd5580cf80 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest.cxx @@ -146,7 +146,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest(int, char *[]) while (!it.IsAtEnd()) { - const ImageType::IndexType index = it.GetIndex(); + const ImageType::IndexType index = it.ComputeIndex(); ShapeFunctionType::PointType point; inputImage->TransformIndexToPhysicalPoint(index, point); if (shape->Evaluate(point) <= 0.0) diff --git a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx index ec1f4a506fa..b169ae175e1 100644 --- a/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx +++ b/Modules/Segmentation/LevelSets/test/itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2.cxx @@ -150,7 +150,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2(int, char *[]) while (!it.IsAtEnd()) { - const ImageType::IndexType index = it.GetIndex(); + const ImageType::IndexType index = it.ComputeIndex(); SphereFunctionType::PointType point; inputImage->TransformIndexToPhysicalPoint(index, point); if (sphere->Evaluate(point) <= 0.0) @@ -241,7 +241,7 @@ itkGeodesicActiveContourShapePriorLevelSetImageFilterTest_2(int, char *[]) while (!citer.IsAtEnd()) { - const ComponentImageType::IndexType index = citer.GetIndex(); + const ComponentImageType::IndexType index = citer.ComputeIndex(); SphereFunctionType::PointType point; meanImage->TransformIndexToPhysicalPoint(index, point); diff --git a/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionGTest.cxx b/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionGTest.cxx index 20815eb82c1..7946437dad4 100644 --- a/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionGTest.cxx +++ b/Modules/Segmentation/SignedDistanceFunction/test/itkPCAShapeSignedDistanceFunctionGTest.cxx @@ -149,7 +149,7 @@ TEST(PCAShapeSignedDistanceFunction, Test) for (meanImageIt.GoToBegin(); !meanImageIt.IsAtEnd(); ++meanImageIt) { // from index to physical point - ImageType::IndexType index = meanImageIt.GetIndex(); + ImageType::IndexType index = meanImageIt.ComputeIndex(); meanImage->TransformIndexToPhysicalPoint(index, point); // inverse Euler2DTransform: first translation then rotation