Skip to content

COMP: Modernize deprecated macros in ParabolicMorphology#6505

Merged
dzenanz merged 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:future-legacy-parabolic-morphology
Jun 25, 2026
Merged

COMP: Modernize deprecated macros in ParabolicMorphology#6505
dzenanz merged 1 commit into
InsightSoftwareConsortium:mainfrom
hjmjohnson:future-legacy-parabolic-morphology

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Modernizes deprecated macros in ParabolicMorphology so it builds under ITK_FUTURE_LEGACY_REMOVE. No behavior change.

What changed

itkTypeMacro(class, super)itkOverrideGetNameOfClassMacro(class) (15 sites) and itkGetStaticConstMacro(X)Self::X (5 sites, in the Concept::SameDimension checks). Both become hard errors under ITK_FUTURE_LEGACY_REMOVE.

Verification

Builds and links under baseline, ITK_LEGACY_REMOVE=ON, and ITK_LEGACY_REMOVE=ON + ITK_FUTURE_LEGACY_REMOVE=ON; all 6 ParabolicMorphology tests pass in baseline.

Replace itkTypeMacro(class, super) with itkOverrideGetNameOfClassMacro(class)
and itkGetStaticConstMacro(X) with Self::X. These become hard errors under
ITK_FUTURE_LEGACY_REMOVE, so the module did not build in that configuration.
No behavior change.
@github-actions github-actions Bot added type:Compiler Compiler support or related warnings area:Filtering Issues affecting the Filtering module labels Jun 24, 2026
@hjmjohnson hjmjohnson marked this pull request as ready for review June 24, 2026 19:41
@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Replaces two deprecated ITK macros across the entire ParabolicMorphology module so the code compiles cleanly under ITK_FUTURE_LEGACY_REMOVE. There are no behavioral changes.

  • itkTypeMacro(ClassName, SuperClassName)itkOverrideGetNameOfClassMacro(ClassName) at 15 sites, removing the deprecated superclass-aware form of the runtime-type macro.
  • itkGetStaticConstMacro(X)Self::X at 5 sites inside #ifdef ITK_USE_CONCEPT_CHECKING blocks, plus the same pattern updated in two commented-out lines for consistency.

Confidence Score: 5/5

Purely mechanical macro substitution with no runtime behavior change; safe to merge.

Every change is a straightforward like-for-like replacement of two deprecated macros. The new forms (itkOverrideGetNameOfClassMacro and direct Self::X access) are the established ITK idioms and are semantically identical to what they replace. No logic, no data flow, and no class interfaces are altered.

No files require special attention; all 15 changes are uniform single-line substitutions.

Important Files Changed

Filename Overview
Modules/Filtering/ParabolicMorphology/include/itkParabolicErodeDilateImageFilter.h Three changes: itkTypeMacro → itkOverrideGetNameOfClassMacro, itkGetStaticConstMacro → Self:: in SameDimension concept check, and the same update in a commented-out RealImageType alias.
Modules/Filtering/ParabolicMorphology/include/itkParabolicOpenCloseImageFilter.h Three changes: itkTypeMacro → itkOverrideGetNameOfClassMacro, itkGetStaticConstMacro → Self:: in SameDimension concept check, and same update in a commented-out RealImageType alias.
Modules/Filtering/ParabolicMorphology/include/itkMorphologicalDistanceTransformImageFilter.h itkTypeMacro → itkOverrideGetNameOfClassMacro plus itkGetStaticConstMacro → Self:: in SameDimension concept check; clean migration.
Modules/Filtering/ParabolicMorphology/include/itkMorphologicalSharpeningImageFilter.h itkTypeMacro → itkOverrideGetNameOfClassMacro plus itkGetStaticConstMacro → Self:: in SameDimension concept check; clean migration.
Modules/Filtering/ParabolicMorphology/include/itkMorphologicalSignedDistanceTransformImageFilter.h itkTypeMacro → itkOverrideGetNameOfClassMacro plus itkGetStaticConstMacro → Self:: in SameDimension concept check; clean migration.
Modules/Filtering/ParabolicMorphology/include/itkBinaryCloseParabolicImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkBinaryDilateParabolicImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkBinaryErodeParabolicImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkBinaryOpenParabolicImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkMorphSDTHelperImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkParabolicCloseImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkParabolicDilateImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkParabolicErodeImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkParabolicOpenCloseSafeBorderImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.
Modules/Filtering/ParabolicMorphology/include/itkSharpenOpImageFilter.h Single-line itkTypeMacro → itkOverrideGetNameOfClassMacro substitution; no other changes.

Reviews (1): Last reviewed commit: "COMP: Modernize deprecated macros in Par..." | Re-trigger Greptile

@hjmjohnson hjmjohnson requested a review from dzenanz June 25, 2026 02:51
@dzenanz dzenanz merged commit 1275621 into InsightSoftwareConsortium:main Jun 25, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Filtering Issues affecting the Filtering module type:Compiler Compiler support or related warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants