2 /*=========================================================================
5 Module: $RCSfile: volumerenderermanager.h,v $
7 Date: $Date: 2011/05/31 19:03:03 $
8 Version: $Revision: 1.1 $
10 Copyright: (c) 2002, 2003
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notice for more information.
17 =========================================================================*/
22 #ifndef __VolumeRendererManagerH__
23 #define __VolumeRendererManagerH__
27 #include <vtkMatrix4x4.h>
29 #include "volumerenderermanagerdata.h"
32 class VolumeRendererManager {
35 VolumeRendererManager();
36 ~VolumeRendererManager();
39 ** Sets the renderer to manage the prop3D from the view
41 void setRenderer(vtkRenderer* renderer);
44 ** Gets the renderer to manage the prop3D from the view
46 vtkRenderer* getRenderer();
51 int addVolume(int idTP, vtkImageData* img, std::string dataname) throw (char*);
54 ** loads a prop3D from a nSTL file
56 vtkProp3D* getVolume(std::string filename);
59 ** loads a MHD file to convert it into an actor
61 vtkImageData* getImageData(std::string filename);
64 ** Gets image data asotiated with the rendering manager
66 vtkImageData* getImageData();
69 ** adds or removes an actor depending of the bool value
71 void addRemoveActor(int propid, bool addremove) throw(char*);
74 ** Check if the variables are setted correctly
76 void checkInvariant()throw(char*);
81 void setVolumeOpacity(int propid, std::vector<double> greylevel,std::vector<double> value) throw(char*);
85 void setVolumeColor(int volid, std::vector<double> greylevel,
86 std::vector<double> red,
87 std::vector<double> green,
88 std::vector<double> blue)throw(char*);
91 ** Given an id search the data in the vector
93 VolumeRendererManagerData* getViewData(int id)throw(char*);
95 void changeCompositeMIPFunction(int id, int function) throw (char *);
98 ** Deletes given actor
100 void deleteActor(int volumeid)throw (char *);
103 ** Updates given volume
105 void Update(int propid);
107 vtkPiecewiseFunction* GetTransferFunction(int volumeid);
108 vtkColorTransferFunction* GetColorFunction(int volumeid);
110 std::vector<VolumeRendererManagerData*> prop3Dvect;
112 vtkRenderer* _renderer;