Overlay of multiple colors in ImageJ

Posted by nico on Stack Overflow See other posts from Stack Overflow or by nico
Published on 2010-06-02T06:34:21Z Indexed on 2010/06/07 17:22 UTC
Read the original article Hit count: 414

Filed under:
|
|

Hi everyone,

I'm writing a little plugin for imageJ and I am drawing several regions as an overlay on the image.

I'm using this code:

ImagePlus imp = getImage();
Overlay ov = new Overlay();
for (int r=0; r<regions.length; r++)
    {
    ov.add(regions[r]);
    }
imp.setOverlay(ov);

Where regions is an array of Roi.

This works as intended and draws the regions in the (hurting to my eyes) standard ImageJ cyan used for overlays. I would like to draw one particular region in another colour, but I cannot seem to find a way to do it. I found that you can change the colour of the whole overlay, but I need two colours in the same overlay.

Any ideas?

Thanks in advance

nico

© Stack Overflow or respective owner

Related posts about java

Related posts about image-processing