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