[vtkusers] Recovering vtkImagePlaneWidget from a vtkOpenGLActor

Mathieu Stumpf mathieu.stumpf at etu.unistra.fr
Tue Apr 3 10:33:29 EDT 2012


Hello,

I have three vtkImagePlaneWidget and I want to be able to switch the
active one when the user click on it.

All three share an unique picker, which is observed :
picker.AddObserver("EndPickEvent", f)

So thank to this picker I can obtain a vtkOpenGLActor with the
GetProp3d() method. This vtkOpenGLActor are indeed my planes, as a
prop.GetProperty().SetColor(color) will change the plane surface taint
(while a plane.GetPlaneProperty().SetColor(color) would change borders
colors).

But as said, my goal is to switch my "current_plane". How do I get a
vtkImagePlaneWidget from this prop ?

Kind regards,
Mathieu




More information about the vtkusers mailing list