annotate Applications/Samples/Common/RtViewerApp.cpp @ 2040:c6263f514f54 deep-learning

allow warnings while creating shaders
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 01 Feb 2023 08:04:51 +0100
parents 5a434f5889f8
children 07964689cb0b
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 {
1975
5a434f5889f8 starting pixel probe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1903
diff changeset
102 // Creating "dummyScene" is a HACK: It won't work with trackers
5a434f5889f8 starting pixel probe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1903
diff changeset
103 // that probe the values of the textures. For such trackers, the
5a434f5889f8 starting pixel probe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1903
diff changeset
104 // actual underlying scene should be provided.
5a434f5889f8 starting pixel probe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1903
diff changeset
105 Scene2D dummyScene;
5a434f5889f8 starting pixel probe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1903
diff changeset
106 activeTracker_->Cancel(dummyScene);
5a434f5889f8 starting pixel probe
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1903
diff changeset
107
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
108 activeTracker_.reset();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
109 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
110 }
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 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
113 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
114 boost::shared_ptr<RtViewerView>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
115 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
116
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
117 view->RegisterMessages();
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 view->CreateLayers(ctLoader_, doseLoader_, doseVolume_, rtstructLoader_);
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 views_.push_back(view);
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
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
124 void RtViewerApp::CreateLoaders()
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
125 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
126 // the viewport hosts the scene
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
127 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
128 // "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
129 // "false" means only using hi quality
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
130 // 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
131 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
132
dad6a2fe6fc7 Added setters to control relative priority of CT series loader requests.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1427
diff changeset
133 // 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
134 ctLoader_->SetSchedulingPriority(-100);
dad6a2fe6fc7 Added setters to control relative priority of CT series loader requests.
Benjamin Golinvaux <bgo@osimis.io>
parents: 1427
diff changeset
135
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
136
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
137 // 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
138 geometryProvider_ = ctLoader_;
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 doseLoader_ = OrthancMultiframeVolumeLoader::Create(*loadersContext_, doseVolume_);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
141 rtstructLoader_ = DicomStructureSetLoader::Create(*loadersContext_);
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
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
144 /**
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
145 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
146 */
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
147
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
148 Register<DicomVolumeImage::GeometryReadyMessage>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
149 (*ctLoader_, &RtViewerApp::HandleGeometryReady);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
150
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
151 Register<DicomVolumeImage::ContentUpdatedMessage>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
152 (*ctLoader_, &RtViewerApp::HandleCTContentUpdated);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
153
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
154 Register<DicomVolumeImage::ContentUpdatedMessage>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
155 (*doseLoader_, &RtViewerApp::HandleDoseLoaded);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
156
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
157 Register<DicomStructureSetLoader::StructuresReady>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
158 (*rtstructLoader_, &RtViewerApp::HandleStructuresReady);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
159
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
160 Register<DicomStructureSetLoader::StructuresUpdated>
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
161 (*rtstructLoader_, &RtViewerApp::HandleStructuresUpdated);
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
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
164 void RtViewerApp::StartLoaders()
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
165 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
166 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
167
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
168 LOG(INFO) << "About to load:";
1522
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
169
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
170 if (GetArgument("ctseries") == "")
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
171 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
172 LOG(INFO) << " CT : <unspecified>";
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 else
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
175 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
176 LOG(INFO) << " CT : " << GetArgument("ctseries");
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
177 ctLoader_->LoadSeries(GetArgument("ctseries"));
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
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
180 if (GetArgument("rtdose") == "")
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
181 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
182 LOG(INFO) << " RTDOSE : <unspecified>";
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 else
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
185 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
186 LOG(INFO) << " RTDOSE : " << GetArgument("rtdose");
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
187 doseLoader_->LoadInstance(GetArgument("rtdose"));
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
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
190 if (GetArgument("rtstruct") == "")
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
191 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
192 LOG(INFO) << " RTSTRUCT : : <unspecified>";
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
193 }
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
194 else
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
195 {
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
196 LOG(INFO) << " RTSTRUCT : : " << GetArgument("rtstruct");
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
197 rtstructLoader_->LoadInstanceFullVisibility(GetArgument("rtstruct"));
fa30f275cd80 Removed requirement for a non-empty RTDOSE
Benjamin Golinvaux <bgo@osimis.io>
parents: 1512
diff changeset
198 }
1404
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::HandleGeometryReady(const DicomVolumeImage::GeometryReadyMessage& message)
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 UpdateLayersInAllViews();
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
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
206 void RtViewerApp::UpdateLayersInAllViews()
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 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
209 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
210 views_[i]->UpdateLayers();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
211 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
212 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
213
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
214 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
215 {
1903
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
216 if (isFirstSlice_)
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 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
219 {
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
220 views_[i]->RetrieveGeometry();
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
221 views_[i]->FitContent();
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
222 }
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
223
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
224 isFirstSlice_ = false;
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
225 }
c7bc9e1776a6 fix rendering of RT sample
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1896
diff changeset
226
1404
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
227 UpdateLayersInAllViews();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
228 }
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 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
231 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
232 //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
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::HandleStructuresReady(const DicomStructureSetLoader::StructuresReady& 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::HandleStructuresUpdated(const DicomStructureSetLoader::StructuresUpdated& message)
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 UpdateLayersInAllViews();
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
244 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
245
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
246 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
247 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
248 if (key == "loglevel")
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
249 OrthancStoneHelpers::SetLogLevel(value);
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
250 else
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
251 arguments_[key] = value;
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
252 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
253
1427
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
254 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
255 {
1427
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
256 std::map<std::string, std::string>::const_iterator found = arguments_.find(key);
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
257 if (found == arguments_.end())
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
258 {
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
259 throw Orthanc::OrthancException(Orthanc::ErrorCode_BadSequenceOfCalls);
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
260 }
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
261 else
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
262 {
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
263 return found->second;
cecedf0b1be6 fix for msvc2008
s.jodogne@gmail.com
parents: 1409
diff changeset
264 }
1404
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 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
268 {
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
269 return (arguments_.find(key) != arguments_.end());
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
270 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
271 }
3e644f6fadd4 Three-viewport is now OK in SDL and Wasm
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
272