2 #ifndef VolumeRendererManagerData_H_
3 #define VolumeRendererManagerData_H_
5 #include <vtkVolumeRayCastCompositeFunction.h>
7 #include <vtkVolumeRayCastMapper.h>
8 #include <vtkVolumeProperty.h>
10 #include <vtkPiecewiseFunction.h>
11 #include <vtkColorTransferFunction.h>
12 #include <vtkImageData.h>
13 #include <vtkProp3D.h>
14 #include <vtkRenderer.h>
15 #include <vtkVolumeRayCastMIPFunction.h>
16 #include <vtkLookupTable.h>
20 class VolumeRendererManagerData {
23 VolumeRendererManagerData(vtkImageData* vol, std::string dataname="");
24 VolumeRendererManagerData(vtkImageData* vol, vtkRenderer* render, std::string dataname="");
25 ~VolumeRendererManagerData();
28 ** Check if the variables are setted correctly
30 void checkInvariant()throw (char *);
40 vtkProp3D* getProp3D();
43 ** return the id from the daat
50 void setId(int propid);
55 std::string getDataname();
60 void setDataname(std::string dataname);
65 void setVolumeColor(std::vector<double>& greylevel,
66 std::vector<double>& red,
67 std::vector<double>& green,
68 std::vector<double>& blue);
73 void setVolumeOpacity(std::vector<double> greylevel,std::vector<double> value);
75 vtkPiecewiseFunction* GetTransferFunction(){
79 vtkColorTransferFunction* GetColorFunction(){
83 void changeCompositeMIPFunction(int function) throw (char *);
85 void SetLookupTable(vtkLookupTable* lookuptable);
89 * Prop 3D (data actor)
93 * Dataname given by the user (ex. filename)
95 std::string _dataname;
105 vtkVolumeRayCastCompositeFunction *_compositeFunction;
106 vtkPlanes *_volumePlanes;
107 vtkVolumeRayCastMapper *_volumeMapper;
108 vtkVolumeProperty *_volumeProperty;
110 vtkPiecewiseFunction* _tfun;
111 vtkColorTransferFunction* _ctfun;
112 vtkVolumeRayCastMIPFunction* _MIPFunction;
114 void Initialize(vtkImageData* vol, std::string dataname);
119 #endif /*VolumeRendererManagerData_H_*/