AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
October 17, 2003 05:43PM
Hi Julius,

I guess you could still use file_tool to reorder all of
your images. Try something like:

---------------------------------------------------------
set infile = INPUT_FILE
set outfile = OUTPUT_FILE
set num_tr = 100 # or whatever

# for 11 64x64 images of shorts
@ half_vol = 64 * 64 * 2 * 11

set offset0 = $half_vol
set offset1 = 0

echo -n "" > $outfile # create an empty file
set count = 0
while ( $count < $num_tr )
file_tool -quiet -offset $offset0 -length $half_vol -infiles $infile >> $outfile
file_tool -quiet -offset $offset1 -length $half_vol -infiles $infile >> $outfile

@ offset0 += $half_vol * 2
@ offset1 += $half_vol * 2

@ count++
end
---------------------------------------------------------

So basically for each volume, get the second half, then
the first half, then increment your offsets by an entire
volume size. Send all output back to a single file.

Hopefully that will work for you.

- rick

Subject Author Posted

re-ordering images in time

Julius October 16, 2003 12:02PM

Re: re-ordering images in time

rick reynolds October 16, 2003 06:54PM

Re: re-ordering images in time

Julius October 16, 2003 10:10PM

Re: re-ordering images in time

rick reynolds October 17, 2003 05:43PM