Hi Aser,
I had the same question a few months ago. I wanted to do the same, but for the AAL atlas and Talairach atlas.
I also wanted to do this for all contrasts at several thresholds and cluster sizes for a comparison study. Doing this manually was out of the question, so I have written something to do this for me in SPM8 (in attachment).
Preparation
-----------------------------------
Put the following "libary" files in the executable path:
spm_get_SPM_pvdm.m
gin_list_plabels.m
gin_tal_cube.m
gin_tal_localmax.m
tabdat_print.m
tabdat_merge.m
tabdat_label.m
Put the following file you working folder, this file will be edited to reflect your needs:
batch_process_results.m
Change in the files gin_tal_cube and gin_tal_localmax the path to the talairach.jar file.
Make sure to be online for this method to work
Install AAL toolbox from http://www.gin.cnrs.fr/spip.php?article217&lang=en in the SPM toolbox dir
Download talairach daemon jar file from http://www.talairach.org/daemon.html to a local folder
Description
-----------------------------------
I have made some modifications to existing files and had to write some new code to have it working.
First, I did a little tweaking of the spm_getSPM.m file. This function is executed when you click on the Results button asking for cluster size, correction, etc. I added a few arguments so this runs without gui.
The arguments are spm-file, Ic (contrast number), u (p-values) and k (cluster size) .
You use it like this:
[spm_data, xspm_data] = spm_getSPM_pvdm(spmmatfile, 1, 0.05, 100);
The xspm_data structure contains all results as displayed in the spm graphics window.
The gin_* files (custom and part of AAL toolbox) do the actual coordinate conversion and labelling. 5 different methods are supported:
AAL: clusters, localmax and extended localmax
TAL: localmax and cube
Tweaking the methods (eg cube size, radius size, tolerance, ...) can be achieved by editing the apropriate gin_* file.
The tabdat_merge.m function merges the SPM generated table with the results generated by the gin_* files
The tabdat_print.m function prints the merged table to a file. Beware that the footer part is copied, but does not reflect the real data, I did not have the time to edit the code for this to work.
The tabdat_label.m function integrates all above processing steps for all provided contrasts and u-vals and k-vals
Input arguments are: dirs (directories containing SPM.mat files), u_vals (array with p-values) and k_vals (array with cluster sizes).
To make it more easy, I have written the batch_process_results.m file where you define the dirs, u_vals and k_vals and call the tabdat_batch_process function.
I ran this file on 6 SPM.mat files with 2 cluster sizes and 2 p-values for all 5 labelling methods generating 120 files in just a few minutes.
The code is not perfected, but if I have the time and if there is a need, I will put this all together in a toolbox so it interfaces with the SPM batch system.
Good luck
Pieter
Op 23/09/2013 13:15, Aser A schreef:
AserThanksHe all,I am sure that I will find an answer here. I am looking for an anatomical software that can label the resulted coordinates produced in SPM table. I could extract these coordinates to excel or mat file. I need now just to insert them in an anatomical labeling software.
--
Pieter Vandemaele, MSc-Ing
GIfMI Site Manager
Ghent Institute for Functional and Metabolic Imaging
MR Department -1K12
Ghent University Hospital
De Pintelaan 185
9000 Ghent - BELGIUM
[log in to unmask] tel: +32 (0)9 332 48 20
http://gifmi.ugent.be fax: +32 (0)9 332 49 69