DOC: Update all command-line help to correspond to code#1976
Conversation
…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.
…yTransformsToPoints
…ImagePixelTypeToFloat
…s in LabelOverlapMeasures
…UseDeformationFieldToGetAffineTransform
…in ResampleImageBySpacing
…liceRegularizedRegistration
…tions in antsRegistration
…hDisplacementField
…scription in ComposeMultiTransform
There was a problem hiding this comment.
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
EvecGradPenaltyandPositivityConstraintoptions insccan.
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
argvbecause it is allocated before theargc < 2check and never freed on this path. Move theargc < 2usage check before allocatingargv, 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 updateSetLongName/SetShortNameto reflect permutations (e.g.,n_permutations), or revert the description to match an eigenvector-count option.
Examples/SurfaceBasedSmoothing.cxx:1 - The help text claims
sigmahas a default of 1.0, butsigmais 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 makesigmaoptional 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.
Fix GradStep default to -0.5 and smoothing default to 1.5 to match code.
ce2b778 to
f20bba3
Compare
|
Thanks, will review |
ntustison
left a comment
There was a problem hiding this comment.
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. |
|
Nope, that was my mistake. THere's no issue. It's all good. |
|
Thanks again @gdevenyi |
Generated using OpenCode with GLM-5.1.