1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
27 // Don't edit this file. This file is generated from xml description..
29 #include "bbcreaMaracasVisuReadAxisTree3D.h"
30 #include "bbcreaMaracasVisuPackage.h"
37 namespace bbcreaMaracasVisu
40 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ReadAxisTree3D)
41 BBTK_BLACK_BOX_IMPLEMENTATION(ReadAxisTree3D,bbtk::AtomicBlackBox);
43 // Don't edit this file. This file is generated from xml description..
45 void ReadAxisTree3D::Process()
48 // THE MAIN PROCESSING METHOD BODY
49 // Here we simply set the input 'In' value to the output 'Out'
50 // And print out the output value
51 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
52 // void bbSet{Input|Output}NAME(const TYPE&)
53 // const TYPE& bbGet{Input|Output}NAME() const
55 // * NAME is the name of the input/output
56 // (the one provided in the attribute 'name' of the tag 'input')
57 // * TYPE is the C++ type of the input/output
58 // (the one provided in the attribute 'type' of the tag 'input')
60 printf("EED ReadAxisTree3D::Process start \n");
62 std::vector< std::vector<std::string> * > tlst;
65 for( i=0 ; i<bbGetInputDimension() ; i++)
67 tlst.push_back( new std::vector<std::string> );
70 int numberOfLines = 0;
72 std::vector<std::string> *vecData;
73 FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r+" );
78 for( i=0 ; i<bbGetInputDimension() ; i++)
80 fscanf(ff1,"%s",tmpValue);
82 vecData->push_back( tmpValue );
87 std::cout<<"18-04-2012 RaC ReadAxisTree3D::Process Erase last element in vectors."<<std::endl;
88 // TOFIX If it is not erased, the last element in every vector is a copy of the last column value
89 for( i=0 ; i<bbGetInputDimension() ; i++)
95 std::cout<<"RaC last element 1:"<<vecData->at(numberOfLines-2)<<std::endl;
96 std::cout<<"RaC last element 1:"<<vecData->at(numberOfLines-1)<<std::endl;
98 std::cout<<"RaC last element 2:"<<vecData->at(numberOfLines-2)<<std::endl;
99 std::cout<<"RaC last element 2:"<<vecData->at(numberOfLines-1)<<std::endl;
101 std::cout<<"RaC last element 3:"<<vecData->at(numberOfLines-2)<<std::endl;
102 std::cout<<"RaC last element 3:"<<vecData->at(numberOfLines-1)<<std::endl; */
105 printf("bbcreaMaracasVisuReadAxisTree3D::Process ...Error... reading file InputFileName_Points>%s\n", bbGetInputFileName().c_str() );
109 i=1; if (i<=bbGetInputDimension()) { bbSetOutputlstData1( *(tlst[i-1]) ); }
110 i=2; if (i<=bbGetInputDimension()) { bbSetOutputlstData2( *(tlst[i-1]) ); }
111 i=3; if (i<=bbGetInputDimension()) { bbSetOutputlstData3( *(tlst[i-1]) ); }
112 i=4; if (i<=bbGetInputDimension()) { bbSetOutputlstData4( *(tlst[i-1]) ); }
113 i=5; if (i<=bbGetInputDimension()) { bbSetOutputlstData5( *(tlst[i-1]) ); }
114 i=6; if (i<=bbGetInputDimension()) { bbSetOutputlstData6( *(tlst[i-1]) ); }
115 i=7; if (i<=bbGetInputDimension()) { bbSetOutputlstData7( *(tlst[i-1]) ); }
116 i=8; if (i<=bbGetInputDimension()) { bbSetOutputlstData8( *(tlst[i-1]) ); }
117 i=9; if (i<=bbGetInputDimension()) { bbSetOutputlstData9( *(tlst[i-1]) ); }
119 printf("EED ReadAxisTree3D::Process end \n");
125 // Don't edit this file. This file is generated from xml description..
127 void ReadAxisTree3D::bbUserSetDefaultValues()
130 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
131 // Here we initialize the input 'In' to 0
133 bbSetInputDimension(1);
134 bbSetInputFileName("");
138 // Don't edit this file. This file is generated from xml description..
140 void ReadAxisTree3D::bbUserInitializeProcessing()
143 // THE INITIALIZATION METHOD BODY :
145 // but this is where you should allocate the internal/output pointers
151 // Don't edit this file. This file is generated from xml description..
153 void ReadAxisTree3D::bbUserFinalizeProcessing()
156 // THE FINALIZATION METHOD BODY :
158 // but this is where you should desallocate the internal/output pointers
163 // EO namespace bbcreaMaracasVisu