Login  Register

Re: Fill ROI holes does not work.

Posted by Ed Siefker on Dec 04, 2018; 10:00pm
URL: http://imagej.273.s1.nabble.com/Fill-ROI-holes-does-not-work-tp5021529p5021530.html

Oh.  I guess Fill ROI Holes is a GUI only function?   It's not enough
to run it, you have to click on the image.

How can I fill holes in an ROI from a macro?
On Tue, Dec 4, 2018 at 3:41 PM Ed Siefker <[hidden email]> wrote:

>
> How do I close holes in a selection?  Image->Selection->Fill ROI Holes
> does not work.
>
> e.g. create an image with this code:
>
> newImage("Untitled", "8-bit black", 1024, 1024, 1);
> makeOval(252, 293, 390, 376);
> setForegroundColor(255, 255, 255);
> run("Fill", "slice");
> setForegroundColor(0, 0, 0);
> makeOval(402, 430, 148, 143);
> run("Fill", "slice");
> run("Select None");
>
> Then create a selection from that image:
>
>
> run("Auto Threshold", "method=Shanbhag white");
> run("Create Selection");
> roiManager("Add");
>
> From here, Fill ROI Holes does nothing.  How do I fill this hole?
> Thanks
> -Ed

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html