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  

|
December 02, 2020 04:29PM
Hi, Mikey-

Yes, please don't use 3dcalc for this... yikes!

If you are asking about taking one input 4D dataset called DSET_4D and calculate the sum across the 4th dimension (=time), then you can use:
3dTstat -sum -prefix dset_sum.nii.gz DSET_4D
For future reference, this program has lots of options for calculating voxelwise quantities across time.

Then you can use 3dcalc to divide the result by whatever you want, such as with this unlikely candidate:
3dcalc -a dset_sum.nii.gz -expr 'a/3.14159' -prefix dset_sum_div_pi.nii.gz

And indeed, if your question was to perform voxelwise addition over a set of 3D datasets, you could use the following:
3dmean -sum -prefix all_sum.nii.gz  DSET1 DSET2 DSET3 ....

--pt
Subject Author Posted

Adding sub-briks together without dividing

MikeyMalina December 02, 2020 03:16PM

Re: Adding sub-briks together without dividing

ptaylor December 02, 2020 04:29PM

Re: Adding sub-briks together without dividing

MikeyMalina December 04, 2020 04:52PM

Re: Adding sub-briks together without dividing

ptaylor December 04, 2020 05:30PM