47 template<
typename TPo
int>
53 infile.open (filename.c_str(), ifstream::in);
59 template<
typename TPo
int>
64 if(aVectPosition.size()==0){
65 for(
unsigned int i=0; i<TPoint::dimension; i++){
66 aVectPosition.push_back(i);
69 vector<TPoint> vectResult;
73 if ( ( str !=
"" ) && ( str[ 0 ] !=
'#' ) ){
74 istringstream in_str( str );
76 typename TPoint::Component val;
77 unsigned int nbFound=0;
79 while ( in_str.good()&& (nbFound<TPoint::dimension)){
80 bool isOK = (in_str >> val);
81 for(
unsigned int j=0; j< TPoint::dimension; j++){
82 if (isOK && (idx == aVectPosition.at(j)) ){
89 if(nbFound==TPoint::dimension){
90 vectResult.push_back(p);
102 template<
typename TPo
int>
104 std::vector< std::vector<TPoint> >
107 infile.open (filename.c_str(), ifstream::in);
112 template<
typename TPo
int>
114 std::vector< std::vector<TPoint> >
116 vector< vector< TPoint > > vectResult;
120 if ( ( str !=
"" ) && ( str[ 0 ] !=
'#' ) ){
121 vector <TPoint> aContour;
122 istringstream in_str( str );
124 while ( in_str.good()){
125 bool isOK = (in_str >> x);
126 isOK = isOK && (in_str >>y);
131 aContour.push_back(p);
134 vectResult.push_back(aContour);
148 template<
typename TPo
int>
149 template<
typename TInteger>
151 std::vector< FreemanChain< TInteger> >
153 std::vector< FreemanChain< TInteger> > vectResult;
155 infile.open (filename.c_str(), ifstream::in);
157 getline(infile, str );
158 while ( infile.good() ){
159 if ( ( str !=
"" ) && ( str[ 0 ] !=
'#' ) ){
160 istringstream in_str( str );
163 bool isOK = (in_str >> x0) && (in_str >> y0) && (in_str >> fcChain);
166 vectResult.push_back(fc);
168 cerr <<
"Ignoring entry invalid FreemanChain" << endl;
171 getline(infile, str );