MantisBT - VTK
View Issue Details
0003897VTK(No Category)public2006-10-07 08:182016-08-12 09:54
kdsfinger 
Karthik Krishnan 
urgentmajoralways
closedmoved 
 
 
0003897: vtkRenderWindowInteractor only can add one observer
I found this bug in the Insight/InsightApplications/LiverTumorSegmentation/ImageSliceViewer.cpp
Althought it is used in itk, it's a vtk program.
In the function
void
  ImageSliceViewer
::SetInteractor( vtkRenderWindowInteractor * interactor )
{
  m_RenderWindow->SetInteractor( interactor );

  vtkInteractorStyleImage * interactorStyle = vtkInteractorStyleImage::New();
  interactor->SetInteractorStyle( interactorStyle );
  interactorStyle->Delete();
  interactor->AddObserver( ::vtkCommand::LeftButtonPressEvent, m_InteractorObserver );
  interactor->AddObserver( ::vtkCommand::LeftButtonReleaseEvent, m_InteractorObserver );
  interactor->AddObserver( ::vtkCommand::MouseMoveEvent, m_InteractorObserver );
}
The interactor only accept the first added observer and neglect the rest. In the above case, only the LeftButtonPressEvent is observed. If I switch the sequence such that the LeftButtonReleaseEvent is added before LeftButtonPressEvent, the LeftButtonReleaseEvent will be observed while the LeftButtonPressEvent is not.
No tags attached.
Issue History
2008-02-06 10:46Jeff BaumesAssigned ToWill Schroeder => Karthik Krishnan
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:54Kitware RobotNote Added: 0036890
2016-08-12 09:54Kitware RobotStatusexpired => closed
2016-08-12 09:54Kitware RobotResolutionopen => moved

Notes
(0036890)
Kitware Robot   
2016-08-12 09:54   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.