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? Thank you |
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? 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 |
In reply to this post by EKPacey
Hi,
you can try the following macro: run("Options...", "iterations=1 count=1 pad do=Nothing"); run("Distance Map"); run("Find Maxima...", "noise=10 output=[Segmented Particles] light"); The 'noise=10' value may need adjusting. It assumes that - all cells are larger than 10 pixels radius - all inter-cell spaces are larger than 10 pixels radius in at least one point (more specifically, a circle with at more than 10 pixels radius can be inscribed at least at one point) - the width of a given intercell space does not vary by more than2*10=20 pixels. Michael ________________________________________________________________ On 2016-08-24 23: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? > > 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 |
In reply to this post by EKPacey
For everybody interested in this:
This question was cross-posted on the ImageJ forum and received some answers there as well. http://forum.imagej.net/t/fixing-broken-lines/2567?u=imagejan Cheers, Jan On 24.08.16 23: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? > > 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 |
Free forum by Nabble | Edit this page |