diff --git a/Examples/DataRepresentation/Image/Image4.cxx b/Examples/DataRepresentation/Image/Image4.cxx index 1c2b86b362a..cdf0bdf8506 100644 --- a/Examples/DataRepresentation/Image/Image4.cxx +++ b/Examples/DataRepresentation/Image/Image4.cxx @@ -441,7 +441,8 @@ main(int, char *[]) // SoftwareGuide : EndLatex // Software Guide : BeginCodeSnippet - using MatrixType = itk::Matrix; + using MatrixType = + itk::Matrix; MatrixType SpacingMatrix; SpacingMatrix.Fill(0.0F); diff --git a/Modules/Core/Common/test/itkSpatialOrientationAdaptorGTest.cxx b/Modules/Core/Common/test/itkSpatialOrientationAdaptorGTest.cxx index 638da456419..3d519a71053 100644 --- a/Modules/Core/Common/test/itkSpatialOrientationAdaptorGTest.cxx +++ b/Modules/Core/Common/test/itkSpatialOrientationAdaptorGTest.cxx @@ -34,10 +34,10 @@ TEST(SpatialOrientationAdaptor, test1) EXPECT_EQ(itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_RAI, adapter.FromDirectionCosines(d1)); - const double data[] = { 0.5986634407395047, 0.22716302314740483, -0.768113953548866, - 0.5627936241740271, 0.563067040943212, 0.6051601804419384, - 0.5699696670095713, -0.794576911518317, 0.20924175102261847 }; - DirectionType d2{ DirectionType::InternalMatrixType{ data } }; + const itk::SpacePrecisionType data[] = { 0.5986634407395047, 0.22716302314740483, -0.768113953548866, + 0.5627936241740271, 0.563067040943212, 0.6051601804419384, + 0.5699696670095713, -0.794576911518317, 0.20924175102261847 }; + DirectionType d2{ DirectionType::InternalMatrixType{ data } }; EXPECT_EQ(itk::SpatialOrientationEnums::ValidCoordinateOrientations::ITK_COORDINATE_ORIENTATION_ASL, adapter.FromDirectionCosines(d2)); } diff --git a/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.h b/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.h index 1ee316906f4..b42bbfc4792 100644 --- a/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkGaussianDerivativeImageFunction.h @@ -77,7 +77,7 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeImageFunction static constexpr unsigned int ImageDimension2 = ImageDimension; #endif - using ContinuousIndexType = ContinuousIndex; + using ContinuousIndexType = typename Superclass::ContinuousIndexType; using NeighborhoodType = Neighborhood; using OperatorNeighborhoodType = Neighborhood; @@ -96,7 +96,7 @@ class ITK_TEMPLATE_EXPORT GaussianDerivativeImageFunction /** Point type alias support */ // using PointType = Point< TOutput, Self::ImageDimension >; - using PointType = typename InputImageType::PointType; + using PointType = typename Superclass::PointType; /** Evaluate the function at the specified point. */ OutputType diff --git a/Modules/Core/ImageFunction/include/itkImageFunction.h b/Modules/Core/ImageFunction/include/itkImageFunction.h index 9fb92052079..df6e2d49473 100644 --- a/Modules/Core/ImageFunction/include/itkImageFunction.h +++ b/Modules/Core/ImageFunction/include/itkImageFunction.h @@ -112,7 +112,7 @@ class ITK_TEMPLATE_EXPORT ImageFunction : public FunctionBase; using ImageAdaptorType = itk::ImageAdaptor; -using CoordRepType = double; +using CoordRepType = itk::SpacePrecisionType; using InterpolatorType = itk::LinearInterpolateImageFunction; using IndexType = InterpolatorType::IndexType; diff --git a/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx b/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx index 61b8ac77d45..2c7fbda065a 100644 --- a/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx +++ b/Modules/Core/ImageFunction/test/itkInterpolateTest.cxx @@ -25,7 +25,7 @@ using SizeType = itk::Size<3>; using ImageType = itk::Image; -using CoordRepType = double; +using CoordRepType = itk::SpacePrecisionType; using InterpolatorType = itk::LinearInterpolateImageFunction; using IndexType = InterpolatorType::IndexType; using PointType = InterpolatorType::PointType; diff --git a/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx index 4fc452e0667..f76dbc7a17b 100644 --- a/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkRGBInterpolateImageFunctionTest.cxx @@ -34,7 +34,7 @@ enum }; // RGB is a vector of dimension 3 using PixelType = itk::RGBPixel; using ImageType = itk::Image; -using CoordRepType = double; +using CoordRepType = itk::SpacePrecisionType; using InterpolatorType = itk::VectorLinearInterpolateImageFunction; using IndexType = InterpolatorType::IndexType; using PointType = InterpolatorType::PointType; diff --git a/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx index 1b728092c75..b4ddee38ac6 100644 --- a/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVectorInterpolateImageFunctionTest.cxx @@ -30,7 +30,7 @@ enum }; using PixelType = itk::Vector; using ImageType = itk::Image; -using CoordRepType = double; +using CoordRepType = itk::SpacePrecisionType; using InterpolatorType = itk::VectorLinearInterpolateImageFunction; using IndexType = InterpolatorType::IndexType; using PointType = InterpolatorType::PointType; diff --git a/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx b/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx index 2cbee091e6f..20fe3c14e81 100644 --- a/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx +++ b/Modules/Core/ImageFunction/test/itkVectorLinearInterpolateNearestNeighborExtrapolateImageFunctionTest.cxx @@ -31,7 +31,7 @@ enum }; using PixelType = itk::Vector; using ImageType = itk::Image; -using CoordRepType = double; +using CoordRepType = itk::SpacePrecisionType; using InterpolatorType = itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction; diff --git a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx index 705ccd8bd4e..51aac5d9233 100644 --- a/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx +++ b/Modules/Core/SpatialObjects/test/itkImageMaskSpatialObjectTest2.cxx @@ -56,7 +56,7 @@ itkImageMaskSpatialObjectTest2(int, char *[]) // Set the direction for a non-oriented image // to better test the frequently encountered case // Use non axis aligned image directions - itk::Euler3DTransform::Pointer tfm = itk::Euler3DTransform::New(); + auto tfm = itk::Euler3DTransform::New(); tfm->SetRotation(30.0 * itk::Math::pi_over_180, 15.0 * itk::Math::pi_over_180, 10.0 * itk::Math::pi_over_180); const ImageType::DirectionType direction = tfm->GetMatrix(); image->SetDirection(direction); diff --git a/Modules/Core/TestKernel/test/itkRandomImageSourceAttributesTest.cxx b/Modules/Core/TestKernel/test/itkRandomImageSourceAttributesTest.cxx index 59541fd17ba..61d7c025ed3 100644 --- a/Modules/Core/TestKernel/test/itkRandomImageSourceAttributesTest.cxx +++ b/Modules/Core/TestKernel/test/itkRandomImageSourceAttributesTest.cxx @@ -76,7 +76,7 @@ itkRandomImageSourceAttributesTest(int, char *[]) const ImageType2D::SizeType size{ { 25, 25 } }; const ImageType2D::SpacingType spacing{ { { 0.7, 2.1 } } }; const ImageType2D::PointType origin{ { { -1.7, 5.2 } } }; - const double d[4] = { 0, 1.0, 1.0, 0 }; + const itk::SpacePrecisionType d[4] = { 0, 1.0, 1.0, 0 }; const ImageType2D::DirectionType direction = ImageType2D::DirectionType::InternalMatrixType(d); const ImageType2D::ValueType min{ 0.0 }; const ImageType2D::ValueType max{ 1000.0 }; @@ -90,7 +90,7 @@ itkRandomImageSourceAttributesTest(int, char *[]) const ImageType3D::SizeType size{ { 14, 17, 36 } }; const ImageType3D::SpacingType spacing{ { { 0.7, 0.4, 1.2 } } }; const ImageType3D::PointType origin{ { { -1.7, 5.2, 3.4 } } }; - const double d[9] = { 0, 1.0, 0, 1.0, 0, 0, 0, 1.0, 0 }; + const itk::SpacePrecisionType d[9] = { 0, 1.0, 0, 1.0, 0, 0, 0, 1.0, 0 }; const ImageType3D::DirectionType direction = ImageType3D::DirectionType::InternalMatrixType(d); const ImageType3D::ValueType min{ 0.0 }; const ImageType3D::ValueType max{ 10.0 }; diff --git a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx index df0d090acff..d350a58ac5d 100644 --- a/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx +++ b/Modules/Filtering/ImageGrid/test/itkBinShrinkImageFilterTest2.cxx @@ -42,7 +42,7 @@ CheckValueIsPhysicalPoint(const TImageType * img) for (unsigned int i = 0; i < TImageType::ImageDimension; ++i) { img->TransformIndexToPhysicalPoint(it.GetIndex(), pt); - if (!itk::Math::FloatAlmostEqual(pt[i], it.Get()[i])) + if (!itk::Math::FloatAlmostEqual(pt[i], it.Get()[i])) { typename TImageType::PointType::VectorType diff; for (unsigned int j = 0; j < TImageType::ImageDimension; ++j) diff --git a/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx b/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx index 5346e64fb51..0643018c80e 100644 --- a/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx +++ b/Modules/Filtering/LabelMap/include/itkShapeLabelMapFilter.hxx @@ -847,7 +847,7 @@ ShapeLabelMapFilter::ComputeOrientedBoundingBox(LabelObject // iterate over all corners (2^D) of the pixel for (unsigned int p = 0; p < 1u << ImageDimension; ++p) { - Vector spacingAxis(0.5 * spacing); + Vector spacingAxis(spacing * 0.5); // permute signs of spacing vector components, based on a bit of p // to component of spacingAxis mapping diff --git a/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx b/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx index 432c18b0aaa..9efa32050bc 100644 --- a/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx +++ b/Modules/Filtering/LabelMap/test/itkShapeLabelMapFilterGTest.cxx @@ -238,9 +238,9 @@ TEST_F(ShapeLabelMapFixture, 3D_T3x2x1_Direction) DirectionType direction; - const double d[9] = { 0.7950707161543119, -0.44533237368675166, 0.41175433605536305, - -0.6065167008084678, -0.5840224148057925, 0.5394954222649374, - 0.00021898465942798317, -0.6786728931900383, -0.7344406416415056 }; + const itk::SpacePrecisionType d[9] = { 0.7950707161543119, -0.44533237368675166, 0.41175433605536305, + -0.6065167008084678, -0.5840224148057925, 0.5394954222649374, + 0.00021898465942798317, -0.6786728931900383, -0.7344406416415056 }; direction = DirectionType::InternalMatrixType(d); @@ -342,9 +342,9 @@ TEST_F(ShapeLabelMapFixture, 3D_T2x2x2_Spacing_Direction) DirectionType direction; - const double d[9] = { 0.7950707161543119, -0.44533237368675166, 0.41175433605536305, - -0.6065167008084678, -0.5840224148057925, 0.5394954222649374, - 0.00021898465942798317, -0.6786728931900383, -0.7344406416415056 }; + const itk::SpacePrecisionType d[9] = { 0.7950707161543119, -0.44533237368675166, 0.41175433605536305, + -0.6065167008084678, -0.5840224148057925, 0.5394954222649374, + 0.00021898465942798317, -0.6786728931900383, -0.7344406416415056 }; direction = DirectionType::InternalMatrixType(d); @@ -455,7 +455,7 @@ TEST_F(ShapeLabelMapFixture, 2D_T1_1_FlipDirection) DirectionType direction; - const double d[4] = { 0, 1.0, 1.0, 0 }; + const itk::SpacePrecisionType d[4] = { 0, 1.0, 1.0, 0 }; direction = DirectionType::InternalMatrixType(d); @@ -489,7 +489,7 @@ TEST_F(ShapeLabelMapFixture, 2D_T1_2_Direction) DirectionType direction; - const double d[4] = { 0, 1.0, 1.0, 0 }; + const itk::SpacePrecisionType d[4] = { 0, 1.0, 1.0, 0 }; direction = DirectionType::InternalMatrixType(d); diff --git a/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.hxx b/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.hxx index 9b31eb84c7c..eecbf29b527 100644 --- a/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.hxx +++ b/Modules/Filtering/Path/include/itkExtractOrthogonalSwath2DImageFilter.hxx @@ -163,7 +163,7 @@ ExtractOrthogonalSwath2DImageFilter::GenerateData() ProgressReporter progress(this, 0, outputRegion.GetNumberOfPixels()); using OutputIterator = ImageRegionIteratorWithIndex; - using InterpolatorType = LinearInterpolateImageFunction; + using InterpolatorType = LinearInterpolateImageFunction; ImageIndexType index; double orthogonalOffset; diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx index 237ef156fa7..a377ff7f8af 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest12.cxx @@ -103,9 +103,9 @@ itkNiftiImageIOTest12(int argc, char * argv[]) ImageType::IndexType threeIndex = { { 3, 3, 3 } }; ImageType::PointType origPhysLocationIndexThree; - image->TransformIndexToPhysicalPoint(threeIndex, origPhysLocationIndexThree); + image->TransformIndexToPhysicalPoint(threeIndex, origPhysLocationIndexThree); ImageType::PointType readPhysLocationIndexThree; - readImage->TransformIndexToPhysicalPoint(threeIndex, readPhysLocationIndexThree); + readImage->TransformIndexToPhysicalPoint(threeIndex, readPhysLocationIndexThree); // If the origins, and the spacings, and the direction cosines are the smae, // then index locations should all represent the same physical locations as well. diff --git a/Modules/IO/NIFTI/test/itkNiftiImageIOTest14.cxx b/Modules/IO/NIFTI/test/itkNiftiImageIOTest14.cxx index c9336dbb2c1..84695ce3951 100644 --- a/Modules/IO/NIFTI/test/itkNiftiImageIOTest14.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiImageIOTest14.cxx @@ -128,7 +128,7 @@ itkNiftiImageIOTest14(int argc, char * argv[]) auto read_origin = test_image->GetOrigin(); - if (itk::Math::FloatAlmostEqual(read_origin[3], 2.0, 4, 1e-6)) + if (itk::Math::FloatAlmostEqual(read_origin[3], 2.0, 4, 1e-6)) { imageHasCorrectTimeOrigin = true; } diff --git a/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx b/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx index 66e6df5e9e0..7c7d1f377de 100644 --- a/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx +++ b/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx @@ -67,8 +67,8 @@ template bool CheckRotation(typename TImage::Pointer img) { - vnl_matrix_fixed rotation = img->GetDirection().GetVnlMatrix().extract(3, 3, 0, 0); - const vnl_matrix_fixed candidate_identity = rotation * rotation.transpose(); + vnl_matrix_fixed rotation = img->GetDirection().GetVnlMatrix().extract(3, 3, 0, 0); + const vnl_matrix_fixed candidate_identity = rotation * rotation.transpose(); return candidate_identity.is_identity(1.0e-4); } diff --git a/Testing/ContinuousIntegration/AzurePipelinesLinux.yml b/Testing/ContinuousIntegration/AzurePipelinesLinux.yml index 290812aff0c..bf1ebe533d1 100644 --- a/Testing/ContinuousIntegration/AzurePipelinesLinux.yml +++ b/Testing/ContinuousIntegration/AzurePipelinesLinux.yml @@ -53,7 +53,6 @@ jobs: sudo pip3 install ninja sudo apt-get update sudo apt-get install -y python3-venv - sudo python3 -m pip install --upgrade setuptools sudo python3 -m pip install lxml scikit-ci-addons displayName: 'Install dependencies' @@ -126,7 +125,6 @@ jobs: sudo pip3 install ninja sudo apt-get update sudo apt-get install -y python3-venv - sudo python3 -m pip install --upgrade setuptools sudo python3 -m pip install lxml scikit-ci-addons displayName: 'Install dependencies' diff --git a/Testing/ContinuousIntegration/AzurePipelinesLinuxPython.yml b/Testing/ContinuousIntegration/AzurePipelinesLinuxPython.yml index a2b7d7d20bf..e18a5c6833f 100644 --- a/Testing/ContinuousIntegration/AzurePipelinesLinuxPython.yml +++ b/Testing/ContinuousIntegration/AzurePipelinesLinuxPython.yml @@ -51,7 +51,6 @@ jobs: - bash: | set -x python3 -m pip install ninja numpy>=1.20 typing-extensions - python3 -m pip install --upgrade setuptools python3 -m pip install lxml scikit-ci-addons dask distributed displayName: 'Install dependencies'