Gretna2.0 使用过程中遇到的问题

在做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

posted on 2018-03-14 15:30  韧心  阅读(1077)  评论(0编辑  收藏  举报

导航