Skip to content

Commit 13f760a

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 2506727 commit 13f760a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/itkLabelSetDilateImageFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class ITK_EXPORT LabelSetDilateImageFilter : public LabelSetMorphBaseImageFilter
5252
itkNewMacro(Self);
5353

5454
/** Runtime information support. */
55-
itkTypeMacro(LabelSetDilateImageFilter, LabelSetMorphBaseImageFilter);
55+
itkOverrideGetNameOfClassMacro(LabelSetDilateImageFilter);
5656

5757
/** Pixel Type of the input image */
5858
using InputImageType = TInputImage;

include/itkLabelSetErodeImageFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class ITK_EXPORT LabelSetErodeImageFilter : public LabelSetMorphBaseImageFilter<
5454
itkNewMacro(Self);
5555

5656
/** Runtime information support. */
57-
itkTypeMacro(LabelSetErodeImageFilter, LabelSetMorphBaseImageFilter);
57+
itkOverrideGetNameOfClassMacro(LabelSetErodeImageFilter);
5858

5959
/** Pixel Type of the input image */
6060
using InputImageType = TInputImage;

include/itkLabelSetMorphBaseImageFilter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class ITK_EXPORT LabelSetMorphBaseImageFilter : public ImageToImageFilter<TInput
5858
itkNewMacro(Self);
5959

6060
/** Runtime information support. */
61-
itkTypeMacro(LabelSetMorphBaseImageFilter, ImageToImageFilter);
61+
itkOverrideGetNameOfClassMacro(LabelSetMorphBaseImageFilter);
6262

6363
/** Pixel Type of the input image */
6464
using InputImageType = TInputImage;

0 commit comments

Comments
 (0)