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)
4 #include "bbcreaVtkPlaneWidget.h"
5 #include "bbcreaVtkPackage.h"
11 void boxcreaVtkPlaneWidget::Execute() // virutal
13 box->bbSetOutputOut( box->_boxcreavtkplanewidget.GetPlaneSource()->GetOutput() );
14 box->bbSignalOutputModification(std::string("Out"));
15 box->bbSetOutputCenter( box->_boxcreavtkplanewidget.GetCenter() );
16 box->bbSignalOutputModification(std::string("Center"));
17 box->bbSetOutputNormal( box->_boxcreavtkplanewidget.GetNormal() );
18 box->bbSignalOutputModification(std::string("Normal"));
22 //----------------------------------------------------------------------------------------------
23 //----------------------------------------------------------------------------------------------
24 //----------------------------------------------------------------------------------------------
25 //----------------------------------------------------------------------------------------------
27 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,PlaneWidget)
28 BBTK_BLACK_BOX_IMPLEMENTATION(PlaneWidget,bbtk::AtomicBlackBox);
30 // 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)
32 void PlaneWidget::Process()
35 // THE MAIN PROCESSING METHOD BODY
36 // Here we simply set the input 'In' value to the output 'Out'
37 // And print out the output value
38 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
39 // void bbSet{Input|Output}NAME(const TYPE&)
40 // const TYPE& bbGet{Input|Output}NAME() const
42 // * NAME is the name of the input/output
43 // (the one provided in the attribute 'name' of the tag 'input')
44 // * TYPE is the C++ type of the input/output
45 // (the one provided in the attribute 'type' of the tag 'input')
48 if ((bbGetInputIn()==NULL) || (bbGetInputRenderer()==NULL))
50 bbSetOutputOut( NULL );
51 std::vector<double> center;
52 std::vector<double> normal;
53 bbSetOutputCenter( center );
54 bbSetOutputNormal( normal );
56 _boxcreavtkplanewidget.SetActive( bbGetInputActive() );
57 _boxcreavtkplanewidget.SetImage( bbGetInputIn() );
58 _boxcreavtkplanewidget.SetResolution( bbGetInputResolution() );
59 _boxcreavtkplanewidget.SetRenderer( bbGetInputRenderer() );
60 _boxcreavtkplanewidget.SetRepresentation( bbGetInputRepresentation() );
61 _boxcreavtkplanewidget.SetOrigin( bbGetInputOrigin() );
62 _boxcreavtkplanewidget.Process();
64 bbSetOutputOut( _boxcreavtkplanewidget.GetPlaneSource()->GetOutput() );
65 bbSetOutputCenter( _boxcreavtkplanewidget.GetCenter() );
66 bbSetOutputNormal( _boxcreavtkplanewidget.GetNormal() );
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)
73 void PlaneWidget::bbUserSetDefaultValues()
76 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
77 // Here we initialize the input 'In' to 0
79 bbSetInputActive(false);
81 bbSetInputResolution(60);
82 bbSetInputRepresentation(1);
83 bbSetInputRenderer(NULL);
85 _boxcreavtkplanewidget.box = this;
88 // 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)
90 void PlaneWidget::bbUserInitializeProcessing()
93 // THE INITIALIZATION METHOD BODY :
95 // but this is where you should allocate the internal/output pointers
101 // 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)
103 void PlaneWidget::bbUserFinalizeProcessing()
106 // THE FINALIZATION METHOD BODY :
108 // but this is where you should desallocate the internal/output pointers
113 }// EO namespace bbcreaVtk