Mercurial > hg > orthanc-stone
annotate Framework/Radiography/RadiographyLayerMaskTracker.h @ 670:5dd496343fad
Restored missing code + fixed key ordering when generating code
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 15 May 2019 18:29:42 +0200 |
parents | 2f6ecb5037ea |
children | 4f2416d519b4 |
rev | line source |
---|---|
480
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
1 /** |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
2 * Stone of Orthanc |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
4 * Department, University Hospital of Liege, Belgium |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
6 * |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
7 * This program is free software: you can redistribute it and/or |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
8 * modify it under the terms of the GNU Affero General Public License |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
9 * as published by the Free Software Foundation, either version 3 of |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
10 * the License, or (at your option) any later version. |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
11 * |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
12 * This program is distributed in the hope that it will be useful, but |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
13 * WITHOUT ANY WARRANTY; without even the implied warranty of |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
15 * Affero General Public License for more details. |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
16 * |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
17 * You should have received a copy of the GNU Affero General Public License |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
19 **/ |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
20 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
21 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
22 #pragma once |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
23 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
24 #include "../Toolbox/UndoRedoStack.h" |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
25 #include "../Toolbox/ViewportGeometry.h" |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
26 #include "../Widgets/IWorldSceneMouseTracker.h" |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
27 #include "RadiographyScene.h" |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
28 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
29 namespace OrthancStone |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
30 { |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
31 class RadiographyLayerMaskTracker : public IWorldSceneMouseTracker |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
32 { |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
33 private: |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
34 class UndoRedoCommand; |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
35 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
36 UndoRedoStack& undoRedoStack_; |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
37 RadiographyScene::LayerAccessor accessor_; |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
38 ControlPoint startSceneCp_; |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
39 ControlPoint endSceneCp_; |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
40 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
41 public: |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
42 RadiographyLayerMaskTracker(UndoRedoStack& undoRedoStack, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
43 RadiographyScene& scene, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
44 const ViewportGeometry& view, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
45 size_t layer, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
46 const ControlPoint& startSceneControlPoint); |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
47 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
48 virtual bool HasRender() const |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
49 { |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
50 return false; |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
51 } |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
52 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
53 virtual void Render(CairoContext& context, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
54 double zoom); |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
55 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
56 virtual void MouseUp(); |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
57 |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
58 virtual void MouseMove(int displayX, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
59 int displayY, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
60 double sceneX, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
61 double sceneY, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
62 const std::vector<Touch>& displayTouches, |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
63 const std::vector<Touch>& sceneTouches); |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
64 }; |
2f6ecb5037ea
added mouse tracker for Layer Mask. Everything seems ok
am@osimis.io
parents:
diff
changeset
|
65 } |