comparison Framework/Layers/ILayerSource.h @ 65:885932a893de wasm

OrthancFrameLayerSource
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 16 May 2017 22:12:41 +0200
parents
children 298f375dcb68
comparison
equal deleted inserted replaced
64:394e63010e02 65:885932a893de
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 Osimis, 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 "ILayerRenderer.h"
25 #include "../Toolbox/SliceGeometry.h"
26
27 namespace OrthancStone
28 {
29 class ILayerSource : public boost::noncopyable
30 {
31 public:
32 class IObserver : public boost::noncopyable
33 {
34 public:
35 virtual ~IObserver()
36 {
37 }
38
39 // Triggered if the extent or the content of the volume has changed
40 virtual void NotifySourceChange(ILayerSource& source) = 0;
41
42 // Triggered if some slice in the source volume has changed
43 virtual void NotifySliceChange(ILayerSource& source,
44 const SliceGeometry& slice) = 0;
45
46 // The layer must be deleted by the observer. "layer" will never
47 // be "NULL", otherwise "NotifyLayerError()" would have been
48 // called.
49 virtual void NotifyLayerReady(ILayerRenderer *layer,
50 ILayerSource& source,
51 const SliceGeometry& viewportSlice) = 0;
52
53 virtual void NotifyLayerError(ILayerSource& source,
54 const SliceGeometry& viewportSlice) = 0;
55 };
56
57 virtual ~ILayerSource()
58 {
59 }
60
61 virtual void SetObserver(IObserver& observer) = 0;
62
63 virtual bool GetExtent(double& x1,
64 double& y1,
65 double& x2,
66 double& y2,
67 const SliceGeometry& viewportSlice) = 0;
68
69 virtual void ScheduleLayerCreation(const SliceGeometry& viewportSlice) = 0;
70 };
71 }