1 #include "vtkInfoTextImageInteractorPlane2D.h"
3 #include "vtkPlane2DView.h"
4 #include "wxVtk2DBaseView.h"
6 vtkInfoTextImageInteractorPlane2D::vtkInfoTextImageInteractorPlane2D()
9 //-------------------------------------------------------------------
10 vtkInfoTextImageInteractorPlane2D::~vtkInfoTextImageInteractorPlane2D()
13 //-------------------------------------------------------------------
14 bool vtkInfoTextImageInteractorPlane2D::OnMouseMove()
17 wxVTKRenderWindowInteractor *wxVTKiren;
18 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
19 wxVTKiren->GetEventPosition(X,Y);
21 int z = (int) ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetZ();
22 double xx=X,yy=Y,zz=z;
25 vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
26 vtkplane2Dview->TransfromCoordViewWorld2(xx,yy,zz);
28 GetVtkInfoTextImage()->PutWindowLevel();
29 GetVtkInfoTextImage()->PutColorLevel();
30 GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
31 GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
33 this->_vtkInteractorStyleBaseView->SetRefresh_waiting();