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