Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-add-seg-only flag should be moved to copy_files_to_derivatives.py #29

Open
valosekj opened this issue Mar 14, 2023 · 1 comment
Open
Assignees
Labels
enhancement New feature or request

Comments

@valosekj
Copy link
Member

Currently, the -add-seg-only flag is available within manual_correction.py script:

'-add-seg-only',
help="Only copy the source files (segmentation) that aren't in -config list to the 'derivatives' folder. "
"Use this flag to add manually QC-ed automatic segmentations to the 'derivatives' folder.",

But it would make sense to move this flag to copy_files_to_derivatives.py.

@valosekj valosekj added the enhancement New feature or request label Mar 14, 2023
@valosekj
Copy link
Member Author

valosekj commented Mar 14, 2023

Also, `add-seg-only` works only for SC and GM seg and not for disc labels:

if task in ['FILES_SEG', 'FILES_GMSEG']:
if not args.add_seg_only:

For record purposes, I used the following command to copy automatically generated labels to git-annex dataset:

for sub in sub*;do cd ${sub}/anat;if [[ ! -f ~/extrassd1/janvalosek/data/dcm-zurich/derivatives/labels/${sub}/anat/${sub}_acq-sagittal_T2w_labels-manual.nii.gz ]];then cp ${sub}_acq-sagittal_T2w_label-SC_mask_labeled_discs.nii.gz ~/extrassd1/janvalosek/data/dcm-zurich/derivatives/labels/${sub}/anat/${sub}_acq-sagittal_T2w_labels-manual.nii.gz;fi;cd ../..;done

And the following command to create dummy json sidecars:

for sub in sub*;do cd ${sub}/anat; if [[ -f ${sub}_acq-sagittal_T2w_labels-manual.nii.gz && ! -f ${sub}_acq-sagittal_T2w_labels-manual.json ]];then; touch ${sub}_acq-sagittal_T2w_labels-manual.json;fi;cd ../..;done

UPDATE: we store only manually created disc labels under derivatives, context here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants