Commit a474236
committed
Integrate longitudinal template generation into rbc (Stage 2 of #301)
Ports scripts/build_robust_template.py into the rbc package layout so the
template stage matches the rest of the pipeline and gets test coverage:
- core/longitudinal/freesurfer.py: generate_robust_template +
fs_to_itk_xfm via niwrap freesurfer + rbc.core.fsl2itk (no c3d).
- workflows/longitudinal/template.py: LongitudinalTemplateOutputs +
generate_subject_template().
- bids/longitudinal/template.py: discover_template_inputs +
export_template; xfm output naming switched to
sub-X_ses-longitudinal_from-Y_to-longitudinal_mode-image_xfm.txt.
resolve_longitudinal_{anat,func} updated to query by from+to extras.
- orchestration/longitudinal/template.py: per-subject loop. Fixes #19
(per-subject volume check now inside the loop, not on the whole df).
- cli/longitudinal/ becomes a package with nested subparsers and a
``long`` alias. ``rbc longitudinal template`` is the new subcommand;
the legacy --anatomical/--functional flow lives at
``rbc longitudinal process`` until Stage 3 splits it.
- noit=True ported as-is with TODO referencing #302.
- Drops the FS license requirement entirely: orchestration sets the
documented SURFER_SIDEDOOR bypass on the runner environ, since
mri_robust_template's chklc() returns immediately when the var is set.
- Deletes scripts/build_robust_template.py.
Unit tests cover filename mapping, the per-subject single-volume guard,
template input discovery, BIDS export naming, and the new CLI wiring
(including the ``long`` alias).
Tier-2 integration test for ``rbc longitudinal template`` deferred:
needs the ds000114 multi-session fixture infrastructure (download
script + CI cache + conftest), which is substantial enough to land
in a separate PR. Existing ``pytest -m 'integration and not slow'``
collects 0 tests today, so no regression risk.1 parent ac8903f commit a474236
14 files changed
Lines changed: 881 additions & 373 deletions
File tree
- scripts
- src/rbc
- bids/longitudinal
- cli/longitudinal
- core/longitudinal
- orchestration/longitudinal
- workflows/longitudinal
- tests/unit
- bids
- cli
- core
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments