Dear fellow freesurfers,
using FreeSurfer 3.0.5 and 4.0.1, I can make fast_inorm.m (as called by inorm) die, with otherwise innocently looking inputs. The syndrom is that if my fist slice contains only one iunder voxel twf_under (see 3.0.5's line 88 of fast_inorm.m) is initialised as scalar (that is not an array), any subsequent try to store a n_timepoint long vector in twf_under just makes matlab choke. This same combination of input dimensionality is fixed for twf_over in the same code. Applying the same special casing of single voxels for iunder solves my problems for good.
Here is the meat of the change:
if(nthslice,1) > 0) twf_under(nthslice,:) = mean(y2(iunder,:)); else
with the following construct:
if(nunder(nthslice,1) > 1) twf_under(nthslice, 1) = mean(y2(iunder,:)); elseif (nunder(nthslice,1) == 1) twf_under(nthslice, 1) = y2(iunder,:); else
Ahoi & thanks supplying powerful tools Sebastian
freesurfer@nmr.mgh.harvard.edu