Hello Laura,
I have not formally inplemented this but using one of my favorite Matlab
file exchange picks (findn,
http://www.mathworks.com/matlabcentral/fileexchange/3055-findn) and some
standard spm-functions, this is easily implemented. You can try
something like
% select, read in file
v = spm_read_vols(spm_vol(spm_select(1,'image','Select image to
analyze')));
% threshold at whatever (t-)value you see fit
v = v .* (v > 4);
% pass to spm_bwlabel
[c, n] = spm_bwlabel(v, 18);
% loop over clusters
clc
for i = 1:n
disp('');
disp(['Coordinates of cluster #' num2str(i) ':']);
coords = findn(c==i);
coords
eval(['save cluster_' num2str(i) ' coords;'])
end;
This will show the coordinates in the command window and save them to
individual files (at least I think it does as I have not thoroughly
tested this).
Hope this helps,
Marko
Laura Bled wrote:
> Hello
>
> I would be very grateful in anyone will share a script to get all voxels
> coordinates in the clusters. When clicking on current cluster option in
> spm I get only a part of voxels, not all. Thanks in advance
>
> Laura
--
____________________________________________________
PD Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Universitäts-Kinderklinik
Abt. III (Neuropädiatrie)
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
University Children's Hospital
Dept. III (Pediatric Neurology)
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn/
____________________________________________________
--
Sendmail-Host: epeire2.extra.cea.fr
Relay: cirse.extra.cea.fr [132.166.172.102]
Helo: cirse.extra.cea.fr
Envelope-From: [log in to unmask]
Queue-Id: r9E6UH6x009149
Date: Mon, 14 Oct 2013 06:30:18 GMT
Envelope-To: [log in to unmask]
Fur_rdns: deneb.ease.lsoft.se
Fur_helo: deneb.ease.lsoft.se
Fur: 212.247.25.55
Direction: Inbound
Mapped-Recipients: [log in to unmask]
Recipient-Group: [log in to unmask]
User-Language: fr
Virus-Id: SOPHOS_SAVI_ERROR_OLD_VIRUS_DATA
Reason: infecte_in
Global-ID: 88223402-4
Msg-Info-Size: 0x0000023a
|