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 #933 (closed defect: duplicate)

Opened 2012-02-03T18:14:40-06:00

Last modified 2012-07-05T16:00:57-05:00

Adding overlays can zoom inappropriately

Reported by: bdezonia Owned by: curtis
Priority: major Milestone: imagej2-b3-headless
Component: UI Framework Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking: #1185


Open an image and zoom in a ways. Draw an overlay (like a line or a point). The display resizes quite large and the image is zoomed out.

Note that debugging I can see that AbstractDisplay thinks it's structure has changed (maybe the addition of an overlay is a structure change). This calls rebuild() which eventually calls sizeAppropriately() in the jhotdrawImageCanvas.

Either fix the sizing code or avoid the rebuild() depending upon what is the best approach.

Change History

comment:1 Changed 2012-02-06T09:36:56-06:00 by bdezonia

Note that it rebuilds the current window with dimensions = orig dims scaled by curr zoom factor. (This can get quite large for high zooms). And it draws the original image at 1:1 scale in the upper left corner of this window. Unless of course the scale * orig image dims is greater than desktop bound in which case the original image is even smaller in the corner.

Last edited 2012-02-06T09:40:43-06:00 by bdezonia

comment:2 Changed 2012-02-06T09:41:24-06:00 by bdezonia

Curtis, can you look at this one? Please assign back if you don't have time.

comment:3 Changed 2012-02-06T09:41:33-06:00 by bdezonia

  • Owner changed from bdezonia to curtis
  • Status changed from new to assigned

comment:4 Changed 2012-02-07T15:55:58-06:00 by bdezonia

Note after 8fedffcf4bfa0796aadec45140c7aad4ab47abaa that the window is no longer giant. But the image zooms from where it was to a small scale. The current zoom level should not be affected by drawing an overlay contained in the current window.

comment:5 Changed 2012-02-27T11:00:59-06:00 by curtis

  • Milestone changed from imagej-2.0-beta1 to imagej-2.0-beta2

comment:6 Changed 2012-05-17T13:52:43-05:00 by curtis

  • Blocking 1185 added

comment:7 Changed 2012-05-18T16:38:45-05:00 by curtis

See also #1189.

comment:8 Changed 2012-07-05T16:00:57-05:00 by curtis

  • Status changed from assigned to closed
  • Resolution set to duplicate

Duplicate of #1189.