//===== // 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) //===== #include "bbcreaMaracasVisuManualPaint_Model.h" #include "bbcreaMaracasVisuPackage.h" namespace bbcreaMaracasVisu { BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ManualPaint_Model) BBTK_BLACK_BOX_IMPLEMENTATION(ManualPaint_Model,bbtk::AtomicBlackBox); //===== // 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) //===== void ManualPaint_Model::Process() { // THE MAIN PROCESSING METHOD BODY // Here we simply set the input 'In' value to the output 'Out' // And print out the output value // INPUT/OUTPUT ACCESSORS ARE OF THE FORM : // void bbSet{Input|Output}NAME(const TYPE&) // const TYPE& bbGet{Input|Output}NAME() const // Where : // * NAME is the name of the input/output // (the one provided in the attribute 'name' of the tag 'input') // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " <SetActive( bbGetInputActive() ); manualpaintmodel->SetTool( bbGetInputTool() ); manualpaintmodel->Set2D3D( bbGetInput2D3D() ); manualpaintmodel->SetImage( bbGetInputImage() ); manualpaintmodel->SetGrayLevel( bbGetInputGrayLevel() ); manualpaintmodel->SetDirection( bbGetInputDirection() ); manualpaintmodel->SetBrushSize( bbGetInputBrushSize() ); manualpaintmodel->SetBrushForm( bbGetInputBrushForm() ); manualpaintmodel->SetToleranceFill( bbGetInputToleranceFill() ); manualpaintmodel->SetDistanceFill( bbGetInputDistanceFill() ); manualpaintmodel->SetRangeMin( bbGetInputRange()[0] ); manualpaintmodel->SetRangeMax( bbGetInputRange()[1] ); manualpaintmodel->PaintImage( bbGetInputPoint()[0] , bbGetInputPoint()[1] , bbGetInputPoint()[2] ); } else { printf("EED Warning: Image not set. Box creaMaracasVisu::ManualPaint_Model (BBTK) \n"); } // if // manualpaintmodel-> GetScalarRange(double * range); // manualpaintmodel-> SetUndoImage(); //DFCH // manualpaintmodel-> Undo(); //DFCH // manualpaintmodel-> Redo(); //DFCH } //===== // 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) //===== void ManualPaint_Model::bbUserSetDefaultValues() { // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 bbSetInputActive(true); bbSetInputTool(1); // Paint bbSetInput2D3D(1); // 3D bbSetInputImage(NULL); bbSetInputGrayLevel(100); bbSetInputDirection(2); // XY bbSetInputBrushSize(3); bbSetInputBrushForm(1); // sphere bbSetInputToleranceFill(50); bbSetInputDistanceFill(25); std::vector point; point.push_back(0); point.push_back(0); point.push_back(0); bbSetInputPoint(point); std::vector range; range.push_back(0); range.push_back(200); bbSetInputRange(range); } //===== // 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) //===== void ManualPaint_Model::bbUserInitializeProcessing() { // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers // if any manualpaintmodel=new ManualPaintModel(); } //===== // 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) //===== void ManualPaint_Model::bbUserFinalizeProcessing() { // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers // if any delete manualpaintmodel; } } // EO namespace bbcreaMaracasVisu