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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
88
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
1 /**
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
2 * Stone of Orthanc
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
6 *
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
10 * the License, or (at your option) any later version.
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
11 *
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
15 * Affero General Public License for more details.
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
16 *
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
19 **/
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
20
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
21
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
22 #pragma once
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
23
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
24 #include "ILayerRenderer.h"
99
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
25 #include "../Toolbox/Slice.h"
88
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
28 {
99
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
29 class SliceOutlineRenderer : public ILayerRenderer
88
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
30 {
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
38
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
46 {
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
47 }
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
50 const ViewportGeometry& view);
88
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
51
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
52 virtual void SetLayerStyle(const RenderStyle& style)
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
53 {
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
54 style_ = style;
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
55 }
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
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
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
58 {
119
ba83e38cf3ff rendering of rt-dose
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 110
diff changeset
59 return geometry_;
99
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
60 }
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 88
diff changeset
61
88
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
62 virtual bool IsFullQuality()
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
63 {
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
64 return true;
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
65 }
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
66 };
90bf4116a23c ISlicedVolume
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff changeset
67 }