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 #include "bbcreaMaracasVisuVolumeRendering.h"
27 #include "bbcreaMaracasVisuPackage.h"
29 #include "wxMaracasMultipleVolumeRendererView.h"
31 namespace bbcreaMaracasVisu
34 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,VolumeRendering)
35 BBTK_BLACK_BOX_IMPLEMENTATION(VolumeRendering,bbtk::WxBlackBox);
36 void VolumeRendering::Process()
39 // THE MAIN PROCESSING METHOD BODY
40 // Here we simply set the input 'In' value to the output 'Out'
41 // And print out the output value
42 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
43 // void bbSet{Input|Output}NAME(const TYPE&)
44 // const TYPE& bbGet{Input|Output}NAME() const
46 // * NAME is the name of the input/output
47 // (the one provided in the attribute 'name' of the tag 'input')
48 // * TYPE is the C++ type of the input/output
49 // (the one provided in the attribute 'type' of the tag 'input')
50 wxMaracasMultipleVolumeRendererView* volview = (wxMaracasMultipleVolumeRendererView*)bbGetOutputWidget();
51 vtkImageData* _img1 = bbGetInputIn0();
52 vtkImageData* _img2 = bbGetInputIn1();
53 vtkImageData* _img3 = bbGetInputIn2();
54 vtkImageData* _img4 = bbGetInputIn3();
55 vtkRenderer* renderer = bbGetInputRenderer();
58 if(renderer!=NULL&&_currentrenderer != renderer){
59 volview->setRenderer(renderer);
60 _currentrenderer = renderer;
62 if(_currentrenderer!=NULL){
64 volview->addVolume(_img1, "INPUT 1");
67 volview->addVolume(_img2, "INPUT 2");
70 volview->addVolume(_img3, "INPUT 3");
73 volview->addVolume(_img4, "INPUT 4");
78 //vtkImageData* img1 = ;
80 /*bbSetOutputOut0(volview->GetOutputImages()[0]);
81 bbSetOutputOut1(volview->GetOutputImages()[1]);
82 bbSetOutputOut2(volview->GetOutputImages()[2]);
83 bbSetOutputOut3(volview->GetOutputImages()[3]);*/
86 void VolumeRendering::CreateWidget(wxWindow* parent)
88 wxMaracasMultipleVolumeRendererView* volview = wxMaracasMultipleVolumeRendererView::getInstance(parent);
89 bbSetOutputWidget(volview);
91 void VolumeRendering::bbUserSetDefaultValues()
94 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
95 // Here we initialize the input 'In' to 0
100 bbSetInputRenderer(0);
102 bbSetOutputOut0(NULL);
103 bbSetOutputOut1(NULL);
104 bbSetOutputOut2(NULL);
105 bbSetOutputOut3(NULL);
108 void VolumeRendering::bbUserInitializeProcessing()
110 _currentrenderer = NULL;
112 void VolumeRendering::bbUserFinalizeProcessing()
115 // THE FINALIZATION METHOD BODY :
117 // but this is where you should desallocate the internal/output pointers
122 // EO namespace bbcreaMaracasVisu