]> Creatis software - creaMaracasVisu.git/blob - lib/Kernel/VTKObjects/SurfaceRenderer/wxMaracasSurfaceRenderingManagerData.h
150524566adcf1e455be19790ee139d5b22bfe58
[creaMaracasVisu.git] / lib / Kernel / VTKObjects / SurfaceRenderer / wxMaracasSurfaceRenderingManagerData.h
1 #ifndef WXMARACASSURFACERENDERINGMANAGERDATA_H_
2 #define WXMARACASSURFACERENDERINGMANAGERDATA_H_
3
4 #include "vtkProp3D.h"
5 #include "vtkRenderer.h"
6 #include "vtkSTLReader.h"
7 #include "vtkPolyDataMapper.h"
8 #include "vtkActor.h"
9 #include "vtkProperty.h"
10 #include "vtkBoxWidget.h"
11
12
13 #define PLY  ".ply"
14 #define STL  ".stl"
15
16
17 class wxMaracasSurfaceRenderingManagerData {
18
19 public:
20         wxMaracasSurfaceRenderingManagerData(vtkProp3D* _prop3Dvect, std::string dataname="", vtkRenderWindowInteractor*  interactor=NULL);     
21         ~wxMaracasSurfaceRenderingManagerData();        
22         
23         /**
24         **      Adds a prop3D to the world of the application
25         **/
26         void setProp3D(vtkProp3D* prop3D);
27         /**
28         **      Changes the opacity in a prop3D
29         **/
30         void changeOpacity(int value);          
31         /**
32         **      Check if the variables are setted correctly
33         **/
34         void checkInvariant();
35         /**
36         **      get the prop3D 
37         **/
38         vtkProp3D* getProp3D();
39         /**
40         **      return the id from the daat
41         **/
42         int getId();
43         /**
44         **      set data id
45         **/
46         void setId(int propid);
47         /**
48         **      Get the filanme
49         **/
50     std::string getDataname();
51         /**
52         ** Set the filanme
53         **/
54     void setDataname(std::string dataname);
55         
56         /**
57         **      creates the image 
58         **/
59         void contourExtractor(int isovalue);
60
61         /**
62         **      Changes the color of the actor
63         **/
64         void changeColor(double red, double green, double blue);        
65         
66         /**
67         ** adds or removes the surface box
68         **/
69         void addRemoveSurfaceBox(bool visible);
70
71         void initializeBoxWidget(vtkRenderWindowInteractor*  interactor);
72
73         void saveProp3DSTL(const char* filename);
74
75         virtual void enableBoxWidget(bool enable);
76
77 protected:
78         vtkPolyDataMapper* _dataMapper;
79         /**
80          * Prop 3D (data actor)
81          */
82         vtkProp3D* _prop3D;     
83         /**
84          *  Dataname given by the user (ex. filename) 
85          **/
86         std::string _dataname;  
87         
88         /**
89         **
90         **/
91         vtkBoxWidget* _boxWidgetS1;
92 private:
93         
94         /*
95          * id of the data
96          */
97         int _id;                
98
99         
100
101         
102 };
103
104 #endif /*WXMARACASSURFACERENDERINGMANAGERDATA_H_*/