Print

Print


Hi,
if you don't want to rely on voxel indices, spm_read_vols also returns mm coordinates for your image matrix:

[Y,XYZmm] = spm_read_vols(X_hdr);

You can then use

Y(XYZmm(1,:)>0)=0;

or

Y(XYZmm(1,:)<=0)=0;

to zero right or left hemisphere.
Best,
Volkmar