Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi/OrthancRestResources.cpp @ 2124:2b1520efa282
cleaning up
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 07 Nov 2016 12:11:34 +0100 |
parents | 2ecc95a239f7 |
children | bfa92c9328d7 |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Mon Nov 07 11:51:40 2016 +0100 +++ b/OrthancServer/OrthancRestApi/OrthancRestResources.cpp Mon Nov 07 12:11:34 2016 +0100 @@ -187,7 +187,7 @@ std::string publicId = call.GetUriComponent("id", ""); std::string dicom; - context.ReadFile(dicom, publicId, FileContentType_Dicom); + context.ReadDicom(dicom, publicId); std::string target; call.BodyToString(target); @@ -207,7 +207,7 @@ if (simplify) { Json::Value full; - context.ReadJson(full, publicId); + context.ReadDicomAsJson(full, publicId); Json::Value simplified; ServerToolbox::SimplifyTags(simplified, full, DicomToJsonFormat_Human); @@ -380,7 +380,7 @@ { // TODO create a cache of file std::string dicomContent; - context.ReadFile(dicomContent, publicId, FileContentType_Dicom); + context.ReadDicom(dicomContent, publicId); decoded.reset(context.GetPlugins().DecodeUnsafe(dicomContent.c_str(), dicomContent.size(), frame)); /** @@ -450,7 +450,7 @@ std::string publicId = call.GetUriComponent("id", ""); std::string dicomContent; - context.ReadFile(dicomContent, publicId, FileContentType_Dicom); + context.ReadDicom(dicomContent, publicId); #if ORTHANC_PLUGINS_ENABLED == 1 IDicomImageDecoder& decoder = context.GetPlugins(); @@ -871,7 +871,7 @@ try { - context.ReadJson(tags, *it); + context.ReadDicomAsJson(tags, *it); } catch (OrthancException&) { @@ -989,7 +989,7 @@ publicId = instances.front(); } - context.ReadJson(tags, publicId); + context.ReadDicomAsJson(tags, publicId); // Filter the tags of the instance according to the module Json::Value result = Json::objectValue; @@ -1206,7 +1206,7 @@ it != instances.end(); ++it) { Json::Value full; - context.ReadJson(full, *it); + context.ReadDicomAsJson(full, *it); if (simplify) { @@ -1295,7 +1295,7 @@ bool simplify = call.HasArgument("simplify"); std::string dicomContent; - context.ReadFile(dicomContent, publicId, FileContentType_Dicom); + context.ReadDicom(dicomContent, publicId); // TODO Consider using "DicomMap::ParseDicomMetaInformation()" to // speed up things here