Ticket #1582 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

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

Description

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 7 years ago by bdezonia

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

comment:2 Changed 7 years ago by bdezonia

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

comment:3 Changed 7 years ago by bdezonia

  • Blocking 1583 added

comment:4 Changed 7 years ago 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 7 years ago by bdezonia

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

comment:6 Changed 7 years ago by bdezonia

  • Blocking 1365 removed

comment:7 Changed 7 years ago by bdezonia

  • Blocking 1584 added
Note: See TracTickets for help on using tickets.