Mercurial > hg > orthanc-stone
annotate Framework/Layers/SliceOutlineRenderer.h @ 540:7428c5dfa5df ct-pet-dose-struct
Initial commit non working app
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Tue, 19 Mar 2019 16:29:07 +0100 |
parents | b70e9be013e4 |
children | d2c0e347ddc2 |
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 | |
439 | 5 * Copyright (C) 2017-2019 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 |
27 namespace OrthancStone | |
28 { | |
99 | 29 class SliceOutlineRenderer : public ILayerRenderer |
88 | 30 { |
31 private: | |
119
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
32 CoordinateSystem3D geometry_; |
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: | |
119
ba83e38cf3ff
rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
110
diff
changeset
|
40 SliceOutlineRenderer(const Slice& slice) : |
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 | |
49 virtual bool RenderLayer(CairoContext& context, | |
99 | 50 const ViewportGeometry& view); |
88 | 51 |
52 virtual void SetLayerStyle(const RenderStyle& style) | |
53 { | |
54 style_ = style; | |
55 } | |
56 | |
110
53025eecbc95
renamed SliceGeometry as CoordinateSystem3D
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
99
diff
changeset
|
57 virtual const 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 } |