Repository navigation
ADD: let AREG read a cohort kept as one folder per patient, chosen beside the per-type layout - #89
Merged
Jules-GP merged 2 commits intoOct 27, 2026
Conversation
…back the oriented CBCT beside the meshes
…side the per-type layout
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The three AREG engines read their two inputs as two folders, one per type:
t1andt2, oriosandcbct. Many cohorts are kept the other way round: one folder per patient holding both inputs (<patient>/T1/and<patient>/T2/, or<patient>/IOS/and<patient>/CBCT/). Running AREG on them meant reorganising the data by hand first.Change
Choosing the layout
input_layout: "One folder per type" (the default, today's behaviour) or "One folder per patient".patients, the folder of patient folders.t1/t2andios/cbctstop being required in the signature, since a per-patient request fills neither.Sorting the per-patient layout (
sadt_areg_common.patient_folders)<patient>/T1/scan.nii.gzis that patient's T1, whatever the file is called.T1//T2/folder or from_T1/_T2in the name. A folder and a name that disagree give no timepoint: the file is left out, not guessed at.IOS/andCBCT/sub-folders are optional.<patient>_T1.nii.gz,<patient>_T1_U.vtk,<patient>_U.stl,<patient>_CBCT.nii.gz.Panel
input_layoutis drawn as two segments (ui: "segmented") above the inputs. Each segment's help shows the folder tree it expects (catalogs.LAYOUT_HELP).patientsonly in its own.required_whenits layout is chosen, so the panel does not label them "(optional)".describe.pyrequired_whenexactly likevisible_when; the checker is shared.PAIREDaxes need to be path arguments, no longer required ones, sincet1/t2are now optional.Depends on
ui: "segmented"on a choice andrequired_when; without it the three AREG tools are refused at load.required_when. Without it the panel still works, with a drop-down and "(optional)".Still to do
The server publishes a paired batch plan on
t1/t2; no client uses it today. A per-patient request fills neither axis, so a future client that splits cohorts would split nothing in that layout. Splitting by patient folder there is a follow-up.Tests
common/tests/test_patient_folders.py(12): timepoint and jaw reading, sorting, refusals, the scratch folder.test_patient_folders.pyin each engine: IOS-CBCT registers a per-patient cohort end to end (side by side and withIOS//CBCT/), and the T1/T2 engines receive the patient's two timepoints.automation's.scripts/tests: 100 passed.test_module_level_heavy_import_is_reported_as_suchalso fails onmain.