annotate Applications/Samples/CtPetDoseStructFusion/ThumbnailInteractor.cpp @ 540:7428c5dfa5df ct-pet-dose-struct

Initial commit non working app
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 19 Mar 2019 16:29:07 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
540
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
1 /**
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
2 * Stone of Orthanc
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
5 * Copyright (C) 2017-2019 Osimis S.A., Belgium
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
6 *
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
10 * the License, or (at your option) any later version.
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
11 *
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
15 * Affero General Public License for more details.
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
16 *
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
19 **/
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
20
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
21 #include "ThumbnailInteractor.h"
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
22
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
23 #include "CtPetDoseStructFusionApplication.h"
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25 namespace CtPetDoseStructFusion {
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
26
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
27 IWorldSceneMouseTracker* ThumbnailInteractor::CreateMouseTracker(WorldSceneWidget& widget,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
28 const ViewportGeometry& view,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
29 MouseButton button,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
30 KeyboardModifiers modifiers,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
31 int viewportX,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
32 int viewportY,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
33 double x,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
34 double y,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
35 IStatusBar* statusBar,
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
36 const std::vector<Touch>& displayTouches)
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
37 {
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
38 if (button == MouseButton_Left)
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
39 {
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
40 statusBar->SetMessage("selected thumbnail " + widget.GetName());
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
41 std::string seriesId = widget.GetName().substr(strlen("thumbnail-series-"));
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
42 application_.SelectSeriesInMainViewport(seriesId);
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
43 }
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
44 return NULL;
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
45 }
7428c5dfa5df Initial commit non working app
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
46 }