From 3f92cee539b301260948066f978352404b2a1be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Fri, 16 Aug 2024 10:29:58 -0400 Subject: [PATCH] COMP: Get ITK_USE_FLOAT_SPACE_PRECISION=ON to compile again --- examples/CompleteMontage.cxx | 2 +- examples/RefineMontage.cxx | 2 +- examples/ResampleMontage.cxx | 2 +- include/itkPhaseCorrelationOptimizer.hxx | 4 ++-- test/itkMontageTestHelper.hxx | 6 +++--- test/itkPairwiseTestHelper.hxx | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/CompleteMontage.cxx b/examples/CompleteMontage.cxx index aa1ac3e..8d9ebcf 100644 --- a/examples/CompleteMontage.cxx +++ b/examples/CompleteMontage.cxx @@ -349,7 +349,7 @@ completeMontage(const itk::TileConfiguration & stageTiles, { using TileConfig = itk::TileConfiguration; using ScalarPixelType = typename itk::NumericTraits::ValueType; - using TransformType = itk::TranslationTransform; + using TransformType = itk::TranslationTransform; using ScalarImageType = itk::Image; using OriginalImageType = itk::Image; // possibly RGB instead of scalar using BiasFieldType = LogBiasFieldType; diff --git a/examples/RefineMontage.cxx b/examples/RefineMontage.cxx index 05efb5c..1e72e93 100644 --- a/examples/RefineMontage.cxx +++ b/examples/RefineMontage.cxx @@ -41,7 +41,7 @@ refineMontage(const itk::TileConfiguration & stageTiles, const std::string & inputPath) { using TileConfig = itk::TileConfiguration; - using TransformType = itk::TranslationTransform; + using TransformType = itk::TranslationTransform; using ScalarImageType = itk::Image; typename ScalarImageType::SpacingType sp; sp.Fill(1.0); diff --git a/examples/ResampleMontage.cxx b/examples/ResampleMontage.cxx index 1bd3f01..81a4794 100644 --- a/examples/ResampleMontage.cxx +++ b/examples/ResampleMontage.cxx @@ -43,7 +43,7 @@ resampleMontage(const itk::TileConfiguration & actualTiles, const std::string & outFilename) { using TileConfig = itk::TileConfiguration; - using TransformType = itk::TranslationTransform; + using TransformType = itk::TranslationTransform; using OriginalImageType = itk::Image; // possibly RGB instead of scalar typename OriginalImageType::SpacingType sp; typename TransformType::ConstPointer identity = TransformType::New(); diff --git a/include/itkPhaseCorrelationOptimizer.hxx b/include/itkPhaseCorrelationOptimizer.hxx index 409a21e..46f2b1a 100644 --- a/include/itkPhaseCorrelationOptimizer.hxx +++ b/include/itkPhaseCorrelationOptimizer.hxx @@ -546,8 +546,8 @@ PhaseCorrelationOptimizer::ComputeOffset() ratio = (y0 + y2) / (2 * y1); if (offsetIndex > 0) // clip to -0.999... to 0.999... range { - ratio = std::min(ratio, 1.0 - std::numeric_limits::epsilon()); - ratio = std::max(ratio, -1.0 + std::numeric_limits::epsilon()); + ratio = std::min(ratio, 1.0f - std::numeric_limits::epsilon()); + ratio = std::max(ratio, -1.0f + std::numeric_limits::epsilon()); } omega = std::acos(ratio); theta = std::atan((y0 - y2) / (2 * y1 * std::sin(omega))); diff --git a/test/itkMontageTestHelper.hxx b/test/itkMontageTestHelper.hxx index 3a903c5..2d4be03 100644 --- a/test/itkMontageTestHelper.hxx +++ b/test/itkMontageTestHelper.hxx @@ -114,9 +114,9 @@ montageTest(const itk::TileConfiguration & stageTiles, int result = EXIT_SUCCESS; using ScalarPixelType = typename itk::NumericTraits::ValueType; using TileConfig = itk::TileConfiguration; - using PointType = itk::Point; - using VectorType = itk::Vector; - using TransformType = itk::TranslationTransform; + using PointType = itk::Point; + using VectorType = itk::Vector; + using TransformType = itk::TranslationTransform; using ScalarImageType = itk::Image; using OriginalImageType = itk::Image; // possibly RGB instead of scalar using PCMType = itk::PhaseCorrelationImageRegistrationMethod; diff --git a/test/itkPairwiseTestHelper.hxx b/test/itkPairwiseTestHelper.hxx index 474b684..ae29113 100644 --- a/test/itkPairwiseTestHelper.hxx +++ b/test/itkPairwiseTestHelper.hxx @@ -135,13 +135,13 @@ calculateError(const itk::TileConfiguration & phaseCorrelationMethod->Update(); - using TransformType = itk::TranslationTransform; + using TransformType = itk::TranslationTransform; static_assert(std::is_same::value, "PhaseCorrelationMethod's TransformType is expected to be a TranslationTransform"); const TransformType * regTr = phaseCorrelationMethod->GetOutput()->Get(); // calculate error - using VectorType = itk::Vector; + using VectorType = itk::Vector; VectorType tr = regTr->GetOffset(); // translation measured by registration for (unsigned d = 0; d < Dimension; d++) {