comparison OrthancServer/OrthancRestApi/OrthancRestAnonymizeModify.cpp @ 1698:d78b87f93bcf

DicomModification use Json::Value
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 09 Oct 2015 12:29:21 +0200
parents b62c2e706c13
children 8ca0e89798b2
comparison
equal deleted inserted replaced
1697:21902c8ba95b 1698:d78b87f93bcf
166 RestApiPostCall& call) 166 RestApiPostCall& call)
167 { 167 {
168 // curl http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/anonymize -X POST -d '{"Replace":{"PatientName":"hello","0010-0020":"world"},"Keep":["StudyDescription", "SeriesDescription"],"KeepPrivateTags": null,"Remove":["Modality"]}' > Anonymized.dcm 168 // curl http://localhost:8042/instances/6e67da51-d119d6ae-c5667437-87b9a8a5-0f07c49f/anonymize -X POST -d '{"Replace":{"PatientName":"hello","0010-0020":"world"},"Keep":["StudyDescription", "SeriesDescription"],"KeepPrivateTags": null,"Remove":["Modality"]}' > Anonymized.dcm
169 169
170 target.SetupAnonymization(); 170 target.SetupAnonymization();
171 std::string patientName = target.GetReplacement(DICOM_TAG_PATIENT_NAME); 171 std::string patientName = target.GetReplacementAsString(DICOM_TAG_PATIENT_NAME);
172 172
173 Json::Value request; 173 Json::Value request;
174 if (call.ParseJsonRequest(request) && request.isObject()) 174 if (call.ParseJsonRequest(request) && request.isObject())
175 { 175 {
176 if (request.isMember("KeepPrivateTags")) 176 if (request.isMember("KeepPrivateTags"))