Skip to content

Add rigid subcommand for rigid-only alignment#27

Merged
tctco merged 1 commit into
devfrom
codex/add-rigid-subcommand-to-adjust-images
May 20, 2026
Merged

Add rigid subcommand for rigid-only alignment#27
tctco merged 1 commit into
devfrom
codex/add-rigid-subcommand-to-adjust-images

Conversation

@tctco
Copy link
Copy Markdown
Owner

@tctco tctco commented May 20, 2026

Motivation

  • Provide a simple subcommand that performs rigid-only alignment by updating the image affine without performing resampling, intensity scaling, or nonlinear warping.
  • Allow callers to opt into a lightweight flow useful for cases that only need affine correction (simpler than adni-pet-core).

Description

  • Added a new spatial normalization CLI module rigid with localizer/src/spatialNormalizations/rigid/RigidCLI.h and .../RigidCLI.cpp that accepts base arguments and triggers a rigid-only request.
  • Introduced a rigidOnly flag in localizer/src/core/common/NormalizationContracts.h to represent the rigid-only mode in the normalization options.
  • Updated localizer/src/core/services/SpatialNormalizationService.cpp to return the rigid-aligned image as the final output when rigidOnly is set and to skip ADNI-style postprocessing in that case.
  • Registered the new module in localizer/src/spatialNormalizations/ModuleCatalog.cpp and added the new source files to localizer/src/CMakeLists.txt; also added a quick CLI test case in localizer/src/tests/test_quick_cli.py for rigid --help.

Testing

  • Ran the quick CLI help test case with pytest -q localizer/src/tests/test_quick_cli.py -k rigid_help, which errored because the test environment expected the DCCCcore executable at localizer/src/install/bin/DCCCcore and it was not present, so the test could not complete.

Codex Task

@tctco tctco merged commit 9990e60 into dev May 20, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant