Mercurial > hg > orthanc-wsi
comparison Resources/Orthanc/OrthancServer/ServerEnumerations.h @ 59:7a3853d51c45
Move "Framework/Orthanc/" as "Resources/Orthanc/"
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 25 Nov 2016 16:34:34 +0100 |
parents | Framework/Orthanc/OrthancServer/ServerEnumerations.h@dc730d11b101 |
children | 5b127ab0080b |
comparison
equal
deleted
inserted
replaced
58:35468714a38e | 59:7a3853d51c45 |
---|---|
1 /** | |
2 * Orthanc - A Lightweight, RESTful DICOM Store | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * | |
6 * This program is free software: you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation, either version 3 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * In addition, as a special exception, the copyright holders of this | |
12 * program give permission to link the code of its release with the | |
13 * OpenSSL project's "OpenSSL" library (or with modified versions of it | |
14 * that use the same license as the "OpenSSL" library), and distribute | |
15 * the linked executables. You must obey the GNU General Public License | |
16 * in all respects for all of the code used other than "OpenSSL". If you | |
17 * modify file(s) with this exception, you may extend this exception to | |
18 * your version of the file(s), but you are not obligated to do so. If | |
19 * you do not wish to do so, delete this exception statement from your | |
20 * version. If you delete this exception statement from all source files | |
21 * in the program, then also delete it here. | |
22 * | |
23 * This program is distributed in the hope that it will be useful, but | |
24 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
26 * General Public License for more details. | |
27 * | |
28 * You should have received a copy of the GNU General Public License | |
29 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
30 **/ | |
31 | |
32 #pragma once | |
33 | |
34 #include <string> | |
35 #include <map> | |
36 | |
37 #include "../Core/Enumerations.h" | |
38 #include "../Core/DicomFormat/DicomTag.h" | |
39 | |
40 namespace Orthanc | |
41 { | |
42 enum SeriesStatus | |
43 { | |
44 SeriesStatus_Complete, | |
45 SeriesStatus_Missing, | |
46 SeriesStatus_Inconsistent, | |
47 SeriesStatus_Unknown | |
48 }; | |
49 | |
50 enum StoreStatus | |
51 { | |
52 StoreStatus_Success, | |
53 StoreStatus_AlreadyStored, | |
54 StoreStatus_Failure, | |
55 StoreStatus_FilteredOut // Removed by NewInstanceFilter | |
56 }; | |
57 | |
58 enum ModalityManufacturer | |
59 { | |
60 ModalityManufacturer_Generic, | |
61 ModalityManufacturer_StoreScp, | |
62 ModalityManufacturer_ClearCanvas, | |
63 ModalityManufacturer_MedInria, | |
64 ModalityManufacturer_Dcm4Chee, | |
65 ModalityManufacturer_SyngoVia, | |
66 ModalityManufacturer_AgfaImpax, | |
67 ModalityManufacturer_EFilm2, | |
68 ModalityManufacturer_Vitrea | |
69 }; | |
70 | |
71 enum DicomRequestType | |
72 { | |
73 DicomRequestType_Echo, | |
74 DicomRequestType_Find, | |
75 DicomRequestType_Get, | |
76 DicomRequestType_Move, | |
77 DicomRequestType_Store | |
78 }; | |
79 | |
80 enum DicomReplaceMode | |
81 { | |
82 DicomReplaceMode_InsertIfAbsent, | |
83 DicomReplaceMode_ThrowIfAbsent, | |
84 DicomReplaceMode_IgnoreIfAbsent | |
85 }; | |
86 | |
87 enum TransferSyntax | |
88 { | |
89 TransferSyntax_Deflated, | |
90 TransferSyntax_Jpeg, | |
91 TransferSyntax_Jpeg2000, | |
92 TransferSyntax_JpegLossless, | |
93 TransferSyntax_Jpip, | |
94 TransferSyntax_Mpeg2, | |
95 TransferSyntax_Rle | |
96 }; | |
97 | |
98 enum DicomToJsonFormat | |
99 { | |
100 DicomToJsonFormat_Full, | |
101 DicomToJsonFormat_Short, | |
102 DicomToJsonFormat_Human | |
103 }; | |
104 | |
105 enum DicomToJsonFlags | |
106 { | |
107 DicomToJsonFlags_IncludeBinary = (1 << 0), | |
108 DicomToJsonFlags_IncludePrivateTags = (1 << 1), | |
109 DicomToJsonFlags_IncludeUnknownTags = (1 << 2), | |
110 DicomToJsonFlags_IncludePixelData = (1 << 3), | |
111 DicomToJsonFlags_ConvertBinaryToAscii = (1 << 4), | |
112 DicomToJsonFlags_ConvertBinaryToNull = (1 << 5), | |
113 | |
114 // Some predefined combinations | |
115 DicomToJsonFlags_None = 0, | |
116 DicomToJsonFlags_Default = (DicomToJsonFlags_IncludeBinary | | |
117 DicomToJsonFlags_IncludePixelData | | |
118 DicomToJsonFlags_IncludePrivateTags | | |
119 DicomToJsonFlags_IncludeUnknownTags | | |
120 DicomToJsonFlags_ConvertBinaryToNull) | |
121 }; | |
122 | |
123 enum DicomFromJsonFlags | |
124 { | |
125 DicomFromJsonFlags_DecodeDataUriScheme = (1 << 0), | |
126 DicomFromJsonFlags_GenerateIdentifiers = (1 << 1) | |
127 }; | |
128 | |
129 enum IdentifierConstraintType | |
130 { | |
131 IdentifierConstraintType_Equal, | |
132 IdentifierConstraintType_SmallerOrEqual, | |
133 IdentifierConstraintType_GreaterOrEqual, | |
134 IdentifierConstraintType_Wildcard /* Case sensitive, "*" or "?" are the only allowed wildcards */ | |
135 }; | |
136 | |
137 | |
138 /** | |
139 * WARNING: Do not change the explicit values in the enumerations | |
140 * below this point. This would result in incompatible databases | |
141 * between versions of Orthanc! | |
142 **/ | |
143 | |
144 enum GlobalProperty | |
145 { | |
146 GlobalProperty_DatabaseSchemaVersion = 1, // Unused in the Orthanc core as of Orthanc 0.9.5 | |
147 GlobalProperty_FlushSleep = 2, | |
148 GlobalProperty_AnonymizationSequence = 3 | |
149 }; | |
150 | |
151 enum MetadataType | |
152 { | |
153 MetadataType_Instance_IndexInSeries = 1, | |
154 MetadataType_Instance_ReceptionDate = 2, | |
155 MetadataType_Instance_RemoteAet = 3, | |
156 MetadataType_Series_ExpectedNumberOfInstances = 4, | |
157 MetadataType_ModifiedFrom = 5, | |
158 MetadataType_AnonymizedFrom = 6, | |
159 MetadataType_LastUpdate = 7, | |
160 MetadataType_Instance_Origin = 8, // New in Orthanc 0.9.5 | |
161 | |
162 // Make sure that the value "65535" can be stored into this enumeration | |
163 MetadataType_StartUser = 1024, | |
164 MetadataType_EndUser = 65535 | |
165 }; | |
166 | |
167 enum ChangeType | |
168 { | |
169 ChangeType_CompletedSeries = 1, | |
170 ChangeType_NewInstance = 2, | |
171 ChangeType_NewPatient = 3, | |
172 ChangeType_NewSeries = 4, | |
173 ChangeType_NewStudy = 5, | |
174 ChangeType_AnonymizedStudy = 6, | |
175 ChangeType_AnonymizedSeries = 7, | |
176 ChangeType_ModifiedStudy = 8, | |
177 ChangeType_ModifiedSeries = 9, | |
178 ChangeType_AnonymizedPatient = 10, | |
179 ChangeType_ModifiedPatient = 11, | |
180 ChangeType_StablePatient = 12, | |
181 ChangeType_StableStudy = 13, | |
182 ChangeType_StableSeries = 14, | |
183 ChangeType_UpdatedAttachment = 15, | |
184 ChangeType_UpdatedMetadata = 16, | |
185 | |
186 ChangeType_INTERNAL_LastLogged = 4095, | |
187 | |
188 // The changes below this point are not logged into the database | |
189 ChangeType_Deleted = 4096, | |
190 ChangeType_NewChildInstance = 4097 | |
191 }; | |
192 | |
193 | |
194 | |
195 void InitializeServerEnumerations(); | |
196 | |
197 void RegisterUserMetadata(int metadata, | |
198 const std::string& name); | |
199 | |
200 MetadataType StringToMetadata(const std::string& str); | |
201 | |
202 std::string EnumerationToString(MetadataType type); | |
203 | |
204 void RegisterUserContentType(int contentType, | |
205 const std::string& name, | |
206 const std::string& mime); | |
207 | |
208 FileContentType StringToContentType(const std::string& str); | |
209 | |
210 std::string EnumerationToString(FileContentType type); | |
211 | |
212 std::string GetFileContentMime(FileContentType type); | |
213 | |
214 std::string GetBasePath(ResourceType type, | |
215 const std::string& publicId); | |
216 | |
217 const char* EnumerationToString(SeriesStatus status); | |
218 | |
219 const char* EnumerationToString(StoreStatus status); | |
220 | |
221 const char* EnumerationToString(ChangeType type); | |
222 | |
223 const char* EnumerationToString(ModalityManufacturer manufacturer); | |
224 | |
225 const char* EnumerationToString(DicomRequestType type); | |
226 | |
227 const char* EnumerationToString(TransferSyntax syntax); | |
228 | |
229 ModalityManufacturer StringToModalityManufacturer(const std::string& manufacturer); | |
230 | |
231 bool IsUserMetadata(MetadataType type); | |
232 } |