Dear Yune Lee,
you mean:
Vol=spm_read_vols(V);
the next step after
voxels= find (Vol>=10)
is to convert linear index to multiple subscripts
[X,Y,Z] = ind2sub(size(Vol), voxels);
and calculate mm coordinate (MNI if normalised)
xyz=V.mat*[X,Y,Z, ones(length(Z),1)]';
xyz=xyz(1:3,:); % cosmetic
Hope this helps,
Michael.
Yune Lee schrieb:
> Dear spm and matlab experts,
>
> I'm trying to figure out X,Y,Z coordinates of entire voxels whose
> T-value is greater than 10 in the spmT image file, but wondering how to
> utilize the voxel numbers to refer to the MNI X,Y,Z coordinate from it.
> Below is what I did and if anyone knows how to convert the values (e.g.,
> 31705) into the MNI coordinate, please help me out.
>
> Thanks,
> YSL
>
> V=spm_vol('spmT_0001.img');
> Vol=spm_read_vol(V);
> voxels= find (Vol>=10)
>
> 31705
> 31913
> 35043
> .
> .
> .
>
> 41772
--
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Dr. Michael Erb
Sektion f. experimentelle Kernspinresonanz des ZNS
Abteilung Neuroradiologie, Universitaetsklinikum
Hoppe-Seyler_Str. 3, D-72076 Tuebingen
Tel.: +49(0)7071/2987753 priv. +49(0)7071/61559
Fax.: +49(0)7071/294371
e-mail: <[log in to unmask]>
www: http://www.medizin.uni-tuebingen.de/nrad/sektion/
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|