Skip to content

Conversation

@hjmjohnson
Copy link
Member

  • STYLE: Add itkVirtualGetNameOfClassMacro + itkOverrideGetNameOfClassMacro
  • STYLE: CoordRepType -> CoordinateType code readability

@hjmjohnson hjmjohnson force-pushed the use-CoordinateType branch 5 times, most recently from 7a4171d to 0ac6f52 Compare January 28, 2025 15:54
…acro

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
For the sake of code readability, a new 'CoordinateType' alias is added for
each nested 'CoordRepType' alias. The old 'CoordRepType' aliases will still be
available with ITK 6.0, but it is recommended to use 'CoordinateType' instead.
The 'CoordRepType' aliases will be removed when 'ITK_FUTURE_LEGACY_REMOVE' is
enabled. Similarly, 'InputCoordinateType', 'OutputCoordinateType', and
'ImagePointCoordinateType' replace 'InputCoordRepType', 'OutputCoordRepType',
and 'ImagePointCoordRepType', respectively.
@hjmjohnson hjmjohnson force-pushed the use-CoordinateType branch 2 times, most recently from 255c0f2 to dea5144 Compare January 28, 2025 16:38
@hjmjohnson hjmjohnson self-assigned this Jan 28, 2025
@hjmjohnson hjmjohnson requested a review from dzenanz January 28, 2025 17:31
@hjmjohnson
Copy link
Member Author

@dzenanz I've been working through this 1 PR to identify what needs to be done in many other remote modules to bring them up-to-date.

Can you please have a more careful review of this one?

@dzenanz
Copy link
Member

dzenanz commented Jan 28, 2025

Sure. I expect to get to it within the next hour or so.

Copy link
Member

@dzenanz dzenanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes mostly look good.

This module is unusual as it does not have Python packages.

@dzenanz
Copy link
Member

dzenanz commented Jan 28, 2025

Also consider finishing up #98 and merging with the changes here.

@hjmjohnson hjmjohnson merged commit 43b11a6 into master Jan 28, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants