Mercurial > hg > orthanc-stone
annotate Framework/Deprecated/Toolbox/MessagingToolbox.h @ 959:13e078adfb94 toa2019082301
Better error log in fetch failure callback +
timeout 600sec in OrthancRestApiCommand +
guard against dead controller access in PanSceneTracker +
relaxed DicomStructureSet AddReferenceSlice method to accept extraneous adds
of the same slice (while trying to understand how it happens in the first place)
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Fri, 23 Aug 2019 14:16:45 +0200 |
parents | 4fe4b221a31f |
children | 2d8ab34c8c91 |
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 | |
792
4fe4b221a31f
deprecating MessagingToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
439
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 | |
792
4fe4b221a31f
deprecating MessagingToolbox
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
439
diff
changeset
|
33 namespace Deprecated |
0 | 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 } |