vtkInfoTextImageInteractor.cxx
Go to the documentation of this file.00001 #include "vtkInfoTextImageInteractor.h"
00002
00003 #include "wxVtk2DBaseView.h"
00004
00005
00006
00007
00008
00009 vtkInfoTextImageInteractor::vtkInfoTextImageInteractor()
00010 {
00011 }
00012
00013
00014 vtkInfoTextImageInteractor::~vtkInfoTextImageInteractor()
00015 {
00016 }
00017
00018
00019
00020 void vtkInfoTextImageInteractor::SetModelVtkInfoTextImage(vtkInfoTextImage *vtkinfotextimage)
00021 {
00022 _vtkinfotextimage = vtkinfotextimage;
00023 }
00024
00025
00026 bool vtkInfoTextImageInteractor::OnMouseMove()
00027 {
00028 int X,Y;
00029 wxVTKRenderWindowInteractor *wxVTKiren;
00030 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
00031 wxVTKiren->GetEventPosition(X,Y);
00032
00033
00034
00035
00036 double xx,yy,zz;
00037
00038 int z = (int)((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetZ();
00039 xx=X;
00040 yy=Y;
00041 zz=z;
00042
00043 _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->TransFromCoordScreenToWorld(xx,yy,zz,true);
00044
00045
00046 GetVtkInfoTextImage()->PutWindowLevel();
00047 GetVtkInfoTextImage()->PutColorLevel();
00048 GetVtkInfoTextImage()->PutPosition( (int)xx , (int)yy , (int)zz );
00049 GetVtkInfoTextImage()->PutPixelIntensity( (int)xx , (int)yy , (int)zz );
00050
00051 this->_vtkInteractorStyleBaseView->SetRefresh_waiting();
00052 return true;
00053 }
00054
00055
00056 vtkInfoTextImage *vtkInfoTextImageInteractor::GetVtkInfoTextImage()
00057 {
00058 return _vtkinfotextimage;
00059 }