]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.h
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracasMultipleVolumeRendererManagerData.h
1 #ifndef wxMaracasMultipleVolumeRendererManagerData_H_
2 #define wxMaracasMultipleVolumeRendererManagerData_H_
3
4 #include <vtkVolumeRayCastCompositeFunction.h>
5 #include <vtkPlanes.h>
6 #include <vtkVolumeRayCastMapper.h>
7 #include <vtkVolumeProperty.h>
8 #include <vtkVolume.h>
9 #include <vtkPiecewiseFunction.h>
10 #include <vtkColorTransferFunction.h>
11 #include <vtkImageData.h>
12 #include <vtkProp3D.h>
13 #include <vtkRenderer.h>
14
15 #include <vector>
16
17
18 class wxMaracasMultipleVolumeRendererManagerData  {
19
20 public:
21         wxMaracasMultipleVolumeRendererManagerData(vtkImageData* vol, std::string dataname=""); 
22         ~wxMaracasMultipleVolumeRendererManagerData();          
23         
24         /**
25         **      Check if the variables are setted correctly
26         **/
27         void checkInvariant();
28
29         /**
30         ** Updates volume
31         **/
32         void Update();
33         
34         /**
35         **      get the prop3D 
36         **/
37         vtkProp3D* getProp3D();
38         
39         /**
40         **      return the id from the daat
41         **/
42         int getId();
43         
44         /**
45         **      set data id
46         **/
47         void setId(int propid);
48         
49         /**
50         **      Get the filanme
51         **/
52     std::string getDataname();
53         
54         /**
55         ** Set the filanme
56         **/
57     void setDataname(std::string dataname);
58         
59         /**
60         **      Set Volume Color
61         **/
62         void setVolumeColor(std::vector<double>& greylevel,
63                                                                         std::vector<double>& red,
64                                                                         std::vector<double>& green,
65                                                                         std::vector<double>& blue);     
66
67         /**
68         **      Volume Opacity
69         **/
70         void setVolumeOpacity(std::vector<double> greylevel,std::vector<double> value);
71
72         vtkPiecewiseFunction* GetTransferFunction(){
73                 return _tfun;
74         }
75
76         vtkColorTransferFunction* GetColorFunction(){
77                 return _ctfun;
78         }
79         
80 protected:
81         /**
82          * Prop 3D (data actor)
83          */
84         vtkImageData* _vol;     
85         /**
86          *  Dataname given by the user (ex. filename) 
87          **/
88         std::string _dataname;  
89         
90         
91 private:
92         
93         /*
94          * id of the data
95          */
96         int _id;                
97
98         vtkVolumeRayCastCompositeFunction       *_compositeFunction;
99         vtkPlanes                                                       *_volumePlanes;
100         vtkVolumeRayCastMapper                          *_volumeMapper;
101         vtkVolumeProperty                                       *_volumeProperty;
102         vtkVolume                                                       *_newvol;
103         vtkPiecewiseFunction* _tfun;
104         vtkColorTransferFunction* _ctfun;
105
106         
107 };
108
109 #endif /*wxMaracasMultipleVolumeRendererManagerData_H_*/