Login  Register

Re: Flattening Multiple Overlays

Posted by Rasband, Wayne (NIH/NIMH) [E] on Aug 09, 2011; 2:48am
URL: http://imagej.273.s1.nabble.com/IJ-setAutoThreshold-tp3683573p3683576.html

On Aug 8, 2011, at 5:07 PM, Watson, David (NIH/NIEHS) [F] wrote:

> Hello All,
>
> I have an image stack with Overlays that correspond to individual slices.  Each Overlay contains some text ROIs.  I would like for my plug-in to flatten each individual Overlay onto its corresponding slice ONLY (not the whole stack!) and then save the image stack.  I like the result of the Overlay -> Flatten command, however I don't think that outputting each individual flattened image and then merging them all into a stack is a clean solution.  So, I was wondering if someone could give me some code to draw an Overlay onto a single slice in a stack.

The ImageProcessor.drawOverlay(Overlay) method will draw an overlay on a single slice of an 8-bit or RGB stack. This method is available in ImageJ 1.45i or later.

-wayne