[vtkusers] vtkRenderWindowInteractor and vtkTkRenderWidget (please help)
yfl at doc.ic.ac.uk
yfl at doc.ic.ac.uk
Tue Oct 18 10:57:39 EDT 2005
Dear all,
I'm writing a program which has a point picking function. However, when I run
it, it gives me an error message about vtkRenderWindowInteractor:
"Object named: iren, could not find requested method: ExposeEvent or the
method was called with incorrect arguments."
I also use vtkTkRenderWidget in my program:
****** part of the program *******
vtkRenderer renderer
renderer AddActor mandible_actor
renderer AddActor pointer_actor
renderer SetBackground 0.1 0.2 0.4
vtkRenderWindow renWin
renWin AddRenderer renderer
vtkPointPicker pointPicker
pointPicker AddObserver EndPickEvent pointPick
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
iren SetPicker pointPicker
iren AddObserver UserEvent {wm deiconify .vtkInteract}
iren Initialize
set vtkw [vtkTkRenderWidget .ren \
-width 500 \
-height 500 \
-rw renWin]
#
# Setup Tk bindings and VTK observers for that widget.
#
::vtk::bind_tk_render_widget $vtkw
frame .params
button .params.reset -text "Reset" -command reSet
set pc1 [scale .params.pc1 \
-from 1 -to 10 -res 1 \
-orient horizontal \
-label "1st Principal Component" \
-command setPC1]
$pc1 set 1
proc setPC1 {res} {}
***********************************
If anyone know how to solve this problem, please reply. Thanks a lot.
Best wishes,
Krista
More information about the vtkusers
mailing list