]> Creatis software - creaVtk.git/blob - bbtk_creaVtk_PKG/src/bbcreaVtkStlReader.cxx
#3467 FillHolesFilter box
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkStlReader.cxx
1 //===== 
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)
3 //===== 
4 #include "bbcreaVtkStlReader.h"
5 #include "bbcreaVtkPackage.h"
6
7 #include "vtkSTLReader.h"
8 #include "vtkFillHolesFilter.h"
9
10 namespace bbcreaVtk
11 {
12
13 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,StlReader)
14 BBTK_BLACK_BOX_IMPLEMENTATION(StlReader,bbtk::AtomicBlackBox);
15 //===== 
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)
17 //===== 
18 void StlReader::Process()
19 {
20
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 
27 //    Where :
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')
32
33         vtkSTLReader *reader = vtkSTLReader::New();
34         reader->SetFileName( bbGetInputFileName().c_str() );  
35         reader->Update();
36         bbSetOutputOut( reader->GetOutput() );
37
38 /*      
39         vtkFillHolesFilter *filler  = vtkFillHolesFilter::New();
40     filler->SetInputData( reader->GetOutput() );
41     filler->SetHoleSize(500);
42     filler->Update();
43         bbSetOutputOut( filler->GetOutput() );
44   */  
45 }
46 //===== 
47 // 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)
48 //===== 
49 void StlReader::bbUserSetDefaultValues()
50 {
51
52 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
53 //    Here we initialize the input 'In' to 0
54    bbSetOutputOut(NULL);
55   
56 }
57 //===== 
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)
59 //===== 
60 void StlReader::bbUserInitializeProcessing()
61 {
62
63 //  THE INITIALIZATION METHOD BODY :
64 //    Here does nothing 
65 //    but this is where you should allocate the internal/output pointers 
66 //    if any 
67
68   
69 }
70 //===== 
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)
72 //===== 
73 void StlReader::bbUserFinalizeProcessing()
74 {
75
76 //  THE FINALIZATION METHOD BODY :
77 //    Here does nothing 
78 //    but this is where you should desallocate the internal/output pointers 
79 //    if any
80   
81 }
82 }
83 // EO namespace bbcreaVtk
84
85