1 /*=========================================================================
4 Module: $RCSfile: wxMaracasSurfaceRenderingManager.h,v $
6 Date: $Date: 2010/01/21 13:54:15 $
7 Version: $Revision: 1.5 $
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)throw(char*);
71 ** loads a prop3D from a nSTL file
73 vtkProp3D* getProp3D(std::string filename);
76 ** loads a MHD file to convert it into an actor
78 vtkImageData* getImageData(std::string filename);
81 ** Gets image data asotiated with the rendering manager
83 vtkImageData* getImageData();
86 ** adds or removes an actor depending of the bool value
88 void addRemoveActor(int propid, bool addremove)throw(char*);
92 void addRemoveSurfaceBox(int propid, bool addremove) throw(char*);
94 ** Check if the variables are setted correctly
97 void checkInvariant()throw(char*);
100 ** Given an id search the data in the vector
102 wxMaracasSurfaceRenderingManagerData* getViewData(int id)throw(char*);
107 void setInteractor(vtkRenderWindowInteractor* interactor);
110 ** Given the id, return the max iso value from the imagedata
112 int getMaxIsoValue(int propid)throw(char*);
116 ** Changes the color of the actor
118 void changeColor(int propid, double red, double green, double blue) throw(char*);
120 void deleteActor(int propid)throw (char *);
122 void Transform(vtkMatrix4x4* tmatrix);
124 bool interactorSet();
127 std::vector<wxMaracasSurfaceRenderingManagerData*> prop3Dvect;
129 vtkRenderer* _renderer;
130 vtkRenderWindowInteractor* _interactor;