The simplest way to write your own batch is to create a complete
prepossessing mat file for a single subject. Then write a matlab
script that goes through the jobs data structure and replaces all
instances of subject name "foo01" with the name of another subject
"foo02", Save the resulting job and repeat for subject "foo03".
This of course assumes that your directory structure is consistent,
except for subject names, and that you are using the same
prepossessing parameters for each subject.
On Fri, May 9, 2008 at 11:51 AM, Marc Berman <[log in to unmask]> wrote:
> Hi,
>
> I'm trying to batch preprocessing (coregistration, normalization, and
> smoothing) for 25 or so subjects. I was hoping to be able to call the
> functions spm_coreg, spm_normalise and spm_smooth repeatedly passing to
> those functions the different .nii files for each subject that I wanted
> those functions to work on. However, I am not quite getting them to work as
> I would like. For example, when I call spm_coreg with my reference and
> source image file names, coregistration seems to work, but my source image
> is not altered. The coregistration affine transformations were passed back
> to me though, and they appeared correct.
>
> In sum, I'm looking for an easy way to loop over subjects and call these
> functions repeatedly by pointing these functions to the correct files, with
> the proper preprocessing parameters. I see that there are some batch
> scripts out there, but there is not much documentation on them. I would
> prefer to just be able to write my own matlab function that loops over the
> subjects and calls these preprocessing functions with the correct params.
> In addition, there are also _config files, such as spm_config_coreg, but I
> was not sure what fields to alter to simply coregister and estimate only. I
> had similar difficulties with the nomalisation config file. Smoothing seems
> more straightforward, as it appears that I can just pass spm_smooth.m a
> matrix of strings, where each string is the name of the file that I want
> smoothed (with the correct file location contained in the name).
>
> I'm also not very familiar with how to set jobs and run jobs with scripts
> only (i.e., not using the gui).
>
> Any help would be appreciated.
>
> Thanks for your time,
> -Marc
>
|