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 #419 (closed defect: fixed)

Opened 2011-03-31T17:12:23-05:00

Last modified 2011-05-06T11:53:45-05:00

The XY flipping plugins do not seem to work

Reported by: bdezonia Owned by: bdezonia
Priority: major Milestone: biweekly-2011: Apr-25 to May-06
Component: Core Version:
Severity: serious Keywords:
Cc: Blocked By:
Blocking:

Description

The XY manipulating plugins (crop, duplicate, flip horz, flip vert, rot 90 left, rot 90 right) are not working. They were before the updates were made to support modification of images in place. Investigate and fix.

Change History

comment:1 Changed 2011-03-31T17:39:04-05:00 by bdezonia

fixed pixel setting in flip v, flip h, rot 90 L, rot 90 R.

noticed that for square images the rotates work great. for nonsquare images the onscreen representation is totally messed up. it looks like the window shape is staying the same and yet the buffered image is maybe not and its getting misinterpreted. note that rotate left followed by rotate right cleans up so the pixel munging code is working.

so
1) fix duplicate
2) can't fix crop until Rois are in place
3) fix display of rotated images

comment:2 Changed 2011-04-01T09:34:37-05:00 by bdezonia

  • Status changed from new to accepted

Duplicate fixed

comment:3 Changed 2011-04-01T12:56:33-05:00 by bdezonia

implemented partial fix for changing window dimensions when rotating a nonsquare image. it works except the window doesn't resize correctly until you change the size of the image window. you only have to do this once and then you can rotate any number of times and the window size fixes up correctly from then on.

cannot duplicate the failure to resize problem within the debugger. the debugger must be changing the sequence of display update events such that the bug doesn't happen.

comment:4 Changed 2011-04-01T15:35:27-05:00 by curtis

  • Milestone changed from imagej-2.0-alpha1 to imagej-2.0-alpha2

comment:5 Changed 2011-04-04T12:57:23-05:00 by bdezonia

put in a small fix to handle rotation of an image that has been panned.

should consider what is the best behavior for rotating by 90 degrees a panned and zoomed image. right now it resets pan and likely leaves zoom unchanged.

I think we'd like to keep zoom the same, display new image at that zoom so that all the same pixels are on the screen, and recalculate the origin needed to make that happen. There might be some trickiness in that image may be w1 x h1 and user may have resized window as w2 x h2. also for rectangular images the new extents may go off the screen.

comment:6 Changed 2011-04-04T13:16:50-05:00 by bdezonia

As well as resetting pan to (0,0) now resize zoom to 1.0 when SwingImageDisplay::update() detects that the dimensions of the displayed Dataset have changed.

BTW sometimes I can duplicate and sometimes I cannot duplicate the problem where window is not resized correctly when rotating an image by 90 degrees. again, when it does happen, one commonality is that the window has never been changed dimensionally. once changed dimensionally (via dragging) the problem goes away.

comment:7 Changed 2011-05-04T11:06:08-05:00 by bdezonia

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

Curtis changed the UI so that the resize on rotate logic is different. I am going to close this ticket and open a couple separate ones with remaining issues mentioned here.

comment:8 Changed 2011-05-06T11:53:45-05:00 by bdezonia

  • Milestone changed from imagej-2.0-alpha3 to biweekly-2011: Apr-25 to May-06