Mercurial > hg > orthanc-stone
annotate OrthancStone/Sources/StoneEnumerations.h @ 1574:fb5e620430ae
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 21 Sep 2020 18:29:53 +0200 |
parents | cf652990abb1 |
children | c476b0d5e59c |
rev | line source |
---|---|
0 | 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:
1256
diff
changeset
|
5 * Copyright (C) 2017-2020 Osimis S.A., Belgium |
0 | 6 * |
7 * This program is free software: you can redistribute it and/or | |
47 | 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. | |
0 | 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 | |
47 | 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 | |
0 | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | |
20 | |
21 | |
22 #pragma once | |
23 | |
1471
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1279
diff
changeset
|
24 #include "OrthancFramework.h" |
28c64c246312
working on a shared library
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1279
diff
changeset
|
25 |
117
42c05a3baee3
loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
93
diff
changeset
|
26 #include <string> |
42c05a3baee3
loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
93
diff
changeset
|
27 |
739
be9c1530d40a
deprecating enum SliceImageQuality
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
643
diff
changeset
|
28 |
0 | 29 namespace OrthancStone |
30 { | |
31 enum SliceOffsetMode | |
32 { | |
33 SliceOffsetMode_Absolute, | |
34 SliceOffsetMode_Relative, | |
35 SliceOffsetMode_Loop | |
36 }; | |
37 | |
38 enum ImageWindowing | |
39 { | |
40 ImageWindowing_Bone, | |
41 ImageWindowing_Lung, | |
42 ImageWindowing_Custom | |
43 }; | |
44 | |
45 enum MouseButton | |
46 { | |
47 MouseButton_Left, | |
48 MouseButton_Right, | |
1208
00e6bff9ea39
handling of mouse interactions in ViewportController
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1200
diff
changeset
|
49 MouseButton_Middle, |
00e6bff9ea39
handling of mouse interactions in ViewportController
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1200
diff
changeset
|
50 MouseButton_None // For instance, because of touch event |
0 | 51 }; |
52 | |
53 enum MouseWheelDirection | |
54 { | |
55 MouseWheelDirection_Up, | |
56 MouseWheelDirection_Down | |
57 }; | |
58 | |
59 enum VolumeProjection | |
60 { | |
61 VolumeProjection_Axial, | |
62 VolumeProjection_Coronal, | |
63 VolumeProjection_Sagittal | |
64 }; | |
65 | |
66 enum ImageInterpolation | |
67 { | |
68 ImageInterpolation_Nearest, | |
141
88bca952cb17
ImageBuffer3D::GetPixelGrayscale8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
69 ImageInterpolation_Bilinear, |
88bca952cb17
ImageBuffer3D::GetPixelGrayscale8
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
135
diff
changeset
|
70 ImageInterpolation_Trilinear |
0 | 71 }; |
72 | |
73 enum KeyboardModifiers | |
74 { | |
75 KeyboardModifiers_None = 0, | |
76 KeyboardModifiers_Shift = (1 << 0), | |
77 KeyboardModifiers_Control = (1 << 1), | |
78 KeyboardModifiers_Alt = (1 << 2) | |
79 }; | |
93
5945e81734a3
decoding of JPEG images
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
47
diff
changeset
|
80 |
327 | 81 enum KeyboardKeys |
82 { | |
83 KeyboardKeys_Generic = 0, | |
84 | |
85 // let's use the same ids as in javascript to avoid some conversion in WASM: https://css-tricks.com/snippets/javascript/javascript-keycodes/ | |
1199
922d2e61aa5d
RadiograpyScene: can now remove any layer + new key wrappers for Delete/Backspace
Alain Mazy <alain@mazy.be>
parents:
739
diff
changeset
|
86 KeyboardKeys_Backspace = 8, |
327 | 87 KeyboardKeys_Left = 37, |
88 KeyboardKeys_Up = 38, | |
89 KeyboardKeys_Right = 39, | |
1199
922d2e61aa5d
RadiograpyScene: can now remove any layer + new key wrappers for Delete/Backspace
Alain Mazy <alain@mazy.be>
parents:
739
diff
changeset
|
90 KeyboardKeys_Down = 40, |
1256 | 91 KeyboardKeys_Delete = 46, |
92 | |
93 KeyboardKeys_F1 = 112, | |
94 KeyboardKeys_F2 = 113, | |
95 KeyboardKeys_F3 = 114, | |
96 KeyboardKeys_F4 = 115, | |
97 KeyboardKeys_F5 = 116, | |
98 KeyboardKeys_F6 = 117, | |
99 KeyboardKeys_F7 = 118, | |
100 KeyboardKeys_F8 = 119, | |
101 KeyboardKeys_F9 = 120, | |
102 KeyboardKeys_F10 = 121, | |
103 KeyboardKeys_F11 = 122, | |
104 KeyboardKeys_F12 = 123, | |
327 | 105 }; |
106 | |
117
42c05a3baee3
loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
93
diff
changeset
|
107 enum SopClassUid |
42c05a3baee3
loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
93
diff
changeset
|
108 { |
625
2eeb5857eb43
DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
589
diff
changeset
|
109 SopClassUid_Other, |
117
42c05a3baee3
loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
93
diff
changeset
|
110 SopClassUid_RTDose |
42c05a3baee3
loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
93
diff
changeset
|
111 }; |
42c05a3baee3
loading multi-frame instances as 3D volumes
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
93
diff
changeset
|
112 |
366
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
113 enum BitmapAnchor |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
114 { |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
115 BitmapAnchor_BottomLeft, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
116 BitmapAnchor_BottomCenter, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
117 BitmapAnchor_BottomRight, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
118 BitmapAnchor_CenterLeft, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
119 BitmapAnchor_Center, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
120 BitmapAnchor_CenterRight, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
121 BitmapAnchor_TopLeft, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
122 BitmapAnchor_TopCenter, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
123 BitmapAnchor_TopRight |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
124 }; |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
125 |
1188 | 126 enum SliceAction |
127 { | |
128 SliceAction_FastPlus, | |
129 SliceAction_Plus, | |
130 SliceAction_None, | |
131 SliceAction_Minus, | |
132 SliceAction_FastMinus | |
133 }; | |
134 | |
1561
cf652990abb1
tunable mouse actions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
135 enum MouseAction |
cf652990abb1
tunable mouse actions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
136 { |
cf652990abb1
tunable mouse actions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
137 MouseAction_Pan, |
cf652990abb1
tunable mouse actions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
138 MouseAction_Zoom, |
cf652990abb1
tunable mouse actions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
139 MouseAction_Rotate, |
cf652990abb1
tunable mouse actions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
140 MouseAction_GrayscaleWindowing |
cf652990abb1
tunable mouse actions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
141 }; |
cf652990abb1
tunable mouse actions
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1512
diff
changeset
|
142 |
625
2eeb5857eb43
DicomInstanceParameters
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
589
diff
changeset
|
143 SopClassUid StringToSopClassUid(const std::string& source); |
142
f19194a11c1d
ComputeWindowing in Enumerations.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
141
diff
changeset
|
144 |
f19194a11c1d
ComputeWindowing in Enumerations.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
141
diff
changeset
|
145 void ComputeWindowing(float& targetCenter, |
f19194a11c1d
ComputeWindowing in Enumerations.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
141
diff
changeset
|
146 float& targetWidth, |
f19194a11c1d
ComputeWindowing in Enumerations.h
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
141
diff
changeset
|
147 ImageWindowing windowing, |
589
3080ec4ec6b9
removed enum value: ImageWindowing_Default
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
561
diff
changeset
|
148 float customCenter, |
3080ec4ec6b9
removed enum value: ImageWindowing_Default
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
561
diff
changeset
|
149 float customWidth); |
366
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
150 |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
151 void ComputeAnchorTranslation(double& deltaX /* out */, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
152 double& deltaY /* out */, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
153 BitmapAnchor anchor, |
a7de01c8fd29
new enum BitmapAnchor
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
327
diff
changeset
|
154 unsigned int bitmapWidth, |
557
77a21b28becd
new argument in ComputeAnchorTranslation: border
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
155 unsigned int bitmapHeight, |
77a21b28becd
new argument in ComputeAnchorTranslation: border
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
440
diff
changeset
|
156 unsigned int border = 0); |
0 | 157 } |