Skip to content

DOC: Update all command-line help to correspond to code#1976

Merged
ntustison merged 51 commits into
ANTsX:masterfrom
gdevenyi:update-commandline-docs
Jun 3, 2026
Merged

DOC: Update all command-line help to correspond to code#1976
ntustison merged 51 commits into
ANTsX:masterfrom
gdevenyi:update-commandline-docs

Conversation

@gdevenyi

Copy link
Copy Markdown
Contributor

Generated using OpenCode with GLM-5.1.

Comprehensively review the command line tools and ensure they all have comprehensive 
documentation including the default settings.

gdevenyi added 30 commits May 26, 2026 10:51
…sccan

Fix UsageOption strings to match actual code defaults:
- n_permutations: 500 -> 0
- n_eigenvectors: 2 -> 1
- covering: 0 -> 1
- l1: 0 -> 0.1
- partial-scca-option: PminusRQ -> PQ

Remove dead GetOption calls for EvecGradPenalty and
PositivityConstraint which were never registered as options
and whose values were discarded.
Replace example-only help with full usage string describing all
parameters. Add missing argc < 5 guard to prevent crash with
insufficient arguments.
Previously had no usage/help message at all.
Add parameter descriptions and hard-coded registration defaults.
Add description of supported transform types, comparison method,
and return codes.
Add comparison tolerance, return codes, and proper formatting.
gdevenyi added 18 commits May 26, 2026 10:53
Copilot AI review requested due to automatic review settings May 26, 2026 14:57

Copilot AI 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.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR improves the usability of multiple ANTs example CLI tools by expanding/standardizing help & usage output and clarifying option defaults, while also removing a couple of no-op option parsing blocks.

Changes:

  • Expanded usage/help text for many example binaries (arguments, defaults, return codes, and short explanations).
  • Updated several option descriptions and usage-option defaults to match intended default behavior.
  • Removed no-op parsing of EvecGradPenalty and PositivityConstraint options in sccan.

Reviewed changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Examples/simpleSynRegistration.cxx Expanded usage text with arguments and hard-coded parameter summary.
Examples/sccan.cxx Removed no-op option parsing; updated defaults/descriptions for several CLI options.
Examples/compareTwoTransforms.cxx Expanded usage with supported transform types and return codes.
Examples/antsVol.cxx Clarified option description by including default behavior.
Examples/antsTransformInfo.cxx Added usage text for missing args, describing supported transform inputs.
Examples/antsSurf.cxx Clarified default behavior in option description.
Examples/antsSliceRegularizedRegistration.cxx Clarified defaults for interpolation and verbose options.
Examples/antsRegistration.cxx Clarified defaults for histogram matching, float usage, and MINC output.
Examples/antsMotionCorrStats.cxx Improved option description text and default.
Examples/antsMotionCorr.cxx Clarified default for scale estimator option.
Examples/antsApplyTransformsToTRX.cxx Clarified default for precision option.
Examples/antsApplyTransformsToPoints.cxx Clarified precision and ANTsR IO option defaults/descriptions.
Examples/antsApplyTransformsToGifti.cxx Clarified default for precision option.
Examples/antsApplyTransforms.cxx Clarified default for float computation option.
Examples/antsAffineInitializer.cxx Added default values to usage text for optional parameters.
Examples/antsAI.cxx Clarified default for principal-axes alignment option.
Examples/TimeSCCAN.cxx Clarified defaults in option descriptions across several flags.
Examples/ThresholdImage.cxx Updated usage to show default inside/outside values.
Examples/TextureRunLengthFeatures.cxx Added help text for optional mask argument.
Examples/TextureCooccurrenceFeatures.cxx Added help text for optional mask argument.
Examples/SurfaceBasedSmoothing.cxx Updated usage and clarified parameter semantics/defaults in help text.
Examples/SuperResolution.cxx Added brief argument descriptions to usage output.
Examples/SmoothDisplacementField.cxx Corrected usage text typo (numberOfLevels).
Examples/SetDirectionByMatrix.cxx Clarified direction-matrix argument ordering for 2D and 3D.
Examples/ResampleImageBySpacing.cxx Clarified defaults and meanings for optional args.
Examples/RebaseTensorImage.cxx Added descriptions for PHYSICAL/LOCAL modes and reference image usage.
Examples/PermuteFlipImageOrientationAxes.cxx Clarified default for FlipAboutOrigin.
Examples/NonLocalSuperResolution.cxx Clarified default interpolation in description.
Examples/MultiplyImages.cxx Clarified default smoothing argument.
Examples/MeasureMinMaxMean.cxx Reworked usage output; clarified defaults and optional args.
Examples/LesionFilling.cxx Added --help handling and more detailed usage/error text.
Examples/LabelOverlapMeasures.cxx Documented output destination default and computed measures.
Examples/LabelClustersUniquely.cxx Clarified defaults and meanings of key args.
Examples/KellySlater.cxx Clarified defaults for multiple optional parameters in usage line.
Examples/ImageSetStatistics.cxx Clarified default whichstat semantics in usage output.
Examples/ImageMath.cxx Clarified default values and fixed a spelling issue in usage output.
Examples/ImageIntensityStatistics.cxx Added help text describing optional label input and outputs.
Examples/ImageCompare.cxx Expanded usage with behavior, tolerance, and return codes.
Examples/GetConnectedComponentsFeatureImages.cxx Added help text describing generated outputs.
Examples/ExtractSliceFromImage.cxx Clarified default for KeepSliceInOriginalSpace.
Examples/DeNrrd.cxx Added brief help text describing conversion and gradients output.
Examples/CreateWarpedGridImage.cxx Documented default values for directions/spacing/sigma.
Examples/CreateImage.cxx Clarified defaults and described usage modes.
Examples/CreateDisplacementField.cxx Clarified semantics of boundary enforcement and component images.
Examples/CreateDTICohort.cxx Clarified default value in noise-sigma option description.
Examples/CopyImageHeaderInformation.cxx Clarified default for tensor flag argument.
Examples/ConvertInputImagePixelTypeToFloat.cxx Added extra help text describing TYPE-OPTION and default.
Examples/ConvertImagePixelType.cxx Clarified TYPE-OPTION default in usage string.
Examples/ComposeMultiTransform.cxx Improved one-line usage description to explain behavior.
Examples/ClusterImageStatistics.cxx Reworked and clarified usage text, defaults, and argument descriptions.
Examples/AverageTensorImages.cxx Standardized usage output wording.
Examples/ANTSUseDeformationFieldToGetAffineTransform.cxx Clarified load_ratio and mask semantics in usage output.
Examples/ANTSJacobian.cxx Clarified optional args and defaults in usage line.
Examples/ANTSIntegrateVelocityField.cxx Improved usage formatting and described time parameters.
Comments suppressed due to low confidence (3)

Examples/antsTransformInfo.cxx:1

  • The new early-return path leaks argv because it is allocated before the argc < 2 check and never freed on this path. Move the argc < 2 usage check before allocating argv, or replace the manual allocation with RAII (e.g., std::vector<char*> argv;) so early returns don’t leak.
    Examples/TimeSCCAN.cxx:1
  • The option description now says this controls the number of permutations, but the long name is n_eigenvectors (and short name -n). This is user-facing CLI/API inconsistency and will mislead users (and potentially conflict with a real eigenvector-count option). Either update SetLongName/SetShortName to reflect permutations (e.g., n_permutations), or revert the description to match an eigenvector-count option.
    Examples/SurfaceBasedSmoothing.cxx:1
  • The help text claims sigma has a default of 1.0, but sigma is shown as a required positional argument in the usage line (not optional/braced). This is internally inconsistent: either remove the '(default: 1.0)' wording, or make sigma optional in the actual argument parsing and reflect that in the usage string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Examples/LesionFilling.cxx
Fix GradStep default to -0.5 and smoothing default to 1.5 to match code.
@gdevenyi gdevenyi force-pushed the update-commandline-docs branch from ce2b778 to f20bba3 Compare May 26, 2026 15:13
@cookpa

cookpa commented May 26, 2026

Copy link
Copy Markdown
Member

Thanks, will review

@ntustison ntustison left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me. I didn't see anything that would change function and the additional documentation is mostly minor but useful. The only thing I saw that was "wrong" was an overwrite of the last part of the citation of CreateDTICohort.cxx but that's inconsequential. Thanks for this, @gdevenyi .

@gdevenyi

gdevenyi commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Looks good to me. I didn't see anything that would change function and the additional documentation is mostly minor but useful. The only thing I saw that was "wrong" was an overwrite of the last part of the citation of CreateDTICohort.cxx but that's inconsequential. Thanks for this, @gdevenyi .

If you point out exactly where I can have copilot undo this inline.

@ntustison

Copy link
Copy Markdown
Member

Nope, that was my mistake. THere's no issue. It's all good.

@ntustison ntustison merged commit 95c7abf into ANTsX:master Jun 3, 2026
1 check passed
@ntustison

Copy link
Copy Markdown
Member

Thanks again @gdevenyi

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.

4 participants