vtkInteractorStyleBaseView2D.cxx

Go to the documentation of this file.
00001 
00002 
00003 #include "vtkInteractorStyleBaseView2D.h"
00004 #include <vtkObjectFactory.h>
00005 
00006 vtkStandardNewMacro(vtkInteractorStyleBaseView2D);
00007 
00008 //---------------------------------------------------------------------------
00009 vtkInteractorStyleBaseView2D::vtkInteractorStyleBaseView2D()
00010 {
00012         // RaC 04-2010 This mechanism of adding new functionalities has to be made externally in order 
00013         // to maintain a plugin architecture. 
00014         // Remember: The manualInteractorWindowLevel changes the window level over the image
00015         //           The vtkInteractorScrollZ changes the slice with right click interaction
00016         //                       This vtkInteractorStyleBaseView2D gives the minimal interaction with a 2D scene
00017         //
00018         // _manualinteractorwindowlevel= new manualInteractorWindowLevel();
00019         // AddInteractorStyleMaracas( _manualinteractorwindowlevel );
00020         //
00021         // _vtkInteractorScrollZ = new vtkInteractorScrollZ();
00022         // AddInteractorStyleMaracas(_vtkInteractorScrollZ);
00024 }
00025 //---------------------------------------------------------------------------
00026 vtkInteractorStyleBaseView2D::~vtkInteractorStyleBaseView2D()
00027 {
00028 }
00029 
00030 //---------------------------------------------------------------------------
00031 void  vtkInteractorStyleBaseView2D::SetInteractorScrollZ(vtkInteractorScrollZ* interactorScroll)
00032 {    
00033         _vtkInteractorScrollZ = interactorScroll;
00034         AddInteractorStyleMaracas(_vtkInteractorScrollZ);
00035 }
00036 
00037 //---------------------------------------------------------------------------
00038 void  vtkInteractorStyleBaseView2D::SetInteractorWindowLevel(manualInteractorWindowLevel* interactorWindowLevel)
00039 {    
00040         _manualinteractorwindowlevel = interactorWindowLevel;
00041         AddInteractorStyleMaracas(_manualinteractorwindowlevel);
00042 }
00043 
00044 //---------------------------------------------------------------------------
00045 void  vtkInteractorStyleBaseView2D::OnRightButtonDown()  // virtual
00046 {    
00047         vtkInteractorStyleBaseView::OnRightButtonDown();
00048 
00049         if ((GetInteractor()->GetControlKey()==1) && (GetInteractor()->GetShiftKey()==0) ){
00050                 this->vtkInteractorStyleImage::OnRightButtonDown();
00051         }
00052 }
00053 
00054 //---------------------------------------------------------------------------
00055 void  vtkInteractorStyleBaseView2D::OnRightButtonUp()  // virtual
00056 {
00057         vtkInteractorStyleBaseView::OnRightButtonUp();
00058         this->vtkInteractorStyleImage::OnRightButtonUp();
00059 }
00060 //---------------------------------------------------------------------------
00061 void  vtkInteractorStyleBaseView2D::OnMouseMove () // virtual
00062 {
00063         vtkInteractorStyleBaseView::OnMouseMove();
00064         this->vtkInteractorStyleImage::OnMouseMove();
00065 }
00066 //---------------------------------------------------------------------------
00067 void  vtkInteractorStyleBaseView2D::OnLeftButtonDown() // virtual
00068 {
00069         vtkInteractorStyleBaseView::OnLeftButtonDown();
00070 
00071         if ((GetInteractor()->GetControlKey()==0) && (GetInteractor()->GetShiftKey()==1) )
00072         {
00073                 this->vtkInteractorStyleImage::OnLeftButtonDown();
00074         }
00075 }
00076 //---------------------------------------------------------------------------
00077 void  vtkInteractorStyleBaseView2D::OnLeftButtonUp () // virtual
00078 {
00079         vtkInteractorStyleBaseView::OnLeftButtonUp();
00080 
00081         this->vtkInteractorStyleImage::OnLeftButtonUp();
00082 }
00083 //---------------------------------------------------------------------------
00084 void  vtkInteractorStyleBaseView2D::OnMiddleButtonDown () // virtual
00085 {
00086         vtkInteractorStyleBaseView::OnMiddleButtonDown();
00087 
00088         if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) )
00089         {
00090                 this->vtkInteractorStyleImage::OnLeftButtonDown();
00091         }
00092 }
00093 //---------------------------------------------------------------------------
00094 void vtkInteractorStyleBaseView2D::OnMiddleButtonUp () // virtual
00095 {
00096         vtkInteractorStyleBaseView::OnMiddleButtonUp();
00097 
00098         if ((GetInteractor()->GetControlKey()==1) || (GetInteractor()->GetShiftKey()==1) )
00099         {
00100                 this->vtkInteractorStyleImage::OnLeftButtonUp();
00101         }
00102 }

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1