NOTICE! This is a static HTML version of a legacy ImageJ Trac ticket.

The ImageJ project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Ticket #1582 (closed defect: fixed)

Opened 2012-11-30T11:38:41-06:00

Last modified 2012-12-03T10:56:12-06:00

Legacy TextRoi translation is broken

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: imagej2-b6-legacy
Component: Legacy Compatibility Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1583, #1584


The legacy layer does some translation between TextRoi and TextOverlay. However if there are more than one overlay in IJ2 it goes to IJ1 as an ORed ShapeRoi. The construction of the ShapeRoi accepts TextRois as inputs but I believe it IJ1 treats them as rectangle rois.

Ideally I think that the active Overlay should go to IJ1 as a Roi. The rest should go into a IJ1 as a set of Rois in the ij.gui.Overlay of the ImagePlus.

Change History

comment:1 Changed 2012-11-30T11:39:48-06:00 by bdezonia

  • Blocking 1365 added
  • Milestone changed from imagej-2.0.0-beta7 to imagej-2.0.0-beta8

comment:2 Changed 2012-11-30T16:48:23-06:00 by bdezonia

  • Milestone changed from imagej-2.0.0-beta8 to imagej-2.0.0-beta6

comment:3 Changed 2012-11-30T16:49:33-06:00 by bdezonia

  • Blocking 1583 added

comment:4 Changed 2012-11-30T16:56:06-06:00 by bdezonia

Fixed with commit 4ca257882f827bf1f88e6e0c81c41f92e79f9182

The new scheme is cleaner and more correct but note that there are some limitations with this approach. Any plugin that assigns the Overlay of the ImagePlus will blow away the definition of IJ2 overlays that are being stashed there.

One such example is Image > Stack > Label. If the Use Overlay checkbox is set it is possible to lose all overlay definitions except the active overlay. To recreate problem open boats, draw two rects, delete one (leaving no overlay active), and run the stack label plugin. Check Use Overlay. Notice that the original rectangle disappears (since it was in the Overlay for translation and the StackLabler plugin blew it away). Overlay Manager shows one overlay which is invisible because it is a TextOverlay of the label and currently there is no code for drawing TextOverlays.

comment:5 Changed 2012-11-30T16:57:47-06:00 by bdezonia

  • Status changed from new to closed
  • Resolution set to fixed

comment:6 Changed 2012-11-30T16:58:06-06:00 by bdezonia

  • Blocking 1365 removed

comment:7 Changed 2012-12-03T10:56:12-06:00 by bdezonia

  • Blocking 1584 added