Skip to content

DOC: Rename \doxygen/\subdoxygen aliases to \itkref/\itksubref#6416

Merged
hjmjohnson merged 2 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:doxygen-itkref-rename
Jun 11, 2026
Merged

DOC: Rename \doxygen/\subdoxygen aliases to \itkref/\itksubref#6416
hjmjohnson merged 2 commits into
InsightSoftwareConsortium:mainfrom
hjmjohnson:doxygen-itkref-rename

Conversation

@hjmjohnson

@hjmjohnson hjmjohnson commented Jun 7, 2026

Copy link
Copy Markdown
Member

Renames the Doxygen class cross-reference aliases \doxygen\itkref and \subdoxygen\itksubref toolkit-wide, keeping the old names as deprecated synonyms for out-of-tree code and external tools. Split out of #6411 (merged) so that PR stayed a focused warning-clear; now rebased onto main, the diff shows only the rename. Companion: InsightSoftwareConsortium/ITKSoftwareGuide#235 defines the new LaTeX macros for the Software Guide pipeline and must merge first.

What this changes

In Utilities/Doxygen/DoxygenConfig.cmake:

  • Adds \itkref{1}=\ref \1 — in-tree spelling of the single-class reference.
  • Adds \itksubref{2}=\ref itk::\1::\2 — in-tree spelling of the namespaced-class reference (\itksubref{Statistics}{Histogram}itk::Statistics::Histogram).
  • Keeps \doxygen{1} and \subdoxygen{2} as deprecated synonyms (marked with a comment).

Conversions across 250 files:

  • \doxygen{...}\itkref{...} — 816 uses (221 files; 221 in Examples/, 20 in Modules/).
  • \subdoxygen{...}{...}\itksubref{...}{...} — 85 uses (31 Examples/ files).

Mechanical, comment-only change (the aliases appear only in Doxygen doc comments). pre-commit run --all-files is clean.

Why / notes

Reviewer request on #6411 (albert-github): the \doxygen alias name is too generic. \itkref / \itksubref read as ITK cross-references and free the old names.

\subdoxygen was previously never defined in DoxygenConfig.cmake despite being used in-tree (Examples) and by remote modules (e.g. BioCell \subdoxygen{bio}{Cell}); defining it as a deprecated synonym additionally makes those existing uses resolve instead of being unknown commands. Backwards compatibility is preserved so no in-repo or out-of-tree documentation breaks.

@github-actions github-actions Bot added type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots area:Examples Demonstration of the use of classes area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Registration Issues affecting the Registration module area:Segmentation Issues affecting the Segmentation module area:Documentation Issues affecting the Documentation module labels Jun 7, 2026
@hjmjohnson hjmjohnson force-pushed the doxygen-itkref-rename branch from c04ecf0 to 9d6416a Compare June 7, 2026 12:55
@github-actions github-actions Bot added the area:Python wrapping Python bindings for a class label Jun 7, 2026
@hjmjohnson hjmjohnson changed the title WIP: DOC: Rename \doxygen Doxygen alias to \itkref (tracks #6411) WIP: DOC: Rename \doxygen/\subdoxygen aliases to \itkref/\itksubref (tracks #6411) Jun 7, 2026
@hjmjohnson hjmjohnson force-pushed the doxygen-itkref-rename branch from 9d6416a to 8d38f85 Compare June 11, 2026 11:52
@github-actions github-actions Bot removed the area:Segmentation Issues affecting the Segmentation module label Jun 11, 2026
@hjmjohnson hjmjohnson changed the title WIP: DOC: Rename \doxygen/\subdoxygen aliases to \itkref/\itksubref (tracks #6411) DOC: Rename \doxygen/\subdoxygen aliases to \itkref/\itksubref Jun 11, 2026
@hjmjohnson hjmjohnson marked this pull request as ready for review June 11, 2026 12:00
@hjmjohnson

Copy link
Copy Markdown
Member Author

@albert-github would you mind reviewing this, please?

@greptile-apps

This comment was marked as resolved.

Comment thread Utilities/Doxygen/DoxygenConfig.cmake Outdated

@albert-github albert-github left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks in principle OK just some remarks as noted in the comments etc.
Seen the shear size of the PR I think a doxygen run would also be beneficial to run on the code.

Comment thread Examples/Segmentation/VectorConfidenceConnected.cxx
Comment thread Examples/Segmentation/WatershedSegmentation1.cxx
Comment thread Examples/Statistics/BayesianPluginClassifier.cxx
Comment thread Examples/Statistics/ExpectationMaximizationMixtureModelEstimator.cxx Outdated
@hjmjohnson hjmjohnson force-pushed the doxygen-itkref-rename branch from 8d38f85 to 0c477a6 Compare June 11, 2026 13:01
@github-actions github-actions Bot added the type:Documentation Documentation improvement or change label Jun 11, 2026

@albert-github albert-github left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Was still in my cache ....

Comment thread Utilities/Doxygen/DoxygenConfig.cmake
@hjmjohnson

Copy link
Copy Markdown
Member Author

Companion PR for the Software Guide LaTeX side: InsightSoftwareConsortium/ITKSoftwareGuide#235 defines \itkref/\itksubref (keeping the old spellings as aliases). It should merge before this PR so Guide builds keep working across the rename.

@hjmjohnson

Copy link
Copy Markdown
Member Author

Ran the verification Doxygen pass @albert-github suggested: warning output is byte-identical between this branch and upstream/main — the rename introduces zero Doxygen warning delta, as expected from alias-name-only changes with identical \ref expansions.

Method and timing
  • Doxygen 1.13.2, warnings-only configuration: the CMake-generated Doxyfile.Documentation plus GENERATE_HTML=NO, GENERATE_LATEX=NO, HAVE_DOT=NO, WARN_LOGFILE=….
  • Examples.dox regenerated per branch via GenerateExamplesDox.cmake.
  • Both runs emit the same 145 warning lines (pre-existing, environment-local: missing ExternalData test files and similar — none reference the aliases).
  • diff main-warnings pr-warnings → empty.
  • Wall time ≈ 63–64 s per run, 1.8 GB peak RSS — small enough that a per-PR doxygen-warnings GitHub Actions job is practical (~5–8 min end-to-end including checkout + configure on a standard runner); candidate follow-up.

Introduce \itkref and \itksubref as the in-tree spellings of the class
and namespaced-class cross-reference aliases, and convert all uses in
Modules and Examples. The historical \doxygen and \subdoxygen aliases
are retained as deprecated synonyms so out-of-tree code and external
tools that still emit them continue to resolve; \subdoxygen was
previously undefined, so this also gives those uses a definition.
The deprecated \doxygen/\subdoxygen aliases now render an inline
"error: deprecated ... alias" marker ahead of the still-working
reference, steering remote modules and out-of-tree consumers to
Utilities/ITKMigrationPreparation/update_doxygen_for_itkv6.py.
@hjmjohnson hjmjohnson force-pushed the doxygen-itkref-rename branch from 0c477a6 to 1acdf7e Compare June 11, 2026 13:59
@hjmjohnson hjmjohnson merged commit 4928823 into InsightSoftwareConsortium:main Jun 11, 2026
18 checks passed
@hjmjohnson

Copy link
Copy Markdown
Member Author

@greptileai review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Documentation Issues affecting the Documentation module area:Examples Demonstration of the use of classes area:Filtering Issues affecting the Filtering module area:IO Issues affecting the IO module area:Python wrapping Python bindings for a class area:Registration Issues affecting the Registration module type:Documentation Documentation improvement or change type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants