Page MenuHomePhabricator

No callback possible for changed zoom or panning
Closed, ResolvedPublic

Description

It is currently not possible to register a callback on any class in the rendering-pipeline to get informed when the rendered scene has been modified by zoom or panning.

This used to be possible registering a callback to the itk::MidifiedEvent on the mitk::DisplayGeometry. Since this class has been removed, there is no way to achieve the same effect.

As this is crucial for me, I would like to either mark the CameraController as Modified or emit another itk based event in the method mitk::CameraController::AdjustCameraToPlane(). According to Christoph Kolb, this would be the correct position to add this event.

Event Timeline

User engelm has pushed new remote branch:

bug-19377-add-callback-on-CameraController

User engelm has pushed new remote branch:

bug-19377-add-callback-on-CameraController-rebased

I extended the CameraController with a 'Modified()' in the method AdjustCameraToPlane() in order to get a callback when the zoom-level or displayed position has changed.

Furthermore I saw, that the method Dispatcher::ProcessEvent() uses the static instance of the RenderingManager instead of the instance that is actually used to manage the renderer at hand.
I fixed this as it's an easy fix that does not interfere with the default behaviour as all BaseRenderers are managed by the static instance of the RenderingManager by default.

As a bonus, I improved the const-correctness in some classes in the core and fixed a couple of typos in the documentation.

[42373a]: Merge branch 'bug-19377-add-callback-on-CameraController-rebased'

Merged commits:

2015-10-20 16:28:30 Markus Engel [109b13]
moved itk::Modified to methods where it's not triggered on each rendering


2015-10-20 16:27:47 Markus Engel [7fff5b]
Merge branch 'bug-19378-set-absolute-zoomlevel' into bug-19377-add-callback-on-CameraController-rebased


2015-10-16 13:17:41 Markus Engel [d8cef8]
more improvements to the const-correctness in the core


2015-10-16 11:51:27 Markus Engel [e80f23]
some improvements to const correctness in core


2015-10-16 11:50:54 Markus Engel [4399ba]
using renderer specific RenderingManager instead of global instance

This does not interfere with the workbench as a BaseRenderer uses the
global instance unless
otherwise specified on construction.


2015-10-16 11:49:11 Markus Engel [7f4583]
fixed typos in docu of CameraController


2015-10-16 11:48:56 Markus Engel [7172de]
added Modified in CameraController::AdjustCameraToPlane()

[9acc32]: COMP: Merge branch 'bug-19377-add-callback-on-CameraController-rebased

Merged commits:

2015-10-20 16:59:25 Markus Engel [21a8bc]
gcc cannot handle const-iterators in erase