Mercurial > hg > orthanc-dicomweb
changeset 157:b8ca6abb6417
fix due to renamed function
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 15 Jul 2016 12:08:08 +0200 |
parents | bd5c36368a67 |
children | ecead7b43fa9 |
files | Plugin/DicomWebClient.cpp Plugin/QidoRs.cpp Plugin/WadoRs.cpp Plugin/WadoRsRetrieveFrames.cpp Plugin/WadoUri.cpp |
diffstat | 5 files changed, 21 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugin/DicomWebClient.cpp Fri Jul 15 11:58:54 2016 +0200 +++ b/Plugin/DicomWebClient.cpp Fri Jul 15 12:08:08 2016 +0200 @@ -135,17 +135,17 @@ // Test whether this resource is an instance Json::Value tmp; - if (OrthancPlugins::RestApiGetJson(tmp, context, "/instances/" + resource, false)) + if (OrthancPlugins::RestApiGet(tmp, context, "/instances/" + resource, false)) { AddInstance(instances, tmp); } // This was not an instance, successively try with series/studies/patients - else if ((OrthancPlugins::RestApiGetJson(tmp, context, "/series/" + resource, false) && - OrthancPlugins::RestApiGetJson(tmp, context, "/series/" + resource + "/instances", false)) || - (OrthancPlugins::RestApiGetJson(tmp, context, "/studies/" + resource, false) && - OrthancPlugins::RestApiGetJson(tmp, context, "/studies/" + resource + "/instances", false)) || - (OrthancPlugins::RestApiGetJson(tmp, context, "/patients/" + resource, false) && - OrthancPlugins::RestApiGetJson(tmp, context, "/patients/" + resource + "/instances", false))) + else if ((OrthancPlugins::RestApiGet(tmp, context, "/series/" + resource, false) && + OrthancPlugins::RestApiGet(tmp, context, "/series/" + resource + "/instances", false)) || + (OrthancPlugins::RestApiGet(tmp, context, "/studies/" + resource, false) && + OrthancPlugins::RestApiGet(tmp, context, "/studies/" + resource + "/instances", false)) || + (OrthancPlugins::RestApiGet(tmp, context, "/patients/" + resource, false) && + OrthancPlugins::RestApiGet(tmp, context, "/patients/" + resource + "/instances", false))) { if (tmp.type() != Json::arrayValue) {
--- a/Plugin/QidoRs.cpp Fri Jul 15 11:58:54 2016 +0200 +++ b/Plugin/QidoRs.cpp Fri Jul 15 12:08:08 2016 +0200 @@ -288,8 +288,8 @@ case QueryLevel_Study: { Json::Value series, instances; - if (OrthancPlugins::RestApiGetJson(series, context, "/studies/" + resource + "/series?expand", false) && - OrthancPlugins::RestApiGetJson(instances, context, "/studies/" + resource + "/instances", false)) + if (OrthancPlugins::RestApiGet(series, context, "/studies/" + resource + "/series?expand", false) && + OrthancPlugins::RestApiGet(instances, context, "/studies/" + resource + "/instances", false)) { // Number of Study Related Series target[gdcm::Tag(0x0020, 0x1206)] = boost::lexical_cast<std::string>(series.size()); @@ -335,7 +335,7 @@ case QueryLevel_Series: { Json::Value instances; - if (OrthancPlugins::RestApiGetJson(instances, context, "/series/" + resource + "/instances", false)) + if (OrthancPlugins::RestApiGet(instances, context, "/series/" + resource + "/instances", false)) { // Number of Series Related Instances target[gdcm::Tag(0x0020, 0x1209)] = boost::lexical_cast<std::string>(instances.size()); @@ -507,7 +507,7 @@ std::string body = writer.write(find); Json::Value resources; - if (!OrthancPlugins::RestApiPostJson(resources, context, "/tools/find", body, false) || + if (!OrthancPlugins::RestApiPost(resources, context, "/tools/find", body, false) || resources.type() != Json::arrayValue) { throw OrthancPlugins::PluginException(OrthancPluginErrorCode_InternalError); @@ -527,7 +527,7 @@ { // Find one child instance of this resource Json::Value tmp; - if (OrthancPlugins::RestApiGetJson(tmp, context, root + resource + "/instances", false) && + if (OrthancPlugins::RestApiGet(tmp, context, root + resource + "/instances", false) && tmp.type() == Json::arrayValue && tmp.size() > 0) { @@ -585,7 +585,7 @@ it = resourcesAndInstances.begin(); it != resourcesAndInstances.end(); ++it) { Json::Value tags; - if (OrthancPlugins::RestApiGetJson(tags, context, "/instances/" + it->second + "/tags", false)) + if (OrthancPlugins::RestApiGet(tags, context, "/instances/" + it->second + "/tags", false)) { std::string wadoUrl = OrthancPlugins::Configuration::GetWadoUrl( wadoBase,
--- a/Plugin/WadoRs.cpp Fri Jul 15 11:58:54 2016 +0200 +++ b/Plugin/WadoRs.cpp Fri Jul 15 12:08:08 2016 +0200 @@ -174,7 +174,7 @@ OrthancPluginContext* context = OrthancPlugins::Configuration::GetContext(); Json::Value instances; - if (!OrthancPlugins::RestApiGetJson(instances, context, resource + "/instances", false)) + if (!OrthancPlugins::RestApiGet(instances, context, resource + "/instances", false)) { // Internal error OrthancPluginSendHttpStatusCode(context, output, 400); @@ -217,7 +217,7 @@ else { Json::Value instances; - if (!OrthancPlugins::RestApiGetJson(instances, context, resource + "/instances", false)) + if (!OrthancPlugins::RestApiGet(instances, context, resource + "/instances", false)) { // Internal error OrthancPluginSendHttpStatusCode(context, output, 400); @@ -310,7 +310,7 @@ } Json::Value study; - if (!OrthancPlugins::RestApiGetJson(study, context, "/series/" + id + "/study", false)) + if (!OrthancPlugins::RestApiGet(study, context, "/series/" + id + "/study", false)) { OrthancPluginSendHttpStatusCode(context, output, 404); return false; @@ -358,8 +358,8 @@ } Json::Value study, series; - if (!OrthancPlugins::RestApiGetJson(series, context, "/instances/" + id + "/series", false) || - !OrthancPlugins::RestApiGetJson(study, context, "/instances/" + id + "/study", false)) + if (!OrthancPlugins::RestApiGet(series, context, "/instances/" + id + "/series", false) || + !OrthancPlugins::RestApiGet(study, context, "/instances/" + id + "/study", false)) { OrthancPluginSendHttpStatusCode(context, output, 404); return false;
--- a/Plugin/WadoRsRetrieveFrames.cpp Fri Jul 15 11:58:54 2016 +0200 +++ b/Plugin/WadoRsRetrieveFrames.cpp Fri Jul 15 12:08:08 2016 +0200 @@ -413,7 +413,7 @@ OrthancPlugins::MemoryBuffer content(context); if (LocateInstance(output, uri, request) && content.RestApiGet(uri + "/file", false) && - OrthancPlugins::RestApiGetJson(header, context, uri + "/header?simplify", false)) + OrthancPlugins::RestApiGet(header, context, uri + "/header?simplify", false)) { { std::string s = "DICOMweb RetrieveFrames on " + uri + ", frames: ";
--- a/Plugin/WadoUri.cpp Fri Jul 15 11:58:54 2016 +0200 +++ b/Plugin/WadoUri.cpp Fri Jul 15 12:08:08 2016 +0200 @@ -116,7 +116,7 @@ else { Json::Value info; - if (!OrthancPlugins::RestApiGetJson(info, context, "/instances/" + instance + "/series", false) || + if (!OrthancPlugins::RestApiGet(info, context, "/instances/" + instance + "/series", false) || info["MainDicomTags"]["SeriesInstanceUID"] != seriesUid) { OrthancPlugins::Configuration::LogError("WADO-URI: Instance " + objectUid + " does not belong to series " + seriesUid); @@ -136,7 +136,7 @@ else { Json::Value info; - if (!OrthancPlugins::RestApiGetJson(info, context, "/instances/" + instance + "/study", false) || + if (!OrthancPlugins::RestApiGet(info, context, "/instances/" + instance + "/study", false) || info["MainDicomTags"]["StudyInstanceUID"] != studyUid) { OrthancPlugins::Configuration::LogError("WADO-URI: Instance " + objectUid + " does not belong to study " + studyUid);