From 12251efd73f1bd63d76da42409d903aa1afd70ec Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Mon, 4 Nov 2024 19:19:05 +0100 Subject: [PATCH] STYLE: Add constexpr to variables initialized by MakeFilled Suggests evaluating its value at compile-time, rather than at runtime. Found by regular expressions: ^( [ ]+)(auto \w+[ ]+= MakeFilled<.+>\(-?\d+\);) ^( [ ]+)(auto \w+[ ]+= MakeFilled<.+>\(\d.0\);) ^( [ ]+)(auto \w+[ ]+= MakeFilled<.+>\(false\);) ^( [ ]+)(auto \w+[ ]+= MakeFilled<.+>\(true\);) Inspired by a comment by Hans Johnson at https://github.com/InsightSoftwareConsortium/ITK/pull/4924#discussion_r1826864385 --- ...oodFilledFunctionConditionalConstIterator.hxx | 2 +- .../Core/Transform/include/itkScaleTransform.hxx | 2 +- .../include/itkObjectMorphologyImageFilter.hxx | 2 +- .../include/itkConvolutionImageFilter.hxx | 4 ++-- ...MaskedFFTNormalizedCorrelationImageFilter.hxx | 4 ++-- .../itkDisplacementFieldToBSplineImageFilter.hxx | 2 +- .../include/itkFastMarchingImageFilter.hxx | 2 +- .../include/itkFastMarchingImageFilterBase.hxx | 8 ++++---- .../include/itkCannyEdgeDetectionImageFilter.hxx | 2 +- .../itkVectorGradientMagnitudeImageFilter.hxx | 2 +- .../include/itkBinaryCrossStructuringElement.h | 2 +- .../itkMultiphaseFiniteDifferenceImageFilter.h | 2 +- ...ScalarImageToCooccurrenceListSampleFilter.hxx | 2 +- .../include/itkImageRegistrationMethodv4.hxx | 2 +- .../include/itkSegmentationLevelSetImageFilter.h | 2 +- .../itkBinaryImageToLevelSetImageAdaptor.hxx | 12 ++++++------ .../include/itkUpdateMalcolmSparseLevelSet.hxx | 6 +++--- .../include/itkUpdateShiSparseLevelSet.hxx | 8 ++++---- .../include/itkUpdateWhitakerSparseLevelSet.hxx | 16 ++++++++-------- 19 files changed, 41 insertions(+), 41 deletions(-) diff --git a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx index 5cb1d2d47e6..44dffa0d0e3 100644 --- a/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx +++ b/Modules/Core/Common/include/itkShapedFloodFilledFunctionConditionalConstIterator.hxx @@ -80,7 +80,7 @@ ShapedFloodFilledFunctionConditionalConstIterator::Initialize m_ImageRegion = this->m_Image->GetBufferedRegion(); // Build and setup the neighborhood iterator - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType tmp_iter(radius, this->m_Image, m_ImageRegion); m_NeighborhoodIterator = tmp_iter; diff --git a/Modules/Core/Transform/include/itkScaleTransform.hxx b/Modules/Core/Transform/include/itkScaleTransform.hxx index e9e1bd52ea8..8ef488a62c8 100644 --- a/Modules/Core/Transform/include/itkScaleTransform.hxx +++ b/Modules/Core/Transform/include/itkScaleTransform.hxx @@ -193,7 +193,7 @@ void ScaleTransform::SetIdentity() { Superclass::SetIdentity(); - auto i = MakeFilled(1.0); + constexpr auto i = MakeFilled(1.0); this->SetScale(i); } diff --git a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx index c3560f2d922..9e2ace6b228 100644 --- a/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx +++ b/Modules/Filtering/BinaryMathematicalMorphology/include/itkObjectMorphologyImageFilter.hxx @@ -132,7 +132,7 @@ ObjectMorphologyImageFilter::DynamicThreaded // Setup the kernel that spans the immediate neighbors of the current // input pixel - used to determine if that pixel abuts a non-object // pixel, i.e., is a boundary pixel - auto bKernelSize = MakeFilled(1); + constexpr auto bKernelSize = MakeFilled(1); TotalProgressReporter progress(this, this->GetOutput()->GetRequestedRegion().GetNumberOfPixels()); diff --git a/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx b/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx index 6ddf9093acb..fdbcefa7935 100644 --- a/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkConvolutionImageFilter.hxx @@ -95,8 +95,8 @@ ConvolutionImageFilter::ComputeConvolut // Flip the kernel using FlipperType = FlipImageFilter; - auto flipper = FlipperType::New(); - auto axesArray = MakeFilled(true); + auto flipper = FlipperType::New(); + constexpr auto axesArray = MakeFilled(true); flipper->SetFlipAxes(axesArray); flipper->SetInput(kernelImage); diff --git a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx index 87e614c44ae..50b8587bd64 100644 --- a/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx +++ b/Modules/Filtering/Convolution/include/itkMaskedFFTNormalizedCorrelationImageFilter.hxx @@ -299,8 +299,8 @@ MaskedFFTNormalizedCorrelationImageFilter // Flip the moving images along all dimensions so that the correlation can be more easily handled. using FlipperType = itk::FlipImageFilter; - auto flipAxes = MakeFilled(true); - auto rotater = FlipperType::New(); + constexpr auto flipAxes = MakeFilled(true); + auto rotater = FlipperType::New(); rotater->SetFlipAxes(flipAxes); rotater->SetInput(inputImage); rotater->Update(); diff --git a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx index 57a9bb8317e..895885b5297 100644 --- a/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx +++ b/Modules/Filtering/DisplacementField/include/itkDisplacementFieldToBSplineImageFilter.hxx @@ -361,7 +361,7 @@ DisplacementFieldToBSplineImageFilter itkDebugMacro("Calculating the B-spline displacement field. "); - auto close = MakeFilled(false); + constexpr auto close = MakeFilled(false); auto bspliner = BSplineFilterType::New(); bspliner->SetOrigin(this->m_BSplineDomainOrigin); diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx index 3513bebb591..93ae15b59f6 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilter.hxx @@ -127,7 +127,7 @@ FastMarchingImageFilter::Initialize(LevelSetImageType * m_BufferedRegion = output->GetBufferedRegion(); m_StartIndex = m_BufferedRegion.GetIndex(); m_LastIndex = m_StartIndex + m_BufferedRegion.GetSize(); - auto offset = MakeFilled(1); + constexpr auto offset = MakeFilled(1); m_LastIndex -= offset; // allocate memory for the PointTypeImage diff --git a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx index 1d896ddbe63..90595cb8af8 100644 --- a/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx +++ b/Modules/Filtering/FastMarching/include/itkFastMarchingImageFilterBase.hxx @@ -436,7 +436,7 @@ FastMarchingImageFilterBase::InitializeOutput(OutputImageType * m_OutputOrigin = oImage->GetOrigin(); m_OutputDirection = oImage->GetDirection(); - auto offset = MakeFilled(1); + constexpr auto offset = MakeFilled(1); m_LastIndex -= offset; // Checking for handles only requires an image to keep track of @@ -608,7 +608,7 @@ template bool FastMarchingImageFilterBase::DoesVoxelChangeViolateStrictTopology(const NodeType & idx) const { - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType It(radius, this->m_LabelImage, this->m_LabelImage->GetBufferedRegion()); It.SetLocation(idx); @@ -644,7 +644,7 @@ template bool FastMarchingImageFilterBase::IsChangeWellComposed2D(const NodeType & idx) const { - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType It(radius, this->m_LabelImage, this->m_LabelImage->GetBufferedRegion()); It.SetLocation(idx); @@ -804,7 +804,7 @@ FastMarchingImageFilterBase::IsChangeWellComposed3D(const NodeT { std::bitset<8> neighborhoodPixels; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType It(radius, this->m_LabelImage, this->m_LabelImage->GetRequestedRegion()); diff --git a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx index e6bd1d9655e..169884aeaa0 100644 --- a/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx +++ b/Modules/Filtering/ImageFeature/include/itkCannyEdgeDetectionImageFilter.hxx @@ -42,7 +42,7 @@ CannyEdgeDetectionImageFilter::CannyEdgeDetectionImag m_UpdateBuffer1 = OutputImageType::New(); // Set up neighborhood slices for all the dimensions. - auto r = MakeFilled::RadiusType>(1); + constexpr auto r = MakeFilled::RadiusType>(1); // Dummy neighborhood used to set up the slices Neighborhood it; diff --git a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx index 665b3309734..334b906d8ab 100644 --- a/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx +++ b/Modules/Filtering/ImageGradient/include/itkVectorGradientMagnitudeImageFilter.hxx @@ -102,7 +102,7 @@ VectorGradientMagnitudeImageFilter::Genera typename TInputImage::RegionType inputRequestedRegion; inputRequestedRegion = inputPtr->GetRequestedRegion(); - auto r1 = MakeFilled(1); + constexpr auto r1 = MakeFilled(1); // pad the input requested region by the operator radius inputRequestedRegion.PadByRadius(r1); diff --git a/Modules/Filtering/MathematicalMorphology/include/itkBinaryCrossStructuringElement.h b/Modules/Filtering/MathematicalMorphology/include/itkBinaryCrossStructuringElement.h index 0ac38cf3d8d..59daf18d4c0 100644 --- a/Modules/Filtering/MathematicalMorphology/include/itkBinaryCrossStructuringElement.h +++ b/Modules/Filtering/MathematicalMorphology/include/itkBinaryCrossStructuringElement.h @@ -89,7 +89,7 @@ class ITK_TEMPLATE_EXPORT BinaryCrossStructuringElement : public Neighborhood(1); + constexpr auto radius = MakeFilled(1); Self::SetRadius(radius); Self::CreateStructuringElement(); } diff --git a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h index 676b068b993..740ca481f27 100644 --- a/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h +++ b/Modules/Nonunit/Review/include/itkMultiphaseFiniteDifferenceImageFilter.h @@ -349,7 +349,7 @@ class ITK_TEMPLATE_EXPORT MultiphaseFiniteDifferenceImageFilter : public InPlace m_DifferenceFunctions.resize(m_FunctionCount, nullptr); - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); for (unsigned int i = 0; i < this->m_FunctionCount; ++i) { diff --git a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx index aef6bf2b14c..8094bc133c8 100644 --- a/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx +++ b/Modules/Numerics/Statistics/include/itkScalarImageToCooccurrenceListSampleFilter.hxx @@ -74,7 +74,7 @@ template void ScalarImageToCooccurrenceListSampleFilter::GenerateData() { - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); using FaceCalculatorType = itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator; diff --git a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx index e5356c1287f..d8427a703fe 100644 --- a/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx +++ b/Modules/Registration/RegistrationMethodsv4/include/itkImageRegistrationMethodv4.hxx @@ -871,7 +871,7 @@ ImageRegistrationMethodv4m_NumberOfLevels; ++level) { - auto shrinkFactors = MakeFilled(1); + constexpr auto shrinkFactors = MakeFilled(1); this->SetShrinkFactorsPerDimension(level, shrinkFactors); } diff --git a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.h b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.h index ea884ebb8f7..5b7a4642fe4 100644 --- a/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.h +++ b/Modules/Segmentation/LevelSets/include/itkSegmentationLevelSetImageFilter.h @@ -439,7 +439,7 @@ class ITK_TEMPLATE_EXPORT SegmentationLevelSetImageFilter { m_SegmentationFunction = s; - auto r = MakeFilled(1); + constexpr auto r = MakeFilled(1); m_SegmentationFunction->Initialize(r); this->SetDifferenceFunction(m_SegmentationFunction); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx index 93d26da8eff..e45d099e7fb 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkBinaryImageToLevelSetImageAdaptor.hxx @@ -134,7 +134,7 @@ BinaryImageToLevelSetImageAdaptorm_LevelSet->GetLayer(outputLayer); const auto plus2 = static_cast(outputLayer); - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); ZeroFluxNeumannBoundaryCondition im_nbc; @@ -197,7 +197,7 @@ BinaryImageToLevelSetImageAdaptorm_LevelSet->GetLayer(LevelSetType::ZeroLayer()); - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); ZeroFluxNeumannBoundaryCondition im_nbc; @@ -260,7 +260,7 @@ BinaryImageToLevelSetImageAdaptorm_LevelSet->GetLayer(LevelSetType::MinusOneLayer()); LevelSetLayerType & layerPlus1 = this->m_LevelSet->GetLayer(LevelSetType::PlusOneLayer()); - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); ZeroFluxNeumannBoundaryCondition im_nbc; @@ -399,7 +399,7 @@ BinaryImageToLevelSetImageAdaptorm_LevelSet->GetLayer(LevelSetType::MinusOneLayer()); LevelSetLayerType & layerPlus1 = this->m_LevelSet->GetLayer(LevelSetType::PlusOneLayer()); - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); ZeroFluxNeumannBoundaryCondition im_nbc; @@ -541,7 +541,7 @@ BinaryImageToLevelSetImageAdaptorm_LevelSet->GetLayer(LevelSetType::ZeroLayer()); - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); ZeroFluxNeumannBoundaryCondition im_nbc; @@ -603,7 +603,7 @@ BinaryImageToLevelSetImageAdaptor sp_nbc; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx index afca35a5b2a..6fd81793c8e 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateMalcolmSparseLevelSet.hxx @@ -169,7 +169,7 @@ UpdateMalcolmSparseLevelSet::EvolveWithUnPhasedP // neighborhood iterator ZeroFluxNeumannBoundaryCondition sp_nbc; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -258,7 +258,7 @@ UpdateMalcolmSparseLevelSet::EvolveWithPhasedPro ZeroFluxNeumannBoundaryCondition sp_nbc; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -352,7 +352,7 @@ UpdateMalcolmSparseLevelSet::CompactLayersToSing ZeroFluxNeumannBoundaryCondition sp_nbc; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx index 0d9a7c6c3be..2e150f1f6f7 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateShiSparseLevelSet.hxx @@ -65,7 +65,7 @@ UpdateShiSparseLevelSet::Update() // neighborhood iterator ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -184,7 +184,7 @@ UpdateShiSparseLevelSet::UpdateLayerPlusOne() ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -283,7 +283,7 @@ UpdateShiSparseLevelSet::UpdateLayerMinusOne() ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -379,7 +379,7 @@ UpdateShiSparseLevelSet::Con(const LevelSetInput ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); diff --git a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx index 1e400d6466b..473d17b3937 100644 --- a/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx +++ b/Modules/Segmentation/LevelSetsv4/include/itkUpdateWhitakerSparseLevelSet.hxx @@ -104,7 +104,7 @@ UpdateWhitakerSparseLevelSet /** todo: put neighborhood creation in protected method */ ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -194,7 +194,7 @@ UpdateWhitakerSparseLevelSet ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -355,7 +355,7 @@ UpdateWhitakerSparseLevelSet ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -460,7 +460,7 @@ UpdateWhitakerSparseLevelSet { ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -565,7 +565,7 @@ UpdateWhitakerSparseLevelSet { ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -669,7 +669,7 @@ UpdateWhitakerSparseLevelSet { ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -796,7 +796,7 @@ UpdateWhitakerSparseLevelSet { ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion()); @@ -853,7 +853,7 @@ UpdateWhitakerSparseLevelSet { ZeroFluxNeumannBoundaryCondition spNBC; - auto radius = MakeFilled(1); + constexpr auto radius = MakeFilled(1); NeighborhoodIteratorType neighIt(radius, this->m_InternalImage, this->m_InternalImage->GetLargestPossibleRegion());