Mercurial > hg > orthanc-stone
comparison Framework/Deprecated/Toolbox/MessagingToolbox.h @ 792:4fe4b221a31f
deprecating MessagingToolbox
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 28 May 2019 08:49:49 +0200 |
parents | Framework/Toolbox/MessagingToolbox.h@b70e9be013e4 |
children | 2d8ab34c8c91 |
comparison
equal
deleted
inserted
replaced
791:907189734acd | 792:4fe4b221a31f |
---|---|
1 /** | |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Affero General Public License | |
9 * as published by the Free Software Foundation, either version 3 of | |
10 * the License, or (at your option) any later version. | |
11 * | |
12 * This program is distributed in the hope that it will be useful, but | |
13 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
15 * Affero General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Affero General Public License | |
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
24 #include "../../StoneEnumerations.h" | |
25 | |
26 #include <Core/DicomFormat/DicomMap.h> | |
27 #include <Core/Images/ImageAccessor.h> | |
28 #include <Plugins/Samples/Common/IDicomDataset.h> | |
29 #include <Plugins/Samples/Common/IOrthancConnection.h> | |
30 | |
31 #include <json/value.h> | |
32 | |
33 namespace Deprecated | |
34 { | |
35 namespace MessagingToolbox | |
36 { | |
37 bool ParseJson(Json::Value& target, | |
38 const void* content, | |
39 size_t size); | |
40 | |
41 void JsonToString(std::string& target, | |
42 const Json::Value& source); | |
43 | |
44 | |
45 void RestApiGet(Json::Value& target, | |
46 OrthancPlugins::IOrthancConnection& orthanc, | |
47 const std::string& uri); | |
48 | |
49 void RestApiPost(Json::Value& target, | |
50 OrthancPlugins::IOrthancConnection& orthanc, | |
51 const std::string& uri, | |
52 const std::string& body); | |
53 | |
54 bool HasWebViewerInstalled(OrthancPlugins::IOrthancConnection& orthanc); | |
55 | |
56 bool CheckOrthancVersion(OrthancPlugins::IOrthancConnection& orthanc); | |
57 | |
58 // This downloads the image from Orthanc and keeps its pixel | |
59 // format unchanged (will be either Grayscale8, Grayscale16, | |
60 // SignedGrayscale16, or RGB24) | |
61 Orthanc::ImageAccessor* DecodeFrame(OrthancPlugins::IOrthancConnection& orthanc, | |
62 const std::string& instance, | |
63 unsigned int frame, | |
64 Orthanc::PixelFormat targetFormat); | |
65 | |
66 Orthanc::ImageAccessor* DecodeJpegFrame(OrthancPlugins::IOrthancConnection& orthanc, | |
67 const std::string& instance, | |
68 unsigned int frame, | |
69 unsigned int quality, | |
70 Orthanc::PixelFormat targetFormat); | |
71 | |
72 void ConvertDataset(Orthanc::DicomMap& target, | |
73 const OrthancPlugins::IDicomDataset& source); | |
74 } | |
75 } |