]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbcreaMaracasVisuSurfaceRendering.cxx
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / bbtk / src / bbcreaMaracasVisuSurfaceRendering.cxx
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
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
8 #
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.
15 #
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
20 #  liability.
21 #
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 # ------------------------------------------------------------------------ */
25
26 #include "bbcreaMaracasVisuSurfaceRendering.h"
27 #include "bbcreaMaracasVisuPackage.h"
28
29
30 #include "wxMaracasSurfaceRendering.h"
31
32 namespace bbcreaMaracasVisu
33 {
34
35 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,SurfaceRendering)
36 BBTK_BLACK_BOX_IMPLEMENTATION(SurfaceRendering,bbtk::WxBlackBox);
37 void SurfaceRendering::Process()
38 {
39
40         wxMaracasSurfaceRendering* surrend = wxMaracasSurfaceRendering::getInstance();
41         std::vector<vtkImageData*> tempvect;
42         int i;
43
44         if(surrend != NULL){
45                 vtkRenderer* renderer = bbGetInputRenderer();
46                 vtkRenderWindowInteractor* interactor = bbGetInputInteractor();
47                 surrend->setRenderer(renderer);
48                 surrend->setInteractor(interactor);
49                 vtkImageData* prop3D;
50                 tempvect.push_back(bbGetInputIn0());
51                 tempvect.push_back(bbGetInputIn1());
52                 tempvect.push_back(bbGetInputIn2());
53                 tempvect.push_back(bbGetInputIn3());
54                 tempvect.push_back(bbGetInputIn4());
55
56                 for(i = 0; i < (int)tempvect.size();i++){
57                         prop3D = tempvect[i];
58                         if(prop3D != NULL&&renderer != NULL){
59                                 surrend->addPropMHD(prop3D);
60                         }
61                 }
62         }  
63 }
64 void SurfaceRendering::CreateWidget(wxWindow* parent)
65 {
66
67
68         //std::cout << "Your application's directory is: " << path;
69
70         wxMaracasSurfaceRendering* surrend = wxMaracasSurfaceRendering::getInstance(parent);
71         //GetDllDirectory(_MAX_PATH, currentPath);
72         //std::cout << "Your application's directory is: " << GetDllDirectory(_MAX_PATH, currentPath)<<std::endl;
73
74         bbSetOutputWidget(surrend);
75   
76 }
77
78         //-----------------------------------------------------------------     
79         void SurfaceRendering::bbUserSetDefaultValues()
80         {
81                 bbSetInputIn0(NULL);
82                 bbSetInputIn1(NULL);
83                 bbSetInputIn2(NULL);
84                 bbSetInputIn3(NULL);
85                 bbSetInputIn4(NULL);
86                 bbSetInputRenderer(NULL);
87                 bbSetInputInteractor(NULL);
88                 bbSetOutputWidget(NULL);
89                 bbSetOutputOut1(NULL);
90                 bbSetOutputOut2(NULL);
91                 bbSetOutputOut3(NULL);
92                 bbSetOutputOut4(NULL);
93         }
94         
95         //-----------------------------------------------------------------     
96         void SurfaceRendering::bbUserInitializeProcessing()
97         {
98         }
99         
100         //-----------------------------------------------------------------     
101         void SurfaceRendering::bbUserFinalizeProcessing()
102         {
103         }
104         
105         //-----------------------------------------------------------------     
106         
107         
108
109 }
110 // EO namespace bbcreaMaracasVisu
111
112