Assisted by Peggy's superb hands-on handout from Bootcamp 2005, I have successfully vol-reg'd the 8 EPI's from a pilot fMRI session to the 105th volume of the 8th EPI. Nevertheless, I had to do so by volreg-ing each EPI in turn, for my efforts to use a loop at the command line kept meeting with the following error message: "run: Undefined variable."
Here is the exact command that I tried to implement:
foreach run (1 2 3 4 5 6 7 8) 3dvolreg -base JIepi8+orig'[105]' -tshif t 0 -prefix JIepi{$run}_vr JIepi{$run}+orig'[2..134]' end
The EPI files listed in the directory in which I was working have the following names:
JIepi1+orig.BRIK JIepi3+orig.BRIK JIepi5+orig.BRIK JIepi7+orig.BRIK
JIepi1+orig.HEAD JIepi3+orig.HEAD JIepi5+orig.HEAD JIepi7+orig.HEAD
JIepi2+orig.BRIK JIepi4+orig.BRIK JIepi6+orig.BRIK JIepi8+orig.BRIK
JIepi2+orig.HEAD JIepi4+orig.HEAD JIepi6+orig.HEAD JIepi8+orig.HEAD
Ideas, anyone? Thanks! -Whitney