<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I am trying to write a complicated GUI. The final GUI should have a
minimap and it should also be able to zoom and pan images. The
minimap has a rectangle that corresponds to the viewport.<br>
<br>
There are two challenges associated with this problem that make it
difficult compared to standard vtk examples: <br>
1) If the zoom value is beyond a threshold, I have to load a higher
reolution image from the hard drive and update the displayed
vtkImage and the minimap accordingly; and 2) Higher resolution
images are also larger than the available memory (~10 GB), so I
cannot load the entire image at once. I should only load part of the
image that is to be displayed on the viewport.<br>
<br>
I am using the mouse wheel event and mouse move events for zooming
and panning. I am updating the minimap using the window render
event.<br>
<br>
The issue is that the minimap, zoom and pan callbacks (classes
inherited from vtkCommand), share states. For example, if the zoom
changes using the mouse wheel, the size of the rectangle in the
minimap callback should change too. As a result, keeping track of
shared information between callbacks is too complicated.<br>
<br>
What I think I should do is to have user events change the state of
the GUI (e.g. the zoom value) and have callbacks that execute when
the state changes. Unfortunately, I am not sure how to do this
properly in VTK.<br>
<br>
<b><u>So my question is this: Is there a way to fire an event when a
value (e.g. a double variable) is changed in VTK? And how do you
catch this event?</u></b><br>
<br>
Thank you,<br>
<br>
Siavash<br>
</body>
</html>