Skip to content

replace ITKv5 CONST with const #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 27, 2025
Merged

Conversation

hjmjohnson
Copy link
Member

  • STYLE: Add itkVirtualGetNameOfClassMacro + itkOverrideGetNameOfClassMacro
  • ENH: ITKv5_CONST macro for VerifyPreconditions() and VerifyInputInformation()

@hjmjohnson hjmjohnson force-pushed the replace_ITKv5_CONST-with-const branch 3 times, most recently from e932008 to ff01ea4 Compare February 1, 2025 18:49
@hjmjohnson hjmjohnson force-pushed the replace_ITKv5_CONST-with-const branch from ff01ea4 to 14f89e9 Compare March 9, 2025 14:50
@hjmjohnson hjmjohnson force-pushed the replace_ITKv5_CONST-with-const branch 3 times, most recently from ce033af to 9bb1dc4 Compare March 16, 2025 16:57
@hjmjohnson hjmjohnson force-pushed the replace_ITKv5_CONST-with-const branch from 9bb1dc4 to 3e43fb8 Compare March 30, 2025 22:15
@hjmjohnson hjmjohnson force-pushed the replace_ITKv5_CONST-with-const branch from 3e43fb8 to 2cc9fac Compare May 9, 2025 01:16
@hjmjohnson hjmjohnson force-pushed the replace_ITKv5_CONST-with-const branch 2 times, most recently from 9b43890 to 454384d Compare May 27, 2025 18:58
…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
…mation()

ITKv5_CONST enables backwards compatible behavior when ITKV4_COMPATIBILITY
is turned ON for methods which have acquired 'const' qualifier in ITKv5.
Breaking changes were originally introduced by ITK  commits
3e6b6f5bd6772316aa0fa6b89f31b42bef562112 (on 2018-10-18) and
16eae15c1bb6cc1bae9fba3e09a3102bdc02e955 (on 2018-10-23).
In preparation for release.

Ensure that cmake is 3.16.3 or greater to
match v5.4.2 minimum requirements.

Set minimum python to 3.9

Increment version number.

Replace keyword of "ITK" with lowercase "itk"
in some instances to be consistent.
Set the default build package tags to v5.4.3 for
capturing the ITKRemoteModuleBuildTestPackageAction
shared scripts.

This pulls the default configuration items needed to
build against ITK version v5.4.3.
@hjmjohnson hjmjohnson force-pushed the replace_ITKv5_CONST-with-const branch from 454384d to a574267 Compare May 27, 2025 19:01
itkShrinkDecimateImageFilter.hxx:184:42: warning: ignoring return value
of ‘bool
itk::ImageBase<VImageDimension>::TransformPhysicalPointToIndex(const
  itk::Point<TCoordinate, VImageDimension>&, IndexType&) const [with
TCoordinate = double; unsigned int VImageDimension = 3; IndexType =
itk::Index<3>]’, declared with attribute ‘nodiscard’ [-Wunused-result]
@hjmjohnson hjmjohnson merged commit a65e9eb into main May 27, 2025
5 of 22 checks passed
@hjmjohnson
Copy link
Member Author

Local builds work. Python wraping infrastructure is broken.

@hjmjohnson hjmjohnson deleted the replace_ITKv5_CONST-with-const branch May 28, 2025 13:46
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.

1 participant