Login  Register

Re: Fixing Broken Lines

Posted by Straub, Volko A. (Dr.) on Aug 25, 2016; 4:54am
URL: http://imagej.273.s1.nabble.com/Fixing-Broken-Lines-tp5017109p5017111.html

On 24/08/2016 22:32, EKPacey wrote:

> Hi everyone,
>
> I'm new to ImageJ and would really appreciate any help.
>
> So what I'm trying to do is fill in a cell using the flood fill tool. I can
> fill in the left central cell because there are no breaks in its perimeter.
> The right central cell on the other hand has broken lines and when I try to
> fill it in with the flood tool the intercellular space above it get filled
> in as well.
>
> I can use the pencil or paintbrush tool to fix the line which will then let
> me fill in just the cell, but its not very standardized.
>
> Are there any macros or plugins that will automate fixing lines like these
> so that its standardized?
You can try a 'binary close' operation on your images. The results will
depend on the size of your gaps and it will probably a bit
trial-and-error, but for the sample image you posted, 15 iterations with
the count set '2' did a pretty good job (as long as you are only
interested in obtaining continuous boundaries for the oval/round looking
shapes. Here is the macro command to run the 'binary close' with the
mentioned parameters:
run("Options...", "iterations=15 count=2 black pad do=Close");
You can access the function by going to 'Process ->  Binary -> Options'.
Hope this helps,
Volko

>
> Thank you
>
>
> <http://imagej.1557.x6.nabble.com/file/n5017109/broken_cell.png>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Fixing-Broken-Lines-tp5017109.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