]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManagerData.h
no newline at end of file
[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         **      get the prop3D 
30         **/
31         vtkProp3D* getProp3D();
32         /**
33         **      return the id from the daat
34         **/
35         int getId();
36         /**
37         **      set data id
38         **/
39         void setId(int propid);
40         /**
41         **      Get the filanme
42         **/
43     std::string getDataname();
44         /**
45         ** Set the filanme
46         **/
47     void setDataname(std::string dataname);     
48
49         
50         /**
51         **      Set Volume Color
52         **/
53         void setVolumeColor(std::vector<double>& greylevel,
54                                                                         std::vector<double>& red,
55                                                                         std::vector<double>& green,
56                                                                         std::vector<double>& blue);     
57
58         /**
59         **      Volume Opacity
60         **/
61         void setVolumeOpacity(std::vector<double> greylevel,std::vector<double> value);
62
63         vtkPiecewiseFunction* GetTransferFunction(){
64                 return _tfun;
65         }
66         vtkColorTransferFunction* GetColorFunction(){
67                 return _ctfun;
68         }
69         
70 protected:
71         /**
72          * Prop 3D (data actor)
73          */
74         vtkImageData* _vol;     
75         /**
76          *  Dataname given by the user (ex. filename) 
77          **/
78         std::string _dataname;  
79         
80         
81 private:
82         
83         /*
84          * id of the data
85          */
86         int _id;                
87
88         vtkVolumeRayCastCompositeFunction       *_compositeFunction;
89         vtkPlanes                                                       *_volumePlanes;
90         vtkVolumeRayCastMapper                          *_volumeMapper;
91         vtkVolumeProperty                                       *_volumeProperty;
92         vtkVolume                                                       *_newvol;
93         vtkPiecewiseFunction* _tfun;
94         vtkColorTransferFunction* _ctfun;
95
96         
97 };
98
99 #endif /*wxMaracasMultipleVolumeRendererManagerData_H_*/