Closed bart-larsen closed 2 years ago
Hello,
Let's see if we can sort this out. May I have the scanner manufacturer and scanner software version you are using so I can test a few things on my end first?
Thank you,
Great, thank you!
This was acquired on Siemens Prisma. The software version listed in the dicom header is syngo MR E11. Let me know if you need more information.
OK, I run one participant on my end collected with Syngo MR E11 sequences on the GitHub version of Ironsmith and I could not replicate the bug.
The next step is to try running Ironsmith on data from one of your participants. Is there any way you could share the necessary files for one of your participants? The exact input files that cause the error on your end.
Is there a way I can contact you to share some data privately. I do not want to post dicom files as they may contain PHI. Let me know what works for you!
Yes, of course. Here is my e-mail: vzachari "AT" uky.edu Would a google drive or OneDrive link with zipped compressed DICOMs from one participant work?
Greetings,
I was able to replicate the issue using the data you provided. The error occurs in IronSmithQSM/Functions/MEDI_QSM_New_Ref.sh and is related to the code on lines 117-125
` echo "Mask_CSF_New_Rot = permute(Mask_CSFNew,[2,3,1]);" >> Subj${Subj}_MEDI_QSM_New_Ref.m echo "Mask_CSF_New_Rot_F1 = flip(Mask_CSF_NewRot,1);" >> Subj${Subj}_MEDI_QSM_New_Ref.m echo "Mask_CSF_New_Rot_F2 = flip(Mask_CSF_New_RotF1,2);" >> Subj${Subj}_MEDI_QSM_New_Ref.m echo "Mask_CSF_New_Rot_F3 = flip(Mask_CSF_New_RotF2,3);" >> Subj${Subj}_MEDI_QSM_New_Ref.m
echo "Mask_WM_New_Rot = permute(Mask_WMNew,[2,3,1]);" >> Subj${Subj}_MEDI_QSM_New_Ref.m echo "Mask_WM_New_Rot_F1 = flip(Mask_WM_NewRot,1);" >> Subj${Subj}_MEDI_QSM_New_Ref.m echo "Mask_WM_New_Rot_F2 = flip(Mask_WM_New_RotF1,2);" >> Subj${Subj}_MEDI_QSM_New_Ref.m echo "Mask_WM_New_Rot_F3 = flip(Mask_WM_New_RotF2,3);" >> Subj${Subj}_MEDI_QSM_New_Ref.m `
It would appear the transformation needed to align/register the Freesurfer lateral ventricle mask to MEDI space in MATLAB is different for your data than for all the data I used to test Ironsmith.
I adjusted the code to fit your data and as long as your T1 and QSM scans are from the same scanner, using the same sequences, the new transformation I applied will work.
I also updated which lateral ventricles mask Ironsmith will use as the QSM reference (CSF reference). For your data, I would use the ${Subj}_freesurfer_LR_Lateral_Ventricle_Mask_AL_QSM_RS_Erx1.nii.gz instead of ${Subj}_freesurfer_LR_Lateral_Ventricle_Mask_AL_QSM_RS_Erx2.nii.gz
Please rename your current IronSmithQSM/Functions/MEDI_QSM_New_Ref.sh file to MEDI_QSM_New_Ref_OLD.sh download the attached MEDI_QSM_New_Ref.zip file, unzip it and place the resulting .sh file in IronSmithQSM/Functions/
Test with one or two participants and let me know how it goes. The participant you provided works on my end, following the updates to MEDI_QSM_New_Ref.sh
I will update Ironsmith in the near future to automatically figure out this transformation so no one has to deal with this bug again.
Wonderful! I will test this today and confirm it is successful. Thanks!
It seems to be successfully completing for all the subjects. Looks like the fix worked. Thank you!
Thank you for identifying this bug. I have updated Ironsmith to V1.3 Beta which should fix this issue.
Hello,
I am trying to get IronSmith to run on a QSM dataset, but every subject fails at the same point. This is the error message
Nothing gets written in the
MEDI_New_Ref_Matlab_Log.txt
If I run the
Subj_21827_11853_MEDI_QSM_New_Ref.m
code in MATLAB, the error seems to occur at this step:Write_DICOM(Mask_CSF_New_Rot_F3, files, New_CSF_Mask_Dir);
The error it produces is this:
Just to note, the original run of MEDI (e.g.
Subj_21827_11853_MEDI_QSM.m
) complete successfully.Any advice is appreciated!