[vtkusers] ImagePlaneWidget Mouse Event Handling Problem
circass
circass at gmail.com
Tue Jan 19 09:33:01 EST 2010
Hi my friends,
i m trying to get mouse input from my imageviewer2 which uses three
imageplanewidgets for sagital axial and coronal views of a volume(Dicom
Volume).
I want to handle the middlebuttonpressed and released events of
ImageplaneWidget but i coudnt succeed whatever i tried.
I wrote a class vtkImageInteractionCallback3D : public vtkCommand that
includes an Execute method, and there are those lines in that method:
if (event == vtkCommand::MiddleButtonPressEvent)
{
this->Slicing = 1;
}
else if (event == vtkCommand::MiddleButtonReleaseEvent)
{
this->Slicing = 0;
}
else if (event == vtkCommand::MouseMoveEvent)
{
if (this->Slicing)
{
i_viewer1->SetInput(i_planeWidget1->GetResliceOutput());
i_viewer1->Render();
i_viewer2->SetInput(i_planeWidget2->GetResliceOutput());
i_viewer2->Render();
i_viewer3->SetInput(i_planeWidget3->GetResliceOutput());
i_viewer3->Render();
}
else
{
vtkInteractorStyle *style = vtkInteractorStyle::SafeDownCast(
interactor->GetInteractorStyle());
if (style)
{
style->OnMouseMove();
}
}
}
i add that callback to my interactor but the problem is, i cant get mouse
inputs when i clicked on imagePlaneWidget, i m getting mouse inputs anywhere
else.
I searched for that but found nothing.
I hope someone can help me.
Thanx.
--
View this message in context: http://old.nabble.com/ImagePlaneWidget-Mouse-Event-Handling-Problem-tp27226693p27226693.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list