Mercurial > hg > orthanc
diff OrthancServer/ServerEnumerations.cpp @ 519:1b2cdc855bd3
Parameter for PACS manufacturer, support for ClearCanvas
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 20 Aug 2013 13:39:42 +0200 |
parents | 3b735fdf320b |
children | e0cfb413c86b |
line wrap: on
line diff
--- a/OrthancServer/ServerEnumerations.cpp Mon Aug 19 14:47:03 2013 +0200 +++ b/OrthancServer/ServerEnumerations.cpp Tue Aug 20 13:39:42 2013 +0200 @@ -256,4 +256,39 @@ throw OrthancException(ErrorCode_ParameterOutOfRange); } } + + + const char* EnumerationToString(ModalityManufacturer manufacturer) + { + switch (manufacturer) + { + case ModalityManufacturer_Generic: + return "Generic"; + + case ModalityManufacturer_ClearCanvas: + return "ClearCanvas"; + + default: + throw OrthancException(ErrorCode_ParameterOutOfRange); + } + } + + + ModalityManufacturer StringToModalityManufacturer(const std::string& manufacturer) + { + if (manufacturer == "Generic") + { + return ModalityManufacturer_Generic; + } + else if (manufacturer == "ClearCanvas") + { + return ModalityManufacturer_ClearCanvas; + } + else + { + throw OrthancException(ErrorCode_ParameterOutOfRange); + } + } + + }