]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkPlaneWidget.cxx
071fd0284450f943fb44c04e640dfdb8b2e4e0d2
[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
20 //----------------------------------------------------------------------------------------------
21 //----------------------------------------------------------------------------------------------
22 //----------------------------------------------------------------------------------------------
23 //----------------------------------------------------------------------------------------------
24
25 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,PlaneWidget)
26 BBTK_BLACK_BOX_IMPLEMENTATION(PlaneWidget,bbtk::AtomicBlackBox);
27 //===== 
28 // 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)
29 //===== 
30 void PlaneWidget::Process()
31 {
32
33 // THE MAIN PROCESSING METHOD BODY
34 //   Here we simply set the input 'In' value to the output 'Out'
35 //   And print out the output value
36 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
37 //    void bbSet{Input|Output}NAME(const TYPE&)
38 //    const TYPE& bbGet{Input|Output}NAME() const 
39 //    Where :
40 //    * NAME is the name of the input/output
41 //      (the one provided in the attribute 'name' of the tag 'input')
42 //    * TYPE is the C++ type of the input/output
43 //      (the one provided in the attribute 'type' of the tag 'input')
44
45         _boxcreavtkplanewidget.SetActive( bbGetInputActive() );
46         _boxcreavtkplanewidget.SetImage( bbGetInputIn() );
47         _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() );
48         _boxcreavtkplanewidget.SetRenderer( bbGetInputRenderer() );
49         _boxcreavtkplanewidget.Process();
50         bbSetOutputOut( _boxcreavtkplanewidget.GetPlaneSource()->GetOutput() );
51         bbSetOutputCenter( _boxcreavtkplanewidget.GetCenter() );
52         bbSetOutputCenter( _boxcreavtkplanewidget.GetNormal() );
53 }
54 //===== 
55 // 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)
56 //===== 
57 void PlaneWidget::bbUserSetDefaultValues()
58 {
59
60 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
61 //    Here we initialize the input 'In' to 0
62
63    bbSetInputActive(false);
64    bbSetInputIn(NULL);
65    bbSetInputResolution(60);
66    bbSetInputRenderer(NULL);
67    bbSetOutputOut(NULL);
68    _boxcreavtkplanewidget.box = this;
69 }
70 //===== 
71 // 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)
72 //===== 
73 void PlaneWidget::bbUserInitializeProcessing()
74 {
75
76 //  THE INITIALIZATION METHOD BODY :
77 //    Here does nothing 
78 //    but this is where you should allocate the internal/output pointers 
79 //    if any 
80
81   
82 }
83 //===== 
84 // 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)
85 //===== 
86 void PlaneWidget::bbUserFinalizeProcessing()
87 {
88
89 //  THE FINALIZATION METHOD BODY :
90 //    Here does nothing 
91 //    but this is where you should desallocate the internal/output pointers 
92 //    if any
93   
94 }
95 }
96 // EO namespace bbcreaVtk
97
98