1 #include "vtkInfoTextImageInteractor.h"
3 #include "wxVtk2DBaseView.h"
5 //-------------------------------------------------------------------
6 //-------------------------------------------------------------------
7 //-------------------------------------------------------------------
9 vtkInfoTextImageInteractor::vtkInfoTextImageInteractor()
13 //-------------------------------------------------------------------
14 vtkInfoTextImageInteractor::~vtkInfoTextImageInteractor()
18 //-------------------------------------------------------------------
20 void vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(vtkInfoTextImage *vtkinfotextimage)
22 _vtkinfotextimage = vtkinfotextimage;
25 //-------------------------------------------------------------------
26 bool vtkInfoTextImageInteractor::OnMouseMove()
29 wxVTKRenderWindowInteractor *wxVTKiren;
30 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
31 wxVTKiren->GetEventPosition(X,Y);
34 * int z = (int)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetVtkBaseData()->GetZ());*/
39 int z = (int)((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetZ();
44 _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->TransFromCoordScreenToWorld(dxx,dyy,dzz,true);
47 GetVtkInfoTextImage()->PutWindowLevel();
48 GetVtkInfoTextImage()->PutColorLevel();
51 ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetImageData()->GetExtent(tempext);
53 if(tempext[0] <= dxx && dxx <= tempext[1] && tempext[2] <= dyy && dyy <= tempext[3])
58 GetVtkInfoTextImage()->PutPosition( ixx , iyy , izz );
59 GetVtkInfoTextImage()->PutPixelIntensity( ixx , iyy , izz );
62 this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
66 //-------------------------------------------------------------------
67 vtkInfoTextImage *vtkInfoTextImageInteractor::GetVtkInfoTextImage()
69 return _vtkinfotextimage;