30 #include "boost/filesystem/operations.hpp"
31 #include "boost/filesystem/fstream.hpp"
37 bool bresult, bfinal =
true;
39 std::vector<std::string>::iterator it = i_filenames.begin();
40 for (; it != i_filenames.end(); it++)
42 bresult = mReader->
CanRead((*it).c_str());
45 i_img.push_back(mReader->
ReadImage((*it).c_str()));
47 printf(
"ERROR. Impossible to read file %s\n", (*it).c_str() );
60 std::vector<std::string> names;
61 bresult = boost::filesystem::exists( i_pathname );
64 boost::filesystem::directory_iterator itr(i_pathname);
65 boost::filesystem::directory_iterator end_itr;
66 for(;itr != end_itr; ++itr)
68 if (!boost::filesystem::is_directory(itr->status()))
70 if( mReader->
CanRead(itr->path().string()) )
72 names.push_back(itr->path().string());
76 std::sort (names.begin(), names.end());
77 int lgr = (int)names.size();
79 for(
int i=0; i<lgr; i++)
81 std::cout << names[i] << std::endl;
82 i_imgs.push_back( mReader->
ReadImage(names[i]) );