Skip to content

Commit 9bae3cd

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 e43a18f commit 9bae3cd

6 files changed

+6
-6
lines changed

include/itkArrivalFunctionToPathFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class ITK_TEMPLATE_EXPORT ArrivalFunctionToPathFilter : public ImageToPathFilter
154154
using ConstPointer = SmartPointer<const Self>;
155155

156156
/** Run-time type information (and related methods). */
157-
itkTypeMacro(ArrivalFunctionToPathFilter, ImageToPathFilter);
157+
itkOverrideGetNameOfClassMacro(ArrivalFunctionToPathFilter);
158158

159159
/** Method for creation through the object factory. */
160160
itkNewMacro(Self);

include/itkIterateNeighborhoodOptimizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class MinimalPathExtraction_EXPORT IterateNeighborhoodOptimizer : public SingleV
5353
itkNewMacro(Self);
5454

5555
/** Run-time type information (and related methods). */
56-
itkTypeMacro(IterateNeighborhoodOptimizer, SingleValuedNonLinearOptimizer);
56+
itkOverrideGetNameOfClassMacro(IterateNeighborhoodOptimizer);
5757

5858
/** Configure whether the local maxima or minima is found.
5959
* The default is to minimize the cost function (maximize = false ).*/

include/itkPhysicalCentralDifferenceImageFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class ITK_TEMPLATE_EXPORT PhysicalCentralDifferenceImageFunction
5757
using ConstPointer = SmartPointer<const Self>;
5858

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

6262
/** Method for creation through the object factory. */
6363
itkNewMacro(Self);

include/itkSingleImageCostFunction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ITK_TEMPLATE_EXPORT SingleImageCostFunction : public SingleValuedCostFunct
6565
itkNewMacro(Self);
6666

6767
/** Run-time type information (and related methods). */
68-
itkTypeMacro(SingleImageCostFunction, SingleValuedCostFunction);
68+
itkOverrideGetNameOfClassMacro(SingleImageCostFunction);
6969

7070
/** MeasureType type alias.
7171
* It defines a type used to return the cost function value. */

include/itkSpeedFunctionPathInformation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class ITK_TEMPLATE_EXPORT SpeedFunctionPathInformation : public LightObject
6363

6464

6565
/** Run-time type information (and related methods). */
66-
itkTypeMacro(SpeedFunctionPathInformation, LightObject);
66+
itkOverrideGetNameOfClassMacro(SpeedFunctionPathInformation);
6767

6868
/** Method for creation through the object factory. */
6969
itkNewMacro(Self);

include/itkSpeedFunctionToPathFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class ITK_TEMPLATE_EXPORT SpeedFunctionToPathFilter : public ArrivalFunctionToPa
7878
using ConstPointer = SmartPointer<const Self>;
7979

8080
/** Run-time type information (and related methods). */
81-
itkTypeMacro(SpeedFunctionToPathFilter, ArrivalFunctionToPathFilter);
81+
itkOverrideGetNameOfClassMacro(SpeedFunctionToPathFilter);
8282

8383
/** Method for creation through the object factory. */
8484
itkNewMacro(Self);

0 commit comments

Comments
 (0)