Page MenuHomePhabricator

GetExtent in Geometries is broken, causing wrong constrained zooming/panning
Closed, WontfixPublic

Description

Example: load Pic3D -> Constrain zooming and panning (preferences->editor->stdMW) ->Coupled crosshair rotation -> rotate 90 degree in coronal -> you can move the image outside the display and zoom out, even if zooming is constrained.

Probably, this is related to wrong calculation of GetExtend, the height is now calculated by the image width (90 deg rotation), but the spacing of the height is taken...

Event Timeline

After Display Geometry Interaction Project (T18735), moving the image outside the bounds is not possible any more, but zooming is still broken.

I close this bug, as the zooming for strange rotated geometries is very hard to be constrained. The main problems are fixed during T18735 (parts of the image could not be seen or the whole image vanished outside the bounds). Therefore, this bug is not a major issue any more.

How this bug could be fixed in general:

  • Find the corners of the rotated image parts, which can be seen on this plane (and that's the main problem, it's hard to be found!)
  • calculate the diagonal vectors (only works for rectangle images)
  • project tha diagonal vectors to the axis of currentWorldPlaneGeometry (scalar product) = height or width
  • Set width in CameraController::ComputeMaxParallelScale
  • take care for the changed spacing of rotated geometries
kislinsk added a project: Bulk Edit.
kislinsk removed a project: Bulk Edit.