This solves the problem.<br><br>Posted final version of .swift script to <br><a href="http://www.ci.uchicago.edu/~uhasson/AFNIsnrV3.swift">http://www.ci.uchicago.edu/~uhasson/AFNIsnrV3.swift</a><br><br>Many thanks,<br>Uri<br>
<br><div class="gmail_quote">On Sun, May 4, 2008 at 6:53 PM, Ben Clifford <<a href="mailto:benc@hawaga.org.uk">benc@hawaga.org.uk</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
ok try this:<br>
<br>
put this in afnimapper and chmod a+x it:<br>
<br>
#!/bin/bash<br>
<br>
# S05.runbyrun.reg_TS_run-2+orig.HEAD<br>
<br>
ls S*.runbyrun.reg_TS_run-*orig* | sed<br>
's/^\(S05.runbyrun.reg_TS_run-\([0-9]*\)+orig.\(.*\)\)$/[\2].\3 \1/'<br>
<br>
then map srun like this:<br>
<br>
AFNI_obj srun[] <ext;exec="afnimapper">;<br>
<br>
You can say something like this:<br>
<br>
trace(@filename(srun[3].BRIK));<br>
<br>
which will give you this trace:<br>
SwiftScript trace: S05.runbyrun.reg_TS_run-3+orig.BRIK<br>
<font color="#888888"><br>
--<br>
<br>
</font></blockquote></div><br>