mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
Fix tiff filename
This commit is contained in:
parent
670d4dbce4
commit
49db2fbee7
@ -54,12 +54,18 @@ std::string getRootString( std::string const& filepath ) {
|
|||||||
// fext: file extension (e.g. "raw")
|
// fext: file extension (e.g. "raw")
|
||||||
std::string createFileName( std::string const& dir, std::string const& fprefix="run",
|
std::string createFileName( std::string const& dir, std::string const& fprefix="run",
|
||||||
std::string const& fsuffix="", std::string const& fext="raw", int const outfilecounter=-1 ) {
|
std::string const& fsuffix="", std::string const& fext="raw", int const outfilecounter=-1 ) {
|
||||||
|
std::string return_string;
|
||||||
if (outfilecounter >= 0)
|
if (outfilecounter >= 0)
|
||||||
return fmt::format("{:s}/{:s}_{:s}_f{:05d}.{:s}", dir, fprefix, fsuffix, outfilecounter, fext);
|
return_string = fmt::format("{:s}/{:s}_{:s}_f{:05d}", dir, fprefix, fsuffix, outfilecounter);
|
||||||
else if (fsuffix.length()!=0)
|
else if (fsuffix.length()!=0)
|
||||||
return fmt::format("{:s}/{:s}_{:s}.{:s}", dir, fprefix, fsuffix, fext);
|
return_string = fmt::format("{:s}/{:s}_{:s}", dir, fprefix, fsuffix);
|
||||||
else
|
else
|
||||||
return fmt::format("{:s}/{:s}.{:s}", dir, fprefix, fext);
|
return_string = fmt::format("{:s}/{:s}", dir, fprefix);
|
||||||
|
|
||||||
|
if (fext.length()!=0)
|
||||||
|
return_string += "." + fext;
|
||||||
|
|
||||||
|
return return_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user