]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkInfoTextImageInteractorPlane2D.cxx
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / vtkInfoTextImageInteractorPlane2D.cxx
1 #include "vtkInfoTextImageInteractorPlane2D.h"
2
3 #include "vtkPlane2DView.h"
4 #include "wxVtk2DBaseView.h"
5
6 vtkInfoTextImageInteractorPlane2D::vtkInfoTextImageInteractorPlane2D()
7 {
8 }
9 //-------------------------------------------------------------------
10 vtkInfoTextImageInteractorPlane2D::~vtkInfoTextImageInteractorPlane2D()
11 {
12 }
13 //-------------------------------------------------------------------
14 bool vtkInfoTextImageInteractorPlane2D::OnMouseMove()
15 {
16         int X,Y;
17         wxVTKRenderWindowInteractor *wxVTKiren;
18         wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
19         wxVTKiren->GetEventPosition(X,Y);
20
21         int z = (int) ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetZ();
22         double xx=X,yy=Y,zz=z;
23
24 // --> dif
25         vtkPlane2DView *vtkplane2Dview = (vtkPlane2DView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
26         vtkplane2Dview->TransfromCoordViewWorld2(xx,yy,zz);
27
28         GetVtkInfoTextImage()->PutWindowLevel();
29         GetVtkInfoTextImage()->PutColorLevel();
30         GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
31         GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
32
33         this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
34         return true;
35 }