Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestModalities.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 | 92ecaf877baf |
children | 5797ca4f3b8d |
comparison
equal
deleted
inserted
replaced
3893:7a5fa8f307e9 | 3894:8f7ad4989fec |
---|---|
111 * DICOM C-Echo SCU | 111 * DICOM C-Echo SCU |
112 ***************************************************************************/ | 112 ***************************************************************************/ |
113 | 113 |
114 static void DicomEcho(RestApiPostCall& call) | 114 static void DicomEcho(RestApiPostCall& call) |
115 { | 115 { |
116 try | 116 DicomControlUserConnection connection(GetAssociationParameters(call)); |
117 { | 117 |
118 DicomControlUserConnection connection(GetAssociationParameters(call)); | 118 if (connection.Echo()) |
119 | 119 { |
120 if (connection.Echo()) | 120 // Echo has succeeded |
121 { | 121 call.GetOutput().AnswerBuffer("{}", MimeType_Json); |
122 // Echo has succeeded | 122 return; |
123 call.GetOutput().AnswerBuffer("{}", MimeType_Json); | 123 } |
124 return; | 124 else |
125 } | 125 { |
126 } | 126 // Echo has failed |
127 catch (OrthancException&) | 127 call.GetOutput().SignalError(HttpStatus_500_InternalServerError); |
128 { | 128 } |
129 } | |
130 | |
131 // Echo has failed | |
132 call.GetOutput().SignalError(HttpStatus_500_InternalServerError); | |
133 } | 129 } |
134 | 130 |
135 | 131 |
136 | 132 |
137 /*************************************************************************** | 133 /*************************************************************************** |
1006 { | 1002 { |
1007 Json::Value body = Json::objectValue; // No body | 1003 Json::Value body = Json::objectValue; // No body |
1008 DicomStoreUserConnection connection(GetAssociationParameters(call, body)); | 1004 DicomStoreUserConnection connection(GetAssociationParameters(call, body)); |
1009 | 1005 |
1010 std::string sopClassUid, sopInstanceUid; | 1006 std::string sopClassUid, sopInstanceUid; |
1011 connection.Store(sopClassUid, sopInstanceUid, | 1007 connection.Store(sopClassUid, sopInstanceUid, call.GetBodyData(), |
1012 call.GetBodyData(), call.GetBodySize()); | 1008 call.GetBodySize(), false /* Not a C-MOVE */, "", 0); |
1013 | 1009 |
1014 Json::Value answer = Json::objectValue; | 1010 Json::Value answer = Json::objectValue; |
1015 answer[SOP_CLASS_UID] = sopClassUid; | 1011 answer[SOP_CLASS_UID] = sopClassUid; |
1016 answer[SOP_INSTANCE_UID] = sopInstanceUid; | 1012 answer[SOP_INSTANCE_UID] = sopInstanceUid; |
1017 | 1013 |