diff Orthanc/Core/Enumerations.cpp @ 128:e8cfda4c8a2f

Sync + support of JPEG2000 lossless images with YBR_RCT photometric interpretation
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 15 Apr 2016 21:44:03 +0200
parents 145e654112d6
children 2c73a785c08e
line wrap: on
line diff
--- a/Orthanc/Core/Enumerations.cpp	Fri Mar 25 17:38:34 2016 +0100
+++ b/Orthanc/Core/Enumerations.cpp	Fri Apr 15 21:44:03 2016 +0200
@@ -212,10 +212,10 @@
         return "The specified path does not point to a directory";
 
       case ErrorCode_HttpPortInUse:
-        return "The TCP port of the HTTP server is already in use";
+        return "The TCP port of the HTTP server is privileged or already in use";
 
       case ErrorCode_DicomPortInUse:
-        return "The TCP port of the DICOM server is already in use";
+        return "The TCP port of the DICOM server is privileged or already in use";
 
       case ErrorCode_BadHttpStatusInRest:
         return "This HTTP status is not allowed in a REST API";
@@ -718,6 +718,31 @@
   }
 
 
+  const char* EnumerationToString(PixelFormat format)
+  {
+    switch (format)
+    {
+      case PixelFormat_RGB24:
+        return "RGB24";
+
+      case PixelFormat_RGBA32:
+        return "RGBA32";
+
+      case PixelFormat_Grayscale8:
+        return "Grayscale (unsigned 8bpp)";
+
+      case PixelFormat_Grayscale16:
+        return "Grayscale (unsigned 16bpp)";
+
+      case PixelFormat_SignedGrayscale16:
+        return "Grayscale (signed 16bpp)";
+
+      default:
+        throw OrthancException(ErrorCode_ParameterOutOfRange);
+    }
+  }
+
+
   Encoding StringToEncoding(const char* encoding)
   {
     std::string s(encoding);