1 /*=========================================================================
4 Module: $RCSfile: CutModelManager.h,v $
6 Date: $Date: 2009/09/01 14:01:36 $
7 Version: $Revision: 1.2 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
21 #ifndef __CutModelManagerH__
22 #define __CutModelManagerH__
27 #include "vtkImageData.h"
28 #include "vtkRenderWindowInteractor.h"
29 #include "vtkRenderer.h"
31 #include "CutModelException.h"
32 #include "CutModelData.h"
34 class CutModelManager {
40 void setImageData(vtkImageData* img);
42 void setInteractor(vtkRenderWindowInteractor* interactor);
44 void setRenderer(vtkRenderer* renderer);
46 void onAddCutModel(int id, vtkCommand* observer) throw( CutModelException);
48 double* getImageRange()throw( CutModelException);
50 void changeOpacity(int id,int opacity)throw( CutModelException);
52 void ShowViewBox(int id,bool check)throw( CutModelException);
54 void ChangeShape(int id,int selection)throw( CutModelException);
56 void changeColor(int id,double r,double g,double b)throw( CutModelException);
58 void updateActorDirection(int id)throw( CutModelException);
60 void RemoveActor(int id)throw( CutModelException);
62 void ExecuteCut(int id, double* range, bool isinside)throw( CutModelException);
64 vtkImageData* GetResultImage();
66 void RefreshActor(int id);
68 void checkInvariant() throw( CutModelException);
70 vtkImageData* _copyimg;
72 vtkRenderWindowInteractor* _interactor;
74 std::vector<CutModelData*> _vectordata;
75 CutModelData* getCutModelData(int id)throw( CutModelException);