]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx
637898152fa920d21718a8483a5d7d4337074781
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkPlaneWidget.cxx
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #include "bbcreaVtkPlaneWidget.h"
5 #include "bbcreaVtkPackage.h"
6 namespace bbcreaVtk
7 {
8
9
10
11 void boxcreaVtkPlaneWidget::Execute()  // virutal
12 {
13         printf("EED bbcreaVtkPlaneWidget::Execute (virtual) start \n");
14         box->bbSetOutputOut( box->_boxcreavtkplanewidget.GetPlaneSource()->GetOutput()  );
15         printf("EED bbcreaVtkPlaneWidget::Execute (virtual) start 1\n");
16         box->bbSignalOutputModification(std::string("Out"));
17         printf("EED bbcreaVtkPlaneWidget::Execute (virtual) end \n");
18
19         box->bbSetOutputCenter( box->_boxcreavtkplanewidget.GetCenter() );
20         box->bbSignalOutputModification(std::string("Center"));
21         box->bbSetOutputNormal( box->_boxcreavtkplanewidget.GetNormal() );
22         box->bbSignalOutputModification(std::string("Normal"));
23
24 }
25
26 //----------------------------------------------------------------------------------------------
27 //----------------------------------------------------------------------------------------------
28 //----------------------------------------------------------------------------------------------
29 //----------------------------------------------------------------------------------------------
30
31 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,PlaneWidget)
32 BBTK_BLACK_BOX_IMPLEMENTATION(PlaneWidget,bbtk::AtomicBlackBox);
33 //===== 
34 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
35 //===== 
36 void PlaneWidget::Process()
37 {
38
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 
45 //    Where :
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
51         _boxcreavtkplanewidget.SetActive( bbGetInputActive() );
52         _boxcreavtkplanewidget.SetImage( bbGetInputIn() );
53         _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() );
54         _boxcreavtkplanewidget.SetRenderer( bbGetInputRenderer() );
55         _boxcreavtkplanewidget.Process();
56         bbSetOutputOut( _boxcreavtkplanewidget.GetPlaneSource()->GetOutput() );
57         bbSetOutputCenter( _boxcreavtkplanewidget.GetCenter() );
58         bbSetOutputNormal( _boxcreavtkplanewidget.GetNormal() );
59 }
60 //===== 
61 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
62 //===== 
63 void PlaneWidget::bbUserSetDefaultValues()
64 {
65
66 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
67 //    Here we initialize the input 'In' to 0
68
69    bbSetInputActive(false);
70    bbSetInputIn(NULL);
71    bbSetInputResolution(60);
72    bbSetInputRenderer(NULL);
73    bbSetOutputOut(NULL);
74    _boxcreavtkplanewidget.box = this;
75 }
76 //===== 
77 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
78 //===== 
79 void PlaneWidget::bbUserInitializeProcessing()
80 {
81
82 //  THE INITIALIZATION METHOD BODY :
83 //    Here does nothing 
84 //    but this is where you should allocate the internal/output pointers 
85 //    if any 
86
87   
88 }
89 //===== 
90 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
91 //===== 
92 void PlaneWidget::bbUserFinalizeProcessing()
93 {
94
95 //  THE FINALIZATION METHOD BODY :
96 //    Here does nothing 
97 //    but this is where you should desallocate the internal/output pointers 
98 //    if any
99   
100 }
101 }
102 // EO namespace bbcreaVtk
103
104