在做Normalize的時候,報錯“Cannot find T1 image (e.g. *.dcm in T1 Directory), Please Check again!”,但是Pipeline的時候不會報錯。
背景:之前使用Gretna做批處理,進行到一半的時候報錯,說“Something went bad... the pipeline has FAILED”,當時查了一下,發現是第84個被試出了問題,于是以為是第84個被試的資料有問題,就把第84個被試從DICOM和T1資料的檔案夾中移除了,但是并沒有删除GretnaFunNIfTI檔案夾下的subj_0084。同時開始分步運作Gretna。
結果問題就出在“沒有删除GretnaFunNIfTI檔案夾下的subj_0084”,在Gretna的分步計算過程中,輸入變成了GretnaFunNIfTI下的檔案,這樣一來,gretna就會在T1檔案夾下尋找subj_0084,找不到就報錯了。
【備注】調試GUI檔案夾下的gretna_GUI_PreprocessInterface.m檔案
為了避免這類問題,我把Gretna的源代碼進行了修改,使其提示更加人性化,修改的代碼如下:
% modify by supakito
FlagEmptyies = cellfun(@isempty, InputT1FileList);
if any(FlagEmptyies)
NoT1Subjs = strjoin(SList(find(FlagEmptyies)),',');
errordlg(['Cannot find T1 image (e.g. *.dcm in T1 Directory), Please Check ',NoT1Subjs]);
return;
end
% end of modify by supakito
用于替換Gretna的gretna_GUI_PreprocessInterface.m中735行的:
if any(cellfun(@isempty, InputT1FileList))
errordlg('Cannot find T1 image (e.g. *.dcm in T1 Directory), Please Check again!');
return;
end