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 22, 2014 03:46PM
Hi -

I'd like to compute RMS for an ROI. I can cobble this together like so:

# Square the values in the ROI
3dcalc -a ds.nii -b mask.nii -expr 'b*(a*a)' -prefix squared_ds.nii

# Get the mean of the squared values in the ROI
mean_of_squares=`3dROIstats -mask mask.nii squared_ds.nii`

# Get the sqrt of the mean of squares.
rms=`echo "sqrt(${mean_of_squares})" | bc -l`

# Remove temp file.
\rm squared_ds.nii

Is there a built-in way that I'm missing? If not, this might be a nice thing to have in 3dROIstats.
Subject Author Posted

Computing RMS for an ROI?

shanusmagnus October 22, 2014 03:46PM