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 "bbcreaVtkMeshReduction_DecimatePro.h"
5 #include "bbcreaVtkPackage.h"
11 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,MeshReduction_DecimatePro)
12 BBTK_BLACK_BOX_IMPLEMENTATION(MeshReduction_DecimatePro,bbtk::AtomicBlackBox);
14 // 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)
16 void MeshReduction_DecimatePro::Process()
18 // THE MAIN PROCESSING METHOD BODY
19 // Here we simply set the input 'In' value to the output 'Out'
20 // And print out the output value
21 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
22 // void bbSet{Input|Output}NAME(const TYPE&)
23 // const TYPE& bbGet{Input|Output}NAME() const
25 // * NAME is the name of the input/output
26 // (the one provided in the attribute 'name' of the tag 'input')
27 // * TYPE is the C++ type of the input/output
28 // (the one provided in the attribute 'type' of the tag 'input')
32 decimatepro = vtkDecimatePro::New();
34 if (bbGetInputIn()!=NULL)
36 decimatepro->SetInputData( bbGetInputIn() );
37 decimatepro->SetTargetReduction( bbGetInputTargetReduction() );
38 decimatepro->PreserveTopologyOn();
39 printf("EED MeshReduction_DecimatePro::Process Running... \n");
40 decimatepro->Update();
41 printf("EED MeshReduction_DecimatePro::Process ...finish \n");
42 bbSetOutputOut(decimatepro->GetOutput() );
44 bbSetOutputOut( NULL );
48 // 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)
50 void MeshReduction_DecimatePro::bbUserSetDefaultValues()
53 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
54 // Here we initialize the input 'In' to 0
58 bbSetInputTargetReduction(0.5);
59 bbSetOutputOut( NULL );
62 // 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)
64 void MeshReduction_DecimatePro::bbUserInitializeProcessing()
67 // THE INITIALIZATION METHOD BODY :
69 // but this is where you should allocate the internal/output pointers
75 // 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)
77 void MeshReduction_DecimatePro::bbUserFinalizeProcessing()
80 // THE FINALIZATION METHOD BODY :
82 // but this is where you should desallocate the internal/output pointers
85 if (decimatepro!=NULL)
87 decimatepro->Delete();
92 // EO namespace bbcreaVtk