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 "bbcreaVtkVectorPolyDataReader.h"
5 #include "bbcreaVtkPackage.h"
7 #include <vtkPolyDataReader.h>
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,VectorPolyDataReader)
13 BBTK_BLACK_BOX_IMPLEMENTATION(VectorPolyDataReader,bbtk::AtomicBlackBox);
15 // 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 void VectorPolyDataReader::Process()
20 // THE MAIN PROCESSING METHOD BODY
21 // Here we simply set the input 'In' value to the output 'Out'
22 // And print out the output value
23 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
24 // void bbSet{Input|Output}NAME(const TYPE&)
25 // const TYPE& bbGet{Input|Output}NAME() const
27 // * NAME is the name of the input/output
28 // (the one provided in the attribute 'name' of the tag 'input')
29 // * TYPE is the C++ type of the input/output
30 // (the one provided in the attribute 'type' of the tag 'input')
33 std::vector<vtkPolyData*> vecPolyData;
34 std::string tmpFileName;
36 int i,size=bbGetInputFileNameVector().size();
39 vtkPolyDataReader *reader = vtkPolyDataReader::New();
40 tmpFileName=bbGetInputDirName() + "/" + bbGetInputFileNameVector()[i];
41 reader->SetFileName( tmpFileName.c_str() );
42 reader->ReadAllScalarsOn();
43 reader->ReadAllVectorsOn();
44 reader->ReadAllNormalsOn();
45 reader->ReadAllTensorsOn();
46 reader->ReadAllColorScalarsOn ();
47 reader->ReadAllTCoordsOn();
48 reader->ReadAllFieldsOn();
50 vecPolyData.push_back( reader->GetOutput() );
53 bbSetOutputPolyDataVector( vecPolyData );
57 // 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 void VectorPolyDataReader::bbUserSetDefaultValues()
62 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
63 // Here we initialize the input 'In' to 0
65 bbSetInputDirName("");
69 // 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)
71 void VectorPolyDataReader::bbUserInitializeProcessing()
74 // THE INITIALIZATION METHOD BODY :
76 // but this is where you should allocate the internal/output pointers
82 // 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)
84 void VectorPolyDataReader::bbUserFinalizeProcessing()
87 // THE FINALIZATION METHOD BODY :
89 // but this is where you should desallocate the internal/output pointers
94 // EO namespace bbcreaVtk