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
int _backWindow
int _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, 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, 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 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 }

Here is the call graph for this function:

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.

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 
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 }

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


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1