Print

Print


Dear SPMers,

I have two related questions. 1) if I would like to extract the value of a 
particular voxel of a single subject defined by an MNI-coordinate (V=spm_vol
(con_img_file_name); beta = spm_get_data(V,MNI_XYZ); ), would I need to 
transform the MNI-coordinate first (to native space) or are all beta-imgs/con-
imgs already written in MNI-space? If transformation is necessary, could it be 
done something like this?
V=spm_vol(con_img_file_name); 
n_voxels = size(MNI,2);
XYZ = inv(V.mat)*[XYZ_mni; ones(1,n_voxels)]; 
XYZ = XYZ(1:3,:);
beta = spm_get_data(V,XYZ);

2) In order to determine the "native coordinates" of a voxel using MNI-
coordinates, could I just do this:
V=spm_vol(normalized_img_file_name); 
n_voxels = size(MNI,2);
XYZ = inv(V.mat)*[XYZ_mni; ones(1,n_voxels)];
XYZ = XYZ(1:3,:);

Thanks for your help! 
Best,
Tim