Mercurial > hg > orthanc
comparison Core/DicomNetworking/RemoteModalityParameters.cpp @ 3894:8f7ad4989fec transcoding
transcoding to uncompressed transfer syntaxes over DICOM protocol is implemented
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 07 May 2020 11:13:29 +0200 |
parents | f6a73611ec5c |
children |
comparison
equal
deleted
inserted
replaced
3893:7a5fa8f307e9 | 3894:8f7ad4989fec |
---|---|
49 static const char* KEY_ALLOW_MOVE = "AllowMove"; | 49 static const char* KEY_ALLOW_MOVE = "AllowMove"; |
50 static const char* KEY_ALLOW_STORE = "AllowStore"; | 50 static const char* KEY_ALLOW_STORE = "AllowStore"; |
51 static const char* KEY_ALLOW_N_ACTION = "AllowNAction"; | 51 static const char* KEY_ALLOW_N_ACTION = "AllowNAction"; |
52 static const char* KEY_ALLOW_N_EVENT_REPORT = "AllowEventReport"; | 52 static const char* KEY_ALLOW_N_EVENT_REPORT = "AllowEventReport"; |
53 static const char* KEY_ALLOW_STORAGE_COMMITMENT = "AllowStorageCommitment"; | 53 static const char* KEY_ALLOW_STORAGE_COMMITMENT = "AllowStorageCommitment"; |
54 static const char* KEY_ALLOW_TRANSCODING = "AllowTranscoding"; | |
54 static const char* KEY_HOST = "Host"; | 55 static const char* KEY_HOST = "Host"; |
55 static const char* KEY_MANUFACTURER = "Manufacturer"; | 56 static const char* KEY_MANUFACTURER = "Manufacturer"; |
56 static const char* KEY_PORT = "Port"; | 57 static const char* KEY_PORT = "Port"; |
57 | 58 |
58 | 59 |
69 allowFind_ = true; | 70 allowFind_ = true; |
70 allowMove_ = true; | 71 allowMove_ = true; |
71 allowGet_ = true; | 72 allowGet_ = true; |
72 allowNAction_ = true; // For storage commitment | 73 allowNAction_ = true; // For storage commitment |
73 allowNEventReport_ = true; // For storage commitment | 74 allowNEventReport_ = true; // For storage commitment |
75 allowTranscoding_ = true; | |
74 } | 76 } |
75 | 77 |
76 | 78 |
77 RemoteModalityParameters::RemoteModalityParameters(const std::string& aet, | 79 RemoteModalityParameters::RemoteModalityParameters(const std::string& aet, |
78 const std::string& host, | 80 const std::string& host, |
231 { | 233 { |
232 bool allow = SerializationToolbox::ReadBoolean(serialized, KEY_ALLOW_STORAGE_COMMITMENT); | 234 bool allow = SerializationToolbox::ReadBoolean(serialized, KEY_ALLOW_STORAGE_COMMITMENT); |
233 allowNAction_ = allow; | 235 allowNAction_ = allow; |
234 allowNEventReport_ = allow; | 236 allowNEventReport_ = allow; |
235 } | 237 } |
238 | |
239 if (serialized.isMember(KEY_ALLOW_TRANSCODING)) | |
240 { | |
241 allowTranscoding_ = SerializationToolbox::ReadBoolean(serialized, KEY_ALLOW_TRANSCODING); | |
242 } | |
236 } | 243 } |
237 | 244 |
238 | 245 |
239 bool RemoteModalityParameters::IsRequestAllowed(DicomRequestType type) const | 246 bool RemoteModalityParameters::IsRequestAllowed(DicomRequestType type) const |
240 { | 247 { |
312 !allowStore_ || | 319 !allowStore_ || |
313 !allowFind_ || | 320 !allowFind_ || |
314 !allowGet_ || | 321 !allowGet_ || |
315 !allowMove_ || | 322 !allowMove_ || |
316 !allowNAction_ || | 323 !allowNAction_ || |
317 !allowNEventReport_); | 324 !allowNEventReport_ || |
325 !allowTranscoding_); | |
318 } | 326 } |
319 | 327 |
320 | 328 |
321 void RemoteModalityParameters::Serialize(Json::Value& target, | 329 void RemoteModalityParameters::Serialize(Json::Value& target, |
322 bool forceAdvancedFormat) const | 330 bool forceAdvancedFormat) const |
334 target[KEY_ALLOW_FIND] = allowFind_; | 342 target[KEY_ALLOW_FIND] = allowFind_; |
335 target[KEY_ALLOW_GET] = allowGet_; | 343 target[KEY_ALLOW_GET] = allowGet_; |
336 target[KEY_ALLOW_MOVE] = allowMove_; | 344 target[KEY_ALLOW_MOVE] = allowMove_; |
337 target[KEY_ALLOW_N_ACTION] = allowNAction_; | 345 target[KEY_ALLOW_N_ACTION] = allowNAction_; |
338 target[KEY_ALLOW_N_EVENT_REPORT] = allowNEventReport_; | 346 target[KEY_ALLOW_N_EVENT_REPORT] = allowNEventReport_; |
347 target[KEY_ALLOW_TRANSCODING] = allowTranscoding_; | |
339 } | 348 } |
340 else | 349 else |
341 { | 350 { |
342 target = Json::arrayValue; | 351 target = Json::arrayValue; |
343 target.append(GetApplicationEntityTitle()); | 352 target.append(GetApplicationEntityTitle()); |