Hi Andrew,
sorry, quite a late response; maybe you have found it in the
meanwhile anyhow.
ImageStack.getProcessor creates a new ImageProcessor each time; any
information written to the previous ImageProcessor gets lost with it.
So you need:
ImageProcessor ip = iplus2.getStack().getProcessor
(image.getCurrentSlice());
ant then ip.setFont, ip.setColor, ip.drawString.
Michael
________________________________________________________________
On 29 Jun 2011, at 13:34, Andrew French wrote:
> Hi everybody
>
> Anyone have any ideas why the following doesn't draw any text?
>
> Font f = new Font("Helvetica", Font.PLAIN, 72);
> iplus2.getStack().getProcessor(image.getCurrentSlice
> ()).setFont(f);
> iplus2.getStack().getProcessor(image.getCurrentSlice
> ()).setColor(java.awt.Color.cyan);
> iplus2.getStack().getProcessor(image.getCurrentSlice
> ()).drawString( "x", x+40, y);
>
> iplus2.updateAndDraw();
>
> Switching the drawString() command for a putPixel(x, y, pixel)
> command works fine...
>
> This is on a RGB image stack.
>
> Many thanks
> Andrew