On Jan 25, 2008 11:32 AM, Albert Compte <
[log in to unmask]> wrote:
Hi,
I need to go through a whole set of subjects, load a given contrast at a
specified p threshold, go to a given voxel, and search for the nearest local
maximum and the nearest suprathreshold voxel. Then extract the value of the
contrast at that point.
I found how to do the contrast value extraction in your archives:
%load a given contrast
V=spm_vol('/path_to_contrasts_for_subject_A/con_0001.img');
%get contrast value "val" at given location [38 36 44]
M=inv(V.mat);
ijk=M(1:3,:)*[38; 36; 44; 1];
val=spm_sample_vol(V,ijk(1),ijk(2),ijk(3),0)
However, I do not know how to script the "search nearest local maximum" and
"search nearest suprathreshold voxel" functionality. Can you help me?
Albert Compte