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 05, 2022 04:35PM
Paul's solutions looks pretty good to me, but for 5000 ROIs, it might be a little slow, but that might not be too bad. We have something a little like this inside our Draw Dataset plugin - line propagation and then ROI filling, but it's not exposed in a separate function. For reference, I think the line propagation is done in AFNI_3d_linefill() in afni_receive.c and DRAW_2dfiller in plug_drawdset.c. The filling is done in 2D in the slice orientation in which it was drawn. Unless the ROI is blobby, filling in all 3 directions, as noted in Paul's script, may not be what you want, so you may want to tweak that as an option for a particular direction.

In any case,ImageJ and its branch, Fiji, have plugins themselves for doing this kind of job. I'm not sure this will be better than the AFNI way, but you might consider that in the future.

[forum.image.sc]
[imagej.net]

Also, just FYI, there are the poly2mask and regionfill functions in Matlab for doing similar processing in 2D.
[www.mathworks.com]
Subject Author Posted

Filling a closed curve ROI from coordinates of the vertices Attachments

gbarisano November 21, 2022 11:15PM

Re: Filling a closed curve ROI from coordinates of the vertices

ptaylor November 22, 2022 06:21AM

Re: Filling a closed curve ROI from coordinates of the vertices

gbarisano November 23, 2022 11:13PM

Re: Filling a closed curve ROI from coordinates of the vertices Attachments

ptaylor November 26, 2022 07:14PM

Re: Filling a closed curve ROI from coordinates of the vertices

ptaylor November 26, 2022 07:16PM

Re: Filling a closed curve ROI from coordinates of the vertices Attachments

gbarisano November 28, 2022 02:42PM

Re: Filling a closed curve ROI from coordinates of the vertices

ptaylor November 28, 2022 03:08PM

Re: Filling a closed curve ROI from coordinates of the vertices

gbarisano November 29, 2022 02:44PM

Re: Filling a closed curve ROI from coordinates of the vertices

ptaylor November 29, 2022 07:29PM

Re: Filling a closed curve ROI from coordinates of the vertices

Daniel Glen December 05, 2022 04:35PM