-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Jan Valosek edited this page Feb 16, 2023
·
33 revisions
Examples:
Lesions are segmented on the PSIR or STIR contrasts (when available). The workflow is the following:
- Loop across subjects,
- Load PSIR/STIR in FSLeyes, and overlay the lesion segmentation (if it already exists),
- Create/adjust the segmentation mask using editing tools. Toggle the lesion overlay on/off to help validate the accuracy of the label (cmd+F on a Mac or ctrl+F on a Linux/Windows),
- Save the mask in FSLeyes
Example command:
python manual_correction.py -path-in <INPUT_PATH> -config <CONFIG_FILE> -path-out <OUTPUT_PATH> -viewer fsleyes
-
INPUT_PATH
: BIDS dataset from which manual lesions will be identified -
CONFIG_FILE
: YML file that lists all subjects to be included in the manual lesion segmentation. This file can either be generated by SCT's QC report or created manually. See the example of a YML file below -
OUTPUT_PATH
: Optional. If not specified, output segmentations will be generated in theINPUT_PATH
FILES_LESION:
- sub-edm005_ses-M0_PSIR.nii.gz
- sub-edm008_ses-M0_PSIR.nii.gz
- sub-edm010_ses-M0_PSIR.nii.gz
Lesions are segmented on one contrast (e.g., T2w), while the second contrast (such as PSIR or STIR) is also opened in FSLeyes. The workflow is the following:
- Loop across subjects,
- Denoise T2w image
- In FSLeyes, load the denoised T2w image first, then load PSIR/STIR in FSLeyes
- Overlay the lesion segmentation (if it already exists),
- Create/adjust the segmentation mask using editing tools. Toggle the contrasts and lesion overlays on/off to help validate the accuracy of the label (cmd+F on a Mac or ctrl+F on a Linux/Windows),
- Save the mask in FSLeyes
- Remove the denoised T2w image
Example command:
python manual_correction.py -path-in <INPUT_PATH> -config <CONFIG_FILE> -path-out <OUTPUT_PATH> -viewer fsleyes -load-other-contrast PSIR -denoise
-
INPUT_PATH
: BIDS dataset from which manual lesions will be identified -
CONFIG_FILE
: YML file that lists all subjects to be included in the manual lesion segmentation. This file can either be generated by SCT's QC report or created manually. See the example of a YML file below -
OUTPUT_PATH
: Optional. If not specified, output segmentations will be generated in theINPUT_PATH
-
-load-other-contrast PSIR
is used to load an additional contrast; in this case, the PSIR image -
-denoise
is used to denoise the images specified inCONFIG_FILE
; ; in this case, the T2w image
FILES_LESION:
- sub-edm005_ses-M0_T2w.nii.gz
- sub-edm008_ses-M0_T2w.nii.gz
- sub-edm010_ses-M0_T2w.nii.gz