Login  Register

Re: Fill holes of circles on edge

Posted by Michael Schmid on Jan 14, 2014; 4:29pm
URL: http://imagej.273.s1.nabble.com/Fill-holes-of-circles-on-edge-tp5006118p5006120.html

Hi Justin,

you can try this macro:

w=getWidth();
h=getHeight();
run("Invert");
run("Canvas Size...", "width="+(w+1)+" height="+(h+1)+" position=Top-Left");
run("Invert");
run("Fill Holes");
run("Canvas Size...", "width=&w height=&h position=Top-Left zero");
run("Invert");
run("Canvas Size...", "width="+(w+1)+" height="+(h+1)+" position=Bottom-Right");
run("Invert");
run("Fill Holes");
run("Canvas Size...", "width=&w height=&h position=Bottom-Right zero");


Michael
________________________________________________________________
On Jan 14, 2014, at 16:43, jmcginnity wrote:

> Hi,
> I wish to fill circles that intersect the edge of the image.  I've tried
> Fill Holes but this only fills holes that are completely bounded.  Is there
> a macro that enables a hole to be filled where one of its edges is the edge
> of the window?  Please see the image below which shows some doughnut shapes
> on the edges that I would like to fill.
> <http://imagej.1557.x6.nabble.com/file/n5006118/Slice1a.jpg>
>
> Thanks,
>
> Justin
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Fill-holes-of-circles-on-edge-tp5006118.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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