Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Scene2D/OsiriXLayerFactory.h @ 1615:f5d4bd7b5593
new class: OsiriXLayerFactory
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 30 Oct 2020 17:26:44 +0100 |
parents | |
children | 9ac2a65d4172 |
comparison
equal
deleted
inserted
replaced
1614:ad9b425f27ae | 1615:f5d4bd7b5593 |
---|---|
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-2020 Osimis S.A., Belgium | |
6 * | |
7 * This program is free software: you can redistribute it and/or | |
8 * modify it under the terms of the GNU Lesser 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 * Lesser General Public License for more details. | |
16 * | |
17 * You should have received a copy of the GNU Lesser General Public | |
18 * License along with this program. If not, see | |
19 * <http://www.gnu.org/licenses/>. | |
20 **/ | |
21 | |
22 | |
23 #pragma once | |
24 | |
25 #include "../Toolbox/CoordinateSystem3D.h" | |
26 #include "../Toolbox/OsiriX/Annotation.h" | |
27 #include "Color.h" | |
28 #include "ISceneLayer.h" | |
29 | |
30 namespace OrthancStone | |
31 { | |
32 class OsiriXLayerFactory : public boost::noncopyable | |
33 { | |
34 private: | |
35 Color color_; | |
36 double thickness_; | |
37 double arrowLength_; | |
38 double arrowAngle_; | |
39 size_t fontIndex_; | |
40 | |
41 public: | |
42 OsiriXLayerFactory(); | |
43 | |
44 void SetColor(const Color& color) | |
45 { | |
46 color_ = color; | |
47 } | |
48 | |
49 void SetColor(uint8_t red, | |
50 uint8_t green, | |
51 uint8_t blue) | |
52 { | |
53 color_ = Color(red, green, blue); | |
54 } | |
55 | |
56 const Color& GetColor() const | |
57 { | |
58 return color_; | |
59 } | |
60 | |
61 void SetThickness(double thickness) | |
62 { | |
63 thickness_ = thickness; | |
64 } | |
65 | |
66 double GetThickness() const | |
67 { | |
68 return thickness_; | |
69 } | |
70 | |
71 void SetArrowLength(double arrowLength) | |
72 { | |
73 arrowLength_ = arrowLength; | |
74 } | |
75 | |
76 double GetArrowLength() const | |
77 { | |
78 return arrowLength_; | |
79 } | |
80 | |
81 void SetArrowAngle(double arrowAngle) | |
82 { | |
83 arrowAngle_ = arrowAngle; | |
84 } | |
85 | |
86 double GetArrowAngle() const | |
87 { | |
88 return arrowAngle_; | |
89 } | |
90 | |
91 void SetFontIndex(double fontIndex) | |
92 { | |
93 fontIndex_ = fontIndex; | |
94 } | |
95 | |
96 double GetFontIndex() const | |
97 { | |
98 return fontIndex_; | |
99 } | |
100 | |
101 ISceneLayer* Create(const OsiriX::Annotation& annotation, | |
102 const CoordinateSystem3D& plane) const; | |
103 }; | |
104 } |