[vtkusers] Turn off Observers "MouseMoveEvent" in vtkInteractorStyleImage
时光
yihui.cao at qq.com
Thu Dec 10 03:53:24 EST 2015
Hi,
When I show an image used vtkInteractorStyleImage, left button down and move, the ColorLevel of image will changing. I want to turn off the observer of "MouseMoveEvent" and write the follow code. But it do not work. So anyone can tell me how to turn off the observer or turn off this function.
cpp code:
vtkSmartPointer<vtkRenderWindowInteractor> renderWindowInteractor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
vtkSmartPointer<vtkInteractorStyleImage> imagestyle =
vtkSmartPointer<vtkInteractorStyleImage>::New();
imagestyle->RemoveObservers(vtkCommand::MouseMoveEvent);
//imagestyle->RemoveAllObservers();
renderWindowInteractor->SetInteractorStyle(imagestyle);
renderWindowInteractor->SetRenderWindow(renderWindow);
renderWindowInteractor->Initialize();
renderWindowInteractor->Start();
Thanks,
Yihui Cao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151210/a380fdb2/attachment.html>
More information about the vtkusers
mailing list