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 "bbcreaMaracasVisuManualPaint_Model.h"
5 #include "bbcreaMaracasVisuPackage.h"
6 namespace bbcreaMaracasVisu
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ManualPaint_Model)
10 BBTK_BLACK_BOX_IMPLEMENTATION(ManualPaint_Model,bbtk::AtomicBlackBox);
12 // 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)
14 void ManualPaint_Model::Process()
17 // THE MAIN PROCESSING METHOD BODY
18 // Here we simply set the input 'In' value to the output 'Out'
19 // And print out the output value
20 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
21 // void bbSet{Input|Output}NAME(const TYPE&)
22 // const TYPE& bbGet{Input|Output}NAME() const
24 // * NAME is the name of the input/output
25 // (the one provided in the attribute 'name' of the tag 'input')
26 // * TYPE is the C++ type of the input/output
27 // (the one provided in the attribute 'type' of the tag 'input')
28 // bbSetOutputOut( bbGetInputIn() );
29 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
31 if (bbGetInputImage()!=NULL)
33 manualpaintmodel->SetActive( bbGetInputActive() );
34 manualpaintmodel->SetTool( bbGetInputTool() );
35 manualpaintmodel->Set2D3D( bbGetInput2D3D() );
36 manualpaintmodel->SetImages( bbGetInputImage(),bbGetInputImage2() );
37 manualpaintmodel->SetGrayLevel( bbGetInputGrayLevel() );
38 manualpaintmodel->SetDirection( bbGetInputDirection() );
39 manualpaintmodel->SetBrushSize( bbGetInputBrushSize() );
40 manualpaintmodel->SetBrushForm( bbGetInputBrushForm() );
41 manualpaintmodel->SetToleranceFill( bbGetInputToleranceFill() );
42 manualpaintmodel->SetDistanceFill( bbGetInputDistanceFill() );
43 manualpaintmodel->SetRangeMin( bbGetInputRange()[0] );
44 manualpaintmodel->SetRangeMax( bbGetInputRange()[1] );
45 manualpaintmodel->PaintImage( bbGetInputPoint()[0] , bbGetInputPoint()[1] , bbGetInputPoint()[2] );
47 printf("EED Warning: Image not set. Box creaMaracasVisu::ManualPaint_Model (BBTK) \n");
49 // manualpaintmodel-> GetScalarRange(double * range);
50 // manualpaintmodel-> SetUndoImage(); //DFCH
51 // manualpaintmodel-> Undo(); //DFCH
52 // manualpaintmodel-> Redo(); //DFCH
58 // 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)
60 void ManualPaint_Model::bbUserSetDefaultValues()
63 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
64 // Here we initialize the input 'In' to 0
66 bbSetInputActive(true);
67 bbSetInputTool(1); // Paint
68 bbSetInput2D3D(1); // 3D
69 bbSetInputImage(NULL);
70 bbSetInputImage2(NULL);
71 bbSetInputGrayLevel(100);
72 bbSetInputDirection(2); // XY
73 bbSetInputBrushSize(3);
74 bbSetInputBrushForm(1); // sphere
75 bbSetInputToleranceFill(50);
76 bbSetInputDistanceFill(25);
78 std::vector<int> point;
82 bbSetInputPoint(point);
84 std::vector<double> range;
87 bbSetInputRange(range);
91 // 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)
93 void ManualPaint_Model::bbUserInitializeProcessing()
96 // THE INITIALIZATION METHOD BODY :
98 // but this is where you should allocate the internal/output pointers
101 manualpaintmodel=new ManualPaintModel();
106 // 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)
108 void ManualPaint_Model::bbUserFinalizeProcessing()
111 // THE FINALIZATION METHOD BODY :
113 // but this is where you should desallocate the internal/output pointers
115 delete manualpaintmodel;
120 // EO namespace bbcreaMaracasVisu