Login  Register

Filling holes in an Roi within a plug-in

Posted by Rats on Mar 19, 2015; 1:46pm
URL: http://imagej.273.s1.nabble.com/Filling-holes-in-an-Roi-within-a-plug-in-tp5012058.html

Hi All!

If you try to get the polygon for an roi that's full of holes, you're returned its bounding box. This is perfectly reasonable, but I'm after the outermost outline. Would there be any straightforward way to fill these holes prior to requesting the polygon within a plug-in? The only way I can see involves creating an ImagePlus from ImageProcessor returned by roi.getMask(), then using IJ.run(imp, "Fill Holes"), but it seems an overly complicated way of doing things.

Thanks in advance,

Luke.