Mercurial > hg > orthanc-stone
comparison Framework/Layers/OrthancFrameLayerSource.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 "LayerSourceBase.h" | |
25 #include "../Toolbox/IWebService.h" | |
26 #include "../../Resources/Orthanc/Plugins/Samples/Common/FullOrthancDataset.h" | |
27 | |
28 namespace OrthancStone | |
29 { | |
30 class OrthancFrameLayerSource : | |
31 public LayerSourceBase, | |
32 public IWebService::ICallback | |
33 { | |
34 private: | |
35 enum Content | |
36 { | |
37 Content_Tags, | |
38 Content_Frame | |
39 }; | |
40 | |
41 class Operation; | |
42 | |
43 IWebService& orthanc_; | |
44 std::string instanceId_; | |
45 unsigned int frame_; | |
46 std::auto_ptr<OrthancPlugins::FullOrthancDataset> dataset_; | |
47 Orthanc::PixelFormat format_; | |
48 | |
49 public: | |
50 OrthancFrameLayerSource(IWebService& orthanc, | |
51 const std::string& instanceId, | |
52 unsigned int frame); | |
53 | |
54 virtual void SetObserver(IObserver& observer); | |
55 | |
56 virtual void NotifyError(const std::string& uri, | |
57 Orthanc::IDynamicObject* payload); | |
58 | |
59 virtual void NotifySuccess(const std::string& uri, | |
60 const void* answer, | |
61 size_t answerSize, | |
62 Orthanc::IDynamicObject* payload); | |
63 | |
64 virtual bool GetExtent(double& x1, | |
65 double& y1, | |
66 double& x2, | |
67 double& y2, | |
68 const SliceGeometry& viewportSlice /* ignored */); | |
69 | |
70 virtual void ScheduleLayerCreation(const SliceGeometry& viewportSlice); | |
71 }; | |
72 } |