Skip to content

Commit 0c1b1b5

Browse files
committed
STYLE: Replace itkStaticConstMacro with static constexpr
Use static constexpr directly now that C++11 conformance is required by all compilers. :%s/itkStaticConstMacro *( *\([^,]*\),[ \_s]*\([^,]*\),\_s*\([^)]*\)) */static constexpr \2 \1 = \3/ge 'itkStaticConstMacro(name, type, value)' became unconditionally identical to 'static constexpr type name = value' with ITK commit aec95193ab00e1322039911e1032da00f3a103b6 "ENH: Update compiler macros (#810)", maekclena, 7 May 2019. 'itkGetStaticConstMacro(name)' became unconditionally identical to '(Self::name)' with ITK commit 84e490b81e3f3c2b0edb89ae7b9de53bfc52f2b2 "Removing some outdated compiler conditionals", Hans Johnson, 31 July 2010. Most 'itkStaticConstMacro' calls were removed by ITK commit 5c14741e1e063a132ea7e7ee69c5bd0a4e49af74
1 parent fc377f4 commit 0c1b1b5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

include/itkTwoImageToOneImageMetric.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ class TwoImageToOneImageMetric : public SingleValuedCostFunction
8282

8383
/** Type of the Transform Base class */
8484
using TransformType = Transform<CoordinateRepresentationType,
85-
itkGetStaticConstMacro(MovingImageDimension),
86-
itkGetStaticConstMacro(FixedImageDimension)>;
85+
Self::MovingImageDimension,
86+
Self::FixedImageDimension>;
8787

8888
using TransformPointer = typename TransformType::Pointer;
8989
using InputPointType = typename TransformType::InputPointType;
@@ -97,21 +97,21 @@ class TwoImageToOneImageMetric : public SingleValuedCostFunction
9797

9898
/** Gaussian filter to compute the gradient of the Moving Image */
9999
using RealType = typename NumericTraits<MovingImagePixelType>::RealType;
100-
using GradientPixelType = CovariantVector<RealType, itkGetStaticConstMacro(MovingImageDimension)>;
101-
using GradientImageType = Image<GradientPixelType, itkGetStaticConstMacro(MovingImageDimension)>;
100+
using GradientPixelType = CovariantVector<RealType, Self::MovingImageDimension>;
101+
using GradientImageType = Image<GradientPixelType, Self::MovingImageDimension>;
102102
using GradientImagePointer = SmartPointer<GradientImageType>;
103103
using GradientImageFilterType = GradientRecursiveGaussianImageFilter<MovingImageType, GradientImageType>;
104104
using GradientImageFilterPointer = typename GradientImageFilterType::Pointer;
105105
using InterpolatorPointer = typename InterpolatorType::Pointer;
106106

107107
/** Type for the mask of the fixed image. Only pixels that are "inside"
108108
this mask will be considered for the computation of the metric */
109-
typedef SpatialObject<itkGetStaticConstMacro(FixedImageDimension)> FixedImageMaskType;
109+
typedef SpatialObject<Self::FixedImageDimension> FixedImageMaskType;
110110
using FixedImageMaskPointer = typename FixedImageMaskType::Pointer;
111111

112112
/** Type for the mask of the moving image. Only pixels that are "inside"
113113
this mask will be considered for the computation of the metric */
114-
typedef SpatialObject<itkGetStaticConstMacro(MovingImageDimension)> MovingImageMaskType;
114+
typedef SpatialObject<Self::MovingImageDimension> MovingImageMaskType;
115115
using MovingImageMaskPointer = typename MovingImageMaskType::Pointer;
116116

117117

0 commit comments

Comments
 (0)