Plot over an image

Hi All

I want to know how to plot a set of circles over an image using a plugin. I think this is easy using macros but I haven’t been able to find some way to do it from a plugin. I show an example image, the red circles would be the ones I want to plot on top of the image.

I appreciate any help, thanks.

Juan

Good day Juan,

did you try recording some Java code with the ImageJ-recoder?

I got this example by doing so:

    import ij.*;
    import ij.process.*;
    import ij.gui.*;
    import java.awt.*;
    import ij.plugin.*;

public class My_Plugin implements PlugIn {

    public void run(String arg) {
        
        ImagePlus imp = IJ.getImage();
        imp.setRoi(new OvalRoi(33,24,6,6));
        IJ.run(imp, "Add Selection...", "");
        IJ.run("Overlay Options...", "stroke=red width=1 fill=none apply");
    }
}

HTH

Herbie

2 Likes

Hi Herbie, I tried this and it work just fine. Never came to my mind to try such thing, thanks a lot.

bye

1 Like