]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasMultipleVolumeRendererManager.h
MIP function
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracasMultipleVolumeRendererManager.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxMaracasMultipleVolumeRendererManager.h,v $
5   Language:  C++
6   Date:      $Date: 2009/11/20 17:09:05 $
7   Version:   $Revision: 1.7 $
8
9   Copyright: (c) 2002, 2003
10   License:
11   
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.
15
16 =========================================================================*/
17
18
19
20
21 #ifndef __wxMaracasMultipleVolumeRendererManagerH__
22 #define __wxMaracasMultipleVolumeRendererManagerH__
23
24 #include <iostream>
25 #include <vector>
26 #include <vtkMatrix4x4.h>
27
28 #include "wxMaracasMultipleVolumeRendererManagerData.h"
29
30
31 class wxMaracasMultipleVolumeRendererManager  {
32
33 public:
34         wxMaracasMultipleVolumeRendererManager();
35         ~wxMaracasMultipleVolumeRendererManager();
36
37         /**
38         **      Sets the renderer to manage the prop3D from the view
39         **/
40         void setRenderer(vtkRenderer*  renderer);
41
42         /**
43         **      Gets the renderer to manage the prop3D from the view
44         **/
45         vtkRenderer* getRenderer();
46         
47         /**
48         **      Adds a volume
49         **/
50         int addVolume(int idTP, vtkImageData* img, std::string dataname) throw (char*); 
51         
52         /**
53         **      loads a prop3D from a nSTL file
54         **/
55         vtkProp3D* getVolume(std::string filename);
56
57         /**
58         **      loads a MHD file to convert it into an actor
59         **/
60         vtkImageData* getImageData(std::string filename);
61
62         /**
63         ** Gets image data asotiated with the rendering manager
64         **/
65         vtkImageData* getImageData();
66
67         /**
68         **      adds or removes an actor depending of the bool value
69         **/
70         void addRemoveActor(int propid, bool addremove) throw(char*);
71         
72         /**
73         **      Check if the variables are setted correctly
74         **/
75         void checkInvariant()throw(char*);
76
77         /** 
78         ** Set Volume Opacity
79         **/
80         void setVolumeOpacity(int propid, std::vector<double> greylevel,std::vector<double> value) throw(char*);
81         /**
82         **      Set Volume Color
83         **/
84         void setVolumeColor(int volid, std::vector<double> greylevel,
85                                                                         std::vector<double> red,
86                                                                         std::vector<double> green,
87                                                                         std::vector<double> blue)throw(char*);  
88
89         /**
90         ** Given an id search the data in the vector
91         **/
92         wxMaracasMultipleVolumeRendererManagerData* getViewData(int id)throw(char*);
93
94         void changeCompositeMIPFunction(int id, int function) throw (char *);
95         
96         /**
97         ** Deletes given actor
98         **/
99         void deleteActor(int volumeid)throw (char *);
100
101         /**
102         ** Updates given volume
103         **/
104         void Update(int propid);
105         
106         vtkPiecewiseFunction* GetTransferFunction(int volumeid);
107         vtkColorTransferFunction* GetColorFunction(int volumeid);
108 private:        
109         std::vector<wxMaracasMultipleVolumeRendererManagerData*> prop3Dvect;
110
111         vtkRenderer*  _renderer;
112         vtkImageData* image;
113
114         int _idCount;
115
116         
117
118         
119 };
120
121 #endif