]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdReadColumnsString.cxx
skip lines
[bbtk.git] / packages / std / src / bbstdReadColumnsString.cxx
index 6d9cfe5f3c37b055e60f7449ff3b18648660deb7..afcd636ac19ec6afaa37115cfe629624771fbd22 100644 (file)
@@ -55,12 +55,18 @@ void ReadColumnsString::Process()
                tlst.push_back( new std::vector<std::string> );
        }       
        
+       int iSkipLines;
        int numberOfLines = 0;
-       char tmpValue[50];
+       char tmpValue[500];
        std::vector<std::string> *vecData;
        FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r+" );
        if (ff1!=NULL)
        {
+               for (iSkipLines=0;iSkipLines<bbGetInputSkipLines(); iSkipLines++ )
+      {
+         fgets( tmpValue , 500, ff1 ); 
+      }
+
                while (!feof(ff1))
                {
                        for( i=0 ;  i<bbGetInputDimension() ; i++)
@@ -99,6 +105,7 @@ void ReadColumnsString::bbUserSetDefaultValues()
 
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
+       bbSetInputSkipLines(0); 
        bbSetInputDimension(1); 
        bbSetInputFileName("");