]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxMaracasIRMViewManager.h
*** empty log message ***
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxMaracasIRMViewManager.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxMaracasIRMViewManager.h,v $
5   Language:  C++
6   Date:      $Date: 2009/05/14 13:54:35 $
7   Version:   $Revision: 1.5 $
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 __wxMaracasIRMViewManagerH__
22 #define __wxMaracasIRMViewManagerH__
23
24 #include <iostream>
25 #include <vector>
26
27 #include "wxMaracasIRMViewManagerData.h"
28
29
30 class wxMaracasIRMViewManager  {
31
32 public:
33         wxMaracasIRMViewManager();
34         ~wxMaracasIRMViewManager();
35
36         /**
37         **      Sets the renderer to manage the prop3D from the view
38         **/
39         void setRenderer(vtkRenderer*  renderer);
40         /**
41         **      Adds a prop3D to the manager and returns the identifier
42         **/
43         int addProp3D(vtkProp3D* prop3D, std::string dataname) throw (char*);
44         /**
45         **      Adds a prop3D to the manager and returns the identifier
46         **/
47         int addPropMHD(vtkImageData* imagedata, std::string dataname) throw(char*);
48         /**
49         **      Changes the opacity in a prop3D
50         **/
51         void changeOpacity(int propid, int value)throw(char*);
52
53         /**
54         **      changes the isovalue in a prop3D
55         **/
56         void changeIsoValue(int propid, double value)throw(char*);
57
58         /**
59         **      loads a prop3D from a nSTL file
60         **/
61         vtkProp3D* getProp3D(std::string filename);
62
63         /**
64         **      loads a MHD file to convert it into an actor
65         **/
66         vtkImageData* getImageData(std::string filename);
67
68         /**
69         **      adds or removes an actor depending of the bool value
70         **/
71         void addRemoveActor(int propid, bool addremove)throw(char*);
72         /**
73         **      Check if the variables are setted correctly
74         **/
75         void checkInvariant()throw(char*);
76
77         /**
78         **      Given an id search the data in the vector
79         **/
80         wxMaracasIRMViewManagerData* getViewData(int id)throw(char*);
81
82         /**
83         **      Given the id, return the max iso value from the imagedata
84         **/
85         int getMaxIsoValue(int propid)throw(char*);
86
87
88         /**
89         **      Changes the color of the actor
90         **/
91         void changeColor(int propid, double red, double green, double blue) throw(char*);
92
93         void deleteActor(int propid)throw (char *);
94         
95 private:        
96         std::vector<wxMaracasIRMViewManagerData*> prop3Dvect;
97
98         vtkRenderer*  _renderer;
99
100         int _idCount;
101
102         
103
104         
105 };
106
107 #endif