[vtk-developers] vtkRect2DWidget & window resize

John Platt jcplatt at lineone.net
Mon Apr 18 04:43:18 EDT 2005


Hi,

 

Attached is a 2D widget for interactively changing a rectangular
selection in a viewport. I am currently using it with
vtkSelectVisiblePoints to specify a region for labelling. I would like
to submit this code but have a problem handling resize of the render
window.

 

The classes follow the same model as vtkScalarBarActor &
vtkScalarBarWidget. Changes in the rectangle actor due to mouse
interaction events are caught by the widget but I can't find an event to
observe for resizing the window. The present solution is for
vtkRect2DActor::SizeRect2D() to send a Modified event to the widget
which then invokes a Modified event for observers of the widget. The
problem is that any interaction with the widget now fires 2 events, an
Interaction event and a Modified event. I would be grateful for
suggestions on alternative solutions.

 

There is also a minor problem with the cursor shape changing as it
passes over the rectangle when interacting with the camera (this is also
a feature of vtkScalarBarWidget).

 

I have also noticed that the bottom right pixel of the rectangle frame
is always missing. I am hoping this is a problem with my graphics card.

 

Any other comments are also welcomed.

 

John. 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20050418/83ba9295/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkRect2D.png
Type: image/png
Size: 4457 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20050418/83ba9295/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkRect2D.zip
Type: application/x-zip-compressed
Size: 10989 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20050418/83ba9295/attachment-0001.bin>


More information about the vtk-developers mailing list