Email discussion lists for the UK Education and Research communities

## SPM@JISCMAIL.AC.UK

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

#### Options

Subject:

Re: other method to extract local maxima in a cluster?

From:

Date:

Thu, 16 Feb 2017 16:45:34 +0000

Content-Type:

text/plain

Parts/Attachments:

 text/plain (42 lines)
 Dear Mike, If you are looking at SPM results, you can change the number of displayed local maxima in the table by changing the defaults:   defaults.stats.results.volume.distmin = 0;   defaults.stats.results.volume.nbmax = Inf; as mentioned in one of your previous posts. You can also click on the "current cluster" button to display, by default, 16 local maxima more than 4mm apart. If you are using another toolbox that still creates the xSPM variable in the MATLAB workspace, you can run the following:   [N,Z,XYZ,A,L] = spm_max(xSPM.Z,xSPM.XYZ);   XYZmm = xSPM.M(1:3,:)*[XYZ; ones(1,size(XYZ,2))] And if what you have is a 3D volume, you can do something like this:   V = spm_vol('spmT_0005.nii');   [Y,XYZmm] = spm_read_vols(V);   XYZ = V.mat\[XYZmm;ones(1,size(XYZmm,2))];   XYZ = XYZ(:,Y(:)>4.81); % height threshold   idx = spm_get_lm(Y,XYZ(1:3,:));   XYZmm = V.mat(1:3,:)*XYZ(:,idx) Best regards, Guillaume. On 16/02/17 16:06, Mike wrote: > Hi, > > I want to extract local maxima in a cluster (SPM8 defaults show only 3 local maxima). I know peak_nii can do that but due to compatibility reason my computer can not compile the mex files, as required in peak_nii manual. Does anyone know other methods to get more local maxima in a cluster? > > Mike > -- Guillaume Flandin, PhD Wellcome Trust Centre for Neuroimaging University College London 12 Queen Square London WC1N 3BG