Login  Register

Overlays (from plugin) example?

Posted by Kenneth Sloan on Jul 01, 2010; 4:04pm
URL: http://imagej.273.s1.nabble.com/Overlays-from-plugin-example-tp3687749.html

I'm writing a plugin, in java (i.e., NOT a macro), and feel the need to
display results (for now, several sets of points - later, perhaps several
polylines) as an overlay.  I prefer not to munge the underlying image.

Google tells me that someone implemented "ImageCanvasWithOverlay" about a year ago.

But, I also see references to "Overlay" in the ImageJ documentation, and a flurry of
changes (as recent as 1 June) that seem to be related to overlays.  From what I can
gather, this overlay feature is closely coupled with ROI's.  It's not entirely clear to me
that my point sets are "ROIs" - perhaps I'm confused about that?

I checked the Examples, and found a *macro* that uses the ROI manager to create an overlay.
What I need is an example that does this from a (java) plugin.  

My target code for this would look something like:

        createOverlay();
        for(int i = 0; i < numPointSets; i++)
         {
           setColor(color[i]);
           for(int p = 0; p < numPoints[i]; p++)
             plotPoint(points[i][p];
         }
        showOverlay();

Bottom line: I want to display several collections of POINTS (perhaps later POLYLINES) as
an overlay.

Perhaps I need a good "plugin developers' reference manual"?  Feel free to point me at one...please!  
My profound apologies if such a thing exists in plain sight and I've simply missed it.

--
Kenneth Sloan
[hidden email]