1 /*=========================================================================
4 Module: $RCSfile: wxMaracasSurfaceRenderingManager.h,v $
6 Date: $Date: 2009/11/09 19:14:56 $
7 Version: $Revision: 1.2 $
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(vtkProp3D* prop3D, std::string dataname) throw (char*);
57 ** Adds a prop3D to the manager and returns the identifier
59 int addPropMHD(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*);
90 ** Check if the variables are setted correctly
92 void checkInvariant()throw(char*);
95 ** Given an id search the data in the vector
97 wxMaracasSurfaceRenderingManagerData* getViewData(int id)throw(char*);
100 ** Given the id, return the max iso value from the imagedata
102 int getMaxIsoValue(int propid)throw(char*);
106 ** Changes the color of the actor
108 void changeColor(int propid, double red, double green, double blue) throw(char*);
110 void deleteActor(int propid)throw (char *);
112 void Transform(vtkMatrix4x4* tmatrix);
115 std::vector<wxMaracasSurfaceRenderingManagerData*> prop3Dvect;
117 vtkRenderer* _renderer;