spinalcordtoolbox / manual-correction

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

Same suffix name is used to fetch and write labels #89

Open sandrinebedard opened 7 months ago

sandrinebedard commented 7 months ago

Description

When I specify the suffix for the labels, for example -suffix-files-seg _seg, then it will search for the labels with the suffix _seg to correct, but it will also use that suffix for the corrected label name written in derivatives.

Since SCT adds the suffix _seg automatically, and the correct name for the spinal cord segmentation is SC-label_seg it is not possible to have this option:

Input: _seg Output: _SC-label_seg

valosekj commented 7 months ago

but it will also use that suffix for the corrected label name written in derivatives.

Correct, this is the current behaviour. The "input suffix" is also used as the "output suffix".

To fix the output suffixes, I cuurenly use for loop 😅 For example:

for file in sub*/anat/*seg*;do echo mv $file ${file/_seg/_SC-label_seg};done

Input: _seg Output: _SC-label_seg

Agree! Allowing the script to do something like this would be great!