//===== // Don't edit this file. This file is generated from xml description.. //===== #include "bbcreaMaracasVisuReadAxisTree3D.h" #include "bbcreaMaracasVisuPackage.h" #include namespace bbcreaMaracasVisu { BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ReadAxisTree3D) BBTK_BLACK_BOX_IMPLEMENTATION(ReadAxisTree3D,bbtk::AtomicBlackBox); //===== // Don't edit this file. This file is generated from xml description.. //===== void ReadAxisTree3D::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') std::vector tlstIndexs; std::vector tlstPointsX; std::vector tlstPointsY; std::vector tlstPointsZ; int numberOfLines = 0; int numberOfPoints = 0; FILE *ff1 = fopen( bbGetInputFileName_Points().c_str() , "r+" ); if (ff1!=NULL) { float xx,yy,zz; while (!feof(ff1)) { fscanf(ff1,"%f %f %f",&xx,&yy,&zz); printf("EED ReadAxisTree3D point %d >> %f %f %f\n", numberOfLines,xx,yy,zz); tlstPointsX.push_back( (double)xx ); tlstPointsY.push_back( (double)yy ); tlstPointsZ.push_back( (double)zz ); numberOfLines++; } fclose(ff1); } else { // else ff1 printf("bbcreaMaracasVisuReadAxisTree3D::Process ...Error... reading file InputFileName_Points>%s", bbGetInputFileName_Points().c_str() ); } //ff1 FILE *ff2 = fopen( bbGetInputFileName_Indexs().c_str() , "r+" ); if (ff2!=NULL) { int ii,i=0; while ( !feof(ff2) ) { fscanf(ff2,"%d ",&ii); printf("EED ReadAxisTree3D index %d >> %d\n", i,ii); i++; numberOfPoints = numberOfPoints +ii; tlstIndexs.push_back( ii ); } fclose(ff2); } else { // else ff printf("bbcreaMaracasVisuReadAxisTree3D::Process ...Error... reading file InputFileName_Indexs>%s", bbGetInputFileName_Indexs().c_str() ); } //ff2 printf("EED numberOfLines=%d numberOfPoints=%d \n",numberOfLines,numberOfPoints); bbSetOutputlstIndexs( tlstIndexs ); bbSetOutputlstPointsX( tlstPointsX ); bbSetOutputlstPointsY( tlstPointsY ); bbSetOutputlstPointsZ( tlstPointsZ ); } //===== // Don't edit this file. This file is generated from xml description.. //===== void ReadAxisTree3D::bbUserSetDefaultValues() { // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 bbSetInputFileName_Indexs(""); bbSetInputFileName_Points(""); } //===== // Don't edit this file. This file is generated from xml description.. //===== void ReadAxisTree3D::bbUserInitializeProcessing() { // THE INITIALIZATION METHOD BODY : // Here does nothing // but this is where you should allocate the internal/output pointers // if any } //===== // Don't edit this file. This file is generated from xml description.. //===== void ReadAxisTree3D::bbUserFinalizeProcessing() { // THE FINALIZATION METHOD BODY : // Here does nothing // but this is where you should desallocate the internal/output pointers // if any } } // EO namespace bbcreaMaracasVisu