filetools.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef MIA_FILETOOLS_HH
#define MIA_FILETOOLS_HH
#include <string>
#include <vector>
#include <mia/core/defines.hh>
namespace boost
{
namespace filesystem
{
class path;
}
}
NS_MIA_BEGIN
EXPORT_CORE std::vector<std::string> get_consecutive_numbered_files(std::string const& in_filename);
EXPORT_CORE const std::string get_filename_pattern_and_range(std::string const& in_filename, size_t& min, size_t& max, size_t& format_width);
EXPORT_CORE size_t fname_to_cformat(const char *fname, std::string& base, bool wildcard);
EXPORT_CORE std::string create_filename(const char *cformat, size_t num);
EXPORT_CORE size_t get_filename_number_pattern_width(std::string const& in_filename);
EXPORT_CORE size_t get_filename_number_pattern(std::string const& infilename, std::string& base, std::string& suffix);
EXPORT_CORE void split_filename_number_pattern(std::string const& in_filename, std::string& base,
std::string& suffix, std::string& number);
NS_MIA_END
#endif
defines.hh
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
EXPORT_CORE
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition defines.hh:101
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
get_filename_number_pattern
EXPORT_CORE size_t get_filename_number_pattern(std::string const &infilename, std::string &base, std::string &suffix)
get_filename_pattern_and_range
EXPORT_CORE const std::string get_filename_pattern_and_range(std::string const &in_filename, size_t &min, size_t &max, size_t &format_width)
create_filename
EXPORT_CORE std::string create_filename(const char *cformat, size_t num)
get_consecutive_numbered_files
EXPORT_CORE std::vector< std::string > get_consecutive_numbered_files(std::string const &in_filename)
fname_to_cformat
EXPORT_CORE size_t fname_to_cformat(const char *fname, std::string &base, bool wildcard)
get_filename_number_pattern_width
EXPORT_CORE size_t get_filename_number_pattern_width(std::string const &in_filename)
split_filename_number_pattern
EXPORT_CORE void split_filename_number_pattern(std::string const &in_filename, std::string &base, std::string &suffix, std::string &number)
boost::filesystem
Definition filetools.hh:32
boost
Definition filetools.hh:30