spinalcordtoolbox / manual-correction

Scripts for the manual correction of spinal cord labels
MIT License
4 stars 0 forks source link

Allow iterating across all subjects using wildcard #14

Closed valosekj closed 1 year ago

valosekj commented 1 year ago

This PR adds the possibility to iterate across all subjects using the wildcard *.

The config file then looks like:

FILES_SEG:
   - sub-*_T1w.nii.gz

Fixes https://github.com/spinalcordtoolbox/manual-correction/issues/5

valosekj commented 1 year ago

Thank you for testing @sandrinebedard!

I've tested it out, and it works, but when there is a session, I had to include the session in the name

Yes, this is fine.

Same thing, I had to add the suffix RPI_r in the yml; using the arg for that didn't work

This is also fine. If the input images have been preprocessed and thus contain the suffix _RPI_r, you have to specify this full filename under -config, like:

FILES_SEG:
  - sub-*_ses-M0_T2w_RPI_r.nii.gz

Then, the flag -suffix-files-in is meant to remove this suffix (_RPI_r in this case) when constructing the path to label files (segmentations, lesions, etc.).

I tried to clarify this case in https://github.com/spinalcordtoolbox/manual-correction/pull/14/commits/51a63385a41e884f27946894c2aa9cbe41e5daf1