This a good quick method with the record button, however in my case it
returns many unwanted images from some subdirectories.
I've written a small and easy script to go around this problem. It creates a
text file with directories to cons of interest (works only for one and
two-digit affixes though; didn't need more :), then after using Edit button
in 2nd level window you can paste the text, either from a text file or
straight from the Matlab command window
Of course no guarantee of perfection but easy to test and doesn't mess up
your actual data, even if there are bugs in it.
I've just played around with comments only, so there shouldn't be any
errors.
Iwo
-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On
Behalf Of Volkmar Glauche
Sent: 13 May 2011 17:09
To: [log in to unmask]
Subject: Re: [SPM] Simple scripting question - batch loading scans
Dear Fred,
unfortunately, file selector does not allow to load a list of filenames from
MATLAB variables or .mat files. However, I could think of a number of ways
to help you select the files:
* If all files have the same name, but live in different folders in your
project (e.g. all con_0001.img files from all your subjects), then you could
navigate to the top level of your project, enter ^con_0001\.img$ into the
filter field and press the 'Rec' button. This will go through all folders
and eventually collect all con_0001.img files that are found.
* If your files are spread in a more complicated way, you should consider
the 'Save Batch and Script' option of the batch GUI. If you leave the
'Scans' items blank in the GUI, the script skeleton will allow to fill them
using standard MATLAB commands. Note, that for the batch system file names
are always cell arrays of strings.
Hope this helps,
Volkmar
|