Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/StoneEnumerations.h @ 1512:244ad1e4e76a
reorganization of folders
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 07 Jul 2020 16:21:02 +0200 |
parents | Framework/StoneEnumerations.h@28c64c246312 |
children | cf652990abb1 |
comparison
equal
deleted
inserted
replaced
1511:9dfeee74c1e6 | 1512:244ad1e4e76a |
---|---|
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 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 "OrthancFramework.h" | |
25 | |
26 #include <string> | |
27 | |
28 | |
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, | |
49 MouseButton_Middle, | |
50 MouseButton_None // For instance, because of touch event | |
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, | |
69 ImageInterpolation_Bilinear, | |
70 ImageInterpolation_Trilinear | |
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 }; | |
80 | |
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/ | |
86 KeyboardKeys_Backspace = 8, | |
87 KeyboardKeys_Left = 37, | |
88 KeyboardKeys_Up = 38, | |
89 KeyboardKeys_Right = 39, | |
90 KeyboardKeys_Down = 40, | |
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, | |
105 }; | |
106 | |
107 enum SopClassUid | |
108 { | |
109 SopClassUid_Other, | |
110 SopClassUid_RTDose | |
111 }; | |
112 | |
113 enum BitmapAnchor | |
114 { | |
115 BitmapAnchor_BottomLeft, | |
116 BitmapAnchor_BottomCenter, | |
117 BitmapAnchor_BottomRight, | |
118 BitmapAnchor_CenterLeft, | |
119 BitmapAnchor_Center, | |
120 BitmapAnchor_CenterRight, | |
121 BitmapAnchor_TopLeft, | |
122 BitmapAnchor_TopCenter, | |
123 BitmapAnchor_TopRight | |
124 }; | |
125 | |
126 enum SliceAction | |
127 { | |
128 SliceAction_FastPlus, | |
129 SliceAction_Plus, | |
130 SliceAction_None, | |
131 SliceAction_Minus, | |
132 SliceAction_FastMinus | |
133 }; | |
134 | |
135 SopClassUid StringToSopClassUid(const std::string& source); | |
136 | |
137 void ComputeWindowing(float& targetCenter, | |
138 float& targetWidth, | |
139 ImageWindowing windowing, | |
140 float customCenter, | |
141 float customWidth); | |
142 | |
143 void ComputeAnchorTranslation(double& deltaX /* out */, | |
144 double& deltaY /* out */, | |
145 BitmapAnchor anchor, | |
146 unsigned int bitmapWidth, | |
147 unsigned int bitmapHeight, | |
148 unsigned int border = 0); | |
149 } |