1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 /*=========================================================================
29 Module: $RCSfile: wxMaracasMultipleVolumeRendererManager.h,v $
31 Date: $Date: 2012/11/15 14:14:35 $
32 Version: $Revision: 1.8 $
34 Copyright: (c) 2002, 2003
37 This software is distributed WITHOUT ANY WARRANTY; without even
38 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
39 PURPOSE. See the above copyright notice for more information.
41 =========================================================================*/
46 #ifndef __wxMaracasMultipleVolumeRendererManagerH__
47 #define __wxMaracasMultipleVolumeRendererManagerH__
51 #include <vtkMatrix4x4.h>
53 #include "wxMaracasMultipleVolumeRendererManagerData.h"
56 class wxMaracasMultipleVolumeRendererManager {
59 wxMaracasMultipleVolumeRendererManager();
60 ~wxMaracasMultipleVolumeRendererManager();
63 ** Sets the renderer to manage the prop3D from the view
65 void setRenderer(vtkRenderer* renderer);
68 ** Gets the renderer to manage the prop3D from the view
70 vtkRenderer* getRenderer();
75 int addVolume(int idTP, vtkImageData* img, std::string dataname) throw (char*);
78 ** loads a prop3D from a nSTL file
80 vtkProp3D* getVolume(std::string filename);
83 ** loads a MHD file to convert it into an actor
85 vtkImageData* getImageData(std::string filename);
88 ** Gets image data asotiated with the rendering manager
90 vtkImageData* getImageData();
93 ** adds or removes an actor depending of the bool value
95 void addRemoveActor(int propid, bool addremove) throw(char*);
98 ** Check if the variables are setted correctly
100 void checkInvariant()throw(char*);
103 ** Set Volume Opacity
105 void setVolumeOpacity(int propid, std::vector<double> greylevel,std::vector<double> value) throw(char*);
109 void setVolumeColor(int volid, std::vector<double> greylevel,
110 std::vector<double> red,
111 std::vector<double> green,
112 std::vector<double> blue)throw(char*);
115 ** Given an id search the data in the vector
117 wxMaracasMultipleVolumeRendererManagerData* getViewData(int id)throw(char*);
119 void changeCompositeMIPFunction(int id, int function) throw (char *);
122 ** Deletes given actor
124 void deleteActor(int volumeid)throw (char *);
127 ** Updates given volume
129 void Update(int propid);
131 vtkPiecewiseFunction* GetTransferFunction(int volumeid);
132 vtkColorTransferFunction* GetColorFunction(int volumeid);
134 std::vector<wxMaracasMultipleVolumeRendererManagerData*> prop3Dvect;
136 vtkRenderer* _renderer;