From 0a14b386fd3bdf13980b16b704f3aafa8eb2de7a Mon Sep 17 00:00:00 2001 From: ouv Date: Wed, 28 Sep 2005 14:25:13 +0000 Subject: [PATCH] AddActor() and RemoveActor() added --- src/VVTK/VVTK_View.cxx | 30 +++++++++++++++++++++++++++++- src/VVTK/VVTK_View.h | 12 +++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/VVTK/VVTK_View.cxx b/src/VVTK/VVTK_View.cxx index 519b2326..c184e254 100644 --- a/src/VVTK/VVTK_View.cxx +++ b/src/VVTK/VVTK_View.cxx @@ -29,6 +29,7 @@ #include "VVTK_View.h" #include "VVTK_InteractorStyle.h" #include "VISU_ImplicitFunctionWidget.h" +#include "VISU_GaussPtsAct.h" #include "SVTK_RenderWindowInteractor.h" #include "VVTK_Renderer.h" @@ -181,6 +182,32 @@ VVTK_MainWindow1 {} +//---------------------------------------------------------------------------- +void +VVTK_MainWindow1 +::AddActor(VTKViewer_Actor* theActor, + bool theIsUpdate) +{ + VISU_GaussPtsAct* anActor = dynamic_cast(theActor); + if( anActor ) + mySegmentationCursorDlg->AddActor( anActor ); + + SVTK_MainWindow::AddActor( theActor, theIsUpdate ); +} + +//---------------------------------------------------------------------------- +void +VVTK_MainWindow1 +::RemoveActor(VTKViewer_Actor* theActor, + bool theIsUpdate) +{ + VISU_GaussPtsAct* anActor = dynamic_cast(theActor); + if( anActor ) + mySegmentationCursorDlg->RemoveActor( anActor ); + + SVTK_MainWindow::RemoveActor( theActor, theIsUpdate ); +} + //---------------------------------------------------------------------------- VVTK_Renderer1* VVTK_MainWindow1 @@ -212,7 +239,8 @@ VVTK_MainWindow1 if( theIsPlaneSegmentationOn ) { - mySegmentationCursorDlg->Update(); + mySegmentationCursorDlg->UpdateSegmentation(); + mySegmentationCursorDlg->UpdateOutsideCursor(); mySegmentationCursorDlg->show(); } else diff --git a/src/VVTK/VVTK_View.h b/src/VVTK/VVTK_View.h index 22993d4b..1be8c53d 100644 --- a/src/VVTK/VVTK_View.h +++ b/src/VVTK/VVTK_View.h @@ -61,7 +61,17 @@ public: virtual ~VVTK_MainWindow1(); - VVTK_Renderer1* + virtual + void + AddActor(VTKViewer_Actor* theActor, + bool theIsUpdate = false); + + virtual + void + RemoveActor(VTKViewer_Actor* theActor, + bool theIsUpdate = false); + + VVTK_Renderer1* GetRenderer1(); virtual -- 2.39.2