Mercurial > hg > orthanc-stone
annotate Framework/Toolbox/MessagingToolbox.h @ 629:8d66efecd91c am-dev
rename
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Wed, 08 May 2019 16:38:25 +0200 |
parents | b70e9be013e4 |
children |
rev | line source |
---|---|
0 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
439 | 5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
47 | 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. | |
0 | 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 | |
47 | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Affero General Public License for more details. | |
309 | 16 * |
47 | 17 * You should have received a copy of the GNU Affero General Public License |
0 | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
194
7a031ac16b2d
rename Enumerations.h to StoneEnumerations.h to avoid clashes with Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
24 #include "../StoneEnumerations.h" |
0 | 25 |
212
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
201
diff
changeset
|
26 #include <Core/DicomFormat/DicomMap.h> |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
201
diff
changeset
|
27 #include <Core/Images/ImageAccessor.h> |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
201
diff
changeset
|
28 #include <Plugins/Samples/Common/IDicomDataset.h> |
5412adf19980
resort to OrthancFramework
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
201
diff
changeset
|
29 #include <Plugins/Samples/Common/IOrthancConnection.h> |
0 | 30 |
31 #include <json/value.h> | |
32 | |
33 namespace OrthancStone | |
34 { | |
35 namespace MessagingToolbox | |
36 { | |
67
acb60cbb8301
refactoring SeriesLoader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
57
diff
changeset
|
37 bool ParseJson(Json::Value& target, |
acb60cbb8301
refactoring SeriesLoader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
57
diff
changeset
|
38 const void* content, |
acb60cbb8301
refactoring SeriesLoader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
57
diff
changeset
|
39 size_t size); |
0 | 40 |
309 | 41 void JsonToString(std::string& target, |
42 const Json::Value& source); | |
43 | |
44 | |
0 | 45 void RestApiGet(Json::Value& target, |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
46 OrthancPlugins::IOrthancConnection& orthanc, |
0 | 47 const std::string& uri); |
48 | |
34 | 49 void RestApiPost(Json::Value& target, |
50 OrthancPlugins::IOrthancConnection& orthanc, | |
51 const std::string& uri, | |
52 const std::string& body); | |
53 | |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
54 bool HasWebViewerInstalled(OrthancPlugins::IOrthancConnection& orthanc); |
0 | 55 |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
56 bool CheckOrthancVersion(OrthancPlugins::IOrthancConnection& orthanc); |
0 | 57 |
58 // This downloads the image from Orthanc and keeps its pixel | |
59 // format unchanged (will be either Grayscale8, Grayscale16, | |
60 // SignedGrayscale16, or RGB24) | |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
61 Orthanc::ImageAccessor* DecodeFrame(OrthancPlugins::IOrthancConnection& orthanc, |
0 | 62 const std::string& instance, |
63 unsigned int frame, | |
64 Orthanc::PixelFormat targetFormat); | |
65 | |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
66 Orthanc::ImageAccessor* DecodeJpegFrame(OrthancPlugins::IOrthancConnection& orthanc, |
0 | 67 const std::string& instance, |
68 unsigned int frame, | |
69 unsigned int quality, | |
70 Orthanc::PixelFormat targetFormat); | |
118
a4d0b6c82b29
using Orthanc::DicomMap instead of OrthancPlugins::DicomDatasetReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
113
diff
changeset
|
71 |
a4d0b6c82b29
using Orthanc::DicomMap instead of OrthancPlugins::DicomDatasetReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
113
diff
changeset
|
72 void ConvertDataset(Orthanc::DicomMap& target, |
a4d0b6c82b29
using Orthanc::DicomMap instead of OrthancPlugins::DicomDatasetReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
113
diff
changeset
|
73 const OrthancPlugins::IDicomDataset& source); |
0 | 74 } |
75 } |