1 /*=========================================================================
4 Module: $RCSfile: wxMaracasSurfaceRenderingManager.h,v $
6 Date: $Date: 2011/06/28 16:56:13 $
7 Version: $Revision: 1.1 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
21 #ifndef __wxMaracasSurfaceRenderingManagerH__
22 #define __wxMaracasSurfaceRenderingManagerH__
26 #include <vtkMatrix4x4.h>
28 #include "wxMaracasSurfaceRenderingManagerData.h"
31 class wxMaracasSurfaceRenderingManager {
34 wxMaracasSurfaceRenderingManager();
35 ~wxMaracasSurfaceRenderingManager();
38 ** Sets the renderer to manage the prop3D from the surface render
40 void setRenderer(vtkRenderer* renderer);
43 ** Gets the renderer which manages the prop3D from the surface render
45 vtkRenderer* getRenderer();
50 void Update(int pid)throw(char*);
53 ** Adds a prop3D to the manager and returns the identifier
55 int addProp3D(int idTP, vtkProp3D* prop3D, std::string dataname) throw (char*);
57 ** Adds a prop3D to the manager and returns the identifier
59 int addPropMHD(int idTP, vtkImageData* imagedata, std::string dataname) throw(char*);
61 ** Changes the opacity in a prop3D
63 void changeOpacity(int propid, int value)throw(char*);
66 ** changes the isovalue in a prop3D
68 void changeIsoValue(int propid, double value);
70 void changeIsoValue(int propid, double min, double max );
73 ** loads a prop3D from a nSTL file
75 vtkProp3D* getProp3D(std::string filename);
78 ** loads a MHD file to convert it into an actor
80 vtkImageData* getImageData(std::string filename);
83 ** Gets image data asotiated with the rendering manager
85 vtkImageData* getImageData();
88 ** adds or removes an actor depending of the bool value
90 void addRemoveActor(int propid, bool addremove)throw(char*);
94 void addRemoveSurfaceBox(int propid, bool addremove) throw(char*);
96 ** Check if the variables are setted correctly
99 void checkInvariant()throw(char*);
102 ** Given an id search the data in the vector
104 wxMaracasSurfaceRenderingManagerData* getViewData(int id)throw(char*);
109 void setInteractor(vtkRenderWindowInteractor* interactor);
112 ** Given the id, return the max iso value from the imagedata
114 int getMaxIsoValue(int propid)throw(char*);
118 ** Changes the color of the actor
120 void changeColor(int propid, double red, double green, double blue) throw(char*);
122 void deleteActor(int propid)throw (char *);
124 void Transform(vtkMatrix4x4* tmatrix);
126 bool interactorSet();
129 void enableBoundingBox(int propid, bool enable);
131 void saveProp3DSTL(int propid,const char* filename);
134 std::vector<wxMaracasSurfaceRenderingManagerData*> prop3Dvect;
136 vtkRenderer* _renderer;
137 vtkRenderWindowInteractor* _interactor;