Login  Register

Re: Text justification in text ROIs

Posted by Jan Eglinger-3 on Jun 07, 2011; 1:51pm
URL: http://imagej.273.s1.nabble.com/Text-justification-in-text-ROIs-tp3684315p3684318.html

Hi again,

On 07.06.2011 10:40 AM, Johannes Weissmann wrote:
> On 07.06.2011 10:34, Jan Eglinger wrote:
>> is it possible to have Text ROIs centered or right-justified?
>>
>
>   ip.setJustification(ImageProcessor.LEFT_JUSTIFY);
>
> This sets the justification for all TextROIs that are drawn afterwards.

I tried to set the justification to centered using:

  ip.setJustification(ImageProcessor.CENTER_JUSTIFY);

but the resulting behaviour is even worse:

When I make a new TextRoi using the Text tool, the typed text is still
displayed left-justified, but when I press Cmd-D to draw it into the
image, the text gets drawn centered on the upper left corner of the
TextRoi, which is understandable regarding the command I used, but
unintuitive with regard to the TextRoi that was overlayed at the wrong
position.

In addition, I observed that when you hold down the mouse button while
selecting a TextRoi with the Text tool, and then you mouse the mouse
vertically upwards, the example text get drawn repeatedly onto the image
without being erased as long as the width of the selection is 0, which
results in a smear of text on the image (that disappears after the next
display update, e.g. if you scroll through a stack).

Anyone else seeing this behaviour?

(I'm using Fiji with ij.jar 1.45i on MacOS 10.5 and 10.6)

Cheers,
Jan