2 // Don't edit this file. This file is generated from xml description..
4 #include "bbcreaMaracasVisuReadAxisTree3D.h"
5 #include "bbcreaMaracasVisuPackage.h"
12 namespace bbcreaMaracasVisu
15 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ReadAxisTree3D)
16 BBTK_BLACK_BOX_IMPLEMENTATION(ReadAxisTree3D,bbtk::AtomicBlackBox);
18 // Don't edit this file. This file is generated from xml description..
20 void ReadAxisTree3D::Process()
23 // THE MAIN PROCESSING METHOD BODY
24 // Here we simply set the input 'In' value to the output 'Out'
25 // And print out the output value
26 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
27 // void bbSet{Input|Output}NAME(const TYPE&)
28 // const TYPE& bbGet{Input|Output}NAME() const
30 // * NAME is the name of the input/output
31 // (the one provided in the attribute 'name' of the tag 'input')
32 // * TYPE is the C++ type of the input/output
33 // (the one provided in the attribute 'type' of the tag 'input')
36 std::vector<int> tlstIndexs;
37 std::vector<double> tlstPointsX;
38 std::vector<double> tlstPointsY;
39 std::vector<double> tlstPointsZ;
41 int numberOfLines = 0;
42 int numberOfPoints = 0;
43 FILE *ff1 = fopen( bbGetInputFileName_Points().c_str() , "r+" );
49 fscanf(ff1,"%f %f %f",&xx,&yy,&zz);
50 printf("EED ReadAxisTree3D point %d >> %f %f %f\n", numberOfLines,xx,yy,zz);
51 tlstPointsX.push_back( (double)xx );
52 tlstPointsY.push_back( (double)yy );
53 tlstPointsZ.push_back( (double)zz );
58 printf("bbcreaMaracasVisuReadAxisTree3D::Process ...Error... reading file InputFileName_Points>%s", bbGetInputFileName_Points().c_str() );
62 FILE *ff2 = fopen( bbGetInputFileName_Indexs().c_str() , "r+" );
68 fscanf(ff2,"%d ",&ii);
69 printf("EED ReadAxisTree3D index %d >> %d\n", i,ii);
72 numberOfPoints = numberOfPoints +ii;
73 tlstIndexs.push_back( ii );
77 printf("bbcreaMaracasVisuReadAxisTree3D::Process ...Error... reading file InputFileName_Indexs>%s", bbGetInputFileName_Indexs().c_str() );
80 printf("EED numberOfLines=%d numberOfPoints=%d \n",numberOfLines,numberOfPoints);
82 bbSetOutputlstIndexs( tlstIndexs );
83 bbSetOutputlstPointsX( tlstPointsX );
84 bbSetOutputlstPointsY( tlstPointsY );
85 bbSetOutputlstPointsZ( tlstPointsZ );
91 // Don't edit this file. This file is generated from xml description..
93 void ReadAxisTree3D::bbUserSetDefaultValues()
96 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
97 // Here we initialize the input 'In' to 0
98 bbSetInputFileName_Indexs("");
99 bbSetInputFileName_Points("");
103 // Don't edit this file. This file is generated from xml description..
105 void ReadAxisTree3D::bbUserInitializeProcessing()
108 // THE INITIALIZATION METHOD BODY :
110 // but this is where you should allocate the internal/output pointers
116 // Don't edit this file. This file is generated from xml description..
118 void ReadAxisTree3D::bbUserFinalizeProcessing()
121 // THE FINALIZATION METHOD BODY :
123 // but this is where you should desallocate the internal/output pointers
128 // EO namespace bbcreaMaracasVisu