I've run into an error on line 248 with Undefined function or variable 'fmap'. When I look at the code, I don't see fmap defined earlier in the function, so I think this may be the issue. Could it be that on 248 we need f and not fmap (looking up to the loop, for which f is looping through the files)? @jooh and @tiborauer I think you may be the most recent people to look at this code (although I'm surprised no one else has run into this).
|
for f = fmaps' |
|
if skipnext |
|
skipnext = false; |
|
continue; |
|
end |
|
jfname = spm_file(f{1},'basename'); |
|
ind = find(jfname=='_',1,'last'); |
|
ftype = jfname(ind+1:end); |
|
switch ftype |
|
case 'phasediff' |
|
fmap.hdr = loadjson(f{1}); |
|
if isfield(fmap.hdr,'IntendedFor') |
|
fmap.hdr.session = get_taskname(sesspath,subjname,fmap.hdr.IntendedFor); |
|
else |
|
fmap.hdr.session = '*'; |
|
end |
|
fmap.fname = cellstr(spm_select('FPList',fullfile(sesspath,fieldmapDIR),[strrep(jfname,ftype,'') '.*.nii.gz'])); |
|
case 'phase1' |
|
skipnext = true; |
|
case 'fieldmap' |
|
end |
|
fieldmapimages = horzcat(fieldmapimages,fmap); |
|
end |
I've run into an error on line 248 with Undefined function or variable 'fmap'. When I look at the code, I don't see fmap defined earlier in the function, so I think this may be the issue. Could it be that on 248 we need
fand notfmap(looking up to the loop, for whichfis looping through the files)? @jooh and @tiborauer I think you may be the most recent people to look at this code (although I'm surprised no one else has run into this).automaticanalysis/aa_engine/aas_processBIDS.m
Lines 227 to 249 in ee48221