Program: wxMaracas
Module: $RCSfile: CutModelManager.cxx,v $
Language: C++
-Date: $Date: 2010/03/04 15:09:57 $
-Version: $Revision: 1.8 $
+Date: $Date: 2010/04/02 07:22:25 $
+Version: $Revision: 1.9 $
Copyright: (c) 2002, 2003
License:
_polygonCutter = new CutModelPolygon();
- cout<<"RaC ContourDrawer::Update Printing points"<<endl;
+ cout<<"RaC Printing points......"<<endl;
for(int t=0;t<numPoints;t++)
{
double point[3];
//---------------------------------------------------------------------------
vtkInteractorStyleBaseView2D::vtkInteractorStyleBaseView2D()
{
- _manualinteractorwindowlevel= new manualInteractorWindowLevel();
- AddInteractorStyleMaracas( _manualinteractorwindowlevel );
-
- _vtkInteractorScrollZ = new vtkInteractorScrollZ();
- AddInteractorStyleMaracas(_vtkInteractorScrollZ);
-
+ ////////////
+ // RaC 04-2010 This mechanism of adding new functionalities has to be made externally in order
+ // to maintain a plugin architecture.
+ // Remember: The manualInteractorWindowLevel changes the window level over the image
+ // The vtkInteractorScrollZ changes the slice with right click interaction
+ // This vtkInteractorStyleBaseView2D gives the minimal interaction with a 2D scene
+ //
+ // _manualinteractorwindowlevel= new manualInteractorWindowLevel();
+ // AddInteractorStyleMaracas( _manualinteractorwindowlevel );
+ //
+ // _vtkInteractorScrollZ = new vtkInteractorScrollZ();
+ // AddInteractorStyleMaracas(_vtkInteractorScrollZ);
+ ////////////
}
//---------------------------------------------------------------------------
vtkInteractorStyleBaseView2D::~vtkInteractorStyleBaseView2D()
{
}
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView2D::SetInteractorScrollZ(vtkInteractorScrollZ* interactorScroll)
+{
+ _vtkInteractorScrollZ = interactorScroll;
+ AddInteractorStyleMaracas(_vtkInteractorScrollZ);
+}
+
+//---------------------------------------------------------------------------
+void vtkInteractorStyleBaseView2D::SetInteractorWindowLevel(manualInteractorWindowLevel* interactorWindowLevel)
+{
+ _manualinteractorwindowlevel = interactorWindowLevel;
+ AddInteractorStyleMaracas(_manualinteractorwindowlevel);
+}
+
//---------------------------------------------------------------------------
void vtkInteractorStyleBaseView2D::OnRightButtonDown() // virtual
{
vtkInteractorStyleBaseView2D();
~vtkInteractorStyleBaseView2D();
static vtkInteractorStyleBaseView2D *New();
+
+ // RaC 04-2010 Look for the description of new changes in vtkInteractorStyleBaseView2D constructor.
+ void SetInteractorScrollZ(vtkInteractorScrollZ* interactorScroll);
+ void SetInteractorWindowLevel(manualInteractorWindowLevel* interactorWindowLevel);
+
virtual void OnMouseMove();
virtual void OnLeftButtonDown();
virtual void OnLeftButtonUp();
// SetActive(false);
_imageViewer2XYZ -> GetVtkImageViewer2() -> SetupInteractor ( iren );
- SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+ //////////////
+ //RaC 04-2010 Look for the description of new changes in vtkInteractorStyleBaseView2D constructor.
+ //
+ // Previous version
+ // SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+ //
+ // Actual version
+ vtkInteractorStyleBaseView2D *style2D = vtkInteractorStyleBaseView2D::New();
+
+ manualInteractorWindowLevel *_manualinteractorwindowlevel= new manualInteractorWindowLevel();
+ style2D->SetInteractorWindowLevel( _manualinteractorwindowlevel );
+
+ vtkInteractorScrollZ *_vtkInteractorScrollZ = new vtkInteractorScrollZ();
+ style2D->SetInteractorScrollZ(_vtkInteractorScrollZ);
+
+ SetInteractorStyleImage( style2D );
+
+ // RaC
+ //////////////
_interactorstyleplane2D = new vtkInteractorStylePlane2D();
((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstyleplane2D );
_imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
_imageViewer2XYZ->GetVtkImageViewer2()->Render();
- SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+
+ //////////////
+ //RaC 04-2010 Look for the description of new changes in vtkInteractorStyleBaseView2D constructor.
+ //
+ // Previous version
+ // SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+ //
+ // Actual version
+ vtkInteractorStyleBaseView2D *style2D = vtkInteractorStyleBaseView2D::New();
+
+ manualInteractorWindowLevel *_manualinteractorwindowlevel= new manualInteractorWindowLevel();
+ style2D->SetInteractorWindowLevel( _manualinteractorwindowlevel );
+
+ vtkInteractorScrollZ *_vtkInteractorScrollZ = new vtkInteractorScrollZ();
+ style2D->SetInteractorScrollZ(_vtkInteractorScrollZ);
+
+ SetInteractorStyleImage( style2D );
+
+ // RaC
+ //////////////
}
_imageViewer2XYZ = new vtkImageViewer2_XYZ();
wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
_imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
- SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+
+ //////////////
+ //RaC 04-2010 Look for the description of new changes in vtkInteractorStyleBaseView2D constructor.
+ //
+ // Previous version
+ // SetInteractorStyleImage( vtkInteractorStyleBaseView2D::New() );
+ //
+ // Actual version
+ vtkInteractorStyleBaseView2D *style2D = vtkInteractorStyleBaseView2D::New();
+
+ manualInteractorWindowLevel *_manualinteractorwindowlevel= new manualInteractorWindowLevel();
+ style2D->SetInteractorWindowLevel( _manualinteractorwindowlevel );
+
+ vtkInteractorScrollZ *_vtkInteractorScrollZ = new vtkInteractorScrollZ();
+ style2D->SetInteractorScrollZ(_vtkInteractorScrollZ);
+
+ SetInteractorStyleImage( style2D );
+
+ // RaC
+ //////////////
+
}