My peak_nii tool can be scripted. It saves out the thresholded images. It also saves out the clusters and peaks and subsequently labels all the peaks as well. In the next release, it will also provide the corrected statistics (FWE/FDR) at both the voxel and cluster level.

http://www.martinos.org/~mclaren/Utilities_DGM

Best Regards, Donald McLaren
=================
D.G. McLaren, Ph.D.
Postdoctoral Research Fellow, GRECC, Bedford VA
Research Fellow, Department of Neurology, Massachusetts General Hospital and
Harvard Medical School
Website: http://www.martinos.org/~mclaren
Office: (773) 406-2464
=====================
This e-mail contains CONFIDENTIAL INFORMATION which may contain PROTECTED
HEALTHCARE INFORMATION and may also be LEGALLY PRIVILEGED and which is
intended only for the use of the individual or entity named above. If the
reader of the e-mail is not the intended recipient or the employee or agent
responsible for delivering it to the intended recipient, you are hereby
notified that you are in possession of confidential and privileged
information. Any unauthorized use, disclosure, copying or the taking of any
action in reliance on the contents of this information is strictly
prohibited and may be unlawful. If you have received this e-mail
unintentionally, please immediately notify the sender via telephone at (773)
406-2464 or email.



On Tue, Mar 13, 2012 at 11:24 AM, Aaron Oliver-Taylor <[log in to unmask]> wrote:
Hello,

I was wondering if anyone could tell me how to batch/automatically/programatically save the activation maps for each contrast during standard fMRI analysis.  This would manually be achieved by going to the results window, selecting spm.mat, selecting the contrast, clicking save and entering a filename.  I have a batch job which handles all of the other aspects of processing, and is similar to the batch job example in the spm 8 manual.

Many thanks,

Aaron
__________________________________________
Aaron Oliver-Taylor
Ph.D Student
The Advanced Magnetic Resonance Imaging Group
Department of Medical Physics and Bioengineering
University College London
[log in to unmask]