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  

|
Tom Ross
February 04, 2004 10:40AM
I can think of two ways to do it, neither obvious.
1.
a) use 3dZcutup 185 times to create single slice data
b) use 3dMean to average in groups of 5
c) put back together with 3dZcat
d) use 3drefit to correct the slice width and anything else buggered up in the head file
2.
a) use 3dcalc with differential subscripts to create a dataset where each slice=sum of itself and 4 neighbors. Note that you will still have 185 slices, just spatially summed
b) extract every 5th slice using 3dZcutup
c) and d) as in #1

Here's a little csh script action for #2 that may actually work:
3dcalc -a tom+orig -b a[0,0,-1,0] -c a[0,0,-2,o] -d a[0,0,1,0] -e a[0,0,2,0] -dsZERO -expr "a+b+c+d+e" -prefix avg5
foreach a (`count -d 3 2 185 5`)
3dZcutup -keep $a $a -prefix slice$a
end
3dZcat -prefix newtom slice*HEAD
rm -f slice* avg5+orig*

Tom

Subject Author Posted

Summing slices

David Manners February 04, 2004 05:27AM

Re: Summing slices

Ziad Saad February 04, 2004 09:46AM

Re: Summing slices

Tom Ross February 04, 2004 10:40AM

Re: Summing slices

sally durgerian February 04, 2004 11:09AM

Re: Summing slices

David Manners February 05, 2004 11:56AM