Skip to content

Commit fc377f4

Browse files
committed
STYLE: Add itkVirtualGetNameOfClassMacro + itkOverrideGetNameOfClassMacro
Added two new macro's, intended to replace the old 'itkTypeMacro' and 'itkTypeMacroNoParent'. The main aim is to be clearer about what those macro's do: add a virtual 'GetNameOfClass()' member function and override it. Unlike 'itkTypeMacro', 'itkOverrideGetNameOfClassMacro' does not have a 'superclass' parameter, as it was not used anyway. Note that originally 'itkTypeMacro' did not use its 'superclass' parameter either, looking at commit 699b66cb04d410e555656828e8892107add38ccb, Will Schroeder, June 27, 2001: https://github.com/InsightSoftwareConsortium/ITK/blob/699b66cb04d410e555656828e8892107add38ccb/Code/Common/itkMacro.h#L331-L337
1 parent 7e995fc commit fc377f4

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

include/itkNormalizedCorrelationTwoImageToOneImageMetric.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class NormalizedCorrelationTwoImageToOneImageMetric : public TwoImageToOneImageM
5757
itkNewMacro(Self);
5858

5959
/** Run-time type information (and related methods). */
60-
itkTypeMacro(NormalizedCorrelationTwoImageToOneImageMetric, Object);
60+
itkOverrideGetNameOfClassMacro(NormalizedCorrelationTwoImageToOneImageMetric);
6161

6262

6363
/** Types transferred from the base class */

include/itkSiddonJacobsRayCastInterpolateImageFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class SiddonJacobsRayCastInterpolateImageFunction : public InterpolateImageFunct
9090

9191

9292
/** Run-time type information (and related methods). */
93-
itkTypeMacro(SiddonJacobsRayCastInterpolateImageFunction, InterpolateImageFunction);
93+
itkOverrideGetNameOfClassMacro(SiddonJacobsRayCastInterpolateImageFunction);
9494

9595
/** Method for creation through the object factory. */
9696
itkNewMacro(Self);

include/itkTwoImageToOneImageMetric.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class TwoImageToOneImageMetric : public SingleValuedCostFunction
6464
using CoordinateRepresentationType = Superclass::ParametersValueType;
6565

6666
/** Run-time type information (and related methods). */
67-
itkTypeMacro(TwoImageToOneImageMetric, SingleValuedCostFunction);
67+
itkOverrideGetNameOfClassMacro(TwoImageToOneImageMetric);
6868

6969
/** Type of the moving Image. */
7070
using MovingImageType = TMovingImage;

include/itkTwoProjectionImageRegistrationMethod.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class TwoProjectionImageRegistrationMethod : public ProcessObject
7777
itkNewMacro(Self);
7878

7979
/** Run-time type information (and related methods). */
80-
itkTypeMacro(TwoProjectionImageRegistrationMethod, ProcessObject);
80+
itkOverrideGetNameOfClassMacro(TwoProjectionImageRegistrationMethod);
8181

8282
/** Type of the Fixed image. */
8383
using FixedImageType = TFixedImage;

0 commit comments

Comments
 (0)