Mercurial > hg > orthanc
annotate Core/Enumerations.cpp @ 4085:da06381f3091
backporting fix from framework branch to mainline
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Jun 2020 15:11:41 +0200 |
parents | e8d30585b909 |
children |
rev | line source |
---|---|
477 | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
1900 | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
1288
6e7e5ed91c2d
upgrade to year 2015
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1206
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
3640
94f4a18a79cc
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3561
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
477 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU General Public License as | |
9 * published by the Free Software Foundation, either version 3 of the | |
10 * License, or (at your option) any later version. | |
11 * | |
12 * In addition, as a special exception, the copyright holders of this | |
13 * program give permission to link the code of its release with the | |
14 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
15 * that use the same license as the "OpenSSL" library), and distribute | |
16 * the linked executables. You must obey the GNU General Public License | |
17 * in all respects for all of the code used other than "OpenSSL". If you | |
18 * modify file(s) with this exception, you may extend this exception to | |
19 * your version of the file(s), but you are not obligated to do so. If | |
20 * you do not wish to do so, delete this exception statement from your | |
21 * version. If you delete this exception statement from all source files | |
22 * in the program, then also delete it here. | |
23 * | |
24 * This program is distributed in the hope that it will be useful, but | |
25 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
27 * General Public License for more details. | |
28 * | |
29 * You should have received a copy of the GNU General Public License | |
30 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
31 **/ | |
32 | |
33 | |
824
a811bdf8b8eb
precompiled headers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
800
diff
changeset
|
34 #include "PrecompiledHeaders.h" |
477 | 35 #include "Enumerations.h" |
36 | |
37 #include "OrthancException.h" | |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
38 #include "Toolbox.h" |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
39 #include "Logging.h" |
477 | 40 |
2407
5edec967055e
fix sandboxed builds
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2401
diff
changeset
|
41 #include <boost/thread/mutex.hpp> |
1495
fbe40117eb21
improve the performance of the internal logger
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1347
diff
changeset
|
42 #include <string.h> |
1993
e2a3ff770b48
introducing float32 images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1980
diff
changeset
|
43 #include <cassert> |
1495
fbe40117eb21
improve the performance of the internal logger
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1347
diff
changeset
|
44 |
477 | 45 namespace Orthanc |
46 { | |
2924
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
47 static const char* const MIME_CSS = "text/css"; |
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
48 static const char* const MIME_DICOM = "application/dicom"; |
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
49 static const char* const MIME_GIF = "image/gif"; |
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
50 static const char* const MIME_GZIP = "application/gzip"; |
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
51 static const char* const MIME_HTML = "text/html"; |
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
52 static const char* const MIME_JAVASCRIPT = "application/javascript"; |
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
53 static const char* const MIME_JPEG2000 = "image/jp2"; |
2984
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
54 static const char* const MIME_NACL = "application/x-nacl"; |
2924
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
55 static const char* const MIME_PLAIN_TEXT = "text/plain"; |
2984
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
56 static const char* const MIME_PNACL = "application/x-pnacl"; |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
57 static const char* const MIME_SVG = "image/svg+xml"; |
2924
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
58 static const char* const MIME_WEB_ASSEMBLY = "application/wasm"; |
2984
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
59 static const char* const MIME_WOFF = "application/x-font-woff"; |
3435
c08bb6ac3b7f
new mime type: font/woff2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3404
diff
changeset
|
60 static const char* const MIME_WOFF2 = "font/woff2"; |
2924
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
61 static const char* const MIME_XML_2 = "text/xml"; |
2976
cb5d75143da0
Asynchronous generation of ZIP archives and DICOM medias
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2954
diff
changeset
|
62 static const char* const MIME_ZIP = "application/zip"; |
3203
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
63 static const char* const MIME_DICOM_WEB_JSON = "application/dicom+json"; |
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
64 static const char* const MIME_DICOM_WEB_XML = "application/dicom+xml"; |
2924
22524fd06225
macros ORTHANC_OVERRIDE and ORTHANC_FINAL
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2908
diff
changeset
|
65 |
1578 | 66 // This function is autogenerated by the script |
67 // "Resources/GenerateErrorCodes.py" | |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
68 const char* EnumerationToString(ErrorCode error) |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
69 { |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
70 switch (error) |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
71 { |
1579
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
72 case ErrorCode_InternalError: |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
73 return "Internal error"; |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
74 |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
75 case ErrorCode_Success: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
76 return "Success"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
77 |
1579
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
78 case ErrorCode_Plugin: |
b93c398f934d
check the size of the enumerations in the plugin engine
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1578
diff
changeset
|
79 return "Error encountered within the plugin engine"; |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
80 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
81 case ErrorCode_NotImplemented: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
82 return "Not implemented yet"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
83 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
84 case ErrorCode_ParameterOutOfRange: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
85 return "Parameter out of range"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
86 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
87 case ErrorCode_NotEnoughMemory: |
2133 | 88 return "The server hosting Orthanc is running out of memory"; |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
89 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
90 case ErrorCode_BadParameterType: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
91 return "Bad type for a parameter"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
92 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
93 case ErrorCode_BadSequenceOfCalls: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
94 return "Bad sequence of calls"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
95 |
1577
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
96 case ErrorCode_InexistentItem: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
97 return "Accessing an inexistent item"; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
98 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
99 case ErrorCode_BadRequest: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
100 return "Bad request"; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
101 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
102 case ErrorCode_NetworkProtocol: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
103 return "Error in the network protocol"; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
104 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
105 case ErrorCode_SystemCommand: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
106 return "Error while calling a system command"; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
107 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
108 case ErrorCode_Database: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
109 return "Error with the database engine"; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
110 |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
111 case ErrorCode_UriSyntax: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
112 return "Badly formatted URI"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
113 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
114 case ErrorCode_InexistentFile: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
115 return "Inexistent file"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
116 |
1577
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
117 case ErrorCode_CannotWriteFile: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
118 return "Cannot write to file"; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
119 |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
120 case ErrorCode_BadFileFormat: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
121 return "Bad file format"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
122 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
123 case ErrorCode_Timeout: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
124 return "Timeout"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
125 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
126 case ErrorCode_UnknownResource: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
127 return "Unknown resource"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
128 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
129 case ErrorCode_IncompatibleDatabaseVersion: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
130 return "Incompatible version of the database"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
131 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
132 case ErrorCode_FullStorage: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
133 return "The file storage is full"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
134 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
135 case ErrorCode_CorruptedFile: |
1582
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
136 return "Corrupted file (e.g. inconsistent MD5 hash)"; |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
137 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
138 case ErrorCode_InexistentTag: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
139 return "Inexistent tag"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
140 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
141 case ErrorCode_ReadOnly: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
142 return "Cannot modify a read-only data structure"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
143 |
1577
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
144 case ErrorCode_IncompatibleImageFormat: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
145 return "Incompatible format of the images"; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
146 |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
147 case ErrorCode_IncompatibleImageSize: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
148 return "Incompatible size of the images"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
149 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
150 case ErrorCode_SharedLibrary: |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
151 return "Error while using a shared library (plugin)"; |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
152 |
1581
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
153 case ErrorCode_UnknownPluginService: |
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
154 return "Plugin invoking an unknown service"; |
357c4bb15701
Plugins have access to explicit error codes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1579
diff
changeset
|
155 |
1582
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
156 case ErrorCode_UnknownDicomTag: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
157 return "Unknown DICOM tag"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
158 |
1596
f2e3d030ea59
BadJson error code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
159 case ErrorCode_BadJson: |
f2e3d030ea59
BadJson error code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
160 return "Cannot parse a JSON document"; |
f2e3d030ea59
BadJson error code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
161 |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
162 case ErrorCode_Unauthorized: |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
163 return "Bad credentials were provided to an HTTP request"; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
164 |
1610
2dff2bdffdb8
font support within Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
165 case ErrorCode_BadFont: |
2dff2bdffdb8
font support within Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
166 return "Badly formatted font file"; |
2dff2bdffdb8
font support within Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1606
diff
changeset
|
167 |
1643
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
168 case ErrorCode_DatabasePlugin: |
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
169 return "The plugin implementing a custom database back-end does not fulfill the proper interface"; |
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
170 |
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
171 case ErrorCode_StorageAreaPlugin: |
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
172 return "Error in the plugin implementing a custom storage area"; |
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
173 |
1746 | 174 case ErrorCode_EmptyRequest: |
175 return "The request is empty"; | |
176 | |
1781
5ad4e4d92ecb
AcceptMediaDispatcher bootstrap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
177 case ErrorCode_NotAcceptable: |
5ad4e4d92ecb
AcceptMediaDispatcher bootstrap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
178 return "Cannot send a response which is acceptable according to the Accept HTTP header"; |
5ad4e4d92ecb
AcceptMediaDispatcher bootstrap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
179 |
2132
a43708636890
ErrorCode_NotEnoughMemory and ErrorCode_NullPointer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2089
diff
changeset
|
180 case ErrorCode_NullPointer: |
a43708636890
ErrorCode_NotEnoughMemory and ErrorCode_NullPointer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2089
diff
changeset
|
181 return "Cannot handle a NULL pointer"; |
a43708636890
ErrorCode_NotEnoughMemory and ErrorCode_NullPointer
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2089
diff
changeset
|
182 |
2486
ad8f30fc28d1
new error code: DatabaseUnavailable
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
183 case ErrorCode_DatabaseUnavailable: |
ad8f30fc28d1
new error code: DatabaseUnavailable
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
184 return "The database is currently not available (probably a transient situation)"; |
ad8f30fc28d1
new error code: DatabaseUnavailable
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
185 |
2581
8da2cffc2378
JobsRegistry::Cancel()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2569
diff
changeset
|
186 case ErrorCode_CanceledJob: |
8da2cffc2378
JobsRegistry::Cancel()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2569
diff
changeset
|
187 return "This job was canceled"; |
8da2cffc2378
JobsRegistry::Cancel()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2569
diff
changeset
|
188 |
3376
56ea9c476dba
new error code for Stone: BadGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3226
diff
changeset
|
189 case ErrorCode_BadGeometry: |
56ea9c476dba
new error code for Stone: BadGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3226
diff
changeset
|
190 return "Geometry error encountered in Stone"; |
56ea9c476dba
new error code for Stone: BadGeometry
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3226
diff
changeset
|
191 |
3801
9fe1d64a748c
upgrade to civetweb 1.12, error reporting if OpenSSL failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3737
diff
changeset
|
192 case ErrorCode_SslInitialization: |
9fe1d64a748c
upgrade to civetweb 1.12, error reporting if OpenSSL failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3737
diff
changeset
|
193 return "Cannot initialize SSL encryption, check out your certificates"; |
9fe1d64a748c
upgrade to civetweb 1.12, error reporting if OpenSSL failure
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3737
diff
changeset
|
194 |
1582
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
195 case ErrorCode_SQLiteNotOpened: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
196 return "SQLite: The database is not opened"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
197 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
198 case ErrorCode_SQLiteAlreadyOpened: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
199 return "SQLite: Connection is already open"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
200 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
201 case ErrorCode_SQLiteCannotOpen: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
202 return "SQLite: Unable to open the database"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
203 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
204 case ErrorCode_SQLiteStatementAlreadyUsed: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
205 return "SQLite: This cached statement is already being referred to"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
206 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
207 case ErrorCode_SQLiteExecute: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
208 return "SQLite: Cannot execute a command"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
209 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
210 case ErrorCode_SQLiteRollbackWithoutTransaction: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
211 return "SQLite: Rolling back a nonexistent transaction (have you called Begin()?)"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
212 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
213 case ErrorCode_SQLiteCommitWithoutTransaction: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
214 return "SQLite: Committing a nonexistent transaction"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
215 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
216 case ErrorCode_SQLiteRegisterFunction: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
217 return "SQLite: Unable to register a function"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
218 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
219 case ErrorCode_SQLiteFlush: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
220 return "SQLite: Unable to flush the database"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
221 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
222 case ErrorCode_SQLiteCannotRun: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
223 return "SQLite: Cannot run a cached statement"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
224 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
225 case ErrorCode_SQLiteCannotStep: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
226 return "SQLite: Cannot step over a cached statement"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
227 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
228 case ErrorCode_SQLiteBindOutOfRange: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
229 return "SQLite: Bing a value while out of range (serious error)"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
230 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
231 case ErrorCode_SQLitePrepareStatement: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
232 return "SQLite: Cannot prepare a cached statement"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
233 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
234 case ErrorCode_SQLiteTransactionAlreadyStarted: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
235 return "SQLite: Beginning the same transaction twice"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
236 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
237 case ErrorCode_SQLiteTransactionCommit: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
238 return "SQLite: Failure when committing the transaction"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
239 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
240 case ErrorCode_SQLiteTransactionBegin: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
241 return "SQLite: Cannot start a transaction"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
242 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
243 case ErrorCode_DirectoryOverFile: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
244 return "The directory to be created is already occupied by a regular file"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
245 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
246 case ErrorCode_FileStorageCannotWrite: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
247 return "Unable to create a subdirectory or a file in the file storage"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
248 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
249 case ErrorCode_DirectoryExpected: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
250 return "The specified path does not point to a directory"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
251 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
252 case ErrorCode_HttpPortInUse: |
1949
d90f737f2dde
warn about the use of privileged ports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1926
diff
changeset
|
253 return "The TCP port of the HTTP server is privileged or already in use"; |
1582
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
254 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
255 case ErrorCode_DicomPortInUse: |
1949
d90f737f2dde
warn about the use of privileged ports
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1926
diff
changeset
|
256 return "The TCP port of the DICOM server is privileged or already in use"; |
1582
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
257 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
258 case ErrorCode_BadHttpStatusInRest: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
259 return "This HTTP status is not allowed in a REST API"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
260 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
261 case ErrorCode_RegularFileExpected: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
262 return "The specified path does not point to a regular file"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
263 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
264 case ErrorCode_PathToExecutable: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
265 return "Unable to get the path to the executable"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
266 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
267 case ErrorCode_MakeDirectory: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
268 return "Cannot create a directory"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
269 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
270 case ErrorCode_BadApplicationEntityTitle: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
271 return "An application entity title (AET) cannot be empty or be longer than 16 characters"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
272 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
273 case ErrorCode_NoCFindHandler: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
274 return "No request handler factory for DICOM C-FIND SCP"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
275 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
276 case ErrorCode_NoCMoveHandler: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
277 return "No request handler factory for DICOM C-MOVE SCP"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
278 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
279 case ErrorCode_NoCStoreHandler: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
280 return "No request handler factory for DICOM C-STORE SCP"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
281 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
282 case ErrorCode_NoApplicationEntityFilter: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
283 return "No application entity filter"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
284 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
285 case ErrorCode_NoSopClassOrInstance: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
286 return "DicomUserConnection: Unable to find the SOP class and instance"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
287 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
288 case ErrorCode_NoPresentationContext: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
289 return "DicomUserConnection: No acceptable presentation context for modality"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
290 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
291 case ErrorCode_DicomFindUnavailable: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
292 return "DicomUserConnection: The C-FIND command is not supported by the remote SCP"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
293 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
294 case ErrorCode_DicomMoveUnavailable: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
295 return "DicomUserConnection: The C-MOVE command is not supported by the remote SCP"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
296 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
297 case ErrorCode_CannotStoreInstance: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
298 return "Cannot store an instance"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
299 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
300 case ErrorCode_CreateDicomNotString: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
301 return "Only string values are supported when creating DICOM instances"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
302 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
303 case ErrorCode_CreateDicomOverrideTag: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
304 return "Trying to override a value inherited from a parent module"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
305 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
306 case ErrorCode_CreateDicomUseContent: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
307 return "Use \"Content\" to inject an image into a new DICOM instance"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
308 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
309 case ErrorCode_CreateDicomNoPayload: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
310 return "No payload is present for one instance in the series"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
311 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
312 case ErrorCode_CreateDicomUseDataUriScheme: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
313 return "The payload of the DICOM instance must be specified according to Data URI scheme"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
314 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
315 case ErrorCode_CreateDicomBadParent: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
316 return "Trying to attach a new DICOM instance to an inexistent resource"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
317 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
318 case ErrorCode_CreateDicomParentIsInstance: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
319 return "Trying to attach a new DICOM instance to an instance (must be a series, study or patient)"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
320 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
321 case ErrorCode_CreateDicomParentEncoding: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
322 return "Unable to get the encoding of the parent resource"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
323 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
324 case ErrorCode_UnknownModality: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
325 return "Unknown modality"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
326 |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
327 case ErrorCode_BadJobOrdering: |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
328 return "Bad ordering of filters in a job"; |
bd1889029cbb
encoding of exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1581
diff
changeset
|
329 |
1583
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
330 case ErrorCode_JsonToLuaTable: |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
331 return "Cannot convert the given JSON object to a Lua table"; |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
332 |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
333 case ErrorCode_CannotCreateLua: |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
334 return "Cannot create the Lua context"; |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
335 |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
336 case ErrorCode_CannotExecuteLua: |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
337 return "Cannot execute a Lua command"; |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
338 |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
339 case ErrorCode_LuaAlreadyExecuted: |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
340 return "Arguments cannot be pushed after the Lua function is executed"; |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
341 |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
342 case ErrorCode_LuaBadOutput: |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
343 return "The Lua function does not give the expected number of outputs"; |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
344 |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
345 case ErrorCode_NotLuaPredicate: |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
346 return "The Lua function is not a predicate (only true/false outputs allowed)"; |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
347 |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
348 case ErrorCode_LuaReturnsNoString: |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
349 return "The Lua function does not return a string"; |
9ea3d082b064
got rid of custom exceptions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1582
diff
changeset
|
350 |
1630
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
351 case ErrorCode_StorageAreaAlreadyRegistered: |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
352 return "Another plugin has already registered a custom storage area"; |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
353 |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
354 case ErrorCode_DatabaseBackendAlreadyRegistered: |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
355 return "Another plugin has already registered a custom database back-end"; |
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
356 |
1643
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
357 case ErrorCode_DatabaseNotInitialized: |
87c77b9b3679
provision for error codes in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1630
diff
changeset
|
358 return "Plugin trying to call the database during its initialization"; |
1630
ffd23c0104af
"/system" URI gives information about the plugins used for storage area and DB back-end
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1610
diff
changeset
|
359 |
1703
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
360 case ErrorCode_SslDisabled: |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
361 return "Orthanc has been built without SSL support"; |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
362 |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
363 case ErrorCode_CannotOrderSlices: |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
364 return "Unable to order the slices of the series"; |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
365 |
1786
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1781
diff
changeset
|
366 case ErrorCode_NoWorklistHandler: |
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1781
diff
changeset
|
367 return "No request handler factory for DICOM C-Find Modality SCP"; |
164d78911382
primitives to handle dicom worklists
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1781
diff
changeset
|
368 |
1980
ebce5f456b8e
new error code: ErrorCode_AlreadyExistingTag
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1949
diff
changeset
|
369 case ErrorCode_AlreadyExistingTag: |
ebce5f456b8e
new error code: ErrorCode_AlreadyExistingTag
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1949
diff
changeset
|
370 return "Cannot override the value of a tag that already exists"; |
ebce5f456b8e
new error code: ErrorCode_AlreadyExistingTag
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1949
diff
changeset
|
371 |
4073 | 372 case ErrorCode_NoStorageCommitmentHandler: |
373 return "No request handler factory for DICOM N-ACTION SCP (storage commitment)"; | |
374 | |
3818
4f78da5613a1
Add C-GET SCP support
Stacy Loesch <stacy.loesch@varian.com>
parents:
3801
diff
changeset
|
375 case ErrorCode_NoCGetHandler: |
4f78da5613a1
Add C-GET SCP support
Stacy Loesch <stacy.loesch@varian.com>
parents:
3801
diff
changeset
|
376 return "No request handler factory for DICOM C-GET SCP"; |
4f78da5613a1
Add C-GET SCP support
Stacy Loesch <stacy.loesch@varian.com>
parents:
3801
diff
changeset
|
377 |
3404
e280ced38a4c
ErrorCode_UnsupportedMediaType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3376
diff
changeset
|
378 case ErrorCode_UnsupportedMediaType: |
e280ced38a4c
ErrorCode_UnsupportedMediaType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3376
diff
changeset
|
379 return "Unsupported media type"; |
e280ced38a4c
ErrorCode_UnsupportedMediaType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3376
diff
changeset
|
380 |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
381 default: |
1703
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
382 if (error >= ErrorCode_START_PLUGINS) |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
383 { |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
384 return "Error encountered within some plugin"; |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
385 } |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
386 else |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
387 { |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
388 return "Unknown error code"; |
b80e76dd1d56
ordered-slices continued
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1651
diff
changeset
|
389 } |
1575
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
390 } |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
391 } |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
392 |
f8aae45011c9
exceptions now carry HTTP status
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1572
diff
changeset
|
393 |
477 | 394 const char* EnumerationToString(HttpMethod method) |
395 { | |
396 switch (method) | |
397 { | |
398 case HttpMethod_Get: | |
399 return "GET"; | |
400 | |
401 case HttpMethod_Post: | |
402 return "POST"; | |
403 | |
404 case HttpMethod_Delete: | |
405 return "DELETE"; | |
406 | |
407 case HttpMethod_Put: | |
408 return "PUT"; | |
409 | |
410 default: | |
411 return "?"; | |
412 } | |
413 } | |
414 | |
415 | |
416 const char* EnumerationToString(HttpStatus status) | |
417 { | |
418 switch (status) | |
419 { | |
420 case HttpStatus_100_Continue: | |
421 return "Continue"; | |
422 | |
423 case HttpStatus_101_SwitchingProtocols: | |
424 return "Switching Protocols"; | |
425 | |
426 case HttpStatus_102_Processing: | |
427 return "Processing"; | |
428 | |
429 case HttpStatus_200_Ok: | |
430 return "OK"; | |
431 | |
432 case HttpStatus_201_Created: | |
433 return "Created"; | |
434 | |
435 case HttpStatus_202_Accepted: | |
436 return "Accepted"; | |
437 | |
438 case HttpStatus_203_NonAuthoritativeInformation: | |
439 return "Non-Authoritative Information"; | |
440 | |
441 case HttpStatus_204_NoContent: | |
442 return "No Content"; | |
443 | |
444 case HttpStatus_205_ResetContent: | |
445 return "Reset Content"; | |
446 | |
447 case HttpStatus_206_PartialContent: | |
448 return "Partial Content"; | |
449 | |
450 case HttpStatus_207_MultiStatus: | |
451 return "Multi-Status"; | |
452 | |
453 case HttpStatus_208_AlreadyReported: | |
454 return "Already Reported"; | |
455 | |
456 case HttpStatus_226_IMUsed: | |
457 return "IM Used"; | |
458 | |
459 case HttpStatus_300_MultipleChoices: | |
460 return "Multiple Choices"; | |
461 | |
462 case HttpStatus_301_MovedPermanently: | |
463 return "Moved Permanently"; | |
464 | |
465 case HttpStatus_302_Found: | |
466 return "Found"; | |
467 | |
468 case HttpStatus_303_SeeOther: | |
469 return "See Other"; | |
470 | |
471 case HttpStatus_304_NotModified: | |
472 return "Not Modified"; | |
473 | |
474 case HttpStatus_305_UseProxy: | |
475 return "Use Proxy"; | |
476 | |
477 case HttpStatus_307_TemporaryRedirect: | |
478 return "Temporary Redirect"; | |
479 | |
480 case HttpStatus_400_BadRequest: | |
481 return "Bad Request"; | |
482 | |
483 case HttpStatus_401_Unauthorized: | |
484 return "Unauthorized"; | |
485 | |
486 case HttpStatus_402_PaymentRequired: | |
487 return "Payment Required"; | |
488 | |
489 case HttpStatus_403_Forbidden: | |
490 return "Forbidden"; | |
491 | |
492 case HttpStatus_404_NotFound: | |
493 return "Not Found"; | |
494 | |
495 case HttpStatus_405_MethodNotAllowed: | |
496 return "Method Not Allowed"; | |
497 | |
498 case HttpStatus_406_NotAcceptable: | |
499 return "Not Acceptable"; | |
500 | |
501 case HttpStatus_407_ProxyAuthenticationRequired: | |
502 return "Proxy Authentication Required"; | |
503 | |
504 case HttpStatus_408_RequestTimeout: | |
505 return "Request Timeout"; | |
506 | |
507 case HttpStatus_409_Conflict: | |
508 return "Conflict"; | |
509 | |
510 case HttpStatus_410_Gone: | |
511 return "Gone"; | |
512 | |
513 case HttpStatus_411_LengthRequired: | |
514 return "Length Required"; | |
515 | |
516 case HttpStatus_412_PreconditionFailed: | |
517 return "Precondition Failed"; | |
518 | |
519 case HttpStatus_413_RequestEntityTooLarge: | |
520 return "Request Entity Too Large"; | |
521 | |
522 case HttpStatus_414_RequestUriTooLong: | |
523 return "Request-URI Too Long"; | |
524 | |
525 case HttpStatus_415_UnsupportedMediaType: | |
526 return "Unsupported Media Type"; | |
527 | |
528 case HttpStatus_416_RequestedRangeNotSatisfiable: | |
529 return "Requested Range Not Satisfiable"; | |
530 | |
531 case HttpStatus_417_ExpectationFailed: | |
532 return "Expectation Failed"; | |
533 | |
534 case HttpStatus_422_UnprocessableEntity: | |
535 return "Unprocessable Entity"; | |
536 | |
537 case HttpStatus_423_Locked: | |
538 return "Locked"; | |
539 | |
540 case HttpStatus_424_FailedDependency: | |
541 return "Failed Dependency"; | |
542 | |
543 case HttpStatus_426_UpgradeRequired: | |
544 return "Upgrade Required"; | |
545 | |
546 case HttpStatus_500_InternalServerError: | |
547 return "Internal Server Error"; | |
548 | |
549 case HttpStatus_501_NotImplemented: | |
550 return "Not Implemented"; | |
551 | |
552 case HttpStatus_502_BadGateway: | |
553 return "Bad Gateway"; | |
554 | |
555 case HttpStatus_503_ServiceUnavailable: | |
556 return "Service Unavailable"; | |
557 | |
558 case HttpStatus_504_GatewayTimeout: | |
559 return "Gateway Timeout"; | |
560 | |
561 case HttpStatus_505_HttpVersionNotSupported: | |
562 return "HTTP Version Not Supported"; | |
563 | |
564 case HttpStatus_506_VariantAlsoNegotiates: | |
565 return "Variant Also Negotiates"; | |
566 | |
567 case HttpStatus_507_InsufficientStorage: | |
568 return "Insufficient Storage"; | |
569 | |
570 case HttpStatus_509_BandwidthLimitExceeded: | |
571 return "Bandwidth Limit Exceeded"; | |
572 | |
573 case HttpStatus_510_NotExtended: | |
574 return "Not Extended"; | |
575 | |
576 default: | |
577 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
578 } | |
579 } | |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
580 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
581 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
582 const char* EnumerationToString(ResourceType type) |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
583 { |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
584 switch (type) |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
585 { |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
586 case ResourceType_Patient: |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
587 return "Patient"; |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
588 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
589 case ResourceType_Study: |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
590 return "Study"; |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
591 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
592 case ResourceType_Series: |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
593 return "Series"; |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
594 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
595 case ResourceType_Instance: |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
596 return "Instance"; |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
597 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
598 default: |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
599 throw OrthancException(ErrorCode_ParameterOutOfRange); |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
600 } |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
601 } |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
602 |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
603 |
800
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
604 const char* EnumerationToString(ImageFormat format) |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
605 { |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
606 switch (format) |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
607 { |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
608 case ImageFormat_Png: |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
609 return "Png"; |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
610 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
611 default: |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
612 throw OrthancException(ErrorCode_ParameterOutOfRange); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
613 } |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
614 } |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
615 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
616 |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
617 const char* EnumerationToString(Encoding encoding) |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
618 { |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
619 switch (encoding) |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
620 { |
1087 | 621 case Encoding_Ascii: |
622 return "Ascii"; | |
623 | |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
624 case Encoding_Utf8: |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
625 return "Utf8"; |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
626 |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
627 case Encoding_Latin1: |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
628 return "Latin1"; |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
629 |
1087 | 630 case Encoding_Latin2: |
631 return "Latin2"; | |
632 | |
633 case Encoding_Latin3: | |
634 return "Latin3"; | |
635 | |
636 case Encoding_Latin4: | |
637 return "Latin4"; | |
638 | |
639 case Encoding_Latin5: | |
640 return "Latin5"; | |
641 | |
642 case Encoding_Cyrillic: | |
643 return "Cyrillic"; | |
644 | |
1347 | 645 case Encoding_Windows1251: |
646 return "Windows1251"; | |
647 | |
1087 | 648 case Encoding_Arabic: |
649 return "Arabic"; | |
650 | |
651 case Encoding_Greek: | |
652 return "Greek"; | |
653 | |
654 case Encoding_Hebrew: | |
655 return "Hebrew"; | |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
656 |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
657 case Encoding_Thai: |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
658 return "Thai"; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
659 |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
660 case Encoding_Japanese: |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
661 return "Japanese"; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
662 |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
663 case Encoding_Chinese: |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
664 return "Chinese"; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
665 |
3217
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
666 case Encoding_Korean: |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
667 return "Korean"; |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
668 |
3218 | 669 case Encoding_JapaneseKanji: |
670 return "JapaneseKanji"; | |
671 | |
3226
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
672 case Encoding_SimplifiedChinese: |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
673 return "SimplifiedChinese"; |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
674 |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
675 default: |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
676 throw OrthancException(ErrorCode_ParameterOutOfRange); |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
677 } |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
678 } |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
679 |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
680 |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
681 const char* EnumerationToString(PhotometricInterpretation photometric) |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
682 { |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
683 switch (photometric) |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
684 { |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
685 case PhotometricInterpretation_RGB: |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
686 return "RGB"; |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
687 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
688 case PhotometricInterpretation_Monochrome1: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
689 return "MONOCHROME1"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
690 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
691 case PhotometricInterpretation_Monochrome2: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
692 return "MONOCHROME2"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
693 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
694 case PhotometricInterpretation_ARGB: |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
695 return "ARGB"; |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
696 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
697 case PhotometricInterpretation_CMYK: |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
698 return "CMYK"; |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
699 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
700 case PhotometricInterpretation_HSV: |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
701 return "HSV"; |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
702 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
703 case PhotometricInterpretation_Palette: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
704 return "PALETTE COLOR"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
705 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
706 case PhotometricInterpretation_YBRFull: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
707 return "YBR_FULL"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
708 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
709 case PhotometricInterpretation_YBRFull422: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
710 return "YBR_FULL_422"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
711 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
712 case PhotometricInterpretation_YBRPartial420: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
713 return "YBR_PARTIAL_420"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
714 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
715 case PhotometricInterpretation_YBRPartial422: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
716 return "YBR_PARTIAL_422"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
717 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
718 case PhotometricInterpretation_YBR_ICT: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
719 return "YBR_ICT"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
720 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
721 case PhotometricInterpretation_YBR_RCT: |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
722 return "YBR_RCT"; |
1206
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
723 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
724 case PhotometricInterpretation_Unknown: |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
725 return "Unknown"; |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
726 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
727 default: |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
728 throw OrthancException(ErrorCode_ParameterOutOfRange); |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
729 } |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
730 } |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
731 |
f5b0207967bc
Fix issue 19 (YBR_FULL are decoded incorrectly)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1146
diff
changeset
|
732 |
1571
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
733 const char* EnumerationToString(RequestOrigin origin) |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
734 { |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
735 switch (origin) |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
736 { |
1572
904096e7367e
More information about the origin request in OnStoredInstance() callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
737 case RequestOrigin_Unknown: |
904096e7367e
More information about the origin request in OnStoredInstance() callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
738 return "Unknown"; |
904096e7367e
More information about the origin request in OnStoredInstance() callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1571
diff
changeset
|
739 |
1571
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
740 case RequestOrigin_DicomProtocol: |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
741 return "DicomProtocol"; |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
742 |
1823
0ef4e6e66b56
"Origin" metadata for the instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1786
diff
changeset
|
743 case RequestOrigin_RestApi: |
0ef4e6e66b56
"Origin" metadata for the instances
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1786
diff
changeset
|
744 return "RestApi"; |
1571
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
745 |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
746 case RequestOrigin_Plugins: |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
747 return "Plugins"; |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
748 |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
749 case RequestOrigin_Lua: |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
750 return "Lua"; |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
751 |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
752 default: |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
753 throw OrthancException(ErrorCode_ParameterOutOfRange); |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
754 } |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
755 } |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
756 |
3232f1c995a5
provide the origin of the requests to HTTP handlers
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1565
diff
changeset
|
757 |
1926
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
758 const char* EnumerationToString(PixelFormat format) |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
759 { |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
760 switch (format) |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
761 { |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
762 case PixelFormat_RGB24: |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
763 return "RGB24"; |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
764 |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
765 case PixelFormat_RGBA32: |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
766 return "RGBA32"; |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
767 |
2089
7a969f235adf
PixelFormat_BGRA32
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2007
diff
changeset
|
768 case PixelFormat_BGRA32: |
7a969f235adf
PixelFormat_BGRA32
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2007
diff
changeset
|
769 return "BGRA32"; |
7a969f235adf
PixelFormat_BGRA32
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2007
diff
changeset
|
770 |
1926
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
771 case PixelFormat_Grayscale8: |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
772 return "Grayscale (unsigned 8bpp)"; |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
773 |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
774 case PixelFormat_Grayscale16: |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
775 return "Grayscale (unsigned 16bpp)"; |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
776 |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
777 case PixelFormat_SignedGrayscale16: |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
778 return "Grayscale (signed 16bpp)"; |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
779 |
1993
e2a3ff770b48
introducing float32 images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1980
diff
changeset
|
780 case PixelFormat_Float32: |
e2a3ff770b48
introducing float32 images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1980
diff
changeset
|
781 return "Grayscale (float 32bpp)"; |
e2a3ff770b48
introducing float32 images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1980
diff
changeset
|
782 |
2415
7e217a1cc63f
PixelFormat_Float32
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2407
diff
changeset
|
783 case PixelFormat_Grayscale32: |
7e217a1cc63f
PixelFormat_Float32
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2407
diff
changeset
|
784 return "Grayscale (unsigned 32bpp)"; |
7e217a1cc63f
PixelFormat_Float32
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2407
diff
changeset
|
785 |
2645
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2499
diff
changeset
|
786 case PixelFormat_Grayscale64: |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2499
diff
changeset
|
787 return "Grayscale (unsigned 64bpp)"; |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2499
diff
changeset
|
788 |
2423
5a7c5c541a1d
Built-in decoding of palette images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2415
diff
changeset
|
789 case PixelFormat_RGB48: |
5a7c5c541a1d
Built-in decoding of palette images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2415
diff
changeset
|
790 return "RGB48"; |
5a7c5c541a1d
Built-in decoding of palette images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2415
diff
changeset
|
791 |
1926
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
792 default: |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
793 throw OrthancException(ErrorCode_ParameterOutOfRange); |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
794 } |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
795 } |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
796 |
2a129de4b5e2
EnumerationToString for PixelFormat
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1908
diff
changeset
|
797 |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
798 const char* EnumerationToString(ModalityManufacturer manufacturer) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
799 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
800 switch (manufacturer) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
801 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
802 case ModalityManufacturer_Generic: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
803 return "Generic"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
804 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
805 case ModalityManufacturer_GenericNoWildcardInDates: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
806 return "GenericNoWildcardInDates"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
807 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
808 case ModalityManufacturer_GenericNoUniversalWildcard: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
809 return "GenericNoUniversalWildcard"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
810 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
811 case ModalityManufacturer_StoreScp: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
812 return "StoreScp"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
813 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
814 case ModalityManufacturer_Vitrea: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
815 return "Vitrea"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
816 |
2888
61a5667f37d9
New modality manufacturer: "GE" for GE Healthcare EA and AW
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2871
diff
changeset
|
817 case ModalityManufacturer_GE: |
61a5667f37d9
New modality manufacturer: "GE" for GE Healthcare EA and AW
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2871
diff
changeset
|
818 return "GE"; |
61a5667f37d9
New modality manufacturer: "GE" for GE Healthcare EA and AW
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2871
diff
changeset
|
819 |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
820 default: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
821 throw OrthancException(ErrorCode_ParameterOutOfRange); |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
822 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
823 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
824 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
825 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
826 const char* EnumerationToString(DicomRequestType type) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
827 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
828 switch (type) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
829 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
830 case DicomRequestType_Echo: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
831 return "Echo"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
832 break; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
833 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
834 case DicomRequestType_Find: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
835 return "Find"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
836 break; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
837 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
838 case DicomRequestType_Get: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
839 return "Get"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
840 break; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
841 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
842 case DicomRequestType_Move: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
843 return "Move"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
844 break; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
845 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
846 case DicomRequestType_Store: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
847 return "Store"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
848 break; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
849 |
3602
085283445db0
AllowNAction in remote modality parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3561
diff
changeset
|
850 case DicomRequestType_NAction: |
3613
c1e2b91c2ab4
all the abstractions for storage commitment are available
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3603
diff
changeset
|
851 return "N-ACTION"; |
c1e2b91c2ab4
all the abstractions for storage commitment are available
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3603
diff
changeset
|
852 break; |
c1e2b91c2ab4
all the abstractions for storage commitment are available
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3603
diff
changeset
|
853 |
c1e2b91c2ab4
all the abstractions for storage commitment are available
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3603
diff
changeset
|
854 case DicomRequestType_NEventReport: |
c1e2b91c2ab4
all the abstractions for storage commitment are available
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3603
diff
changeset
|
855 return "N-EVENT-REPORT"; |
3602
085283445db0
AllowNAction in remote modality parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3561
diff
changeset
|
856 break; |
085283445db0
AllowNAction in remote modality parameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3561
diff
changeset
|
857 |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
858 default: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
859 throw OrthancException(ErrorCode_ParameterOutOfRange); |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
860 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
861 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
862 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
863 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
864 const char* EnumerationToString(TransferSyntax syntax) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
865 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
866 switch (syntax) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
867 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
868 case TransferSyntax_Deflated: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
869 return "Deflated"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
870 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
871 case TransferSyntax_Jpeg: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
872 return "JPEG"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
873 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
874 case TransferSyntax_Jpeg2000: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
875 return "JPEG2000"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
876 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
877 case TransferSyntax_JpegLossless: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
878 return "JPEG Lossless"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
879 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
880 case TransferSyntax_Jpip: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
881 return "JPIP"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
882 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
883 case TransferSyntax_Mpeg2: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
884 return "MPEG2"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
885 |
3643
fa3ff492fb3b
added TransferSyntax_Mpeg4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
886 case TransferSyntax_Mpeg4: |
fa3ff492fb3b
added TransferSyntax_Mpeg4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
887 return "MPEG4"; |
fa3ff492fb3b
added TransferSyntax_Mpeg4
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3640
diff
changeset
|
888 |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
889 case TransferSyntax_Rle: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
890 return "RLE"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
891 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
892 default: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
893 throw OrthancException(ErrorCode_ParameterOutOfRange); |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
894 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
895 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
896 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
897 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
898 const char* EnumerationToString(DicomVersion version) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
899 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
900 switch (version) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
901 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
902 case DicomVersion_2008: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
903 return "2008"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
904 break; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
905 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
906 case DicomVersion_2017c: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
907 return "2017c"; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
908 break; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
909 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
910 default: |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
911 throw OrthancException(ErrorCode_ParameterOutOfRange); |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
912 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
913 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
914 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
915 |
2499
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
916 const char* EnumerationToString(ValueRepresentation vr) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
917 { |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
918 switch (vr) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
919 { |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
920 case ValueRepresentation_ApplicationEntity: // AE |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
921 return "AE"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
922 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
923 case ValueRepresentation_AgeString: // AS |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
924 return "AS"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
925 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
926 case ValueRepresentation_AttributeTag: // AT (2 x uint16_t) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
927 return "AT"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
928 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
929 case ValueRepresentation_CodeString: // CS |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
930 return "CS"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
931 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
932 case ValueRepresentation_Date: // DA |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
933 return "DA"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
934 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
935 case ValueRepresentation_DecimalString: // DS |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
936 return "DS"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
937 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
938 case ValueRepresentation_DateTime: // DT |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
939 return "DT"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
940 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
941 case ValueRepresentation_FloatingPointSingle: // FL (float) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
942 return "FL"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
943 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
944 case ValueRepresentation_FloatingPointDouble: // FD (double) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
945 return "FD"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
946 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
947 case ValueRepresentation_IntegerString: // IS |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
948 return "IS"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
949 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
950 case ValueRepresentation_LongString: // LO |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
951 return "LO"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
952 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
953 case ValueRepresentation_LongText: // LT |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
954 return "LT"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
955 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
956 case ValueRepresentation_OtherByte: // OB |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
957 return "OB"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
958 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
959 case ValueRepresentation_OtherDouble: // OD |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
960 return "OD"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
961 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
962 case ValueRepresentation_OtherFloat: // OF |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
963 return "OF"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
964 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
965 case ValueRepresentation_OtherLong: // OL |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
966 return "OL"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
967 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
968 case ValueRepresentation_OtherWord: // OW |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
969 return "OW"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
970 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
971 case ValueRepresentation_PersonName: // PN |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
972 return "PN"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
973 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
974 case ValueRepresentation_ShortString: // SH |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
975 return "SH"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
976 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
977 case ValueRepresentation_SignedLong: // SL (int32_t) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
978 return "SL"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
979 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
980 case ValueRepresentation_Sequence: // SQ |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
981 return "SQ"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
982 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
983 case ValueRepresentation_SignedShort: // SS (int16_t) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
984 return "SS"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
985 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
986 case ValueRepresentation_ShortText: // ST |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
987 return "ST"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
988 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
989 case ValueRepresentation_Time: // TM |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
990 return "TM"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
991 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
992 case ValueRepresentation_UnlimitedCharacters: // UC |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
993 return "UC"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
994 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
995 case ValueRepresentation_UniqueIdentifier: // UI (UID) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
996 return "UI"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
997 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
998 case ValueRepresentation_UnsignedLong: // UL (uint32_t) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
999 return "UL"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1000 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1001 case ValueRepresentation_Unknown: // UN |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1002 return "UN"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1003 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1004 case ValueRepresentation_UniversalResource: // UR (URI or URL) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1005 return "UR"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1006 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1007 case ValueRepresentation_UnsignedShort: // US (uint16_t) |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1008 return "US"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1009 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1010 case ValueRepresentation_UnlimitedText: // UT |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1011 return "UT"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1012 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1013 case ValueRepresentation_NotSupported: |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1014 return "Not supported"; |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1015 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1016 default: |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1017 throw OrthancException(ErrorCode_ParameterOutOfRange); |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1018 } |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1019 } |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1020 |
83b8b6743531
ITagVisitor - for anonymization relationships
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2486
diff
changeset
|
1021 |
2569 | 1022 const char* EnumerationToString(JobState state) |
1023 { | |
1024 switch (state) | |
1025 { | |
1026 case JobState_Pending: | |
1027 return "Pending"; | |
1028 | |
1029 case JobState_Running: | |
1030 return "Running"; | |
1031 | |
1032 case JobState_Success: | |
1033 return "Success"; | |
1034 | |
1035 case JobState_Failure: | |
1036 return "Failure"; | |
1037 | |
1038 case JobState_Paused: | |
1039 return "Paused"; | |
1040 | |
1041 case JobState_Retry: | |
1042 return "Retry"; | |
1043 | |
1044 default: | |
1045 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
1046 } | |
1047 } | |
2908
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1048 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1049 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1050 const char* EnumerationToString(MimeType mime) |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1051 { |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1052 switch (mime) |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1053 { |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1054 case MimeType_Binary: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1055 return MIME_BINARY; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1056 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1057 case MimeType_Dicom: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1058 return MIME_DICOM; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1059 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1060 case MimeType_Jpeg: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1061 return MIME_JPEG; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1062 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1063 case MimeType_Jpeg2000: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1064 return MIME_JPEG2000; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1065 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1066 case MimeType_Json: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1067 return MIME_JSON; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1068 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1069 case MimeType_Pdf: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1070 return MIME_PDF; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1071 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1072 case MimeType_Png: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1073 return MIME_PNG; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1074 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1075 case MimeType_Xml: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1076 return MIME_XML; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1077 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1078 case MimeType_PlainText: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1079 return MIME_PLAIN_TEXT; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1080 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1081 case MimeType_Pam: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1082 return MIME_PAM; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1083 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1084 case MimeType_Html: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1085 return MIME_HTML; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1086 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1087 case MimeType_Gzip: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1088 return MIME_GZIP; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1089 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1090 case MimeType_JavaScript: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1091 return MIME_JAVASCRIPT; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1092 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1093 case MimeType_Css: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1094 return MIME_CSS; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1095 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1096 case MimeType_WebAssembly: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1097 return MIME_WEB_ASSEMBLY; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1098 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1099 case MimeType_Gif: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1100 return MIME_GIF; |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1101 |
2976
cb5d75143da0
Asynchronous generation of ZIP archives and DICOM medias
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2954
diff
changeset
|
1102 case MimeType_Zip: |
cb5d75143da0
Asynchronous generation of ZIP archives and DICOM medias
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2954
diff
changeset
|
1103 return MIME_ZIP; |
cb5d75143da0
Asynchronous generation of ZIP archives and DICOM medias
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2954
diff
changeset
|
1104 |
2984
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1105 case MimeType_NaCl: |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1106 return MIME_NACL; |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1107 |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1108 case MimeType_PNaCl: |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1109 return MIME_PNACL; |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1110 |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1111 case MimeType_Svg: |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1112 return MIME_SVG; |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1113 |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1114 case MimeType_Woff: |
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1115 return MIME_WOFF; |
3174
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
1116 |
3435
c08bb6ac3b7f
new mime type: font/woff2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3404
diff
changeset
|
1117 case MimeType_Woff2: |
c08bb6ac3b7f
new mime type: font/woff2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3404
diff
changeset
|
1118 return MIME_WOFF2; |
c08bb6ac3b7f
new mime type: font/woff2
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3404
diff
changeset
|
1119 |
3174
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
1120 case MimeType_PrometheusText: |
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
1121 // https://prometheus.io/docs/instrumenting/exposition_formats/#text-based-format |
8ea7c4546c3a
primitives to collect metrics in Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3061
diff
changeset
|
1122 return "text/plain; version=0.0.4"; |
3203
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
1123 |
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
1124 case MimeType_DicomWebJson: |
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
1125 return MIME_DICOM_WEB_JSON; |
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
1126 |
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
1127 case MimeType_DicomWebXml: |
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
1128 return MIME_DICOM_WEB_XML; |
2984
db8f360fcb41
OrthancPluginAutodetectMimeType()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2976
diff
changeset
|
1129 |
2908
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1130 default: |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1131 throw OrthancException(ErrorCode_ParameterOutOfRange); |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1132 } |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1133 } |
2569 | 1134 |
1135 | |
3530
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1136 const char* EnumerationToString(Endianness endianness) |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1137 { |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1138 switch (endianness) |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1139 { |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1140 case Endianness_Little: |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1141 return "Little-endian"; |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1142 |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1143 case Endianness_Big: |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1144 return "Big-endian"; |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1145 |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1146 case Endianness_Unknown: |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1147 return "Unknown endianness"; |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1148 |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1149 default: |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1150 throw OrthancException(ErrorCode_ParameterOutOfRange); |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1151 } |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1152 } |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1153 |
b26b6ea27648
endianness to string
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3435
diff
changeset
|
1154 |
3737
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1155 const char* EnumerationToString(StorageCommitmentFailureReason reason) |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1156 { |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1157 switch (reason) |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1158 { |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1159 case StorageCommitmentFailureReason_Success: |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1160 return "Success"; |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1161 |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1162 case StorageCommitmentFailureReason_ProcessingFailure: |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1163 return "A general failure in processing the operation was encountered"; |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1164 |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1165 case StorageCommitmentFailureReason_NoSuchObjectInstance: |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1166 return "One or more of the elements in the Referenced SOP " |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1167 "Instance Sequence was not available"; |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1168 |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1169 case StorageCommitmentFailureReason_ResourceLimitation: |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1170 return "The SCP does not currently have enough resources to " |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1171 "store the requested SOP Instance(s)"; |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1172 |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1173 case StorageCommitmentFailureReason_ReferencedSOPClassNotSupported: |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1174 return "Storage Commitment has been requested for a SOP Instance " |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1175 "with a SOP Class that is not supported by the SCP"; |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1176 |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1177 case StorageCommitmentFailureReason_ClassInstanceConflict: |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1178 return "The SOP Class of an element in the Referenced SOP Instance Sequence " |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1179 "did not correspond to the SOP class registered for this SOP Instance at the SCP"; |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1180 |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1181 case StorageCommitmentFailureReason_DuplicateTransactionUID: |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1182 return "The Transaction UID of the Storage Commitment Request is already in use"; |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1183 |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1184 default: |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1185 return "Unknown failure reason"; |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1186 } |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1187 } |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1188 |
f29843323daf
accessing storage commitment reports from REST API
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3731
diff
changeset
|
1189 |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1190 Encoding StringToEncoding(const char* encoding) |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1191 { |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1192 std::string s(encoding); |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1193 Toolbox::ToUpperCase(s); |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1194 |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1195 if (s == "UTF8") |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1196 { |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1197 return Encoding_Utf8; |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1198 } |
1087 | 1199 |
1200 if (s == "ASCII") | |
1201 { | |
1202 return Encoding_Ascii; | |
1203 } | |
1204 | |
1205 if (s == "LATIN1") | |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1206 { |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1207 return Encoding_Latin1; |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1208 } |
1087 | 1209 |
1210 if (s == "LATIN2") | |
1211 { | |
1212 return Encoding_Latin2; | |
1213 } | |
1214 | |
1215 if (s == "LATIN3") | |
1216 { | |
1217 return Encoding_Latin3; | |
1218 } | |
1219 | |
1220 if (s == "LATIN4") | |
1221 { | |
1222 return Encoding_Latin4; | |
1223 } | |
1224 | |
1225 if (s == "LATIN5") | |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1226 { |
1087 | 1227 return Encoding_Latin5; |
1228 } | |
1229 | |
1230 if (s == "CYRILLIC") | |
1231 { | |
1232 return Encoding_Cyrillic; | |
1233 } | |
1234 | |
1347 | 1235 if (s == "WINDOWS1251") |
1236 { | |
1237 return Encoding_Windows1251; | |
1238 } | |
1239 | |
1087 | 1240 if (s == "ARABIC") |
1241 { | |
1242 return Encoding_Arabic; | |
1243 } | |
1244 | |
1245 if (s == "GREEK") | |
1246 { | |
1247 return Encoding_Greek; | |
1248 } | |
1249 | |
1250 if (s == "HEBREW") | |
1251 { | |
1252 return Encoding_Hebrew; | |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1253 } |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1254 |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1255 if (s == "THAI") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1256 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1257 return Encoding_Thai; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1258 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1259 |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1260 if (s == "JAPANESE") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1261 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1262 return Encoding_Japanese; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1263 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1264 |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1265 if (s == "CHINESE") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1266 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1267 return Encoding_Chinese; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1268 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1269 |
3217
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1270 if (s == "KOREAN") |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1271 { |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1272 return Encoding_Korean; |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1273 } |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1274 |
3219 | 1275 if (s == "JAPANESEKANJI") |
3218 | 1276 { |
1277 return Encoding_JapaneseKanji; | |
1278 } | |
1279 | |
3226
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1280 if (s == "SIMPLIFIEDCHINESE") |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1281 { |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1282 return Encoding_SimplifiedChinese; |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1283 } |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1284 |
1086
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1285 throw OrthancException(ErrorCode_ParameterOutOfRange); |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1286 } |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1287 |
e56c3ed8d738
Parameter to set the default encoding for DICOM files without SpecificCharacterSet
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
824
diff
changeset
|
1288 |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1289 ResourceType StringToResourceType(const char* type) |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1290 { |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1291 std::string s(type); |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1292 Toolbox::ToUpperCase(s); |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1293 |
697
dd1ce9a2844c
access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
1294 if (s == "PATIENT" || s == "PATIENTS") |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1295 { |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1296 return ResourceType_Patient; |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1297 } |
697
dd1ce9a2844c
access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
1298 else if (s == "STUDY" || s == "STUDIES") |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1299 { |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1300 return ResourceType_Study; |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1301 } |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1302 else if (s == "SERIES") |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1303 { |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1304 return ResourceType_Series; |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1305 } |
697
dd1ce9a2844c
access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
1306 else if (s == "INSTANCE" || s == "IMAGE" || |
dd1ce9a2844c
access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
689
diff
changeset
|
1307 s == "INSTANCES" || s == "IMAGES") |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1308 { |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1309 return ResourceType_Instance; |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1310 } |
800
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1311 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1312 throw OrthancException(ErrorCode_ParameterOutOfRange); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1313 } |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1314 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1315 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1316 ImageFormat StringToImageFormat(const char* format) |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1317 { |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1318 std::string s(format); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1319 Toolbox::ToUpperCase(s); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1320 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1321 if (s == "PNG") |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1322 { |
800
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1323 return ImageFormat_Png; |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1324 } |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1325 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1326 throw OrthancException(ErrorCode_ParameterOutOfRange); |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1327 } |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1328 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1329 |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1330 ValueRepresentation StringToValueRepresentation(const std::string& vr, |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1331 bool throwIfUnsupported) |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1332 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1333 if (vr == "AE") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1334 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1335 return ValueRepresentation_ApplicationEntity; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1336 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1337 else if (vr == "AS") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1338 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1339 return ValueRepresentation_AgeString; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1340 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1341 else if (vr == "AT") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1342 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1343 return ValueRepresentation_AttributeTag; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1344 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1345 else if (vr == "CS") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1346 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1347 return ValueRepresentation_CodeString; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1348 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1349 else if (vr == "DA") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1350 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1351 return ValueRepresentation_Date; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1352 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1353 else if (vr == "DS") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1354 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1355 return ValueRepresentation_DecimalString; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1356 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1357 else if (vr == "DT") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1358 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1359 return ValueRepresentation_DateTime; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1360 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1361 else if (vr == "FL") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1362 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1363 return ValueRepresentation_FloatingPointSingle; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1364 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1365 else if (vr == "FD") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1366 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1367 return ValueRepresentation_FloatingPointDouble; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1368 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1369 else if (vr == "IS") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1370 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1371 return ValueRepresentation_IntegerString; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1372 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1373 else if (vr == "LO") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1374 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1375 return ValueRepresentation_LongString; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1376 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1377 else if (vr == "LT") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1378 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1379 return ValueRepresentation_LongText; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1380 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1381 else if (vr == "OB") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1382 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1383 return ValueRepresentation_OtherByte; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1384 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1385 else if (vr == "OD") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1386 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1387 return ValueRepresentation_OtherDouble; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1388 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1389 else if (vr == "OF") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1390 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1391 return ValueRepresentation_OtherFloat; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1392 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1393 else if (vr == "OL") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1394 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1395 return ValueRepresentation_OtherLong; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1396 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1397 else if (vr == "OW") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1398 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1399 return ValueRepresentation_OtherWord; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1400 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1401 else if (vr == "PN") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1402 { |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
1403 return ValueRepresentation_PersonName; |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1404 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1405 else if (vr == "SH") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1406 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1407 return ValueRepresentation_ShortString; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1408 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1409 else if (vr == "SL") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1410 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1411 return ValueRepresentation_SignedLong; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1412 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1413 else if (vr == "SQ") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1414 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1415 return ValueRepresentation_Sequence; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1416 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1417 else if (vr == "SS") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1418 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1419 return ValueRepresentation_SignedShort; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1420 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1421 else if (vr == "ST") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1422 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1423 return ValueRepresentation_ShortText; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1424 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1425 else if (vr == "TM") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1426 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1427 return ValueRepresentation_Time; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1428 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1429 else if (vr == "UC") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1430 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1431 return ValueRepresentation_UnlimitedCharacters; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1432 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1433 else if (vr == "UI") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1434 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1435 return ValueRepresentation_UniqueIdentifier; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1436 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1437 else if (vr == "UL") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1438 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1439 return ValueRepresentation_UnsignedLong; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1440 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1441 else if (vr == "UN") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1442 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1443 return ValueRepresentation_Unknown; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1444 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1445 else if (vr == "UR") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1446 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1447 return ValueRepresentation_UniversalResource; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1448 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1449 else if (vr == "US") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1450 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1451 return ValueRepresentation_UnsignedShort; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1452 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1453 else if (vr == "UT") |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1454 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1455 return ValueRepresentation_UnlimitedText; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1456 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1457 else |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1458 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1459 std::string s = "Unsupported value representation encountered: " + vr; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1460 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1461 if (throwIfUnsupported) |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1462 { |
2954
d924f9bb61cc
taking advantage of details in OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2953
diff
changeset
|
1463 throw OrthancException(ErrorCode_ParameterOutOfRange, s); |
2006
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1464 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1465 else |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1466 { |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1467 LOG(INFO) << s; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1468 return ValueRepresentation_NotSupported; |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1469 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1470 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1471 } |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1472 |
6301bbcbcaed
more generic support of value representations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1993
diff
changeset
|
1473 |
2281
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1474 PhotometricInterpretation StringToPhotometricInterpretation(const char* value) |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1475 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1476 // http://dicom.nema.org/medical/dicom/2017a/output/chtml/part03/sect_C.7.6.3.html#sect_C.7.6.3.1.2 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1477 std::string s(value); |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1478 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1479 if (s == "MONOCHROME1") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1480 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1481 return PhotometricInterpretation_Monochrome1; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1482 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1483 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1484 if (s == "MONOCHROME2") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1485 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1486 return PhotometricInterpretation_Monochrome2; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1487 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1488 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1489 if (s == "PALETTE COLOR") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1490 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1491 return PhotometricInterpretation_Palette; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1492 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1493 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1494 if (s == "RGB") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1495 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1496 return PhotometricInterpretation_RGB; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1497 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1498 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1499 if (s == "HSV") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1500 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1501 return PhotometricInterpretation_HSV; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1502 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1503 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1504 if (s == "ARGB") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1505 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1506 return PhotometricInterpretation_ARGB; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1507 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1508 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1509 if (s == "CMYK") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1510 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1511 return PhotometricInterpretation_CMYK; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1512 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1513 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1514 if (s == "YBR_FULL") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1515 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1516 return PhotometricInterpretation_YBRFull; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1517 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1518 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1519 if (s == "YBR_FULL_422") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1520 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1521 return PhotometricInterpretation_YBRFull422; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1522 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1523 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1524 if (s == "YBR_PARTIAL_422") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1525 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1526 return PhotometricInterpretation_YBRPartial422; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1527 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1528 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1529 if (s == "YBR_PARTIAL_420") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1530 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1531 return PhotometricInterpretation_YBRPartial420; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1532 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1533 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1534 if (s == "YBR_ICT") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1535 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1536 return PhotometricInterpretation_YBR_ICT; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1537 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1538 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1539 if (s == "YBR_RCT") |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1540 { |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1541 return PhotometricInterpretation_YBR_RCT; |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1542 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1543 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1544 throw OrthancException(ErrorCode_ParameterOutOfRange); |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1545 } |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1546 |
e002430baa41
Fix issue #44 (Bad interpretation of photometric interpretation MONOCHROME1)
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2244
diff
changeset
|
1547 |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1548 ModalityManufacturer StringToModalityManufacturer(const std::string& manufacturer) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1549 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1550 ModalityManufacturer result; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1551 bool obsolete = false; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1552 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1553 if (manufacturer == "Generic") |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1554 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1555 return ModalityManufacturer_Generic; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1556 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1557 else if (manufacturer == "GenericNoWildcardInDates") |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1558 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1559 return ModalityManufacturer_GenericNoWildcardInDates; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1560 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1561 else if (manufacturer == "GenericNoUniversalWildcard") |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1562 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1563 return ModalityManufacturer_GenericNoUniversalWildcard; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1564 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1565 else if (manufacturer == "StoreScp") |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1566 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1567 return ModalityManufacturer_StoreScp; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1568 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1569 else if (manufacturer == "Vitrea") |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1570 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1571 return ModalityManufacturer_Vitrea; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1572 } |
2888
61a5667f37d9
New modality manufacturer: "GE" for GE Healthcare EA and AW
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2871
diff
changeset
|
1573 else if (manufacturer == "GE") |
61a5667f37d9
New modality manufacturer: "GE" for GE Healthcare EA and AW
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2871
diff
changeset
|
1574 { |
61a5667f37d9
New modality manufacturer: "GE" for GE Healthcare EA and AW
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2871
diff
changeset
|
1575 return ModalityManufacturer_GE; |
61a5667f37d9
New modality manufacturer: "GE" for GE Healthcare EA and AW
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2871
diff
changeset
|
1576 } |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1577 else if (manufacturer == "AgfaImpax" || |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1578 manufacturer == "SyngoVia") |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1579 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1580 result = ModalityManufacturer_GenericNoWildcardInDates; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1581 obsolete = true; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1582 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1583 else if (manufacturer == "EFilm2" || |
3561
bdafff1ce443
C-Find SCU at Instance level now sets the 0008,0052 tag to IMAGE per default (was INSTANCE). Source: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/orthanc-users/FYxHXzlaQ0M/rn6d0SowAAAJ
Alain Mazy <alain@mazy.be>
parents:
3530
diff
changeset
|
1584 manufacturer == "MedInria" || |
bdafff1ce443
C-Find SCU at Instance level now sets the 0008,0052 tag to IMAGE per default (was INSTANCE). Source: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/orthanc-users/FYxHXzlaQ0M/rn6d0SowAAAJ
Alain Mazy <alain@mazy.be>
parents:
3530
diff
changeset
|
1585 manufacturer == "ClearCanvas" || |
bdafff1ce443
C-Find SCU at Instance level now sets the 0008,0052 tag to IMAGE per default (was INSTANCE). Source: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/orthanc-users/FYxHXzlaQ0M/rn6d0SowAAAJ
Alain Mazy <alain@mazy.be>
parents:
3530
diff
changeset
|
1586 manufacturer == "Dcm4Chee" |
bdafff1ce443
C-Find SCU at Instance level now sets the 0008,0052 tag to IMAGE per default (was INSTANCE). Source: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/orthanc-users/FYxHXzlaQ0M/rn6d0SowAAAJ
Alain Mazy <alain@mazy.be>
parents:
3530
diff
changeset
|
1587 ) |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1588 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1589 result = ModalityManufacturer_Generic; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1590 obsolete = true; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1591 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1592 else |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1593 { |
2954
d924f9bb61cc
taking advantage of details in OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2953
diff
changeset
|
1594 throw OrthancException(ErrorCode_ParameterOutOfRange, |
d924f9bb61cc
taking advantage of details in OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2953
diff
changeset
|
1595 "Unknown modality manufacturer: \"" + manufacturer + "\""); |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1596 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1597 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1598 if (obsolete) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1599 { |
3561
bdafff1ce443
C-Find SCU at Instance level now sets the 0008,0052 tag to IMAGE per default (was INSTANCE). Source: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/orthanc-users/FYxHXzlaQ0M/rn6d0SowAAAJ
Alain Mazy <alain@mazy.be>
parents:
3530
diff
changeset
|
1600 LOG(WARNING) << "The \"" << manufacturer << "\" manufacturer is now obsolete. " |
bdafff1ce443
C-Find SCU at Instance level now sets the 0008,0052 tag to IMAGE per default (was INSTANCE). Source: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/orthanc-users/FYxHXzlaQ0M/rn6d0SowAAAJ
Alain Mazy <alain@mazy.be>
parents:
3530
diff
changeset
|
1601 << "To guarantee compatibility with future Orthanc " |
2382
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1602 << "releases, you should replace it by \"" |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1603 << EnumerationToString(result) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1604 << "\" in your configuration file."; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1605 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1606 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1607 return result; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1608 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1609 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1610 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1611 DicomVersion StringToDicomVersion(const std::string& version) |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1612 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1613 if (version == "2008") |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1614 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1615 return DicomVersion_2008; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1616 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1617 else if (version == "2017c") |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1618 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1619 return DicomVersion_2017c; |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1620 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1621 else |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1622 { |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1623 throw OrthancException(ErrorCode_ParameterOutOfRange); |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1624 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1625 } |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1626 |
7284093111b0
big reorganization to cleanly separate framework vs. server
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2381
diff
changeset
|
1627 |
2646 | 1628 JobState StringToJobState(const std::string& state) |
1629 { | |
1630 if (state == "Pending") | |
1631 { | |
1632 return JobState_Pending; | |
1633 } | |
1634 else if (state == "Running") | |
1635 { | |
1636 return JobState_Running; | |
1637 } | |
1638 else if (state == "Success") | |
1639 { | |
1640 return JobState_Success; | |
1641 } | |
1642 else if (state == "Failure") | |
1643 { | |
1644 return JobState_Failure; | |
1645 } | |
1646 else if (state == "Paused") | |
1647 { | |
1648 return JobState_Paused; | |
1649 } | |
1650 else if (state == "Retry") | |
1651 { | |
1652 return JobState_Retry; | |
1653 } | |
1654 else | |
1655 { | |
1656 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
1657 } | |
1658 } | |
1659 | |
1660 | |
2655 | 1661 RequestOrigin StringToRequestOrigin(const std::string& origin) |
1662 { | |
1663 if (origin == "Unknown") | |
1664 { | |
1665 return RequestOrigin_Unknown; | |
1666 } | |
1667 else if (origin == "DicomProtocol") | |
1668 { | |
1669 return RequestOrigin_DicomProtocol; | |
1670 } | |
1671 else if (origin == "RestApi") | |
1672 { | |
1673 return RequestOrigin_RestApi; | |
1674 } | |
1675 else if (origin == "Plugins") | |
1676 { | |
1677 return RequestOrigin_Plugins; | |
1678 } | |
1679 else if (origin == "Lua") | |
1680 { | |
1681 return RequestOrigin_Lua; | |
1682 } | |
1683 else | |
1684 { | |
1685 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
1686 } | |
1687 } | |
2908
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1688 |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1689 |
4073 | 1690 bool LookupMimeType(MimeType& target, |
1691 const std::string& source) | |
1692 { | |
1693 if (source == MIME_BINARY) | |
1694 { | |
1695 target = MimeType_Binary; | |
1696 return true; | |
1697 } | |
1698 else if (source == MIME_DICOM) | |
1699 { | |
1700 target = MimeType_Dicom; | |
1701 return true; | |
1702 } | |
1703 else if (source == MIME_JPEG) | |
1704 { | |
1705 target = MimeType_Jpeg; | |
1706 return true; | |
1707 } | |
1708 else if (source == MIME_JPEG2000) | |
1709 { | |
1710 target = MimeType_Jpeg2000; | |
1711 return true; | |
1712 } | |
1713 else if (source == MIME_JSON) | |
1714 { | |
1715 target = MimeType_Json; | |
1716 return true; | |
1717 } | |
1718 else if (source == MIME_PDF) | |
1719 { | |
1720 target = MimeType_Pdf; | |
1721 return true; | |
1722 } | |
1723 else if (source == MIME_PNG) | |
1724 { | |
1725 target = MimeType_Png; | |
1726 return true; | |
1727 } | |
1728 else if (source == MIME_XML || | |
1729 source == MIME_XML_2) | |
1730 { | |
1731 target = MimeType_Xml; | |
1732 return true; | |
1733 } | |
1734 else if (source == MIME_PLAIN_TEXT) | |
1735 { | |
1736 target = MimeType_PlainText; | |
1737 return true; | |
1738 } | |
1739 else if (source == MIME_PAM) | |
1740 { | |
1741 target = MimeType_Pam; | |
1742 return true; | |
1743 } | |
1744 else if (source == MIME_HTML) | |
1745 { | |
1746 target = MimeType_Html; | |
1747 return true; | |
1748 } | |
1749 else if (source == MIME_GZIP) | |
1750 { | |
1751 target = MimeType_Gzip; | |
1752 return true; | |
1753 } | |
1754 else if (source == MIME_JAVASCRIPT) | |
1755 { | |
1756 target = MimeType_JavaScript; | |
1757 return true; | |
1758 } | |
1759 else if (source == MIME_CSS) | |
1760 { | |
1761 target = MimeType_Css; | |
1762 return true; | |
1763 } | |
1764 else if (source == MIME_WEB_ASSEMBLY) | |
1765 { | |
1766 target = MimeType_WebAssembly; | |
1767 return true; | |
1768 } | |
1769 else if (source == MIME_GIF) | |
1770 { | |
1771 target = MimeType_Gif; | |
1772 return true; | |
1773 } | |
1774 else if (source == MIME_ZIP) | |
1775 { | |
1776 target = MimeType_Zip; | |
1777 return true; | |
1778 } | |
1779 else if (source == MIME_NACL) | |
1780 { | |
1781 target = MimeType_NaCl; | |
1782 return true; | |
1783 } | |
1784 else if (source == MIME_PNACL) | |
1785 { | |
1786 target = MimeType_PNaCl; | |
1787 return true; | |
1788 } | |
1789 else if (source == MIME_SVG) | |
1790 { | |
1791 target = MimeType_Svg; | |
1792 return true; | |
1793 } | |
1794 else if (source == MIME_WOFF) | |
1795 { | |
1796 target = MimeType_Woff; | |
1797 return true; | |
1798 } | |
1799 else if (source == MIME_WOFF2) | |
1800 { | |
1801 target = MimeType_Woff2; | |
1802 return true; | |
1803 } | |
1804 else if (source == MIME_DICOM_WEB_JSON) | |
1805 { | |
1806 target = MimeType_DicomWebJson; | |
1807 return true; | |
1808 } | |
1809 else if (source == MIME_DICOM_WEB_XML) | |
1810 { | |
1811 target = MimeType_DicomWebXml; | |
1812 return true; | |
1813 } | |
1814 else | |
1815 { | |
1816 return false; | |
1817 } | |
1818 } | |
1819 | |
1820 | |
1821 | |
2908
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1822 MimeType StringToMimeType(const std::string& mime) |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1823 { |
4073 | 1824 MimeType result; |
1825 if (LookupMimeType(result, mime)) | |
2908
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1826 { |
4073 | 1827 return result; |
3203
810772486249
URI "/instances/.../file" can return DICOMweb JSON or XML, depending on Accept header
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3174
diff
changeset
|
1828 } |
2908
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1829 else |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1830 { |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1831 throw OrthancException(ErrorCode_ParameterOutOfRange); |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1832 } |
9d277f8ad698
new enumeration: MimeType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2888
diff
changeset
|
1833 } |
2655 | 1834 |
1835 | |
800
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1836 unsigned int GetBytesPerPixel(PixelFormat format) |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1837 { |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1838 switch (format) |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1839 { |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1840 case PixelFormat_Grayscale8: |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1841 return 1; |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1842 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1843 case PixelFormat_Grayscale16: |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1844 case PixelFormat_SignedGrayscale16: |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1845 return 2; |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1846 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1847 case PixelFormat_RGB24: |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1848 return 3; |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1849 |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1850 case PixelFormat_RGBA32: |
2089
7a969f235adf
PixelFormat_BGRA32
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2007
diff
changeset
|
1851 case PixelFormat_BGRA32: |
2415
7e217a1cc63f
PixelFormat_Float32
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2407
diff
changeset
|
1852 case PixelFormat_Grayscale32: |
800
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1853 return 4; |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1854 |
1993
e2a3ff770b48
introducing float32 images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1980
diff
changeset
|
1855 case PixelFormat_Float32: |
e2a3ff770b48
introducing float32 images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1980
diff
changeset
|
1856 assert(sizeof(float) == 4); |
e2a3ff770b48
introducing float32 images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1980
diff
changeset
|
1857 return 4; |
e2a3ff770b48
introducing float32 images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1980
diff
changeset
|
1858 |
2423
5a7c5c541a1d
Built-in decoding of palette images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2415
diff
changeset
|
1859 case PixelFormat_RGB48: |
5a7c5c541a1d
Built-in decoding of palette images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2415
diff
changeset
|
1860 return 6; |
5a7c5c541a1d
Built-in decoding of palette images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2415
diff
changeset
|
1861 |
2645
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2499
diff
changeset
|
1862 case PixelFormat_Grayscale64: |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2499
diff
changeset
|
1863 return 8; |
89b789366596
Grayscale64 pixel format
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2499
diff
changeset
|
1864 |
800
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1865 default: |
ecedd89055db
generation of DICOM images from PNG files
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
697
diff
changeset
|
1866 throw OrthancException(ErrorCode_ParameterOutOfRange); |
562
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1867 } |
f64e3838d6e1
refactoring enumerations
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
477
diff
changeset
|
1868 } |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1869 |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1870 |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1871 bool GetDicomEncoding(Encoding& encoding, |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1872 const char* specificCharacterSet) |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1873 { |
2202
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2133
diff
changeset
|
1874 std::string s = Toolbox::StripSpaces(specificCharacterSet); |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1875 Toolbox::ToUpperCase(s); |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1876 |
1908
5096681efce6
direct hyperlinks to the DICOM standard
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
1877 // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2 |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1878 // https://github.com/dcm4che/dcm4che/blob/master/dcm4che-core/src/main/java/org/dcm4che3/data/SpecificCharacterSet.java |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1879 if (s == "ISO_IR 6" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1880 s == "ISO 2022 IR 6") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1881 { |
2202
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2133
diff
changeset
|
1882 encoding = Encoding_Ascii; |
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2133
diff
changeset
|
1883 } |
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2133
diff
changeset
|
1884 else if (s == "ISO_IR 192") |
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2133
diff
changeset
|
1885 { |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1886 encoding = Encoding_Utf8; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1887 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1888 else if (s == "ISO_IR 100" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1889 s == "ISO 2022 IR 100") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1890 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1891 encoding = Encoding_Latin1; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1892 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1893 else if (s == "ISO_IR 101" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1894 s == "ISO 2022 IR 101") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1895 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1896 encoding = Encoding_Latin2; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1897 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1898 else if (s == "ISO_IR 109" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1899 s == "ISO 2022 IR 109") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1900 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1901 encoding = Encoding_Latin3; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1902 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1903 else if (s == "ISO_IR 110" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1904 s == "ISO 2022 IR 110") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1905 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1906 encoding = Encoding_Latin4; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1907 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1908 else if (s == "ISO_IR 148" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1909 s == "ISO 2022 IR 148") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1910 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1911 encoding = Encoding_Latin5; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1912 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1913 else if (s == "ISO_IR 144" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1914 s == "ISO 2022 IR 144") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1915 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1916 encoding = Encoding_Cyrillic; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1917 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1918 else if (s == "ISO_IR 127" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1919 s == "ISO 2022 IR 127") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1920 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1921 encoding = Encoding_Arabic; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1922 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1923 else if (s == "ISO_IR 126" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1924 s == "ISO 2022 IR 126") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1925 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1926 encoding = Encoding_Greek; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1927 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1928 else if (s == "ISO_IR 138" || |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1929 s == "ISO 2022 IR 138") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1930 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1931 encoding = Encoding_Hebrew; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1932 } |
3217
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1933 else if (s == "ISO_IR 166" || |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1934 s == "ISO 2022 IR 166") |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1935 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1936 encoding = Encoding_Thai; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1937 } |
3217
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1938 else if (s == "ISO_IR 13" || |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1939 s == "ISO 2022 IR 13") |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1940 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1941 encoding = Encoding_Japanese; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1942 } |
2401
a051aba0037c
Use "GBK" (frequently used in China) as an alias for "GB18030"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
1943 else if (s == "GB18030" || s == "GBK") |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1944 { |
2401
a051aba0037c
Use "GBK" (frequently used in China) as an alias for "GB18030"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
1945 /** |
a051aba0037c
Use "GBK" (frequently used in China) as an alias for "GB18030"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
1946 * According to tumashu@163.com, "In China, many dicom file's |
a051aba0037c
Use "GBK" (frequently used in China) as an alias for "GB18030"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
1947 * 0008,0005 tag is set as "GBK", instead of "GB18030", GBK is a |
a051aba0037c
Use "GBK" (frequently used in China) as an alias for "GB18030"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
1948 * subset of GB18030, and which is used frequently in China, |
a051aba0037c
Use "GBK" (frequently used in China) as an alias for "GB18030"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
1949 * suggest support it." |
a051aba0037c
Use "GBK" (frequently used in China) as an alias for "GB18030"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
1950 * https://groups.google.com/d/msg/orthanc-users/WMM8LMbjpUc/02-1f_yFCgAJ |
a051aba0037c
Use "GBK" (frequently used in China) as an alias for "GB18030"
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2382
diff
changeset
|
1951 **/ |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1952 encoding = Encoding_Chinese; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1953 } |
3217
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1954 else if (s == "ISO 2022 IR 149") |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1955 { |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1956 encoding = Encoding_Korean; |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
1957 } |
3218 | 1958 else if (s == "ISO 2022 IR 87") |
1959 { | |
1960 encoding = Encoding_JapaneseKanji; | |
1961 } | |
3226
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1962 else if (s == "ISO 2022 IR 58") |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1963 { |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1964 encoding = Encoding_SimplifiedChinese; |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
1965 } |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1966 /* |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1967 else if (s == "ISO 2022 IR 159") |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1968 { |
3218 | 1969 TODO - Supplementary Kanji set |
1090
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1970 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1971 */ |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1972 else |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1973 { |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1974 return false; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1975 } |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1976 |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1977 // The encoding was properly detected |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1978 return true; |
e494ceb8d763
support more encodings
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1087
diff
changeset
|
1979 } |
1146
200fcac0deb4
optimization for access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1090
diff
changeset
|
1980 |
200fcac0deb4
optimization for access to attachments
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1090
diff
changeset
|
1981 |
1555
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1982 ResourceType GetChildResourceType(ResourceType type) |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1983 { |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1984 switch (type) |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1985 { |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1986 case ResourceType_Patient: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1987 return ResourceType_Study; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1988 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1989 case ResourceType_Study: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1990 return ResourceType_Series; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1991 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1992 case ResourceType_Series: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1993 return ResourceType_Instance; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1994 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1995 default: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1996 throw OrthancException(ErrorCode_ParameterOutOfRange); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1997 } |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1998 } |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
1999 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2000 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2001 ResourceType GetParentResourceType(ResourceType type) |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2002 { |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2003 switch (type) |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2004 { |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2005 case ResourceType_Study: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2006 return ResourceType_Patient; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2007 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2008 case ResourceType_Series: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2009 return ResourceType_Study; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2010 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2011 case ResourceType_Instance: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2012 return ResourceType_Series; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2013 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2014 default: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2015 throw OrthancException(ErrorCode_ParameterOutOfRange); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2016 } |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2017 } |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2018 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2019 |
3027 | 2020 bool IsResourceLevelAboveOrEqual(ResourceType level, |
2021 ResourceType reference) | |
2022 { | |
2023 switch (reference) | |
2024 { | |
2025 case ResourceType_Patient: | |
2026 return (level == ResourceType_Patient); | |
2027 | |
2028 case ResourceType_Study: | |
2029 return (level == ResourceType_Patient || | |
2030 level == ResourceType_Study); | |
2031 | |
2032 case ResourceType_Series: | |
2033 return (level == ResourceType_Patient || | |
2034 level == ResourceType_Study || | |
2035 level == ResourceType_Series); | |
2036 | |
2037 case ResourceType_Instance: | |
2038 return (level == ResourceType_Patient || | |
2039 level == ResourceType_Study || | |
2040 level == ResourceType_Series || | |
2041 level == ResourceType_Instance); | |
2042 | |
2043 default: | |
2044 throw OrthancException(ErrorCode_ParameterOutOfRange); | |
2045 } | |
2046 } | |
2047 | |
2048 | |
1555
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2049 DicomModule GetModule(ResourceType type) |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2050 { |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2051 switch (type) |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2052 { |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2053 case ResourceType_Patient: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2054 return DicomModule_Patient; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2055 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2056 case ResourceType_Study: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2057 return DicomModule_Study; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2058 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2059 case ResourceType_Series: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2060 return DicomModule_Series; |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2061 |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2062 default: |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2063 throw OrthancException(ErrorCode_ParameterOutOfRange); |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2064 } |
d6a93e12b1c1
Creation of DICOM files with encapsulated PDF
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1548
diff
changeset
|
2065 } |
1565
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2066 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2067 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2068 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2069 const char* GetDicomSpecificCharacterSet(Encoding encoding) |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2070 { |
1908
5096681efce6
direct hyperlinks to the DICOM standard
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1900
diff
changeset
|
2071 // http://dicom.nema.org/medical/dicom/current/output/html/part03.html#sect_C.12.1.1.2 |
1565
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2072 switch (encoding) |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2073 { |
2202
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2133
diff
changeset
|
2074 case Encoding_Ascii: |
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2133
diff
changeset
|
2075 return "ISO_IR 6"; |
9b373b7d6713
Fix handling of encodings in C-FIND requests
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2133
diff
changeset
|
2076 |
1565
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2077 case Encoding_Utf8: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2078 return "ISO_IR 192"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2079 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2080 case Encoding_Latin1: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2081 return "ISO_IR 100"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2082 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2083 case Encoding_Latin2: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2084 return "ISO_IR 101"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2085 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2086 case Encoding_Latin3: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2087 return "ISO_IR 109"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2088 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2089 case Encoding_Latin4: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2090 return "ISO_IR 110"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2091 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2092 case Encoding_Latin5: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2093 return "ISO_IR 148"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2094 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2095 case Encoding_Cyrillic: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2096 return "ISO_IR 144"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2097 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2098 case Encoding_Arabic: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2099 return "ISO_IR 127"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2100 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2101 case Encoding_Greek: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2102 return "ISO_IR 126"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2103 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2104 case Encoding_Hebrew: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2105 return "ISO_IR 138"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2106 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2107 case Encoding_Japanese: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2108 return "ISO_IR 13"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2109 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2110 case Encoding_Chinese: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2111 return "GB18030"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2112 |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2113 case Encoding_Thai: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2114 return "ISO_IR 166"; |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2115 |
3217
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
2116 case Encoding_Korean: |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
2117 return "ISO 2022 IR 149"; |
cf8cbeb35f33
preliminary support of Korean character set
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3203
diff
changeset
|
2118 |
3218 | 2119 case Encoding_JapaneseKanji: |
2120 return "ISO 2022 IR 87"; | |
2121 | |
3226
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
2122 case Encoding_SimplifiedChinese: |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
2123 return "ISO 2022 IR 58"; |
45e1631febbb
support of simplified chinese
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3219
diff
changeset
|
2124 |
1565
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2125 default: |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2126 throw OrthancException(ErrorCode_ParameterOutOfRange); |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2127 } |
4b23310eb7e8
add tags per instances in a series
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1555
diff
changeset
|
2128 } |
1576
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2129 |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2130 |
1578 | 2131 // This function is autogenerated by the script |
2132 // "Resources/GenerateErrorCodes.py" | |
1576
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2133 HttpStatus ConvertErrorCodeToHttpStatus(ErrorCode error) |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2134 { |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2135 switch (error) |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2136 { |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2137 case ErrorCode_Success: |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2138 return HttpStatus_200_Ok; |
1577
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2139 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2140 case ErrorCode_ParameterOutOfRange: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2141 return HttpStatus_400_BadRequest; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2142 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2143 case ErrorCode_BadParameterType: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2144 return HttpStatus_400_BadRequest; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2145 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2146 case ErrorCode_InexistentItem: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2147 return HttpStatus_404_NotFound; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2148 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2149 case ErrorCode_BadRequest: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2150 return HttpStatus_400_BadRequest; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2151 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2152 case ErrorCode_UriSyntax: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2153 return HttpStatus_400_BadRequest; |
1576
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2154 |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2155 case ErrorCode_InexistentFile: |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2156 return HttpStatus_404_NotFound; |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2157 |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2158 case ErrorCode_BadFileFormat: |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2159 return HttpStatus_400_BadRequest; |
1577
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2160 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2161 case ErrorCode_UnknownResource: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2162 return HttpStatus_404_NotFound; |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2163 |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2164 case ErrorCode_InexistentTag: |
7aac0cddd42e
generation of the error codes from a Python script
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1576
diff
changeset
|
2165 return HttpStatus_404_NotFound; |
1576
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2166 |
1596
f2e3d030ea59
BadJson error code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2167 case ErrorCode_BadJson: |
f2e3d030ea59
BadJson error code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2168 return HttpStatus_400_BadRequest; |
f2e3d030ea59
BadJson error code
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1583
diff
changeset
|
2169 |
1606
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2170 case ErrorCode_Unauthorized: |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2171 return HttpStatus_401_Unauthorized; |
31f4adefb88f
issuing HTTP requests from the plugin SDK
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1596
diff
changeset
|
2172 |
1781
5ad4e4d92ecb
AcceptMediaDispatcher bootstrap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
2173 case ErrorCode_NotAcceptable: |
5ad4e4d92ecb
AcceptMediaDispatcher bootstrap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
2174 return HttpStatus_406_NotAcceptable; |
5ad4e4d92ecb
AcceptMediaDispatcher bootstrap
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1773
diff
changeset
|
2175 |
2486
ad8f30fc28d1
new error code: DatabaseUnavailable
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
2176 case ErrorCode_DatabaseUnavailable: |
ad8f30fc28d1
new error code: DatabaseUnavailable
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
2177 return HttpStatus_503_ServiceUnavailable; |
ad8f30fc28d1
new error code: DatabaseUnavailable
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2447
diff
changeset
|
2178 |
2953
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2179 case ErrorCode_CreateDicomNotString: |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2180 return HttpStatus_400_BadRequest; |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2181 |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2182 case ErrorCode_CreateDicomOverrideTag: |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2183 return HttpStatus_400_BadRequest; |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2184 |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2185 case ErrorCode_CreateDicomUseContent: |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2186 return HttpStatus_400_BadRequest; |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2187 |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2188 case ErrorCode_CreateDicomNoPayload: |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2189 return HttpStatus_400_BadRequest; |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2190 |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2191 case ErrorCode_CreateDicomUseDataUriScheme: |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2192 return HttpStatus_400_BadRequest; |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2193 |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2194 case ErrorCode_CreateDicomBadParent: |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2195 return HttpStatus_400_BadRequest; |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2196 |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2197 case ErrorCode_CreateDicomParentIsInstance: |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2198 return HttpStatus_400_BadRequest; |
210d5afd8f2b
GenerateErrorCodes.py
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2924
diff
changeset
|
2199 |
3404
e280ced38a4c
ErrorCode_UnsupportedMediaType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3376
diff
changeset
|
2200 case ErrorCode_UnsupportedMediaType: |
e280ced38a4c
ErrorCode_UnsupportedMediaType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3376
diff
changeset
|
2201 return HttpStatus_415_UnsupportedMediaType; |
e280ced38a4c
ErrorCode_UnsupportedMediaType
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3376
diff
changeset
|
2202 |
1576
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2203 default: |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2204 return HttpStatus_500_InternalServerError; |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2205 } |
de54c19fc44d
refactoring OrthancException
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1575
diff
changeset
|
2206 } |
1773
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1772
diff
changeset
|
2207 |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1772
diff
changeset
|
2208 |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1772
diff
changeset
|
2209 bool IsUserContentType(FileContentType type) |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1772
diff
changeset
|
2210 { |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1772
diff
changeset
|
2211 return (type >= FileContentType_StartUser && |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1772
diff
changeset
|
2212 type <= FileContentType_EndUser); |
613df4362575
New UpdatedAttachment and UpdatedMetadata events in plugins
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1772
diff
changeset
|
2213 } |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2214 |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2215 |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2216 bool IsBinaryValueRepresentation(ValueRepresentation vr) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2217 { |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2218 // http://dicom.nema.org/medical/dicom/current/output/chtml/part05/sect_6.2.html |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2219 |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2220 switch (vr) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2221 { |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2222 case ValueRepresentation_ApplicationEntity: // AE |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2223 case ValueRepresentation_AgeString: // AS |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2224 case ValueRepresentation_CodeString: // CS |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2225 case ValueRepresentation_Date: // DA |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2226 case ValueRepresentation_DecimalString: // DS |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2227 case ValueRepresentation_DateTime: // DT |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2228 case ValueRepresentation_IntegerString: // IS |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2229 case ValueRepresentation_LongString: // LO |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2230 case ValueRepresentation_LongText: // LT |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2231 case ValueRepresentation_PersonName: // PN |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2232 case ValueRepresentation_ShortString: // SH |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2233 case ValueRepresentation_ShortText: // ST |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2234 case ValueRepresentation_Time: // TM |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2235 case ValueRepresentation_UnlimitedCharacters: // UC |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2236 case ValueRepresentation_UniqueIdentifier: // UI (UID) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2237 case ValueRepresentation_UniversalResource: // UR (URI or URL) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2238 case ValueRepresentation_UnlimitedText: // UT |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2239 { |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2240 return false; |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2241 } |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2242 |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2243 /** |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2244 * Below are all the VR whose character repertoire is tagged as |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2245 * "not applicable" |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2246 **/ |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2247 case ValueRepresentation_AttributeTag: // AT (2 x uint16_t) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2248 case ValueRepresentation_FloatingPointSingle: // FL (float) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2249 case ValueRepresentation_FloatingPointDouble: // FD (double) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2250 case ValueRepresentation_OtherByte: // OB |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2251 case ValueRepresentation_OtherDouble: // OD |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2252 case ValueRepresentation_OtherFloat: // OF |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2253 case ValueRepresentation_OtherLong: // OL |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2254 case ValueRepresentation_OtherWord: // OW |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2255 case ValueRepresentation_SignedLong: // SL (int32_t) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2256 case ValueRepresentation_Sequence: // SQ |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2257 case ValueRepresentation_SignedShort: // SS (int16_t) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2258 case ValueRepresentation_UnsignedLong: // UL (uint32_t) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2259 case ValueRepresentation_Unknown: // UN |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2260 case ValueRepresentation_UnsignedShort: // US (uint16_t) |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2261 { |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2262 return true; |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2263 } |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2264 |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2265 case ValueRepresentation_NotSupported: |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2266 default: |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2267 throw OrthancException(ErrorCode_ParameterOutOfRange); |
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2268 } |
2381
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2269 } |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2270 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2271 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2272 static boost::mutex defaultEncodingMutex_; // Should not be necessary |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2273 static Encoding defaultEncoding_ = ORTHANC_DEFAULT_DICOM_ENCODING; |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2274 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2275 Encoding GetDefaultDicomEncoding() |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2276 { |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2277 boost::mutex::scoped_lock lock(defaultEncodingMutex_); |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2278 return defaultEncoding_; |
2007
655489d9165d
DicomMap::ParseDicomMetaInformation()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2006
diff
changeset
|
2279 } |
2381
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2280 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2281 void SetDefaultDicomEncoding(Encoding encoding) |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2282 { |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2283 std::string name = EnumerationToString(encoding); |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2284 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2285 { |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2286 boost::mutex::scoped_lock lock(defaultEncodingMutex_); |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2287 defaultEncoding_ = encoding; |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2288 } |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2289 |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2290 LOG(INFO) << "Default encoding for DICOM was changed to: " << name; |
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2291 } |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3727
diff
changeset
|
2292 } |
2381
b8969010b534
uncoupling DCMTK primitives from Orthanc::Configuration
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
2281
diff
changeset
|
2293 |
3727
090022f1b5e1
auto-generation of primitives to handle transfer syntaxes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3643
diff
changeset
|
2294 |
3730
ae31ba2b09a6
toolbox: LookupTransferSyntax()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
3727
diff
changeset
|
2295 #include "./Enumerations_TransferSyntaxes.impl.h" |