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  

|
bob cox
November 03, 2005 04:52PM
Suppose you want to erode the edges; that is, voxels that are in the mask but whose neighbors are not all in the mask. This could be done with

3dcalc -a mask+orig \
-b a+i -c a-i -d a+j -e a-j -f a+k -g a-k \
-expr 'step(a)*mofn(6,b,c,d,e,f,g)' -prefix maskminus -nscale

Here, the mofn(6,b,c,d,e,f,g) function is 1 if all 6 arguments after the '6' are nonzero, and is 0 otherwise. So if 'a' is 1 but any of its neighbors are 0, then that voxel is eroded. If you want to allow 'a' to survive if (say) 5 of its neighbors are in, then change the '6' to a '5'.

As always, the easiest way to try out new types of 3dcalc expressions is via using the ccalc program.

Subject Author Posted

Constricting a mask dataset

Brian November 03, 2005 04:18PM

Re: Constricting a mask dataset

bob cox November 03, 2005 04:52PM

Re: Constricting a mask dataset

Daniel Glen November 03, 2005 04:58PM

Re: Constricting a mask dataset

Brian November 03, 2005 05:14PM