ImageCanvasWithOverlay Update

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

ImageCanvasWithOverlay Update

Peter Sebastian Masny
Hi all,

ImageCanvasWithOverlay now has a few Roi specific methods. The added code:

    public void overlayDrawRoi(Color c) {
        overlayDrawRoi(imp.getRoi(), c);
    }

    public void overlayFillRoi(Color c) {
        overlayFillRoi(imp.getRoi(), c);
    }

    public void overlayDrawRoi(Roi roi, Color c) {
        if (roi == null) return;
        Polygon polygon = roi.getPolygon();
        getColoredGraphics(c).drawPolygon(polygon);
    }

    public void overlayFillRoi(Roi roi, Color c) {
        if (roi == null) return;
        Polygon polygon = roi.getPolygon();
        getColoredGraphics(c).fillPolygon(polygon);
    }

See the website for downloads, and a full description of the plugin.

Peter