annotate Framework/Toolbox/OrthancSlicesLoader.h @ 254:abc1c6231947 am-2

cleanup
author am@osimis.io
date Tue, 03 Jul 2018 11:49:02 +0200
parents 40b21c1f8b8d
children 9afafb192180
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
135
e2fe9352f240 upgrade to year 2018
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 120
diff changeset
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "IWebService.h"
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
25 #include "SlicesSorter.h"
194
7a031ac16b2d rename Enumerations.h to StoneEnumerations.h to avoid clashes with Orthanc
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 135
diff changeset
26 #include "../StoneEnumerations.h"
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
27
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 #include <boost/shared_ptr.hpp>
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
29
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 namespace OrthancStone
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
31 {
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
32 class OrthancSlicesLoader : public boost::noncopyable
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
33 {
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
34 public:
252
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
35 struct SliceImageReadyMessage : public IMessage
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
36 {
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
37 unsigned int sliceIndex_;
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
38 const Slice& slice_;
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
39 std::auto_ptr<Orthanc::ImageAccessor>& image_;
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
40 SliceImageQuality effectiveQuality_;
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
41
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
42 SliceImageReadyMessage(unsigned int sliceIndex,
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
43 const Slice& slice,
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
44 std::auto_ptr<Orthanc::ImageAccessor>& image,
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
45 SliceImageQuality effectiveQuality)
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
46 : IMessage(MessageType_SliceImageReady),
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
47 sliceIndex_(sliceIndex),
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
48 slice_(slice),
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
49 image_(image),
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
50 effectiveQuality_(effectiveQuality)
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
51 {
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
52 }
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
53 };
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
54
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
55 struct SliceImageErrorMessage : public IMessage
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
56 {
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
57 const Slice& slice_;
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
58 unsigned int sliceIndex_;
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
59 SliceImageQuality effectiveQuality_;
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
60
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
61 SliceImageErrorMessage(unsigned int sliceIndex,
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
62 const Slice& slice,
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
63 SliceImageQuality effectiveQuality)
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
64 : IMessage(MessageType_SliceImageError),
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
65 slice_(slice),
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
66 sliceIndex_(sliceIndex),
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
67 effectiveQuality_(effectiveQuality)
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
68 {
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
69 }
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
70 };
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
71
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
72 public:
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
73 class ISliceLoaderObserver : public IObserver
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
74 {
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
75 public:
252
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
76
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
77 ISliceLoaderObserver(MessageBroker& broker)
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
78 : IObserver(broker)
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
79 {
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
80 }
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
81
252
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
82 virtual ~ISliceLoaderObserver()
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
83 {
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
84 }
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
85
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
86 virtual void HandleMessage(IObservable& from, const IMessage& message);
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
87
252
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
88 virtual void OnSliceGeometryReady(const OrthancSlicesLoader& loader) = 0;
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
89
252
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
90 virtual void OnSliceGeometryError(const OrthancSlicesLoader& loader) = 0;
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
91
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
92 virtual void OnSliceImageReady(const OrthancSlicesLoader& loader,
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
93 unsigned int sliceIndex,
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
94 const Slice& slice,
99
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 93
diff changeset
95 std::auto_ptr<Orthanc::ImageAccessor>& image,
117
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
96 SliceImageQuality effectiveQuality) = 0;
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
97
252
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
98 virtual void OnSliceImageError(const OrthancSlicesLoader& loader,
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
99 unsigned int sliceIndex,
93
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
100 const Slice& slice,
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
101 SliceImageQuality quality) = 0;
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
102 };
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
103
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
104 private:
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
105 enum State
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
106 {
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
107 State_Error,
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
108 State_Initialization,
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
109 State_LoadingGeometry,
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
110 State_GeometryReady
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
111 };
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
112
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
113 enum Mode
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
114 {
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
115 Mode_SeriesGeometry,
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
116 Mode_InstanceGeometry,
117
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
117 Mode_FrameGeometry,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
118 Mode_LoadImage,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
119 Mode_LoadRawImage
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
120 };
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
121
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
122 class Operation;
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
123 class WebCallback;
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
124
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
125 boost::shared_ptr<WebCallback> webCallback_; // This is a PImpl pattern
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
126
252
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
127 ISliceLoaderObserver& userCallback_;
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
128 IWebService& orthanc_;
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
129 State state_;
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
130 SlicesSorter slices_;
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
131
93
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
132 void NotifySliceImageSuccess(const Operation& operation,
99
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 93
diff changeset
133 std::auto_ptr<Orthanc::ImageAccessor>& image) const;
93
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
134
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
135 void NotifySliceImageError(const Operation& operation) const;
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
136
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
137 void ParseSeriesGeometry(const void* answer,
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
138 size_t size);
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
139
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
140 void ParseInstanceGeometry(const std::string& instanceId,
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
141 const void* answer,
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
142 size_t size);
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
143
117
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
144 void ParseFrameGeometry(const std::string& instanceId,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
145 unsigned int frame,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
146 const void* answer,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
147 size_t size);
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
148
93
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
149 void ParseSliceImagePng(const Operation& operation,
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
150 const void* answer,
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
151 size_t size);
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
152
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
153 void ParseSliceImageJpeg(const Operation& operation,
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
154 const void* answer,
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
155 size_t size);
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
156
117
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
157 void ParseSliceRawImage(const Operation& operation,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
158 const void* answer,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
159 size_t size);
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
160
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
161 void ScheduleSliceImagePng(const Slice& slice,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
162 size_t index);
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
163
117
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
164 void ScheduleSliceImageJpeg(const Slice& slice,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
165 size_t index,
93
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
166 SliceImageQuality quality);
120
063f7f3d9f14 fix 3d locations of the doses
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 117
diff changeset
167
063f7f3d9f14 fix 3d locations of the doses
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 117
diff changeset
168 void SortAndFinalizeSlices();
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
169
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
170 public:
251
192e6e349e69 first usage of new message system (in SDL only)
am@osimis.io
parents: 194
diff changeset
171 OrthancSlicesLoader(MessageBroker& broker,
252
40b21c1f8b8d more usage of IObservable/IObserver
am@osimis.io
parents: 251
diff changeset
172 ISliceLoaderObserver& callback,
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
173 IWebService& orthanc);
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
174
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
175 void ScheduleLoadSeries(const std::string& seriesId);
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
176
117
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
177 void ScheduleLoadInstance(const std::string& instanceId);
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
178
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
179 void ScheduleLoadFrame(const std::string& instanceId,
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
180 unsigned int frame);
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
181
77
f5f54ed8d307 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
182 bool IsGeometryReady() const;
f5f54ed8d307 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
183
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
184 size_t GetSliceCount() const;
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
185
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
186 const Slice& GetSlice(size_t index) const;
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
187
77
f5f54ed8d307 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
188 bool LookupSlice(size_t& index,
110
53025eecbc95 renamed SliceGeometry as CoordinateSystem3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 99
diff changeset
189 const CoordinateSystem3D& plane) const;
77
f5f54ed8d307 refactoring
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 73
diff changeset
190
93
5945e81734a3 decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 77
diff changeset
191 void ScheduleLoadSliceImage(size_t index,
117
42c05a3baee3 loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
192 SliceImageQuality requestedQuality);
73
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
193 };
ffa6dded91bd reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
194 }