comparison OrthancServer/Sources/OrthancRestApi/OrthancRestApi.cpp @ 4796:94616af363ec filter-store-instance

added ReceivedCStoreInstanceFilter lua callback + OrthancPluginRegisterIncomingCStoreInstanceFilter in sdk
author Alain Mazy <am@osimis.io>
date Fri, 01 Oct 2021 18:36:45 +0200
parents 71fbdee4b832
children 70d2a97ca8cb 7053502fbf97
comparison
equal deleted inserted replaced
4795:22d5b611dea7 4796:94616af363ec
197 197
198 std::string publicId; 198 std::string publicId;
199 199
200 try 200 try
201 { 201 {
202 StoreStatus status = context.Store(publicId, *toStore, StoreInstanceMode_Default); 202 ServerContext::StoreResult result = context.Store(publicId, *toStore, StoreInstanceMode_Default);
203 203
204 Json::Value info; 204 Json::Value info;
205 SetupResourceAnswer(info, *toStore, status, publicId); 205 SetupResourceAnswer(info, *toStore, result.GetStatus(), publicId);
206 answer.append(info); 206 answer.append(info);
207 } 207 }
208 catch (OrthancException& e) 208 catch (OrthancException& e)
209 { 209 {
210 if (e.GetErrorCode() == ErrorCode_BadFileFormat) 210 if (e.GetErrorCode() == ErrorCode_BadFileFormat)
250 } 250 }
251 251
252 toStore->SetOrigin(DicomInstanceOrigin::FromRest(call)); 252 toStore->SetOrigin(DicomInstanceOrigin::FromRest(call));
253 253
254 std::string publicId; 254 std::string publicId;
255 StoreStatus status = context.Store(publicId, *toStore, StoreInstanceMode_Default); 255 ServerContext::StoreResult result = context.Store(publicId, *toStore, StoreInstanceMode_Default);
256 256
257 OrthancRestApi::GetApi(call).AnswerStoredInstance(call, *toStore, status, publicId); 257 OrthancRestApi::GetApi(call).AnswerStoredInstance(call, *toStore, result.GetStatus(), publicId);
258 } 258 }
259 } 259 }
260 260
261 261
262 262