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 27, 2005 08:59AM
The only way I can think of is kind of clunky. Using your example:

3dmaskave -mask '3dcalc( -a ROI+orig -expr 5-argnum(a-2,a-5,a-6,a-9,a-10) )' ...

This will use 3dcalc to compute a mask on-the-fly, read it in, delete it from disk, and then proceed. The function argnum(x,y,...) returns the number of nonzero arguments. In this example, if the value 'a' is in one of the 5 chosen ROIs, then one of the values 'a-2', 'a-5', ..., will be zero, so argnum() will be 4; otherwise it will be 5. So subtracting the argnum() result from 5 will result in the expression being 1 inside the combined mask, and 0 outside.

Note that you can't put any spaces in the expression following "-expr" in the '3calc(...)' dataset specification.

Advancing to the level of using on-the-fly '3calc(...)' datasets is one of the tests to become an AFNI Certified Expert (ACE) -- sort of a Jedi Knight in the AFNI Republic.

Subject Author Posted

3dmaskave question/request

Adam Greenberg October 26, 2005 05:47PM

Re: 3dmaskave question/request

Robert Cox October 27, 2005 08:59AM

Re: 3dmaskave question/request

Adam Greenberg October 27, 2005 10:06AM