#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] |
Definition at line 19 of file manualInteractorWindowLevel.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 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::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 manualInteractorWindowLevel::OnMiddleButtonDown | ( | ) | [protected, virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 86 of file manualInteractorWindowLevel.cxx.
References _backLevel, _backPx, _backPy, _backWindow, _stateWindowLevel, InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), and wxVtkBaseView::GetWxVTKRenderWindowInteractor().
00087 { 00088 if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) && 00089 (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ){ 00090 00091 _stateWindowLevel = true; 00092 wxVTKRenderWindowInteractor *wxVTKiren; 00093 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor(); 00094 wxVTKiren->GetEventPosition( _backPx , _backPy ); 00095 00096 _backWindow = (int)(((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorWindow()); 00097 _backLevel = (int)(((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorLevel()); 00098 } 00099 return true; 00100 }
bool manualInteractorWindowLevel::OnMiddleButtonUp | ( | ) | [protected, virtual] |
Reimplemented from InteractorStyleMaracas.
Definition at line 104 of file manualInteractorWindowLevel.cxx.
References _stateWindowLevel.
00105 { 00106 if (_stateWindowLevel==true) 00107 { 00108 _stateWindowLevel=false; 00109 } 00110 return true; 00111 }
bool InteractorStyleMaracas::OnMiddleDClick | ( | ) | [virtual, inherited] |
Definition at line 72 of file InteractorStyleMaracas.cxx.
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 00035 00036 int colorWin; 00037 int colorLev; 00038 00039 00040 vtkImageData* imgrange = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetImageData(); 00041 00042 if(imgrange != NULL){ 00043 double* scalarrange = imgrange->GetScalarRange(); 00044 double scalarr = scalarrange[1] - scalarrange[0]; 00045 //std::cout<<"scalar r="<<scalarr<<std::endl; 00046 int w, h; 00047 ((wxWindow*)wxVTKiren)->GetSize(&w, &h); 00048 int dx = (scalarr*( _backPx - tmpPx ))/w; 00049 int dy = (scalarr*( _backPy - tmpPy ))/h; 00050 //colorWin=_backWindow - (scalarr)*( _backPx - tmpPx ); 00051 colorWin=_backWindow - dx; 00052 colorLev=_backLevel + dy; 00053 }else{ 00054 colorWin=_backWindow - 2*( _backPx - tmpPx ); 00055 colorLev=_backLevel + 2*( _backPy - tmpPy ); 00056 } 00057 00058 if (colorWin<0) 00059 { 00060 colorWin=0; 00061 } 00062 if (colorWin>100000) 00063 { 00064 colorWin=100000; 00065 } 00066 00067 if (colorLev<0) 00068 { 00069 colorLev=0; 00070 } 00071 if (colorLev>100000) 00072 { 00073 colorLev=100000; 00074 } 00075 vtkImageViewer2 *vtkimageviewer2; 00076 vtkimageviewer2=((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2(); 00077 vtkimageviewer2->SetColorWindow(colorWin); 00078 vtkimageviewer2->SetColorLevel(colorLev); 00079 // vtkimageviewer2->Render(); 00080 } 00081 return true; 00082 }
bool InteractorStyleMaracas::OnMouseWheel | ( | ) | [virtual, inherited] |
Definition at line 92 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::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 manualInteractorWindowLevel::_backLevel [protected] |
Definition at line 16 of file manualInteractorWindowLevel.h.
Referenced by manualInteractorWindowLevel(), OnMiddleButtonDown(), 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().
bool manualInteractorWindowLevel::_stateWindowLevel [protected] |
Definition at line 12 of file manualInteractorWindowLevel.h.
Referenced by manualInteractorWindowLevel(), OnMiddleButtonDown(), OnMiddleButtonUp(), 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().