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