Hello SPMers,
I am repeating a procedure for several ROIs of numerous subjects, so I would like to automate the procedure. I need help doing that. I think I should outline the procedure first.
I. Change MATLAB directory to the folder containing the SPM.mat file generated by 1st level GLM of desired individual. (This step is not necessary, but makes the process convenient.)
II. Open Pickatlas, if not already open.
III. Click Analysis button, choose the SPM.mat file, and choose the appropriate contrast:
Apply Masking Image
Choose the desired anatomical ROI image file. [I created a .nii mask of an anatomical ROI in Pickatlas earlier. I also noted the location of the peak voxel]
Nature of Mask Inclusive
ROI analysis Yes
ROI analysis from Pickatlas GUI
Enter the MNI coordinates of peak voxel and click Go. Create a 10 mm radius sphere centered on the peak voxel.
[In Human Atlas window] Shapes -> Sphere
Enter 10 for radius and click Generate Shape. Click Done.
p value adjustment to control None
threshold [T or p value] 0.001
Extent threshold 0
IV. Store the location of the global maximum of the resulting activation. Close Pickatlas.
I realise that all I am using Pickatlas for here is to create a sphere with a 10 mm radius. I could create this spherical ROI and then not involve PickAtlas at all.
But because of the interactive nature of the procedure, I cannot use the standard batch file procedure.
Is there a way I can use a MATLAB script to run the above procedure with SPM and PickAtlas, without the need for me to interact with the process? Perhaps my inputs could be stored in and read from an Excel file?
I greatly appreciate any help I can get. Thank you very much.
Kwaku.
|