Mercurial > hg > orthanc-stone
annotate Framework/Toolbox/MessagingToolbox.h @ 371:fe4befe03935
integration legacy->default
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 05 Nov 2018 10:04:56 +0100 |
parents | 5412adf19980 |
children | 14ef1227120f |
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 | |
134
4cff7b1ed31d
upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
47
diff
changeset
|
5 * Copyright (C) 2017-2018 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. | |
16 * | |
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 |
41 void RestApiGet(Json::Value& target, | |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
42 OrthancPlugins::IOrthancConnection& orthanc, |
0 | 43 const std::string& uri); |
44 | |
34 | 45 void RestApiPost(Json::Value& target, |
46 OrthancPlugins::IOrthancConnection& orthanc, | |
47 const std::string& uri, | |
48 const std::string& body); | |
49 | |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
50 bool HasWebViewerInstalled(OrthancPlugins::IOrthancConnection& orthanc); |
0 | 51 |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
52 bool CheckOrthancVersion(OrthancPlugins::IOrthancConnection& orthanc); |
0 | 53 |
54 // This downloads the image from Orthanc and keeps its pixel | |
55 // format unchanged (will be either Grayscale8, Grayscale16, | |
56 // SignedGrayscale16, or RGB24) | |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
57 Orthanc::ImageAccessor* DecodeFrame(OrthancPlugins::IOrthancConnection& orthanc, |
0 | 58 const std::string& instance, |
59 unsigned int frame, | |
60 Orthanc::PixelFormat targetFormat); | |
61 | |
31
9aace933cb64
sharing code with the Orthanc core
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
16
diff
changeset
|
62 Orthanc::ImageAccessor* DecodeJpegFrame(OrthancPlugins::IOrthancConnection& orthanc, |
0 | 63 const std::string& instance, |
64 unsigned int frame, | |
65 unsigned int quality, | |
66 Orthanc::PixelFormat targetFormat); | |
118
a4d0b6c82b29
using Orthanc::DicomMap instead of OrthancPlugins::DicomDatasetReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
113
diff
changeset
|
67 |
a4d0b6c82b29
using Orthanc::DicomMap instead of OrthancPlugins::DicomDatasetReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
113
diff
changeset
|
68 void ConvertDataset(Orthanc::DicomMap& target, |
a4d0b6c82b29
using Orthanc::DicomMap instead of OrthancPlugins::DicomDatasetReader
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
113
diff
changeset
|
69 const OrthancPlugins::IDicomDataset& source); |
0 | 70 } |
71 } |