From: Eduardo DAVILA Date: Mon, 11 Apr 2016 12:19:38 +0000 (+0200) Subject: #2912 BBTK Feature New Normal - FilesFromDirectory box package std X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=81cf34a7ea4edd0cef61258e6d65df60e80bbb6a;p=bbtk.git #2912 BBTK Feature New Normal - FilesFromDirectory box package std --- diff --git a/packages/std/src/bbstdFilesFromDirectory.cxx b/packages/std/src/bbstdFilesFromDirectory.cxx index 61fb34c..6712c8c 100644 --- a/packages/std/src/bbstdFilesFromDirectory.cxx +++ b/packages/std/src/bbstdFilesFromDirectory.cxx @@ -269,12 +269,39 @@ void FilesFromDirectory::CleanFilenames( std::string basePath ) { std::string tmpString; int i,ii,sizeFilenames = Filenames.size(); + int j,sizeFileEnd = bbGetInputFileEnd().size(); + int okEraseElement; + +//Selecting just the files in the FileEnd List + if (bbGetInputFileEnd().size()!=0) + { + for (i=sizeFilenames-1; i>=0; i--) + { + okEraseElement=0; + for (j=0; j); BBTK_DECLARE_OUTPUT(Out,std::vector); BBTK_DECLARE_OUTPUT(OutSimple,std::vector); BBTK_PROCESS(Process); @@ -70,6 +71,7 @@ namespace bbstd BBTK_INPUT(FilesFromDirectory,In,"Directory Name",std::string,""); BBTK_INPUT(FilesFromDirectory,Recursive,"Recursive directory exploration",bool,""); BBTK_INPUT(FilesFromDirectory,Type,"0=files 1=All_directories 2=last_directories (0 default)",int,""); + BBTK_INPUT(FilesFromDirectory,FileEnd,"Select just the files with this end file name",std::vector,""); BBTK_OUTPUT(FilesFromDirectory,Out,"FullPathNames of the files",std::vector,""); BBTK_OUTPUT(FilesFromDirectory,OutSimple,"Simple Full PathNames of the files",std::vector,"");