annotate Applications/Samples/Common/RtViewerApp.cpp @ 1915:0d1235ca4abc

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 20 Mar 2022 18:07:11 +0100
parents c7bc9e1776a6
children 5a434f5889f8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
1 /**
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
2 * Stone of Orthanc
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
1871
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
5 * Copyright (C) 2017-2022 Osimis S.A., Belgium
7053b8a0aaec upgrade to year 2022
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1870
diff changeset
6 * Copyright (C) 2021-2022 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
7 *
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
8 * This program is free software: you can redistribute it and/or
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
9 * modify it under the terms of the GNU Affero General Public License
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
10 * as published by the Free Software Foundation, either version 3 of
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
11 * the License, or (at your option) any later version.
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
12 *
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful, but
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
16 * Affero General Public License for more details.
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
17 *
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
18 * You should have received a copy of the GNU Affero General Public License
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
20 **/
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
21
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
22 // Sample app
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
23 #include "RtViewerApp.h"
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24 #include "RtViewerView.h"
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25 #include "SampleHelpers.h"
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
26
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
27 // Stone of Orthanc
1903
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
28 #include "../../../OrthancStone/Sources/Oracle/GetOrthancWebViewerJpegCommand.h"
1542
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
29 #include "../../../OrthancStone/Sources/Scene2D/CairoCompositor.h"
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
30 #include "../../../OrthancStone/Sources/Scene2D/ColorTextureSceneLayer.h"
1903
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
31 #include "../../../OrthancStone/Sources/Scene2D/GrayscaleStyleConfigurator.h"
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
32 #include "../../../OrthancStone/Sources/Scene2D/LookupTableStyleConfigurator.h"
1542
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
33 #include "../../../OrthancStone/Sources/Scene2D/OpenGLCompositor.h"
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
34 #include "../../../OrthancStone/Sources/Scene2D/PanSceneTracker.h"
1903
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
35 #include "../../../OrthancStone/Sources/Scene2D/RotateSceneTracker.h"
1542
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
36 #include "../../../OrthancStone/Sources/Scene2D/ZoomSceneTracker.h"
1903
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
37 #include "../../../OrthancStone/Sources/Scene2DViewport/CreateAngleMeasureTracker.h"
1542
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
38 #include "../../../OrthancStone/Sources/Scene2DViewport/CreateLineMeasureTracker.h"
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
39 #include "../../../OrthancStone/Sources/Scene2DViewport/IFlexiblePointerTracker.h"
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
40 #include "../../../OrthancStone/Sources/Scene2DViewport/MeasureTool.h"
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
41 #include "../../../OrthancStone/Sources/Scene2DViewport/PredeclaredTypes.h"
1903
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
42 #include "../../../OrthancStone/Sources/Scene2DViewport/UndoStack.h"
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
43 #include "../../../OrthancStone/Sources/StoneException.h"
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
44 #include "../../../OrthancStone/Sources/StoneInitialization.h"
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
45 #include "../../../OrthancStone/Sources/Volumes/DicomVolumeImageMPRSlicer.h"
1542
6e0da8370270 fixing paths
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1538
diff changeset
46 #include "../../../OrthancStone/Sources/Volumes/VolumeSceneLayerSource.h"
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
47
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
48 // Orthanc
1457
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1448
diff changeset
49 #include <Logging.h>
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1448
diff changeset
50 #include <OrthancException.h>
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
51
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
52 // System
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
53 #include <boost/shared_ptr.hpp>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
54 #include <boost/weak_ptr.hpp>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
55 #include <boost/make_shared.hpp>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
56
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
57 #include <stdio.h>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
58
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
59
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
60 namespace OrthancStone
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
61 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
62 void RtViewerApp::InvalidateAllViewports()
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
63 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
64 for (size_t i = 0; i < views_.size(); ++i)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
65 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
66 views_[i]->Invalidate();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
67 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
68 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
69
1896
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
70 VolumeImageGeometry RtViewerApp::GetMainGeometry()
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
71 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
72 ORTHANC_ASSERT(geometryProvider_.get() != NULL);
1896
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
73 if (geometryProvider_->HasGeometry())
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
74 {
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
75 return geometryProvider_->GetImageGeometry();
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
76 }
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
77 else
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
78 {
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
79 return VolumeImageGeometry();
b3c08e607d9f simplified signature of DicomStructureSet::ProjectStructure()
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1871
diff changeset
80 }
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
81 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
82
1573
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1542
diff changeset
83 RtViewerApp::RtViewerApp() :
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1542
diff changeset
84 // Create the volumes that will be filled later on
32e0c007789d cppcheck
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1542
diff changeset
85 ctVolume_(boost::make_shared<DicomVolumeImage>()),
1574
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1573
diff changeset
86 doseVolume_(boost::make_shared<DicomVolumeImage>()),
1903
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
87 undoStack_(new UndoStack),
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
88 isFirstSlice_(true)
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
89 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
90 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
91
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
92 boost::shared_ptr<RtViewerApp> RtViewerApp::Create()
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
93 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
94 boost::shared_ptr<RtViewerApp> thisOne(new RtViewerApp());
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
95 return thisOne;
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
96 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
97
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
98 void RtViewerApp::DisableTracker()
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
99 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
100 if (activeTracker_)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
101 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
102 activeTracker_->Cancel();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
103 activeTracker_.reset();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
104 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
105 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
106
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
107 void RtViewerApp::CreateView(const std::string& canvasId, VolumeProjection projection)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
108 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
109 boost::shared_ptr<RtViewerView>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
110 view(new RtViewerView(shared_from_this(), canvasId, projection));
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
111
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
112 view->RegisterMessages();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
113
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
114 view->CreateLayers(ctLoader_, doseLoader_, doseVolume_, rtstructLoader_);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
115
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
116 views_.push_back(view);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
117 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
118
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
119 void RtViewerApp::CreateLoaders()
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
120 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
121 // the viewport hosts the scene
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
122 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
123 // "true" means use progressive quality (jpeg 50 --> jpeg 90 --> 16-bit raw)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
124 // "false" means only using hi quality
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
125 // TODO: add flag for quality
1525
31b0449a163a JPEG mode re-enabled in MPR RT viewer + some docs
Benjamin Golinvaux <bgo@osimis.io>
parents: 1523
diff changeset
126 ctLoader_ = OrthancSeriesVolumeProgressiveLoader::Create(*loadersContext_, ctVolume_, true);
1448
dad6a2fe6fc7 Added setters to control relative priority of CT series loader requests.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1427
diff changeset
127
dad6a2fe6fc7 Added setters to control relative priority of CT series loader requests.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1427
diff changeset
128 // better priority for CT vs dose and struct
dad6a2fe6fc7 Added setters to control relative priority of CT series loader requests.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1427
diff changeset
129 ctLoader_->SetSchedulingPriority(-100);
dad6a2fe6fc7 Added setters to control relative priority of CT series loader requests.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1427
diff changeset
130
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
131
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
132 // we need to store the CT loader to ask from geometry details later on when geometry is loaded
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
133 geometryProvider_ = ctLoader_;
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
134
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
135 doseLoader_ = OrthancMultiframeVolumeLoader::Create(*loadersContext_, doseVolume_);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
136 rtstructLoader_ = DicomStructureSetLoader::Create(*loadersContext_);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
137 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
138
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
139 /**
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
140 Register for notifications issued by the loaders
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
141 */
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
142
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
143 Register<DicomVolumeImage::GeometryReadyMessage>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
144 (*ctLoader_, &RtViewerApp::HandleGeometryReady);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
145
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
146 Register<DicomVolumeImage::ContentUpdatedMessage>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
147 (*ctLoader_, &RtViewerApp::HandleCTContentUpdated);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
148
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
149 Register<DicomVolumeImage::ContentUpdatedMessage>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
150 (*doseLoader_, &RtViewerApp::HandleDoseLoaded);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
151
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
152 Register<DicomStructureSetLoader::StructuresReady>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
153 (*rtstructLoader_, &RtViewerApp::HandleStructuresReady);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
154
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
155 Register<DicomStructureSetLoader::StructuresUpdated>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
156 (*rtstructLoader_, &RtViewerApp::HandleStructuresUpdated);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
157 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
158
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
159 void RtViewerApp::StartLoaders()
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
160 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
161 ORTHANC_ASSERT(HasArgument("ctseries") && HasArgument("rtdose") && HasArgument("rtstruct"));
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
162
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
163 LOG(INFO) << "About to load:";
1522
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
164
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
165 if (GetArgument("ctseries") == "")
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
166 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
167 LOG(INFO) << " CT : <unspecified>";
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
168 }
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
169 else
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
170 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
171 LOG(INFO) << " CT : " << GetArgument("ctseries");
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
172 ctLoader_->LoadSeries(GetArgument("ctseries"));
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
173 }
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
174
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
175 if (GetArgument("rtdose") == "")
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
176 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
177 LOG(INFO) << " RTDOSE : <unspecified>";
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
178 }
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
179 else
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
180 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
181 LOG(INFO) << " RTDOSE : " << GetArgument("rtdose");
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
182 doseLoader_->LoadInstance(GetArgument("rtdose"));
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
183 }
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
184
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
185 if (GetArgument("rtstruct") == "")
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
186 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
187 LOG(INFO) << " RTSTRUCT : : <unspecified>";
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
188 }
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
189 else
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
190 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
191 LOG(INFO) << " RTSTRUCT : : " << GetArgument("rtstruct");
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
192 rtstructLoader_->LoadInstanceFullVisibility(GetArgument("rtstruct"));
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
193 }
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
194 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
195
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
196 void RtViewerApp::HandleGeometryReady(const DicomVolumeImage::GeometryReadyMessage& message)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
197 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
198 UpdateLayersInAllViews();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
199 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
200
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
201 void RtViewerApp::UpdateLayersInAllViews()
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
202 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
203 for (size_t i = 0; i < views_.size(); ++i)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
204 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
205 views_[i]->UpdateLayers();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
206 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
207 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
208
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
209 void RtViewerApp::HandleCTContentUpdated(const DicomVolumeImage::ContentUpdatedMessage& message)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
210 {
1903
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
211 if (isFirstSlice_)
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
212 {
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
213 for (size_t i = 0; i < views_.size(); ++i)
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
214 {
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
215 views_[i]->RetrieveGeometry();
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
216 views_[i]->FitContent();
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
217 }
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
218
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
219 isFirstSlice_ = false;
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
220 }
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
221
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
222 UpdateLayersInAllViews();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
223 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
224
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
225 void RtViewerApp::HandleDoseLoaded(const DicomVolumeImage::ContentUpdatedMessage& message)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
226 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
227 //TODO: compute dose extent, with outlier rejection
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
228 UpdateLayersInAllViews();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
229 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
230
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
231 void RtViewerApp::HandleStructuresReady(const DicomStructureSetLoader::StructuresReady& message)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
232 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
233 UpdateLayersInAllViews();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
234 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
235
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
236 void RtViewerApp::HandleStructuresUpdated(const DicomStructureSetLoader::StructuresUpdated& message)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
237 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
238 UpdateLayersInAllViews();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
239 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
240
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
241 void RtViewerApp::SetArgument(const std::string& key, const std::string& value)
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
242 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
243 if (key == "loglevel")
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
244 OrthancStoneHelpers::SetLogLevel(value);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
245 else
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
246 arguments_[key] = value;
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
247 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
248
1427
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
249 std::string RtViewerApp::GetArgument(const std::string& key) const
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
250 {
1427
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
251 std::map<std::string, std::string>::const_iterator found = arguments_.find(key);
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
252 if (found == arguments_.end())
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
253 {
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
254 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
255 }
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
256 else
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
257 {
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
258 return found->second;
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
259 }
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
260 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
261
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
262 bool RtViewerApp::HasArgument(const std::string& key) const
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
263 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
264 return (arguments_.find(key) != arguments_.end());
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
265 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
266 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
267