Print

Print


Dear Albert,

Have you looked at the usage for spm_mip_ui?  In particular

% FORMAT [xyz,d] = spm_mip_ui('Jump',h,loc)
% Utility routine (CallBack of UIcontextMenu) to jump cursor
% h       - Handle of MIP axes [defaults to spm_mip_ui('FindMIPax')]
% loc     - String defining jump: 'dntmv' - don't move
%                                 'nrvox' - nearest suprathreshold voxel
%                                 'nrmax' - nearest local maxima
%                                 'glmax' - global maxima

while you probably can't directly use the code since it is expecting to interact with the GUI, it will provide some code (see lines ~400-420) to help you out.

-Tom


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


____________________________________________
Thomas Nichols, PhD
Director, Modelling & Genetics
GlaxoSmithKline Clinical Imaging Centre

Senior Research Fellow
Oxford University FMRIB Centre