comparison Resources/Orthanc/Core/Enumerations.h @ 16:ff1e935768e7

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 09 Nov 2016 20:06:52 +0100
parents Framework/Orthanc/Core/Enumerations.h@9220cf4a63d5
children 7207a407bcd8
comparison
equal deleted inserted replaced
15:da2cf3ace87a 16:ff1e935768e7
1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium
5 *
6 * This program is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
10 *
11 * In addition, as a special exception, the copyright holders of this
12 * program give permission to link the code of its release with the
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it
14 * that use the same license as the "OpenSSL" library), and distribute
15 * the linked executables. You must obey the GNU General Public License
16 * in all respects for all of the code used other than "OpenSSL". If you
17 * modify file(s) with this exception, you may extend this exception to
18 * your version of the file(s), but you are not obligated to do so. If
19 * you do not wish to do so, delete this exception statement from your
20 * version. If you delete this exception statement from all source files
21 * in the program, then also delete it here.
22 *
23 * This program is distributed in the hope that it will be useful, but
24 * WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26 * General Public License for more details.
27 *
28 * You should have received a copy of the GNU General Public License
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
30 **/
31
32
33 #pragma once
34
35 #include <string>
36
37 namespace Orthanc
38 {
39 enum Endianness
40 {
41 Endianness_Unknown,
42 Endianness_Big,
43 Endianness_Little
44 };
45
46 // This enumeration is autogenerated by the script
47 // "Resources/GenerateErrorCodes.py"
48 enum ErrorCode
49 {
50 ErrorCode_InternalError = -1 /*!< Internal error */,
51 ErrorCode_Success = 0 /*!< Success */,
52 ErrorCode_Plugin = 1 /*!< Error encountered within the plugin engine */,
53 ErrorCode_NotImplemented = 2 /*!< Not implemented yet */,
54 ErrorCode_ParameterOutOfRange = 3 /*!< Parameter out of range */,
55 ErrorCode_NotEnoughMemory = 4 /*!< The server hosting Orthanc is running out of memory */,
56 ErrorCode_BadParameterType = 5 /*!< Bad type for a parameter */,
57 ErrorCode_BadSequenceOfCalls = 6 /*!< Bad sequence of calls */,
58 ErrorCode_InexistentItem = 7 /*!< Accessing an inexistent item */,
59 ErrorCode_BadRequest = 8 /*!< Bad request */,
60 ErrorCode_NetworkProtocol = 9 /*!< Error in the network protocol */,
61 ErrorCode_SystemCommand = 10 /*!< Error while calling a system command */,
62 ErrorCode_Database = 11 /*!< Error with the database engine */,
63 ErrorCode_UriSyntax = 12 /*!< Badly formatted URI */,
64 ErrorCode_InexistentFile = 13 /*!< Inexistent file */,
65 ErrorCode_CannotWriteFile = 14 /*!< Cannot write to file */,
66 ErrorCode_BadFileFormat = 15 /*!< Bad file format */,
67 ErrorCode_Timeout = 16 /*!< Timeout */,
68 ErrorCode_UnknownResource = 17 /*!< Unknown resource */,
69 ErrorCode_IncompatibleDatabaseVersion = 18 /*!< Incompatible version of the database */,
70 ErrorCode_FullStorage = 19 /*!< The file storage is full */,
71 ErrorCode_CorruptedFile = 20 /*!< Corrupted file (e.g. inconsistent MD5 hash) */,
72 ErrorCode_InexistentTag = 21 /*!< Inexistent tag */,
73 ErrorCode_ReadOnly = 22 /*!< Cannot modify a read-only data structure */,
74 ErrorCode_IncompatibleImageFormat = 23 /*!< Incompatible format of the images */,
75 ErrorCode_IncompatibleImageSize = 24 /*!< Incompatible size of the images */,
76 ErrorCode_SharedLibrary = 25 /*!< Error while using a shared library (plugin) */,
77 ErrorCode_UnknownPluginService = 26 /*!< Plugin invoking an unknown service */,
78 ErrorCode_UnknownDicomTag = 27 /*!< Unknown DICOM tag */,
79 ErrorCode_BadJson = 28 /*!< Cannot parse a JSON document */,
80 ErrorCode_Unauthorized = 29 /*!< Bad credentials were provided to an HTTP request */,
81 ErrorCode_BadFont = 30 /*!< Badly formatted font file */,
82 ErrorCode_DatabasePlugin = 31 /*!< The plugin implementing a custom database back-end does not fulfill the proper interface */,
83 ErrorCode_StorageAreaPlugin = 32 /*!< Error in the plugin implementing a custom storage area */,
84 ErrorCode_EmptyRequest = 33 /*!< The request is empty */,
85 ErrorCode_NotAcceptable = 34 /*!< Cannot send a response which is acceptable according to the Accept HTTP header */,
86 ErrorCode_NullPointer = 35 /*!< Cannot handle a NULL pointer */,
87 ErrorCode_SQLiteNotOpened = 1000 /*!< SQLite: The database is not opened */,
88 ErrorCode_SQLiteAlreadyOpened = 1001 /*!< SQLite: Connection is already open */,
89 ErrorCode_SQLiteCannotOpen = 1002 /*!< SQLite: Unable to open the database */,
90 ErrorCode_SQLiteStatementAlreadyUsed = 1003 /*!< SQLite: This cached statement is already being referred to */,
91 ErrorCode_SQLiteExecute = 1004 /*!< SQLite: Cannot execute a command */,
92 ErrorCode_SQLiteRollbackWithoutTransaction = 1005 /*!< SQLite: Rolling back a nonexistent transaction (have you called Begin()?) */,
93 ErrorCode_SQLiteCommitWithoutTransaction = 1006 /*!< SQLite: Committing a nonexistent transaction */,
94 ErrorCode_SQLiteRegisterFunction = 1007 /*!< SQLite: Unable to register a function */,
95 ErrorCode_SQLiteFlush = 1008 /*!< SQLite: Unable to flush the database */,
96 ErrorCode_SQLiteCannotRun = 1009 /*!< SQLite: Cannot run a cached statement */,
97 ErrorCode_SQLiteCannotStep = 1010 /*!< SQLite: Cannot step over a cached statement */,
98 ErrorCode_SQLiteBindOutOfRange = 1011 /*!< SQLite: Bing a value while out of range (serious error) */,
99 ErrorCode_SQLitePrepareStatement = 1012 /*!< SQLite: Cannot prepare a cached statement */,
100 ErrorCode_SQLiteTransactionAlreadyStarted = 1013 /*!< SQLite: Beginning the same transaction twice */,
101 ErrorCode_SQLiteTransactionCommit = 1014 /*!< SQLite: Failure when committing the transaction */,
102 ErrorCode_SQLiteTransactionBegin = 1015 /*!< SQLite: Cannot start a transaction */,
103 ErrorCode_DirectoryOverFile = 2000 /*!< The directory to be created is already occupied by a regular file */,
104 ErrorCode_FileStorageCannotWrite = 2001 /*!< Unable to create a subdirectory or a file in the file storage */,
105 ErrorCode_DirectoryExpected = 2002 /*!< The specified path does not point to a directory */,
106 ErrorCode_HttpPortInUse = 2003 /*!< The TCP port of the HTTP server is privileged or already in use */,
107 ErrorCode_DicomPortInUse = 2004 /*!< The TCP port of the DICOM server is privileged or already in use */,
108 ErrorCode_BadHttpStatusInRest = 2005 /*!< This HTTP status is not allowed in a REST API */,
109 ErrorCode_RegularFileExpected = 2006 /*!< The specified path does not point to a regular file */,
110 ErrorCode_PathToExecutable = 2007 /*!< Unable to get the path to the executable */,
111 ErrorCode_MakeDirectory = 2008 /*!< Cannot create a directory */,
112 ErrorCode_BadApplicationEntityTitle = 2009 /*!< An application entity title (AET) cannot be empty or be longer than 16 characters */,
113 ErrorCode_NoCFindHandler = 2010 /*!< No request handler factory for DICOM C-FIND SCP */,
114 ErrorCode_NoCMoveHandler = 2011 /*!< No request handler factory for DICOM C-MOVE SCP */,
115 ErrorCode_NoCStoreHandler = 2012 /*!< No request handler factory for DICOM C-STORE SCP */,
116 ErrorCode_NoApplicationEntityFilter = 2013 /*!< No application entity filter */,
117 ErrorCode_NoSopClassOrInstance = 2014 /*!< DicomUserConnection: Unable to find the SOP class and instance */,
118 ErrorCode_NoPresentationContext = 2015 /*!< DicomUserConnection: No acceptable presentation context for modality */,
119 ErrorCode_DicomFindUnavailable = 2016 /*!< DicomUserConnection: The C-FIND command is not supported by the remote SCP */,
120 ErrorCode_DicomMoveUnavailable = 2017 /*!< DicomUserConnection: The C-MOVE command is not supported by the remote SCP */,
121 ErrorCode_CannotStoreInstance = 2018 /*!< Cannot store an instance */,
122 ErrorCode_CreateDicomNotString = 2019 /*!< Only string values are supported when creating DICOM instances */,
123 ErrorCode_CreateDicomOverrideTag = 2020 /*!< Trying to override a value inherited from a parent module */,
124 ErrorCode_CreateDicomUseContent = 2021 /*!< Use \"Content\" to inject an image into a new DICOM instance */,
125 ErrorCode_CreateDicomNoPayload = 2022 /*!< No payload is present for one instance in the series */,
126 ErrorCode_CreateDicomUseDataUriScheme = 2023 /*!< The payload of the DICOM instance must be specified according to Data URI scheme */,
127 ErrorCode_CreateDicomBadParent = 2024 /*!< Trying to attach a new DICOM instance to an inexistent resource */,
128 ErrorCode_CreateDicomParentIsInstance = 2025 /*!< Trying to attach a new DICOM instance to an instance (must be a series, study or patient) */,
129 ErrorCode_CreateDicomParentEncoding = 2026 /*!< Unable to get the encoding of the parent resource */,
130 ErrorCode_UnknownModality = 2027 /*!< Unknown modality */,
131 ErrorCode_BadJobOrdering = 2028 /*!< Bad ordering of filters in a job */,
132 ErrorCode_JsonToLuaTable = 2029 /*!< Cannot convert the given JSON object to a Lua table */,
133 ErrorCode_CannotCreateLua = 2030 /*!< Cannot create the Lua context */,
134 ErrorCode_CannotExecuteLua = 2031 /*!< Cannot execute a Lua command */,
135 ErrorCode_LuaAlreadyExecuted = 2032 /*!< Arguments cannot be pushed after the Lua function is executed */,
136 ErrorCode_LuaBadOutput = 2033 /*!< The Lua function does not give the expected number of outputs */,
137 ErrorCode_NotLuaPredicate = 2034 /*!< The Lua function is not a predicate (only true/false outputs allowed) */,
138 ErrorCode_LuaReturnsNoString = 2035 /*!< The Lua function does not return a string */,
139 ErrorCode_StorageAreaAlreadyRegistered = 2036 /*!< Another plugin has already registered a custom storage area */,
140 ErrorCode_DatabaseBackendAlreadyRegistered = 2037 /*!< Another plugin has already registered a custom database back-end */,
141 ErrorCode_DatabaseNotInitialized = 2038 /*!< Plugin trying to call the database during its initialization */,
142 ErrorCode_SslDisabled = 2039 /*!< Orthanc has been built without SSL support */,
143 ErrorCode_CannotOrderSlices = 2040 /*!< Unable to order the slices of the series */,
144 ErrorCode_NoWorklistHandler = 2041 /*!< No request handler factory for DICOM C-Find Modality SCP */,
145 ErrorCode_AlreadyExistingTag = 2042 /*!< Cannot override the value of a tag that already exists */,
146 ErrorCode_START_PLUGINS = 1000000
147 };
148
149 enum LogLevel
150 {
151 LogLevel_Error,
152 LogLevel_Warning,
153 LogLevel_Info,
154 LogLevel_Trace
155 };
156
157
158 /**
159 * {summary}{The memory layout of the pixels (resp. voxels) of a 2D (resp. 3D) image.}
160 **/
161 enum PixelFormat
162 {
163 /**
164 * {summary}{Color image in RGB24 format.}
165 * {description}{This format describes a color image. The pixels are stored in 3
166 * consecutive bytes. The memory layout is RGB.}
167 **/
168 PixelFormat_RGB24 = 1,
169
170 /**
171 * {summary}{Color image in RGBA32 format.}
172 * {description}{This format describes a color image. The pixels are stored in 4
173 * consecutive bytes. The memory layout is RGBA.}
174 **/
175 PixelFormat_RGBA32 = 2,
176
177 /**
178 * {summary}{Graylevel 8bpp image.}
179 * {description}{The image is graylevel. Each pixel is unsigned and stored in one byte.}
180 **/
181 PixelFormat_Grayscale8 = 3,
182
183 /**
184 * {summary}{Graylevel, unsigned 16bpp image.}
185 * {description}{The image is graylevel. Each pixel is unsigned and stored in two bytes.}
186 **/
187 PixelFormat_Grayscale16 = 4,
188
189 /**
190 * {summary}{Graylevel, signed 16bpp image.}
191 * {description}{The image is graylevel. Each pixel is signed and stored in two bytes.}
192 **/
193 PixelFormat_SignedGrayscale16 = 5,
194
195 /**
196 * {summary}{Graylevel, floating-point image.}
197 * {description}{The image is graylevel. Each pixel is floating-point and stored in 4 bytes.}
198 **/
199 PixelFormat_Float32 = 6,
200
201 // This is the memory layout for Cairo
202 PixelFormat_BGRA32 = 7
203 };
204
205
206 /**
207 * {summary}{The extraction mode specifies the way the values of the pixels are scaled when downloading a 2D image.}
208 **/
209 enum ImageExtractionMode
210 {
211 /**
212 * {summary}{Rescaled to 8bpp.}
213 * {description}{The minimum value of the image is set to 0, and its maximum value is set to 255.}
214 **/
215 ImageExtractionMode_Preview = 1,
216
217 /**
218 * {summary}{Truncation to the [0, 255] range.}
219 **/
220 ImageExtractionMode_UInt8 = 2,
221
222 /**
223 * {summary}{Truncation to the [0, 65535] range.}
224 **/
225 ImageExtractionMode_UInt16 = 3,
226
227 /**
228 * {summary}{Truncation to the [-32768, 32767] range.}
229 **/
230 ImageExtractionMode_Int16 = 4
231 };
232
233
234 /**
235 * Most common, non-joke and non-experimental HTTP status codes
236 * http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
237 **/
238 enum HttpStatus
239 {
240 HttpStatus_None = -1,
241
242 // 1xx Informational
243 HttpStatus_100_Continue = 100,
244 HttpStatus_101_SwitchingProtocols = 101,
245 HttpStatus_102_Processing = 102,
246
247 // 2xx Success
248 HttpStatus_200_Ok = 200,
249 HttpStatus_201_Created = 201,
250 HttpStatus_202_Accepted = 202,
251 HttpStatus_203_NonAuthoritativeInformation = 203,
252 HttpStatus_204_NoContent = 204,
253 HttpStatus_205_ResetContent = 205,
254 HttpStatus_206_PartialContent = 206,
255 HttpStatus_207_MultiStatus = 207,
256 HttpStatus_208_AlreadyReported = 208,
257 HttpStatus_226_IMUsed = 226,
258
259 // 3xx Redirection
260 HttpStatus_300_MultipleChoices = 300,
261 HttpStatus_301_MovedPermanently = 301,
262 HttpStatus_302_Found = 302,
263 HttpStatus_303_SeeOther = 303,
264 HttpStatus_304_NotModified = 304,
265 HttpStatus_305_UseProxy = 305,
266 HttpStatus_307_TemporaryRedirect = 307,
267
268 // 4xx Client Error
269 HttpStatus_400_BadRequest = 400,
270 HttpStatus_401_Unauthorized = 401,
271 HttpStatus_402_PaymentRequired = 402,
272 HttpStatus_403_Forbidden = 403,
273 HttpStatus_404_NotFound = 404,
274 HttpStatus_405_MethodNotAllowed = 405,
275 HttpStatus_406_NotAcceptable = 406,
276 HttpStatus_407_ProxyAuthenticationRequired = 407,
277 HttpStatus_408_RequestTimeout = 408,
278 HttpStatus_409_Conflict = 409,
279 HttpStatus_410_Gone = 410,
280 HttpStatus_411_LengthRequired = 411,
281 HttpStatus_412_PreconditionFailed = 412,
282 HttpStatus_413_RequestEntityTooLarge = 413,
283 HttpStatus_414_RequestUriTooLong = 414,
284 HttpStatus_415_UnsupportedMediaType = 415,
285 HttpStatus_416_RequestedRangeNotSatisfiable = 416,
286 HttpStatus_417_ExpectationFailed = 417,
287 HttpStatus_422_UnprocessableEntity = 422,
288 HttpStatus_423_Locked = 423,
289 HttpStatus_424_FailedDependency = 424,
290 HttpStatus_426_UpgradeRequired = 426,
291
292 // 5xx Server Error
293 HttpStatus_500_InternalServerError = 500,
294 HttpStatus_501_NotImplemented = 501,
295 HttpStatus_502_BadGateway = 502,
296 HttpStatus_503_ServiceUnavailable = 503,
297 HttpStatus_504_GatewayTimeout = 504,
298 HttpStatus_505_HttpVersionNotSupported = 505,
299 HttpStatus_506_VariantAlsoNegotiates = 506,
300 HttpStatus_507_InsufficientStorage = 507,
301 HttpStatus_509_BandwidthLimitExceeded = 509,
302 HttpStatus_510_NotExtended = 510
303 };
304
305
306 enum HttpMethod
307 {
308 HttpMethod_Get = 0,
309 HttpMethod_Post = 1,
310 HttpMethod_Delete = 2,
311 HttpMethod_Put = 3
312 };
313
314
315 enum ImageFormat
316 {
317 ImageFormat_Png = 1
318 };
319
320
321 // https://en.wikipedia.org/wiki/HTTP_compression
322 enum HttpCompression
323 {
324 HttpCompression_None,
325 HttpCompression_Deflate,
326 HttpCompression_Gzip
327 };
328
329
330 // Specific Character Sets
331 // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2
332 enum Encoding
333 {
334 Encoding_Ascii,
335 Encoding_Utf8,
336 Encoding_Latin1,
337 Encoding_Latin2,
338 Encoding_Latin3,
339 Encoding_Latin4,
340 Encoding_Latin5, // Turkish
341 Encoding_Cyrillic,
342 Encoding_Windows1251, // Windows-1251 (commonly used for Cyrillic)
343 Encoding_Arabic,
344 Encoding_Greek,
345 Encoding_Hebrew,
346 Encoding_Thai, // TIS 620-2533
347 Encoding_Japanese, // JIS X 0201 (Shift JIS): Katakana
348 Encoding_Chinese // GB18030 - Chinese simplified
349 //Encoding_JapaneseKanji, // Multibyte - JIS X 0208: Kanji
350 //Encoding_JapaneseSupplementaryKanji, // Multibyte - JIS X 0212: Supplementary Kanji set
351 //Encoding_Korean, // Multibyte - KS X 1001: Hangul and Hanja
352 };
353
354
355 // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.7.6.3.1.2
356 enum PhotometricInterpretation
357 {
358 PhotometricInterpretation_ARGB, // Retired
359 PhotometricInterpretation_CMYK, // Retired
360 PhotometricInterpretation_HSV, // Retired
361 PhotometricInterpretation_Monochrome1,
362 PhotometricInterpretation_Monochrome2,
363 PhotometricInterpretation_Palette,
364 PhotometricInterpretation_RGB,
365 PhotometricInterpretation_YBRFull,
366 PhotometricInterpretation_YBRFull422,
367 PhotometricInterpretation_YBRPartial420,
368 PhotometricInterpretation_YBRPartial422,
369 PhotometricInterpretation_YBR_ICT,
370 PhotometricInterpretation_YBR_RCT,
371 PhotometricInterpretation_Unknown
372 };
373
374 enum DicomModule
375 {
376 DicomModule_Patient,
377 DicomModule_Study,
378 DicomModule_Series,
379 DicomModule_Instance,
380 DicomModule_Image
381 };
382
383 enum RequestOrigin
384 {
385 RequestOrigin_Unknown,
386 RequestOrigin_DicomProtocol,
387 RequestOrigin_RestApi,
388 RequestOrigin_Plugins,
389 RequestOrigin_Lua
390 };
391
392 enum ServerBarrierEvent
393 {
394 ServerBarrierEvent_Stop,
395 ServerBarrierEvent_Reload // SIGHUP signal: reload configuration file
396 };
397
398 enum FileMode
399 {
400 FileMode_ReadBinary,
401 FileMode_WriteBinary
402 };
403
404 /**
405 * The value representations Orthanc knows about. They correspond to
406 * the DICOM 2016b version of the standard.
407 * http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6.2.html
408 **/
409 enum ValueRepresentation
410 {
411 ValueRepresentation_ApplicationEntity = 1, // AE
412 ValueRepresentation_AgeString = 2, // AS
413 ValueRepresentation_AttributeTag = 3, // AT (2 x uint16_t)
414 ValueRepresentation_CodeString = 4, // CS
415 ValueRepresentation_Date = 5, // DA
416 ValueRepresentation_DecimalString = 6, // DS
417 ValueRepresentation_DateTime = 7, // DT
418 ValueRepresentation_FloatingPointSingle = 8, // FL (float)
419 ValueRepresentation_FloatingPointDouble = 9, // FD (double)
420 ValueRepresentation_IntegerString = 10, // IS
421 ValueRepresentation_LongString = 11, // LO
422 ValueRepresentation_LongText = 12, // LT
423 ValueRepresentation_OtherByte = 13, // OB
424 ValueRepresentation_OtherDouble = 14, // OD
425 ValueRepresentation_OtherFloat = 15, // OF
426 ValueRepresentation_OtherLong = 16, // OL
427 ValueRepresentation_OtherWord = 17, // OW
428 ValueRepresentation_PersonName = 18, // PN
429 ValueRepresentation_ShortString = 19, // SH
430 ValueRepresentation_SignedLong = 20, // SL (int32_t)
431 ValueRepresentation_Sequence = 21, // SQ
432 ValueRepresentation_SignedShort = 22, // SS (int16_t)
433 ValueRepresentation_ShortText = 23, // ST
434 ValueRepresentation_Time = 24, // TM
435 ValueRepresentation_UnlimitedCharacters = 25, // UC
436 ValueRepresentation_UniqueIdentifier = 26, // UI (UID)
437 ValueRepresentation_UnsignedLong = 27, // UL (uint32_t)
438 ValueRepresentation_Unknown = 28, // UN
439 ValueRepresentation_UniversalResource = 29, // UR (URI or URL)
440 ValueRepresentation_UnsignedShort = 30, // US (uint16_t)
441 ValueRepresentation_UnlimitedText = 31, // UT
442 ValueRepresentation_NotSupported // Not supported by Orthanc, or tag not in dictionary
443 };
444
445
446 /**
447 * WARNING: Do not change the explicit values in the enumerations
448 * below this point. This would result in incompatible databases
449 * between versions of Orthanc!
450 **/
451
452 enum CompressionType
453 {
454 /**
455 * Buffer/file that is stored as-is, in a raw fashion, without
456 * compression.
457 **/
458 CompressionType_None = 1,
459
460 /**
461 * Buffer that is compressed using the "deflate" algorithm (RFC
462 * 1951), wrapped inside the zlib data format (RFC 1950), prefixed
463 * with a "uint64_t" (8 bytes) that encodes the size of the
464 * uncompressed buffer. If the compressed buffer is empty, its
465 * represents an empty uncompressed buffer. This format is
466 * internal to Orthanc. If the 8 first bytes are skipped AND the
467 * buffer is non-empty, the buffer is compatible with the
468 * "deflate" HTTP compression.
469 **/
470 CompressionType_ZlibWithSize = 2
471 };
472
473 enum FileContentType
474 {
475 // If you add a value below, insert it in "PluginStorageArea" in
476 // the file "Plugins/Engine/OrthancPlugins.cpp"
477 FileContentType_Unknown = 0,
478 FileContentType_Dicom = 1,
479 FileContentType_DicomAsJson = 2,
480
481 // Make sure that the value "65535" can be stored into this enumeration
482 FileContentType_StartUser = 1024,
483 FileContentType_EndUser = 65535
484 };
485
486 enum ResourceType
487 {
488 ResourceType_Patient = 1,
489 ResourceType_Study = 2,
490 ResourceType_Series = 3,
491 ResourceType_Instance = 4
492 };
493
494
495 const char* EnumerationToString(ErrorCode code);
496
497 const char* EnumerationToString(HttpMethod method);
498
499 const char* EnumerationToString(HttpStatus status);
500
501 const char* EnumerationToString(ResourceType type);
502
503 const char* EnumerationToString(ImageFormat format);
504
505 const char* EnumerationToString(Encoding encoding);
506
507 const char* EnumerationToString(PhotometricInterpretation photometric);
508
509 const char* EnumerationToString(LogLevel level);
510
511 const char* EnumerationToString(RequestOrigin origin);
512
513 const char* EnumerationToString(PixelFormat format);
514
515 Encoding StringToEncoding(const char* encoding);
516
517 ResourceType StringToResourceType(const char* type);
518
519 ImageFormat StringToImageFormat(const char* format);
520
521 LogLevel StringToLogLevel(const char* level);
522
523 ValueRepresentation StringToValueRepresentation(const std::string& vr,
524 bool throwIfUnsupported);
525
526 unsigned int GetBytesPerPixel(PixelFormat format);
527
528 bool GetDicomEncoding(Encoding& encoding,
529 const char* specificCharacterSet);
530
531 ResourceType GetChildResourceType(ResourceType type);
532
533 ResourceType GetParentResourceType(ResourceType type);
534
535 DicomModule GetModule(ResourceType type);
536
537 const char* GetDicomSpecificCharacterSet(Encoding encoding);
538
539 HttpStatus ConvertErrorCodeToHttpStatus(ErrorCode error);
540
541 bool IsUserContentType(FileContentType type);
542
543 bool IsBinaryValueRepresentation(ValueRepresentation vr);
544 }