Mercurial > hg > orthanc-transfers
comparison Resources/Orthanc/Plugins/OrthancPluginCppWrapper.h @ 64:5fb01c588287
updated to Orthanc Framework 1.12.1
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 11 Oct 2023 15:58:27 +0200 |
parents | 5915547fa6f2 |
children | 1078942460cc |
comparison
equal
deleted
inserted
replaced
63:9789c6003e9d | 64:5fb01c588287 |
---|---|
1 /** | 1 /** |
2 * Orthanc - A Lightweight, RESTful DICOM Store | 2 * Orthanc - A Lightweight, RESTful DICOM Store |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
4 * Department, University Hospital of Liege, Belgium | 4 * Department, University Hospital of Liege, Belgium |
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium | 5 * Copyright (C) 2017-2023 Osimis S.A., Belgium |
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium | 6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium |
7 * | 7 * |
8 * This program is free software: you can redistribute it and/or | 8 * This program is free software: you can redistribute it and/or |
9 * modify it under the terms of the GNU General Public License as | 9 * modify it under the terms of the GNU General Public License as |
10 * published by the Free Software Foundation, either version 3 of the | 10 * published by the Free Software Foundation, either version 3 of the |
11 * License, or (at your option) any later version. | 11 * License, or (at your option) any later version. |
344 std::string GetPath(const std::string& key) const; | 344 std::string GetPath(const std::string& key) const; |
345 | 345 |
346 void LoadConfiguration(); | 346 void LoadConfiguration(); |
347 | 347 |
348 public: | 348 public: |
349 OrthancConfiguration(); | 349 OrthancConfiguration(); // loads the full Orthanc configuration |
350 | 350 |
351 explicit OrthancConfiguration(bool load); | 351 explicit OrthancConfiguration(bool load); |
352 | |
353 explicit OrthancConfiguration(const Json::Value& configuration, const std::string& path); // e.g. to load a section from a default json content | |
352 | 354 |
353 const Json::Value& GetJson() const | 355 const Json::Value& GetJson() const |
354 { | 356 { |
355 return configuration_; | 357 return configuration_; |
356 } | 358 } |
529 void WriteStyledJson(std::string& target, | 531 void WriteStyledJson(std::string& target, |
530 const Json::Value& source); | 532 const Json::Value& source); |
531 | 533 |
532 bool RestApiGet(Json::Value& result, | 534 bool RestApiGet(Json::Value& result, |
533 const std::string& uri, | 535 const std::string& uri, |
536 bool applyPlugins); | |
537 | |
538 bool RestApiGet(Json::Value& result, | |
539 const std::string& uri, | |
540 const std::map<std::string, std::string>& httpHeaders, | |
534 bool applyPlugins); | 541 bool applyPlugins); |
535 | 542 |
536 bool RestApiGetString(std::string& result, | 543 bool RestApiGetString(std::string& result, |
537 const std::string& uri, | 544 const std::string& uri, |
538 bool applyPlugins); | 545 bool applyPlugins); |
1255 size_t size); | 1262 size_t size); |
1256 #endif | 1263 #endif |
1257 | 1264 |
1258 ~DicomInstance(); | 1265 ~DicomInstance(); |
1259 | 1266 |
1267 const OrthancPluginDicomInstance* GetObject() const | |
1268 { | |
1269 return instance_; | |
1270 } | |
1271 | |
1260 std::string GetRemoteAet() const; | 1272 std::string GetRemoteAet() const; |
1261 | 1273 |
1262 const void* GetBuffer() const | 1274 const void* GetBuffer() const |
1263 { | 1275 { |
1264 return OrthancPluginGetInstanceData(GetGlobalContext(), instance_); | 1276 return OrthancPluginGetInstanceData(GetGlobalContext(), instance_); |
1308 | 1320 |
1309 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0) | 1321 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 7, 0) |
1310 static DicomInstance* Transcode(const void* buffer, | 1322 static DicomInstance* Transcode(const void* buffer, |
1311 size_t size, | 1323 size_t size, |
1312 const std::string& transferSyntax); | 1324 const std::string& transferSyntax); |
1325 #endif | |
1326 | |
1327 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 12, 1) | |
1328 static DicomInstance* Load(const std::string& instanceId, | |
1329 OrthancPluginLoadDicomInstanceMode mode); | |
1313 #endif | 1330 #endif |
1314 }; | 1331 }; |
1315 | 1332 |
1316 // helper method to convert Http headers from the plugin SDK to a std::map | 1333 // helper method to convert Http headers from the plugin SDK to a std::map |
1317 void GetHttpHeaders(std::map<std::string, std::string>& result, const OrthancPluginHttpRequest* request); | 1334 void GetHttpHeaders(std::map<std::string, std::string>& result, const OrthancPluginHttpRequest* request); |