From: davila Date: Wed, 18 Feb 2015 17:36:11 +0000 (+0100) Subject: skip lines X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3f3122bf224c4c9bc3bed303fb3e5218764f9317;p=bbtk.git skip lines --- diff --git a/packages/std/src/bbstdReadColumnsString.cxx b/packages/std/src/bbstdReadColumnsString.cxx index 6d9cfe5..afcd636 100644 --- a/packages/std/src/bbstdReadColumnsString.cxx +++ b/packages/std/src/bbstdReadColumnsString.cxx @@ -55,12 +55,18 @@ void ReadColumnsString::Process() tlst.push_back( new std::vector ); } + int iSkipLines; int numberOfLines = 0; - char tmpValue[50]; + char tmpValue[500]; std::vector *vecData; FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r+" ); if (ff1!=NULL) { + for (iSkipLines=0;iSkipLines ); @@ -72,6 +73,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ReadColumnsString,bbtk::AtomicBlackBox); BBTK_DESCRIPTION("Read Columns from a text file"); BBTK_CATEGORY("read/write"); BBTK_INPUT(ReadColumnsString,FileName,"File name of Points",std::string,""); + BBTK_INPUT(ReadColumnsString,SkipLines,"(default 0) - Number of lines to be skipe before read data",int,""); BBTK_INPUT(ReadColumnsString,Dimension,"(default 1) - The number of columns of the file",int,""); BBTK_OUTPUT(ReadColumnsString,lstData1,"vector of data",std::vector,"");