xuli99 / JHUKKI_QSM_Toolbox

BSD 2-Clause "Simplified" License
12 stars 2 forks source link

CSF mask calculation in JHUKKI_QSM_Toolbox during QSM Reconstruction #4

Closed lijiaxiang98 closed 1 year ago

lijiaxiang98 commented 1 year ago

Hello, I am currently using the JHUKKI_QSM_Toolbox for QSM reconstruction and I am encountering an intermittent issue. When I use my own data for reconstruction, sometimes it successfully completes the process, but at other times it fails. After some investigation, I noticed that the failure seems to be correlated with instances where the CSF mask is completely zeroed out. This issue occurs within this part of code: https://github.com/xuli99/JHUKKI_QSM_Toolbox/blob/4ae65da1c661c058ab09f42b40cb37ac0dea7e9e/QSM_Modules/CalculateQSM.m#L405-L421 From my understanding, "lambdaSet.maskSS = CSFmask1 & CSFmask2;" is intended to combine central and outer CSF masks, maybe it should be "CSFmask1 | CSFmask2"? Thanks for your nice work!

xuli99 commented 1 year ago

This part can be modified according to your data. For some of my previous data, the CSFmask1 may go beyond the ventricles, e.g. due to motion artifacts in R2* images, thus I used CSFmask1 & CSFmask2 to clean that.