]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/CutModule/kernel/CutModelManager.h
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / CutModule / kernel / CutModelManager.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: CutModelManager.h,v $
5   Language:  C++
6   Date:      $Date: 2009/08/31 08:46:12 $
7   Version:   $Revision: 1.1 $
8
9   Copyright: (c) 2002, 2003
10   License:
11   
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.
15
16 =========================================================================*/
17
18
19
20
21 #ifndef __CutModelManagerH__
22 #define __CutModelManagerH__
23
24 #include <iostream>
25 #include <vector>
26
27 #include "vtkImageData.h"
28 #include "vtkRenderWindowInteractor.h"
29 #include "vtkRenderer.h"
30
31 #include "CutModelException.h"
32 #include "CutModelData.h"
33
34 class CutModelManager  {
35
36 public:
37         CutModelManager();
38         ~CutModelManager();
39
40         void setImageData(vtkImageData* img);
41
42         void setInteractor(vtkRenderWindowInteractor* interactor);
43
44         void setRenderer(vtkRenderer* renderer);
45         
46         void onAddCutModel(int id, vtkCommand* observer) throw( CutModelException);
47
48         double* getImageRange()throw( CutModelException);
49
50         void changeOpacity(int id,int opacity)throw( CutModelException);
51
52         void ShowViewBox(int id,bool check)throw( CutModelException);
53
54         void ChangeShape(int id,int selection)throw( CutModelException);
55
56         void changeColor(int id,double r,double g,double b)throw( CutModelException);
57
58         void updateActorDirection(int id)throw( CutModelException);
59
60         void RemoveActor(int id)throw( CutModelException);
61
62         void ExecuteCut(int id, double* range, bool isinside)throw( CutModelException);
63
64         vtkImageData* GetResultImage();
65 private:        
66         void checkInvariant() throw( CutModelException);
67         vtkImageData* _img;
68         vtkImageData* _copyimg;
69         vtkRenderer* _render;
70         vtkRenderWindowInteractor* _interactor;
71
72         std::vector<CutModelData*> _vectordata;
73         CutModelData* getCutModelData(int id)throw( CutModelException);
74         
75 };
76
77 #endif