annotate OrthancStone/Sources/Scene2DViewport/EditAngleMeasureTracker.h @ 2124:16c01cc201e7

updated copyright, as Osimis is not active on Orthanc anymore
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 May 2024 17:00:29 +0200
parents c23eef785569
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
866
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
1 /**
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
2 * Stone of Orthanc
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
2124
16c01cc201e7 updated copyright, as Osimis is not active on Orthanc anymore
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2114
diff changeset
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
2114
c23eef785569 update year to 2024
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 2077
diff changeset
6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
866
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
7 *
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
9 * modify it under the terms of the GNU Lesser General Public License
866
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
10 * as published by the Free Software Foundation, either version 3 of
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
11 * the License, or (at your option) any later version.
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
12 *
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
16 * Lesser General Public License for more details.
866
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
17 *
1598
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
19 * License along with this program. If not, see
8563ea5d8ae4 relicensing some files, cf. osimis bm26 and chu agreement on 2020-05-20
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
20 * <http://www.gnu.org/licenses/>.
866
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
21 **/
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
22
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
23 #pragma once
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25 #include "MeasureTrackers.h"
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
26
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
27 namespace OrthancStone
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
28 {
1020
ac88989817e3 TrackerCommand --> MeasureCommand + fuse against exception in MeasureTool dtor
Benjamin Golinvaux <bgo@osimis.io>
parents: 866
diff changeset
29 class EditAngleMeasureCommand;
ac88989817e3 TrackerCommand --> MeasureCommand + fuse against exception in MeasureTool dtor
Benjamin Golinvaux <bgo@osimis.io>
parents: 866
diff changeset
30
866
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
31 class EditAngleMeasureTracker : public EditMeasureTracker
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
32 {
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
33 public:
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
34 /**
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
35 When you create this tracker, you need to supply it with the undo stack
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
36 where it will store the commands that perform the actual measure tool
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
37 creation and modification.
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
38 In turn, a container for these commands to store the actual measuring
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
39 must be supplied, too
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
40 */
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
41 EditAngleMeasureTracker(
1059
e713f1a99861 replacing MessageBroker by weak_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1020
diff changeset
42 boost::shared_ptr<MeasureTool> measureTool,
1606
874e178f34e9 - ViewportController now has weak ptr to Viewport
Benjamin Golinvaux <bgo@osimis.io>
parents: 1598
diff changeset
43 boost::weak_ptr<IViewport> viewport,
866
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
44 const PointerEvent& e);
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
45
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
46 ~EditAngleMeasureTracker();
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
47
1972
9c0adcc8feec refactoring to simplify OneGesturePointerTracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
48 virtual void PointerMove(const PointerEvent& e,
9c0adcc8feec refactoring to simplify OneGesturePointerTracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
49 const Scene2D& scene) ORTHANC_OVERRIDE;
9c0adcc8feec refactoring to simplify OneGesturePointerTracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
50
9c0adcc8feec refactoring to simplify OneGesturePointerTracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
51 virtual void PointerUp(const PointerEvent& e,
9c0adcc8feec refactoring to simplify OneGesturePointerTracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
52 const Scene2D& scene) ORTHANC_OVERRIDE;
9c0adcc8feec refactoring to simplify OneGesturePointerTracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
53
9c0adcc8feec refactoring to simplify OneGesturePointerTracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
54 virtual void PointerDown(const PointerEvent& e,
9c0adcc8feec refactoring to simplify OneGesturePointerTracker
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
55 const Scene2D& scene) ORTHANC_OVERRIDE;
866
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
56
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
57 private:
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
58 AngleMeasureTool::AngleHighlightArea modifiedZone_;
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
59
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
60 boost::shared_ptr<EditAngleMeasureCommand> GetCommand();
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
61 };
c71ef52602a0 Added the ability to edit existing measuring tools (demo not updated yet)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
62 }