Dear Colleagues,
it seems that I do not understand the code in "spm_vb_roi_basis.m":
xyz = xY.XYZmm;
N = size(xyz,2);
M = diag(SPM.xVol.M);
m = 1./abs(M(1:3));
xyz = (m*ones(1,N)).*xyz;
vxyz = spm_vb_neighbors(xyz',1);
However, its crashing when calling "spm_vb_neighbors". The problem is
the division of xyz by the voxel size "m = 1./abs(M(1:3))". Then, the
coordinates are no integers anymore (because the integer coordinates are
divided by, lets say 3).
In "spm_vb_neighbors.m" this "rational numbers" are treated in the
following way:
DIM = max(xyz,[],1);
I = sub2ind([DIM(1),DIM(2),DIM(3)],xyz(:,1),xyz(:,2),xyz(:,3));
This means that also DIM are no integers. However, "sub2ind" requires
integers for setting the dimensions.
A second question is if we really need to do "spm_vb_neighbors". We
would like to assess only the voxels which belong to our VOI, and not
further voxels.
With best regards,
Karsten
|