http://imagej.273.s1.nabble.com/Adding-text-Destructively-to-the-image-tp5015530p5015531.html
Dr. Graeme Ball
> Hello
>
> I'm writing a plugin to add text permanently to an image. It forms part of
> a
> loop which moves through an image stack adding numbers (as text) where
> required. I'm using the code below to add the text
>
> String TheText = Integer.toString(count);
> Font font = new Font("SansSerif", Font.PLAIN, 9);
> TextRoi roi = new TextRoi(Xval, Yval, TheText, font);
> roi.setStrokeColor(Color.white);
> Overlay overlay = new Overlay();
> overlay.add(roi);
> Dupimp.setOverlay(overlay);
>
> This adds the text as an overlay which can't then be made part of the
> image.
> The Draw command will do this but the text would have to be a selection
> which I can't work out how to do. Any suggestions as to how I can make the
> text permanent would be appreciated.
>
> Regards
>
> David
>
>
>
> --
> View this message in context:
>
http://imagej.1557.x6.nabble.com/Adding-text-Destructively-to-the-image-tp5015530.html> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>