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  

|
January 19, 2016 09:40AM
Assuming the mask dataset has each ROI marked with a different integer, you could do something like (using csh syntax)

3dhistog -omit 0 -unq U.1D maskdataset+tlrc > /dev/null
foreach uuu ( `1dcat U.1D` )
3dcalc -a maskdataset+tlrc -expr "equals(a,$uuu)" -prefix maskdataset.$uuu
end
\rm -f U.1D

For an ROI labeled with "3" (e.g.), you would get a dataset named maskdataset.3+tlrc whose values are 1 at each voxel where the input was 3, and whose values are 0 at all other voxels. If you with to preserve the input value, change the expression to "a*equals(a,$uuu)".

To become a Jedi AFNI Master, important it is to learn shell scripting.
Subject Author Posted

Extract ROI from Mask

3dFoodie January 18, 2016 06:01PM

Re: Extract ROI from Mask

Emperor Zhark January 19, 2016 09:40AM

Re: Extract ROI from Mask

Emperor Zhark January 19, 2016 11:26AM

Re: Extract ROI from Mask

3dFoodie January 19, 2016 12:35PM