-
Notifications
You must be signed in to change notification settings - Fork 1
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
Identical NIFTI files between M0 and M12 #39
Comments
I wrote a script to compare the files from M0 and M12. This script is stored in the canproco dataset in The analysis gives the following: out of 1752 files from M12, 177 are identical. The output file can be found here: What are the next steps? |
Thank you! I checked the TXT file you generated, and it looks that for the following 32 subjects, the entire List of identical subjects:
|
This comment summarizes the comparison of the "fixed" dataset (received 2023-11-08 from Erin) with our git-annex dataset. Clone a clean copy of the git-annex canproco dataset
Copy the data received Erin
Check for changed files
--> 496 changed files Some changes seem to be minor and related mainly to the nii header (possibly due to the usage of another version of the BIDSification tool?). JSON: nii header: TODOWrite and run a script to compare images subject-wise between |
Currently running on |
Currently adding the files to branch New folder created:
Files modified:modified: sub-cal084/ses-M0/anat/sub-cal084_ses-M0_STIR.json The above shows that 494 files were modified. Untracked filessub-cal056/ses-M0/anat/sub-cal056_ses-M0_acq-MT_MTS.json The above files are marked as new as they are not yet split into MTon and MToff. Using @valosekj script
|
After further investigation, I was able to track the files which have changes in their data : List of files with data changes (in image.data)sub-edm054_ses-M0_T2w.nii.gz This is a total of 183 files (or 33 subjects). This means that only for those files, derivatives need to be reviewed. Output of data transfer : |
Joplin script Visual verification of changed images Subjects :
Only two subjects M0 lesion seg on PSIR didn't correspond to the M12 image
Next step :
Question :
|
Images This was pushed to branch Note : Subject |
Thanks for the investigation, @plbenveniste! 🚀
Great, this is good!
Okay! In other words, it means that the current git-annex lesion segmentation could be renamed from
I will take care of the T2w SC segs (I will check if |
I generated QC to overlay code to generate QClist_of_subjects=(sub-edm054 sub-tor029 sub-mon002 sub-mon005 sub-mon003 sub-edm065 sub-edm035 sub-edm031 sub-mon006 sub-tor051 sub-edm088 sub-tor036 sub-mon009 sub-tor016 sub-mon032 sub-tor043 sub-tor010 sub-mon007 sub-mon060 sub-tor039 sub-tor044 sub-mon011 sub-mon041 sub-tor012 sub-mon014 sub-edm005 sub-tor038 sub-mon031 sub-mon010 sub-mon052 sub-tor021)
cd ~/data/canproco
for sub in ${list_of_subjects};do git annex get ${sub}/ses-M12/anat/${sub}_ses-M12_T2w.nii.gz; sct_qc -i ${sub}/ses-M12/anat/${sub}_ses-M12_T2w.nii.gz -s derivatives/labels/${sub}/ses-M0/anat/${sub}_ses-M0_T2w_seg-manual.nii.gz -p sct_deepseg_sc -qc qc -qc-subject ${sub};done |
Thanks, @valosekj, for your investigation :)
#!/bin/bash
list_of_subjects=(sub-edm054 sub-tor029 sub-mon002 sub-mon005 sub-mon003 sub-edm065 sub-edm035 sub-edm031 sub-mon006 sub-tor051 sub-edm088 sub-tor036 sub-mon009 sub-tor016 sub-mon032 sub-tor043 sub-tor010 sub-mon007 sub-mon060 sub-tor039 sub-tor044 sub-mon011 sub-mon041 sub-tor012 sub-mon014 sub-edm005 sub-tor038 sub-mon031 sub-mon010 sub-mon052 sub-tor021)
for sub in ${list_of_subjects[@]} ;do
# Go to subject directory
cd derivatives/labels/${sub}
echo ${sub}
# Copy M0 segmentation to M12
mv ses-M0/anat/${sub}_ses-M0_PSIR_lesion-manual.nii.gz ses-M12/anat/${sub}_ses-M12_PSIR_lesion-manual.nii.gz
mv ses-M0/anat/${sub}_ses-M0_PSIR_lesion-manual.json ses-M12/anat/${sub}_ses-M12_PSIR_lesion-manual.json
mv ses-M0/anat/${sub}_ses-M0_PSIR_seg-manual.nii.gz ses-M12/anat/${sub}_ses-M12_PSIR_seg-manual.nii.gz
mv ses-M0/anat/${sub}_ses-M0_PSIR_seg-manual.json ses-M12/anat/${sub}_ses-M12_PSIR_seg-manual.json
mv ses-M0/anat/${sub}_ses-M0_T2w_seg-manual.nii.gz ses-M12/anat/${sub}_ses-M12_T2w_seg-manual.nii.gz
mv ses-M0/anat/${sub}_ses-M0_T2w_seg-manual.json ses-M12/anat/${sub}_ses-M12_T2w_seg-manual.json
mv ses-M0/anat/${sub}_ses-M0_T2w_labels-manual.nii.gz ses-M12/anat/${sub}_ses-M12_T2w_labels-manual.nii.gz
mv ses-M0/anat/${sub}_ses-M0_T2w_labels-manual.json ses-M12/anat/${sub}_ses-M12_T2w_labels-manual.json
# remove disc label segmentation file
rm ses-M0/anat/${sub}_ses-M0_PSIR_labels-disc.nii.gz
rm ses-M0/anat/${sub}_ses-M0_PSIR_labels-disc.json
ls ses-M0/anat
# Go back
cd ../../..
done
Next steps :
|
Currently manully segmenting the M0 files with the following config file : Config file usedFILES_LESION:
- sub-edm054_ses-M0_PSIR.nii.gz
- sub-tor029_ses-M0_PSIR.nii.gz
- sub-mon005_ses-M0_PSIR.nii.gz
- sub-mon002_ses-M0_PSIR.nii.gz
- sub-mon003_ses-M0_PSIR.nii.gz
- sub-edm065_ses-M0_PSIR.nii.gz
- sub-edm035_ses-M0_PSIR.nii.gz
- sub-edm031_ses-M0_PSIR.nii.gz
- sub-mon006_ses-M0_PSIR.nii.gz
- sub-tor051_ses-M0_PSIR.nii.gz
- sub-edm088_ses-M0_PSIR.nii.gz
- sub-tor036_ses-M0_PSIR.nii.gz
- sub-mon009_ses-M0_PSIR.nii.gz
- sub-tor016_ses-M0_PSIR.nii.gz
- sub-mon032_ses-M0_PSIR.nii.gz
- sub-tor043_ses-M0_PSIR.nii.gz
- sub-tor010_ses-M0_PSIR.nii.gz
- sub-mon007_ses-M0_PSIR.nii.gz
- sub-tor014_ses-M0_PSIR.nii.gz
- sub-mon060_ses-M0_PSIR.nii.gz
- sub-tor039_ses-M0_PSIR.nii.gz
- sub-tor044_ses-M0_PSIR.nii.gz
- sub-mon011_ses-M0_PSIR.nii.gz
- sub-mon041_ses-M0_PSIR.nii.gz
- sub-tor012_ses-M0_PSIR.nii.gz
- sub-mon014_ses-M0_PSIR.nii.gz
- sub-edm005_ses-M0_PSIR.nii.gz
- sub-tor038_ses-M0_PSIR.nii.gz
- sub-mon031_ses-M0_PSIR.nii.gz
- sub-mon010_ses-M0_PSIR.nii.gz
- sub-mon052_ses-M0_PSIR.nii.gz
- sub-tor021_ses-M0_PSIR.nii.gz Code used : python manual_correction.py -path-img /Users/plbenveniste/tmp_romane/updating_canproco/canproco -config /Users/plbenveniste/Desktop/canproco_erin_M0_lesion_seg.yaml -path-label /Users/plbenveniste/tmp_romane/updating_canproco/canproco/derivatives/labels -suffix-files-lesion _lesion-manual -fsleyes-dr="-40,70"
|
Great! Thanks for the command! Cross-refed to manual-correction wiki. |
|
FYI: I merged the script |
Related to #37 in (this comment).
It seems that some images are identical from time point M0 to M12.
Some examples are:
To do:
The text was updated successfully, but these errors were encountered: