Skip to content

Commit 5b4ea2e

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 2b2ccb5 commit 5b4ea2e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/itkAdditiveGaussianNoiseMeshFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class AdditiveGaussianNoiseMeshFilter : public MeshToMeshFilter<TInput, TOutput>
6262
itkNewMacro(Self);
6363

6464
/** Run-time type information (and related methods). */
65-
itkTypeMacro(AdditiveGaussianNoiseMeshFilter, MeshToMeshFilter);
65+
itkOverrideGetNameOfClassMacro(AdditiveGaussianNoiseMeshFilter);
6666

6767
/** Mean of noise. */
6868
itkGetConstMacro(Mean, CoordRepType);

include/itkAdditiveGaussianNoiseQuadEdgeMeshFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class AdditiveGaussianNoiseQuadEdgeMeshFilter : public QuadEdgeMeshToQuadEdgeMes
5656
itkNewMacro(Self);
5757

5858
/** Run-time type information (and related methods). */
59-
itkTypeMacro(AdditiveGaussianNoiseQuadEdgeMeshFilter, QuadEdgeMeshToQuadEdgeMeshFilter);
59+
itkOverrideGetNameOfClassMacro(AdditiveGaussianNoiseQuadEdgeMeshFilter);
6060

6161
/** Mean of noise. */
6262
itkGetConstMacro(Mean, CoordRepType);

0 commit comments

Comments
 (0)