manualInteractorWindowLevel Class Reference

#include <manualInteractorWindowLevel.h>

Inheritance diagram for manualInteractorWindowLevel:
Inheritance graph
[legend]
Collaboration diagram for manualInteractorWindowLevel:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 manualInteractorWindowLevel ()
virtual ~manualInteractorWindowLevel ()
virtual InteractorStyleMaracasClone ()
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
double _backWindow
double _backLevel
vtkInteractorStyleBaseView_vtkInteractorStyleBaseView

Detailed Description

Definition at line 6 of file manualInteractorWindowLevel.h.


Constructor & Destructor Documentation

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.

00020 {
00021 }


Member Function Documentation

InteractorStyleMaracas * InteractorStyleMaracas::Clone (  )  [virtual, inherited]
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 }

Here is the call graph for this function:

Here is the caller graph for this function:

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 }

Here is the caller graph for this function:

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().

00038 {
00039         return true;
00040 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnLeftButtonDown (  )  [virtual, inherited]

Reimplemented in manualContour3DControler, manualContourBaseControler, vtkInteractorManualPaint, vtkInteractorStyleMPRView, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.

Definition at line 47 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00048 {
00049         return true;
00050 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnLeftButtonUp (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, vtkInteractorManualPaint, vtkInteractorStyleMPRView, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.

Definition at line 52 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00053 {
00054         return true;
00055 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnLeftDClick (  )  [virtual, inherited]
bool manualInteractorWindowLevel::OnMiddleButtonDown (  )  [protected, virtual]

Reimplemented from InteractorStyleMaracas.

Definition at line 87 of file manualInteractorWindowLevel.cxx.

References _backLevel, _backPx, _backPy, _backWindow, _stateWindowLevel, InteractorStyleMaracas::_vtkInteractorStyleBaseView, vtkInteractorStyleBaseView::GetWxVtk2DBaseView(), and wxVtkBaseView::GetWxVTKRenderWindowInteractor().

00088 {
00089         if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) &&
00090                 (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ){
00091                 _stateWindowLevel       = true;
00092                 wxVTKRenderWindowInteractor *wxVTKiren;
00093                 wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
00094                 wxVTKiren->GetEventPosition( _backPx , _backPy );
00095                 _backWindow = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorWindow();
00096                 _backLevel  = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorLevel();
00097         }
00098         return true;
00099 }

Here is the call graph for this function:

bool manualInteractorWindowLevel::OnMiddleButtonUp (  )  [protected, virtual]

Reimplemented from InteractorStyleMaracas.

Definition at line 103 of file manualInteractorWindowLevel.cxx.

References _stateWindowLevel.

00104 {
00105         if (_stateWindowLevel==true)
00106         {
00107                 _stateWindowLevel=false;
00108         }
00109         return true;
00110 }

bool InteractorStyleMaracas::OnMiddleDClick (  )  [virtual, inherited]

Definition at line 72 of file InteractorStyleMaracas.cxx.

00073 {
00074         return true;
00075 }

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                 double colorWin;
00036                 double colorLev;
00037                 
00038                 vtkImageData* imgrange = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetImageData();
00039 
00040                 if(imgrange != NULL){
00041                         double* scalarrange = imgrange->GetScalarRange();
00042                         double scalarr = scalarrange[1] - scalarrange[0];
00043                         //std::cout<<"scalar r="<<scalarr<<std::endl;
00044                         int w, h;
00045                         ((wxWindow*)wxVTKiren)->GetSize(&w, &h);                        
00046 
00047                         double dw=w,dh=h;
00048                         double dx = (scalarr*( _backPx - tmpPx ))/dw;
00049                         double dy = (scalarr*( _backPy - tmpPy ))/dh;
00050 
00051                         //colorWin=_backWindow - (scalarr)*( _backPx - tmpPx );
00052                         colorWin=_backWindow - dx;
00053                         colorLev=_backLevel  + dy;
00054                 }else{
00055                         colorWin=_backWindow - 2*( _backPx - tmpPx );
00056                         colorLev=_backLevel  + 2*( _backPy - tmpPy );
00057                 }
00058 
00059                 if (colorWin<0)
00060                 { 
00061                         colorWin=0;
00062                 }
00063                 if (colorWin>100000)
00064                 { 
00065                         colorWin=100000;
00066                 }       
00067 
00068                 if (colorLev<0)
00069                 { 
00070                         colorLev=0;
00071                 }
00072                 if (colorLev>100000)
00073                 { 
00074                         colorLev=100000;
00075                 }
00076                 vtkImageViewer2 *vtkimageviewer2;
00077                 vtkimageviewer2=((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2();
00078                 vtkimageviewer2->SetColorWindow(colorWin);
00079                 vtkimageviewer2->SetColorLevel(colorLev);
00080 //              vtkimageviewer2->Render();
00081         }
00082         return true;
00083 }

Here is the call graph for this function:

bool InteractorStyleMaracas::OnMouseWheel (  )  [virtual, inherited]

Definition at line 92 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00093 {
00094         return true;
00095 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnRightButtonDown (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, vtkInteractorScrollZ, and vtkInteractorStyleSphere.

Definition at line 77 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00078 {
00079         return true;
00080 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnRightButtonUp (  )  [virtual, inherited]

Reimplemented in manualContourBaseControler, vtkInteractorScrollZ, vtkInteractorStylePlane2D, and vtkInteractorStyleSphere.

Definition at line 82 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00083 {
00084         return true;
00085 }

Here is the caller graph for this function:

bool InteractorStyleMaracas::OnRightDClick (  )  [virtual, inherited]

Definition at line 87 of file InteractorStyleMaracas.cxx.

Referenced by vtkInteractorStyleBaseView::CallLstInteractorStyleMaracas().

00088 {
00089         return true;
00090 }

Here is the caller graph for this function:

void InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView (  )  [inherited]

Definition at line 106 of file InteractorStyleMaracas.cxx.

References InteractorStyleMaracas::_vtkInteractorStyleBaseView.

Referenced by vtkInteractorStyleBaseView::RemoveInteractorStyleMaracas().

00107 {
00108         _vtkInteractorStyleBaseView = NULL;
00109 }

Here is the caller graph for this function:

void InteractorStyleMaracas::SetActive ( bool  active  )  [inherited]
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 }

Here is the caller graph for this function:


Member Data Documentation

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(), vtkInteractorManualPaint::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(), vtkInteractorManualPaint::OnMouseMove(), OnMouseMove(), manualContourBaseControler::OnMouseMove(), vtkInteractorStyleSphere::OnRightButtonDown(), vtkInteractorScrollZ::OnRightButtonDown(), manualContourBaseControler::OnRightButtonDown(), vtkInteractorStyleSphere::OnRightButtonUp(), InteractorStyleMaracas::RemoveVtkInteractorStyleBaseView(), vtkInteractorStyle3DView::SelectMarchibCubePoint(), and InteractorStyleMaracas::SetVtkInteractorStyleBaseView().


The documentation for this class was generated from the following files:

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1