comparison Core/Enumerations.h @ 1364:111e23bb4904 query-retrieve

integration mainline->query-retrieve
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 21 May 2015 16:58:30 +0200
parents 60cc0ee61edb
children ac4efabeb80c
comparison
equal deleted inserted replaced
953:f894be6e7cc1 1364:111e23bb4904
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics
4 * Belgium 4 * Department, University Hospital of Liege, Belgium
5 * 5 *
6 * This program is free software: you can redistribute it and/or 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 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 8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version. 9 * License, or (at your option) any later version.
55 ErrorCode_BadParameterType, 55 ErrorCode_BadParameterType,
56 ErrorCode_BadSequenceOfCalls, 56 ErrorCode_BadSequenceOfCalls,
57 ErrorCode_InexistentItem, 57 ErrorCode_InexistentItem,
58 ErrorCode_BadRequest, 58 ErrorCode_BadRequest,
59 ErrorCode_NetworkProtocol, 59 ErrorCode_NetworkProtocol,
60 ErrorCode_SystemCommand,
61 ErrorCode_Database,
60 62
61 // Specific error codes 63 // Specific error codes
62 ErrorCode_UriSyntax, 64 ErrorCode_UriSyntax,
63 ErrorCode_InexistentFile, 65 ErrorCode_InexistentFile,
64 ErrorCode_CannotWriteFile, 66 ErrorCode_CannotWriteFile,
69 ErrorCode_FullStorage, 71 ErrorCode_FullStorage,
70 ErrorCode_CorruptedFile, 72 ErrorCode_CorruptedFile,
71 ErrorCode_InexistentTag, 73 ErrorCode_InexistentTag,
72 ErrorCode_ReadOnly, 74 ErrorCode_ReadOnly,
73 ErrorCode_IncompatibleImageFormat, 75 ErrorCode_IncompatibleImageFormat,
74 ErrorCode_IncompatibleImageSize 76 ErrorCode_IncompatibleImageSize,
77 ErrorCode_SharedLibrary,
78 ErrorCode_Plugin
75 }; 79 };
76 80
77 /** 81 /**
78 * {summary}{The memory layout of the pixels (resp. voxels) of a 2D (resp. 3D) image.} 82 * {summary}{The memory layout of the pixels (resp. voxels) of a 2D (resp. 3D) image.}
79 **/ 83 **/
226 { 230 {
227 ImageFormat_Png = 1 231 ImageFormat_Png = 1
228 }; 232 };
229 233
230 234
235 // http://www.dabsoft.ch/dicom/3/C.12.1.1.2/
231 enum Encoding 236 enum Encoding
232 { 237 {
238 Encoding_Ascii,
233 Encoding_Utf8, 239 Encoding_Utf8,
234 Encoding_Latin1 240 Encoding_Latin1,
241 Encoding_Latin2,
242 Encoding_Latin3,
243 Encoding_Latin4,
244 Encoding_Latin5, // Turkish
245 Encoding_Cyrillic,
246 Encoding_Windows1251, // Windows-1251 (commonly used for Cyrillic)
247 Encoding_Arabic,
248 Encoding_Greek,
249 Encoding_Hebrew,
250 Encoding_Thai, // TIS 620-2533
251 Encoding_Japanese, // JIS X 0201 (Shift JIS): Katakana
252 Encoding_Chinese // GB18030 - Chinese simplified
253 //Encoding_JapaneseKanji, // Multibyte - JIS X 0208: Kanji
254 //Encoding_JapaneseSupplementaryKanji, // Multibyte - JIS X 0212: Supplementary Kanji set
255 //Encoding_Korean, // Multibyte - KS X 1001: Hangul and Hanja
256 };
257
258
259 // https://www.dabsoft.ch/dicom/3/C.7.6.3.1.2/
260 enum PhotometricInterpretation
261 {
262 PhotometricInterpretation_ARGB, // Retired
263 PhotometricInterpretation_CMYK, // Retired
264 PhotometricInterpretation_HSV, // Retired
265 PhotometricInterpretation_Monochrome1,
266 PhotometricInterpretation_Monochrome2,
267 PhotometricInterpretation_Palette,
268 PhotometricInterpretation_RGB,
269 PhotometricInterpretation_YBRFull,
270 PhotometricInterpretation_YBRFull422,
271 PhotometricInterpretation_YBRPartial420,
272 PhotometricInterpretation_YBRPartial422,
273 PhotometricInterpretation_YBR_ICT,
274 PhotometricInterpretation_YBR_RCT,
275 PhotometricInterpretation_Unknown
276 };
277
278 enum DicomModule
279 {
280 DicomModule_Patient,
281 DicomModule_Study,
282 DicomModule_Series,
283 DicomModule_Instance,
284 DicomModule_Image
235 }; 285 };
236 286
237 287
238 /** 288 /**
239 * WARNING: Do not change the explicit values in the enumerations 289 * WARNING: Do not change the explicit values in the enumerations
247 CompressionType_Zlib = 2 297 CompressionType_Zlib = 2
248 }; 298 };
249 299
250 enum FileContentType 300 enum FileContentType
251 { 301 {
302 // If you add a value below, insert it in "PluginStorageArea" in
303 // the file "Plugins/Engine/OrthancPlugins.cpp"
304 FileContentType_Unknown = 0,
252 FileContentType_Dicom = 1, 305 FileContentType_Dicom = 1,
253 FileContentType_DicomAsJson = 2, 306 FileContentType_DicomAsJson = 2,
254 307
255 // Make sure that the value "65535" can be stored into this enumeration 308 // Make sure that the value "65535" can be stored into this enumeration
256 FileContentType_StartUser = 1024, 309 FileContentType_StartUser = 1024,
272 325
273 const char* EnumerationToString(ResourceType type); 326 const char* EnumerationToString(ResourceType type);
274 327
275 const char* EnumerationToString(ImageFormat format); 328 const char* EnumerationToString(ImageFormat format);
276 329
330 const char* EnumerationToString(Encoding encoding);
331
332 const char* EnumerationToString(PhotometricInterpretation photometric);
333
334 Encoding StringToEncoding(const char* encoding);
335
277 ResourceType StringToResourceType(const char* type); 336 ResourceType StringToResourceType(const char* type);
278 337
279 ImageFormat StringToImageFormat(const char* format); 338 ImageFormat StringToImageFormat(const char* format);
280 339
281 unsigned int GetBytesPerPixel(PixelFormat format); 340 unsigned int GetBytesPerPixel(PixelFormat format);
341
342 bool GetDicomEncoding(Encoding& encoding,
343 const char* specificCharacterSet);
344
345 const char* GetMimeType(FileContentType type);
282 } 346 }