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 "bbcreaMaracasVisuManualContourModel_Box.h"
5 #include "bbcreaMaracasVisuPackage.h"
7 #include <creaContoursFactory.h>
10 namespace bbcreaMaracasVisu
13 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ManualContourModel_Box)
14 BBTK_BLACK_BOX_IMPLEMENTATION(ManualContourModel_Box,bbtk::AtomicBlackBox);
16 // 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)
18 void ManualContourModel_Box::Process()
21 // THE MAIN PROCESSING METHOD BODY
22 // Here we simply set the input 'In' value to the output 'Out'
23 // And print out the output value
24 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
25 // void bbSet{Input|Output}NAME(const TYPE&)
26 // const TYPE& bbGet{Input|Output}NAME() const
28 // * NAME is the name of the input/output
29 // (the one provided in the attribute 'name' of the tag 'input')
30 // * TYPE is the C++ type of the input/output
31 // (the one provided in the attribute 'type' of the tag 'input')
33 // bbSetOutputOut( bbGetInputIn() );
34 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
36 creaContoursFactory f;
37 manualContourModel *m;
38 std::vector<double> lstX;
39 std::vector<double> lstY;
40 std::vector<double> lstZ;
44 m = (manualContourModel*)f.getContourModel( bbGetInputType() );
45 m->SetNumberOfPointsSpline( bbGetInputNbPoints() );
46 m->SetCloseContour( bbGetInputOpenClose() );
47 size = bbGetInputLstControlPointsX().size();
50 // m->InsertPoint( bbGetInputLstControlPointsX()[i] , bbGetInputLstControlPointsY()[i] , bbGetInputLstControlPointsZ()[i] );
51 m->AddPoint( bbGetInputLstControlPointsX()[i] , bbGetInputLstControlPointsY()[i] , bbGetInputLstControlPointsZ()[i] );
54 size = bbGetInputNbPoints();
57 m->GetSpline_i_Point(i,&x,&y,&z);
62 bbSetOutputLstContourPointsX(lstX);
63 bbSetOutputLstContourPointsY(lstY);
64 bbSetOutputLstContourPointsZ(lstZ);
70 // 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 void ManualContourModel_Box::bbUserSetDefaultValues()
75 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
76 // Here we initialize the input 'In' to 0
78 bbSetInputOpenClose(false);
79 bbSetInputNbPoints(100);
83 // 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 void ManualContourModel_Box::bbUserInitializeProcessing()
88 // THE INITIALIZATION METHOD BODY :
90 // but this is where you should allocate the internal/output pointers
96 // 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)
98 void ManualContourModel_Box::bbUserFinalizeProcessing()
101 // THE FINALIZATION METHOD BODY :
103 // but this is where you should desallocate the internal/output pointers
108 // EO namespace bbcreaMaracasVisu