Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

Ghislain Bonamy
I have seen a couple Threads in regards to modifying ROI. However, I do not believe that any of them solves my problem. Resizing ROI to a smaller size than there original size is not too hard. However enlarging them, while preserving a correct delimitation (not fusing the particle) is a different story.

I believe the easiest solution would be to use a seeded watershed algorithm. Unfortunately, I cannot seem to find any plugins for that. If you have any plugins that may do this I would much appreciate.

I am also interested in a tool to fuse ROI based on there properties (circularity, perimeter in common, fluorescence in different channels, distance, size...).

On another topic, does anyone have a way to convert edges to an ROI (this would probably need a way to provide a seed and to close edges)?

Thanks in adavance.


Reply | Threaded
Open this post in threaded view
|

Re: Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

Gabriel Landini
On Wednesday 26 November 2008 02:06:58 Ghislain Bonamy wrote:
> Resizing ROI to a smaller size
> than there original size is not too hard.

Not sure it is that easy. If you reduce a linear part in a particle, it
depends how do you do it, you can end up with disconnected pieces.

> I believe the easiest solution would be to use a seeded watershed
> algorithm. Unfortunately, I cannot seem to find any plugins for that.

The IJ site has 2.

If you do not want to overlap with nearby particles, one solution is to
dilate-no-merge the particles and re-compute the rois.

Cheers

G.
Reply | Threaded
Open this post in threaded view
|

Re: Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

dscho
In reply to this post by Ghislain Bonamy
Hi,

On Tue, 25 Nov 2008, Ghislain Bonamy wrote:

> I have seen a couple Threads in regards to modifying ROI. However, I do
> not believe that any of them solves my problem. Resizing ROI to a
> smaller size than there original size is not too hard. However enlarging
> them, while preserving a correct delimitation (not fusing the particle)
> is a different story.

Why don't you turn your selection into a mask, resize that, and turn that
mask into a selection?

Ciao,
Dscho
Reply | Threaded
Open this post in threaded view
|

Re: Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

Michael Schmid
In reply to this post by Ghislain Bonamy
Hi Ghislain,

actually there is a seeded watershed in ImageJ - it is hidden in  
"Find Maxima".

So, initially following Gabriel's suggestion you can
(1) create a mask from the roi (Edit>Selection>Create Mask)
(2) duplicate it
(3) run Filters>maximum to enlarge it
(4) copy it and paste it to the mask
(5) select "Blend" in "Edit>Paste Control.
(Image Calculator > Average is an alternative to steps 5&6)

This will give you particles with the core at value 255 and the  
enlarged rim at 127.

(6) Binary>Find Maxima with "light background", any tolerance below  
127 and output type "Segmented Particles" should do it.


- Convert edges to a roi:
if the edges form closed loops, you can use Analyze Particles with  
"Include Holes" to fill the interior.

Fusing rois: I am not aware of such a tool, it looks like a task for  
a macro examining the Results table. Some simple operations might be  
done by running "Analyze Particles" with different settings  
(circularity) and combining the images created.

Michael
________________________________________________________________

On 26 Nov 2008, at 03:06, Ghislain Bonamy wrote:

> I have seen a couple Threads in regards to modifying ROI. However,  
> I do not
> believe that any of them solves my problem. Resizing ROI to a  
> smaller size
> than there original size is not too hard. However enlarging them,  
> while
> preserving a correct delimitation (not fusing the particle) is a  
> different
> story.
>
> I believe the easiest solution would be to use a seeded watershed  
> algorithm.
> Unfortunately, I cannot seem to find any plugins for that. If you  
> have any
> plugins that may do this I would much appreciate.
>
> I am also interested in a tool to fuse ROI based on there properties
> (circularity, perimeter in common, fluorescence in different channels,
> distance, size...).
>
> On another topic, does anyone have a way to convert edges to an ROI  
> (this
> would probably need a way to provide a seed and to close edges)?
>
> Thanks in adavance.
>
>
>
> --
> View this message in context: <a href="http://n2.nabble.com/Roi-Enlarge-%">http://n2.nabble.com/Roi-Enlarge-% 
> 28without-merging%29---ROI-merging---Edges-to-ROI-conversion-
> tp1579237p1579237.html
> Sent from the ImageJ mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

Ghislain Bonamy
In reply to this post by Gabriel Landini
Gabriel,

Thanks for the prompt answer. I was thinking that reducing the particle size was easy enough via a mask transform and an erosion. It is possible that particles may become separated, but there isn't in my opinion a much better way to do it (unless one can directly resize an ROI).

For the seeded watershed, I look on the pugin page and found the two plugins you are reffering to, but they do not seem to be seeded watershed algorithm. Perhaps, I am missing something.

I think your solution of redilate-no-merge is a great solution. Am I correct to believe that the plugin you are reffering to is the one you created in your morphology set?

Finally, do you have any idea if a plugin is available to fuse adjacent ROI based on there properties?
Reply | Threaded
Open this post in threaded view
|

Re: Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

Ghislain Bonamy
In reply to this post by Michael Schmid
Michael,

Great solution, did not realize that the seeded-watershed was hidden in "Find Maxima"! I followed the described strategy, but used dilate (x times) instead of step (3).

-convert edges to ROI... Works

-Fusing ROIs: Thanks, I probably need to think a bit more about that one. In brief I wanted to see if some of the startegy from definiens was implemented or could easily be implmented.

Ghislain
Reply | Threaded
Open this post in threaded view
|

Re: Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

Michael Schmid
Hi Ghislain,

one more remark:

There are a few points of difference between Binary>erode/dilate and  
Filters>minimum/maximum:

Erode (dilate) uses a square kernel areas, minimum (maximum) circular  
ones.
Often, especially for large radii (large iteration count), circular  
kernels are desireable. Dilate a small circular spot with several  
iterations to see the difference.

Minimum/maximum is a one-step operation, thus faster than erode/
dilate for large radii/large iteration count (the break-even depends  
on the image contents, it is around 3).

Erode has additional flexibility when handling edge objects (see  
"Count" in Binary Options)

Caveat:
- Minimum/maximum does not check whether you have a binary image.
- Minimum/maximum works on pixel values, irrespective or the LUT  
(inverted LUT or not) and "Black Background" setting in Binary options.

So my usual choice is erode/dilate for one or two pixels, minimum/
maximum for more.

Michael
________________________________________________________________

On 26 Nov 2008, at 20:34, Ghislain Bonamy wrote:

> Michael,
>
> Great solution, did not realize that the seeded-watershed was  
> hidden in
> "Find Maxima"! I followed the described strategy, but used dilate  
> (x times)
> instead of step (3).
>
> -convert edges to ROI... Works
>
> -Fusing ROIs: Thanks, I probably need to think a bit more about  
> that one. In
> brief I wanted to see if some of the startegy from definiens was  
> implemented
> or could easily be implmented.
>
> Ghislain
> --
> View this message in context: <a href="http://n2.nabble.com/Roi-Enlarge-%">http://n2.nabble.com/Roi-Enlarge-% 
> 28without-merging%29---ROI-merging---Edges-to-ROI-conversion-
> tp1579237p1582352.html
> Sent from the ImageJ mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

Gabriel Landini
In reply to this post by Ghislain Bonamy
On Wednesday 26 November 2008 17:51:02 Ghislain Bonamy wrote:
> Thanks for the prompt answer. I was thinking that reducing the particle
> size was easy enough via a mask transform and an erosion. It is possible
> that particles may become separated, but there isn't in my opinion a much
> better way to do it (unless one can directly resize an ROI).

Perhaps something like some iterations of thinning, would do it.

> For the seeded watershed, I look on the pugin page and found the two
> plugins you are reffering to, but they do not seem to be seeded watershed
> algorithm. Perhaps, I am missing something.

Like Michael said, you could provide a new image which has only your seeds and
apply the watershed to that.
Another possibility is to skeletonise the background (skiz, or influence
zones).

> I think your solution of redilate-no-merge is a great solution. Am I
> correct to believe that the plugin you are reffering to is the one you
> created in your morphology set?

Yes it is, but be aware that for particles that are separated by exactly 2
pixels thick space, one cannot dilate both objects. Since the algorithm
dilates all particles independently in a sequence, one will be dilated and the
other won't.

Cheers
G
Reply | Threaded
Open this post in threaded view
|

Re: Roi Enlarge (without merging) / ROI merging / Edges to ROI conversion

sazzad

Gabriel Landini wrote
On Wednesday 26 November 2008 17:51:02 Ghislain Bonamy wrote:
> Thanks for the prompt answer. I was thinking that reducing the particle
> size was easy enough via a mask transform and an erosion. It is possible
> that particles may become separated, but there isn't in my opinion a much
> better way to do it (unless one can directly resize an ROI).

Perhaps something like some iterations of thinning, would do it.

> For the seeded watershed, I look on the pugin page and found the two
> plugins you are reffering to, but they do not seem to be seeded watershed
> algorithm. Perhaps, I am missing something.

Like Michael said, you could provide a new image which has only your seeds and
apply the watershed to that.
Another possibility is to skeletonise the background (skiz, or influence
zones).

> I think your solution of redilate-no-merge is a great solution. Am I
> correct to believe that the plugin you are reffering to is the one you
> created in your morphology set?

Yes it is, but be aware that for particles that are separated by exactly 2
pixels thick space, one cannot dilate both objects. Since the algorithm
dilates all particles independently in a sequence, one will be dilated and the
other won't.

Cheers
G

I have got a question.

If there is a neucleaus in a cell do you think watershed algorithm will be able to solve the problem?

If yes then is there anything that we can do?

How can we try in that case?

cheers