Mercurial > hg > orthanc-wsi
diff Applications/DicomToTiff.cpp @ 8:62adabb8c122
Provide "--version" in command-line tools
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 26 Oct 2016 16:53:54 +0200 |
parents | 4a7a53257c7d |
children | 8e1dfd531335 |
line wrap: on
line diff
--- a/Applications/DicomToTiff.cpp Wed Oct 26 15:42:52 2016 +0200 +++ b/Applications/DicomToTiff.cpp Wed Oct 26 16:53:54 2016 +0200 @@ -40,6 +40,7 @@ boost::program_options::options_description generic("Generic options"); generic.add_options() ("help", "Display this help and exit") + ("version", "Output version information and exit") ("verbose", "Be verbose in logs") ; @@ -90,7 +91,8 @@ } if (!error && - options.count("help") == 0) + options.count("help") == 0 && + options.count("version") == 0) { if (options.count("input") != 1) { @@ -125,6 +127,12 @@ return false; } + if (options.count("version")) + { + OrthancWSI::ApplicationToolbox::PrintVersion(argv[0]); + return false; + } + if (options.count("verbose")) { Orthanc::Logging::EnableInfoLevel(true);