#include <manualInteractorWindowLevel.h>
Public Member Functions | |
manualInteractorWindowLevel () | |
virtual | ~manualInteractorWindowLevel () |
virtual InteractorStyleMaracas * | Clone () |
void | CopyAttributesTo (InteractorStyleMaracas *cloneObject) |
virtual bool | OnChar () |
virtual bool | OnLeftButtonDown () |
virtual bool | OnLeftButtonUp () |
virtual bool | OnRightButtonDown () |
virtual bool | OnRightButtonUp () |
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 Member Functions | |
virtual bool | OnMouseMove () |
virtual bool | OnMiddleButtonDown () |
virtual bool | OnMiddleButtonUp () |
Protected Attributes | |
bool | _stateWindowLevel |
int | _backPx |
int | _backPy |
int | _backWindow |
int | _backLevel |
vtkInteractorStyleBaseView * | _vtkInteractorStyleBaseView |
Definition at line 6 of file manualInteractorWindowLevel.h.
manualInteractorWindowLevel::manualInteractorWindowLevel | ( | ) |
Definition at line 8 of file manualInteractorWindowLevel.cxx.
References _backLevel, _backPx, _backPy, _backWindow, and _stateWindowLevel.
00009 { 00010 _stateWindowLevel = false; 00011 _backPx = 0; 00012 _backPy = 0; 00013 _backWindow = -1; 00014 _backLevel = -1; 00015 }
manualInteractorWindowLevel::~manualInteractorWindowLevel | ( | ) | [virtual] |
bool manualInteractorWindowLevel::OnMouseMove | ( | ) | [protected, virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 25 of file manualInteractorWindowLevel.cxx.
References _backLevel, _backPx, _backPy, _backWindow, _stateWindowLevel, InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), and wxVtkBaseView::GetWxVTKRenderWindowInteractor().
00026 { 00027 00028 if (_stateWindowLevel==true) 00029 { 00030 int tmpPx,tmpPy; 00031 wxVTKRenderWindowInteractor *wxVTKiren; 00032 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00033 wxVTKiren->GetEventPosition( tmpPx , tmpPy ); 00034 int colorWin=_backWindow - 2*( _backPx - tmpPx ); 00035 int colorLev=_backLevel + 2*( _backPy - tmpPy ); 00036 00037 if (colorWin<0) 00038 { 00039 colorWin=0; 00040 } 00041 if (colorWin>100000) 00042 { 00043 colorWin=100000; 00044 } 00045 00046 if (colorLev<0) 00047 { 00048 colorLev=0; 00049 } 00050 if (colorLev>100000) 00051 { 00052 colorLev=100000; 00053 } 00054 vtkImageViewer2 *vtkimageviewer2; 00055 vtkimageviewer2=((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2(); 00056 vtkimageviewer2->SetColorWindow(colorWin); 00057 vtkimageviewer2->SetColorLevel(colorLev); 00058 // vtkimageviewer2->Render(); 00059 } 00060 return true; 00061 }
bool manualInteractorWindowLevel::OnMiddleButtonDown | ( | ) | [protected, virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 65 of file manualInteractorWindowLevel.cxx.
References _backLevel, _backPx, _backPy, _backWindow, _stateWindowLevel, InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), and wxVtkBaseView::GetWxVTKRenderWindowInteractor().
00066 { 00067 if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && 00068 (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ){ 00069 00070 _stateWindowLevel = true; 00071 wxVTKRenderWindowInteractor *wxVTKiren; 00072 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00073 wxVTKiren->GetEventPosition( _backPx , _backPy ); 00074 00075 _backWindow = (int)(((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorWindow()); 00076 _backLevel = (int)(((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorLevel()); 00077 } 00078 return true; 00079 }
bool manualInteractorWindowLevel::OnMiddleButtonUp | ( | ) | [protected, virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 83 of file manualInteractorWindowLevel.cxx.
References _stateWindowLevel.
00084 { 00085 if (_stateWindowLevel==true) 00086 { 00087 _stateWindowLevel=false; 00088 } 00089 return true; 00090 }
InteractorStyleMaracas * InteractorStyleMaracas::Clone | ( | ) | [virtual, inherited] |
Reimplemented in manualCircleControler, manualContour3DControler, manualContour3V3DControler, manualContour3VControler, manualContourBaseControler, manualContourControler, manualContourPerpPlaneControler, manualLineControler, and manualRoiControler.
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] |
Definition at line 27 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::SetActive().
Referenced by InteractorStyleMaracas::Clone(), and manualContourBaseControler::CopyAttributesTo().
00028 { 00029 // Fathers object 00030 //<FATHERCLASS>::CopyAttributesTo(cloneObject); 00031 00032 cloneObject->SetActive( this->GetActive() ); 00033 }
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 InteractorStyleMaracas::OnLeftButtonDown | ( | ) | [virtual, inherited] |
Reimplemented in manualContour3DControler, manualContourBaseControler, vtkInteractorStyleMPRView, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.
Definition at line 47 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool InteractorStyleMaracas::OnLeftButtonUp | ( | ) | [virtual, inherited] |
Reimplemented in manualContourBaseControler, vtkInteractorStyleMPRView, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.
Definition at line 52 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool InteractorStyleMaracas::OnRightButtonDown | ( | ) | [virtual, inherited] |
Reimplemented in manualContourBaseControler, vtkInteractorScrollZ, and vtkInteractorStyleSphere.
Definition at line 77 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool InteractorStyleMaracas::OnRightButtonUp | ( | ) | [virtual, inherited] |
Reimplemented in manualContourBaseControler, vtkInteractorScrollZ, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.
Definition at line 82 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
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::OnRightDClick | ( | ) | [virtual, inherited] |
Definition at line 87 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
bool InteractorStyleMaracas::OnMiddleDClick | ( | ) | [virtual, inherited] |
bool InteractorStyleMaracas::OnMouseWheel | ( | ) | [virtual, inherited] |
Definition at line 92 of file InteractorStyleMaracas.cxx.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
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 }
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 }
bool InteractorStyleMaracas::GetActive | ( | ) | [inherited] |
Definition at line 116 of file InteractorStyleMaracas.cxx.
References InteractorStyleMaracas::_active.
Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().
00117 { 00118 return _active; 00119 }
bool manualInteractorWindowLevel::_stateWindowLevel [protected] |
Definition at line 12 of file manualInteractorWindowLevel.h.
Referenced by manualInteractorWindowLevel(), OnMiddleButtonDown(), OnMiddleButtonUp(), and OnMouseMove().
int manualInteractorWindowLevel::_backPx [protected] |
Definition at line 13 of file manualInteractorWindowLevel.h.
Referenced by manualInteractorWindowLevel(), OnMiddleButtonDown(), and OnMouseMove().
int manualInteractorWindowLevel::_backPy [protected] |
Definition at line 14 of file manualInteractorWindowLevel.h.
Referenced by manualInteractorWindowLevel(), OnMiddleButtonDown(), and OnMouseMove().
int manualInteractorWindowLevel::_backWindow [protected] |
Definition at line 15 of file manualInteractorWindowLevel.h.
Referenced by manualInteractorWindowLevel(), OnMiddleButtonDown(), and OnMouseMove().
int manualInteractorWindowLevel::_backLevel [protected] |
Definition at line 16 of file manualInteractorWindowLevel.h.
Referenced by manualInteractorWindowLevel(), OnMiddleButtonDown(), and OnMouseMove().
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(), vtkInteractorStyleSphere::OnLeftButtonDown(), vtkInteractorStylePlane2D::OnLeftButtonDown(), vtkInteractorStyleMPRView::OnLeftButtonDown(), manualContourBaseControler::OnLeftButtonDown(), manualContour3DControler::OnLeftButtonDown(), vtkInteractorStyleSphere::OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftButtonUp(), manualContourBaseControler::OnLeftButtonUp(), vtkInteractorStylePlane2D::OnLeftDClick(), vtkInteractorStyleMPRView::OnLeftDClick(), manualContourBaseControler::OnLeftDClick(), OnMiddleButtonDown(), manualContourBaseControler::OnMiddleButtonDown(), vtkInteractorStyleSphere::OnMouseMove(), vtkInteractorStylePlane2D::OnMouseMove(), vtkInteractorStyleMPRView::OnMouseMove(), vtkInteractorScrollZ::OnMouseMove(), vtkInfoTextImageInteractorPlane2D::OnMouseMove(), vtkInfoTextImageInteractor::OnMouseMove(), OnMouseMove(), manualContourBaseControler::OnMouseMove(), vtkInteractorStyleSphere::OnRightButtonDown(), vtkInteractorScrollZ::OnRightButtonDown(), manualContourBaseControler::OnRightButtonDown(), vtkInteractorStyleSphere::OnRightButtonUp(), InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), and InteractorStyleMaracas::SetVtkInteractorStyleBaseView().