#include <vtkInteractorStyleSphere.h>
Public Member Functions | |
vtkInteractorStyleSphere () | |
~vtkInteractorStyleSphere () | |
virtual bool | OnLeftButtonUp () |
virtual bool | OnLeftButtonDown () |
virtual bool | OnMouseMove () |
virtual bool | OnRightButtonUp () |
virtual bool | OnRightButtonDown () |
virtual InteractorStyleMaracas * | Clone () |
void | CopyAttributesTo (InteractorStyleMaracas *cloneObject) |
virtual bool | OnChar () |
virtual bool | OnMiddleButtonDown () |
virtual bool | OnMiddleButtonUp () |
virtual bool | OnLeftDClick () |
virtual bool | OnRightDClick () |
virtual bool | OnMiddleDClick () |
virtual bool | OnMouseWheel () |
void | SetVtkInteractorStyleBaseView (vtkInteractorStyleBaseView *_vtkInteractorStyleBaseView) |
void | RemoveVtkInteractorStyleBaseView () |
void | SetActive (bool active) |
bool | GetActive () |
Protected Attributes | |
vtkInteractorStyleBaseView * | _vtkInteractorStyleBaseView |
Private Attributes | |
bool | _stateRotate |
bool | _stateRadio |
int | _fordwareX |
int | _fordwareY |
double | _radio |
Definition at line 6 of file vtkInteractorStyleSphere.h.
vtkInteractorStyleSphere::vtkInteractorStyleSphere | ( | ) |
Definition at line 6 of file vtkInteractorStyleSphere.cxx.
References _stateRadio, and _stateRotate.
00007 { 00008 _stateRadio = false; 00009 _stateRotate = false; 00010 }
vtkInteractorStyleSphere::~vtkInteractorStyleSphere | ( | ) |
Definition at line 14 of file vtkInteractorStyleSphere.cxx.
InteractorStyleMaracas * InteractorStyleMaracas::Clone | ( | ) | [virtual, inherited] |
Reimplemented in manualCircleControler, manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourBaseControler, manualContourControler, manualContourPerpPlaneControler, manualLineControler, manualRoiControler, and manualRotationToolControler.
Definition at line 18 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::CopyAttributesTo(), and InteractorStyleMaracas::InteractorStyleMaracas().
00019 { 00020 InteractorStyleMaracas * clone = new InteractorStyleMaracas(); 00021 CopyAttributesTo(clone); 00022 return clone; 00023 }
void InteractorStyleMaracas::CopyAttributesTo | ( | InteractorStyleMaracas * | cloneObject | ) | [inherited] |
Reimplemented in manualCircleControler, manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourBaseControler, manualContourControler, manualContourPerpPlaneControler, manualLineControler, manualRoiControler, and manualRotationToolControler.
Definition at line 27 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::GetActive(), and InteractorStyleMaracas::SetActive().
Referenced by InteractorStyleMaracas::Clone().
00028 { 00029 // Fathers object 00030 //<FATHERCLASS>::CopyAttributesTo(cloneObject); 00031 00032 cloneObject->SetActive( this->GetActive() ); 00033 }
bool InteractorStyleMaracas::GetActive | ( | ) | [inherited] |
Definition at line 116 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_active.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(), and InteractorStyleMaracas::CopyAttributesTo().
00117 { 00118 return _active; 00119 }
bool InteractorStyleMaracas::OnChar | ( | ) | [virtual, inherited] |
Reimplemented in manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourBaseControler, and manualContourPerpPlaneControler.
Definition at line 37 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool vtkInteractorStyleSphere::OnLeftButtonDown | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 59 of file vtkInteractorStyleSphere.cxx.
References _fordwareX, _fordwareY, _stateRotate, and InteractorStyleMaracas::_vtkInteractorStyleBaseView.
00060 { 00061 _stateRotate = true; 00062 _fordwareX = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0]; 00063 _fordwareY = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; 00064 return true; 00065 }
bool vtkInteractorStyleSphere::OnLeftButtonUp | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 70 of file vtkInteractorStyleSphere.cxx.
References _fordwareX, _fordwareY, _stateRotate, InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxVtkBaseView::GetWxVTKRenderWindowInteractor(), wxSphereView::RefreshView(), wxSphereView::RotationEnd(), wxSphereView::SetXYZtoParent(), and vtkInteractorStyleBaseView::TransformCoordinate().
00071 { 00072 wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()); 00073 if (_stateRotate==true){ 00074 int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0]; 00075 int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; 00076 00077 if ((_fordwareX==fx)&&(_fordwareY==fy)){ 00078 double x=fx,y=fy,z=1; 00079 _vtkInteractorStyleBaseView->TransformCoordinate(x,y,z); 00080 wxsphereview->SetXYZtoParent(x,y); 00081 wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121); 00082 wxsphereview->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent); 00083 } else { 00084 wxsphereview->RotationEnd(); 00085 } 00086 wxsphereview->RefreshView(); 00087 _stateRotate = false; 00088 } 00089 00090 return true; 00091 }
bool InteractorStyleMaracas::OnLeftDClick | ( | ) | [virtual, inherited] |
Reimplemented in manualContourBaseControler, manualContourPerpPlaneControler, vtkInteractorStyle3DView, vtkInteractorStyleMPRView, and vtkInteractorStylePlane2D.
Definition at line 57 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas(), and manualContourPerpPlaneControler::MouseDLeft().
bool InteractorStyleMaracas::OnMiddleButtonDown | ( | ) | [virtual, inherited] |
Reimplemented in manualContourBaseControler, and manualInteractorWindowLevel.
Definition at line 62 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool InteractorStyleMaracas::OnMiddleButtonUp | ( | ) | [virtual, inherited] |
Reimplemented in manualContourBaseControler, and manualInteractorWindowLevel.
Definition at line 67 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool InteractorStyleMaracas::OnMiddleDClick | ( | ) | [virtual, inherited] |
Definition at line 72 of file InteractorStyleMaracas.cxx.
bool vtkInteractorStyleSphere::OnMouseMove | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 96 of file vtkInteractorStyleSphere.cxx.
References _fordwareX, _fordwareY, _radio, _stateRadio, _stateRotate, InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxSphereView::RefreshView(), wxSphereView::RotationStart(), wxSphereView::SetDeltaVoxel(), and wxSphereView::SetRadio().
00097 { 00098 wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()); 00099 if (_stateRotate==true) 00100 { 00101 bool ok_v, ok_ang; 00102 ok_v=false; 00103 ok_ang=false; 00104 if (_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==1) 00105 { 00106 ok_v = true; 00107 } 00108 if (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==1) 00109 { 00110 ok_ang = true; 00111 } 00112 int fx = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[0]; 00113 int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; 00114 wxsphereview->RotationStart( fx - _fordwareX , -(fy - _fordwareY) , ok_v, ok_ang); 00115 wxsphereview->RefreshView(); 00116 } 00117 if (_stateRadio==true) 00118 { 00119 //int fx = this->Interactor->GetEventPosition()[0]; 00120 int fy = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; 00121 double dif=(fy-_fordwareY) / 10.0; 00122 wxsphereview->SetRadio( _radio + dif ); 00123 wxsphereview->SetDeltaVoxel(3); 00124 wxsphereview->RefreshView(); 00125 } 00126 00127 return true; 00128 }
bool InteractorStyleMaracas::OnMouseWheel | ( | ) | [virtual, inherited] |
Definition at line 92 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool vtkInteractorStyleSphere::OnRightButtonDown | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 21 of file vtkInteractorStyleSphere.cxx.
References _fordwareY, _radio, _stateRadio, InteractorStyleMaracas::_vtkInteractorStyleBaseView, wxSphereView::GetRadio(), and vtkInteractorStyleBaseView::GetWxVtk2DBaseView().
00022 { 00023 if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ) 00024 { 00025 _stateRadio = true; 00026 //_fordwareX = this->Interactor->GetEventPosition()[0]; 00027 _fordwareY = _vtkInteractorStyleBaseView->GetInteractor()->GetEventPosition()[1]; 00028 00029 wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()); 00030 00031 _radio = wxsphereview->GetRadio(); 00032 } 00033 00034 return true; 00035 }
bool vtkInteractorStyleSphere::OnRightButtonUp | ( | ) | [virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 39 of file vtkInteractorStyleSphere.cxx.
References _stateRadio, InteractorStyleMaracas::_vtkInteractorStyleBaseView, wxSphereView::GetIdOfImage(), wxSphereView::GetRadio(), vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), wxSphereView::RefreshView(), and wxSphereView::SetDeltaVoxel().
00040 { 00041 if (_stateRadio==true) 00042 { 00043 wxSphereView *wxsphereview = (wxSphereView*)(_vtkInteractorStyleBaseView->GetWxVtk2DBaseView()); 00044 wxsphereview->SetDeltaVoxel(1); 00045 double radio=wxsphereview->GetRadio(); 00046 wxsphereview->GetIdOfImage(radio+0.1); 00047 wxsphereview->GetIdOfImage(radio+0.2); 00048 wxsphereview->GetIdOfImage(radio-0.1); 00049 wxsphereview->GetIdOfImage(radio-0.2); 00050 00051 wxsphereview->RefreshView(); 00052 _stateRadio = false; 00053 } 00054 00055 return true; 00056 }
bool InteractorStyleMaracas::OnRightDClick | ( | ) | [virtual, inherited] |
Definition at line 87 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
void InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView | ( | ) | [inherited] |
Definition at line 106 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView.
Referenced by vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas().
00107 { 00108 _vtkInteractorStyleBaseView = NULL; 00109 }
void InteractorStyleMaracas::SetActive | ( | bool | active | ) | [inherited] |
Definition at line 111 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_active.
Referenced by wxWidgetMesure2D::ActiveMessureTool(), wxWidgetMesure2D::ConfigureA(), wxEmptyPanel_3_Widget::ConfigureVTK(), ContourVOIWidget::ConfigureVTK(), wxMaracasCoutourTool::ConfigureVTK(), wxImageViewerWidget::ConstructVTK(), InteractorStyleMaracas::CopyAttributesTo(), manualContourContainer::createLumenContour(), wxImageViewerWidget::CreateNewManualContour(), manualContourContainer::createWallContour(), wxMaracasImageBrowser02::LoadData(), wxMaracasImageBrowser02::OnBtnResetRoi(), manualContourContainer::refreshLumen(), manualContourContainer::refreshWall(), manualContourContainer::restartLumenContour(), manualContourContainer::restartWallContour(), vtkInteractorStyleBaseView::SetActiveAllInteractors(), and wxMaracasImageBrowser02::SetROI().
00112 { 00113 _active = active; 00114 }
void InteractorStyleMaracas::SetVtkInteractorStyleBaseView | ( | vtkInteractorStyleBaseView * | _vtkInteractorStyleBaseView | ) | [inherited] |
Definition at line 99 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_vtkInteractorStyleBaseView.
Referenced by vtkInteractorStyleBaseView::AddInteractorStyleMaracas(), and vtkInteractorStyleBaseView::InsertInteractorStyleMaracas().
00100 { 00101 _vtkInteractorStyleBaseView = vtkInteractorStyleBaseView; 00102 }
int vtkInteractorStyleSphere::_fordwareX [private] |
Definition at line 20 of file vtkInteractorStyleSphere.h.
Referenced by OnLeftButtonDown(), OnLeftButtonUp(), and OnMouseMove().
int vtkInteractorStyleSphere::_fordwareY [private] |
Definition at line 21 of file vtkInteractorStyleSphere.h.
Referenced by OnLeftButtonDown(), OnLeftButtonUp(), OnMouseMove(), and OnRightButtonDown().
double vtkInteractorStyleSphere::_radio [private] |
Definition at line 23 of file vtkInteractorStyleSphere.h.
Referenced by OnMouseMove(), and OnRightButtonDown().
bool vtkInteractorStyleSphere::_stateRadio [private] |
Definition at line 19 of file vtkInteractorStyleSphere.h.
Referenced by OnMouseMove(), OnRightButtonDown(), OnRightButtonUp(), and vtkInteractorStyleSphere().
bool vtkInteractorStyleSphere::_stateRotate [private] |
Definition at line 18 of file vtkInteractorStyleSphere.h.
Referenced by OnLeftButtonDown(), OnLeftButtonUp(), OnMouseMove(), and vtkInteractorStyleSphere().
vtkInteractorStyleBaseView* InteractorStyleMaracas::_vtkInteractorStyleBaseView [protected, inherited] |
Definition at line 45 of file InteractorStyleMaracas.h.
Referenced by manualContour3VControler::AddPoint_Others(), manualContour3VControler::DeleteActualMousePoint_Others(), manualContour3VControler::InsertPoint_Others(), InteractorStyleMaracas::InteractorStyleMaracas(), manualContourControler::MouseClickLeft(), manualContour3DControler::MouseClickLeft(), manualContourPerpPlaneControler::MouseDLeft(), manualContourControler::MouseDLeft(), manualContourPerpPlaneControler::MouseMove(), manualContourControler::MouseMove(), manualContour3V3DControler::MouseMove(), manualContour3VControler::MouseMove_Others(), manualContourBaseControler::OnChar(), manualContour3DControler::OnChar(), manualContour3VControler::OnChar_Others(), OnLeftButtonDown(), vtkInteractorStylePlane2D::OnLeftButtonDown(), vtkInteractorStyleMPRView::OnLeftButtonDown(), manualContourBaseControler::OnLeftButtonDown(), manualContour3DControler::OnLeftButtonDown(), OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftButtonUp(), manualContourBaseControler::OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftDClick(), vtkInteractorStyleMPRView::OnLeftDClick(), manualContourBaseControler::OnLeftDClick(), manualInteractorWindowLevel::OnMiddleButtonDown(), manualContourBaseControler::OnMiddleButtonDown(), OnMouseMove(), vtkInteractorStylePlane2D::OnMouseMove(), vtkInteractorStyleMPRView::OnMouseMove(), vtkInteractorScrollZ::OnMouseMove(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), vtkInfoTextImageInteractor::OnMouseMove(), manualInteractorWindowLevel::OnMouseMove(), manualContourBaseControler::OnMouseMove(), OnRightButtonDown(), vtkInteractorScrollZ::OnRightButtonDown(), manualContourBaseControler::OnRightButtonDown(), OnRightButtonUp(), InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), and InteractorStyleMaracas::SetVtkInteractorStyleBaseView().