/*************************************** Auteur : Pierre Aubert Mail : aubertp7@gmail.com Licence : CeCILL-C ****************************************/ #include #include "ProgressBarr.h" #include "OptionParser.h" #include "PImagePng.h" #include "MatrixHdf5.h" ///Create the OptionParser of this program /** @return OptionParser of this program */ OptionParser createOptionParser(){ OptionParser parser(true, __PROGRAM_VERSION__); parser.setExampleLongOption("gray_scott2pic --input=file.h5 --output=/output/dir/name"); parser.setExampleShortOption("gray_scott2pic -i file.h5 -o /output/dir/name"); parser.addOption("input", "i", OptionType::FILENAME, true, "input hdf5 file name"); std::string defaultOutputDir("./"); parser.addOption("output", "o", defaultOutputDir, "Output directory of the created images"); return parser; } ///Simulate the images /** @param inputFile : input hdf5 file name * @param outputDir : Output directory of the created images * @return true on succsess, false otherwise */ bool simulateImage(const std::string & inputFile, const std::string & outputDir){ MatrixHdf5 fullMat; fullMat.read(inputFile); size_t nbImage(fullMat.getNbEntries()), nbRow(fullMat.getNbRow()), nbCol(fullMat.getNbCol()); std::cout << "simulateImage : nbImage = "<