Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/Deprecated/Layers/SliceOutlineRenderer.h @ 1513:24068dd8c445
fix path
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Jul 2020 16:28:52 +0200 |
parents | 244ad1e4e76a |
children |
rev | line source |
---|---|
88 | 1 /** |
2 * Stone of Orthanc | |
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics | |
4 * Department, University Hospital of Liege, Belgium | |
1270
2d8ab34c8c91
upgrade to year 2020
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
732
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
88 | 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" | |
99 | 25 #include "../Toolbox/Slice.h" |
88 | 26 |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
27 namespace Deprecated |
88 | 28 { |
99 | 29 class SliceOutlineRenderer : public ILayerRenderer |
88 | 30 { |
31 private: | |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
32 OrthancStone::CoordinateSystem3D geometry_; |
119
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
33 double pixelSpacingX_; |
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
34 double pixelSpacingY_; |
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
35 unsigned int width_; |
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
36 unsigned int height_; |
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
37 RenderStyle style_; |
88 | 38 |
39 public: | |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
40 SliceOutlineRenderer(const Slice& slice) : |
119
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
41 geometry_(slice.GetGeometry()), |
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
42 pixelSpacingX_(slice.GetPixelSpacingX()), |
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
43 pixelSpacingY_(slice.GetPixelSpacingY()), |
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
44 width_(slice.GetWidth()), |
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
45 height_(slice.GetHeight()) |
88 | 46 { |
47 } | |
48 | |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
49 virtual bool RenderLayer(OrthancStone::CairoContext& context, |
99 | 50 const ViewportGeometry& view); |
88 | 51 |
52 virtual void SetLayerStyle(const RenderStyle& style) | |
53 { | |
54 style_ = style; | |
55 } | |
56 | |
726
4f2416d519b4
moving layers, widgets and loaders to Deprecated namespace
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
714
diff
changeset
|
57 virtual const OrthancStone::CoordinateSystem3D& GetLayerSlice() |
99 | 58 { |
119
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
59 return geometry_; |
99 | 60 } |
61 | |
88 | 62 virtual bool IsFullQuality() |
63 { | |
64 return true; | |
65 } | |
66 }; | |
67 } |