-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3dHeightMapViewer_8cpp.html
277 lines (271 loc) · 28 KB
/
3dHeightMapViewer_8cpp.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
<!-- HTML header for doxygen 1.8.11-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<title>DGtalTools: 3dHeightMapViewer.cpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/MathJax.js?config=TeX-MML-AM_CHTML/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="modern-doxygen-green.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">DGtalTools
 <span id="projectnumber">1.5.beta</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_74fcefaf575a6d4264bd59dd648a438b.html">visualisation</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">3dHeightMapViewer.cpp File Reference<div class="ingroups"><a class="elRef" href="https://dgtal-team.github.io/doc-nightly/group__Examples.html">DGtal Examples</a></div></div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include <iostream></code><br />
<code>#include <climits></code><br />
<code>#include "DGtal/base/Common.h"</code><br />
<code>#include "DGtal/base/BasicFunctors.h"</code><br />
<code>#include "DGtal/helpers/StdDefs.h"</code><br />
<code>#include "DGtal/io/readers/GenericReader.h"</code><br />
<code>#include "DGtal/io/viewers/Viewer3D.h"</code><br />
<code>#include <DGtal/io/colormaps/GradientColorMap.h></code><br />
<code>#include <DGtal/io/colormaps/GrayscaleColorMap.h></code><br />
<code>#include <DGtal/images/ImageContainerBySTLVector.h></code><br />
<code>#include "DGtal/io/Color.h"</code><br />
<code>#include <DGtal/base/ConstAlias.h></code><br />
<code>#include <DGtal/kernel/BasicPointFunctors.h></code><br />
<code>#include <DGtal/topology/helpers/Surfaces.h></code><br />
<code>#include "CLI11.hpp"</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for 3dHeightMapViewer.cpp:</div>
<div class="dyncontent">
<div class="center"><img src="3dHeightMapViewer_8cpp__incl.png" border="0" usemap="#a3dHeightMapViewer_8cpp" alt=""/></div>
<map name="a3dHeightMapViewer_8cpp" id="a3dHeightMapViewer_8cpp">
<area shape="rect" title=" " alt="" coords="1250,5,1430,32"/>
<area shape="rect" title=" " alt="" coords="5,87,85,114"/>
<area shape="rect" title=" " alt="" coords="109,87,176,114"/>
<area shape="rect" title=" " alt="" coords="201,87,370,114"/>
<area shape="rect" title=" " alt="" coords="395,87,595,114"/>
<area shape="rect" title=" " alt="" coords="619,87,797,114"/>
<area shape="rect" title=" " alt="" coords="822,80,1005,121"/>
<area shape="rect" title=" " alt="" coords="1029,87,1238,114"/>
<area shape="rect" title=" " alt="" coords="1262,80,1418,121"/>
<area shape="rect" title=" " alt="" coords="1443,80,1608,121"/>
<area shape="rect" title=" " alt="" coords="1632,80,1851,121"/>
<area shape="rect" title=" " alt="" coords="1875,87,1999,114"/>
<area shape="rect" title=" " alt="" coords="2024,87,2203,114"/>
<area shape="rect" title=" " alt="" coords="2227,87,2469,114"/>
<area shape="rect" title=" " alt="" coords="2494,80,2666,121"/>
<area shape="rect" title=" " alt="" coords="2690,87,2777,114"/>
</map>
</div>
</div>
<p><a href="3dHeightMapViewer_8cpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="3dHeightMapViewer_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a> (int argc, char **argv)</td></tr>
<tr class="separator:a3c04138a5bfe5d72780bb7e82a18e627"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>.</p>
<dl class="section author"><dt>Author</dt><dd>Bertrand Kerautret (<code><a href="#" onclick="location.href='mai'+'lto:'+'ker'+'au'+'tre'+'@l'+'ori'+'a.'+'fr'; return false;">kerau<span style="display: none;">.nosp@m.</span>tre@<span style="display: none;">.nosp@m.</span>loria<span style="display: none;">.nosp@m.</span>.fr</a></code> ) LORIA (CNRS, UMR 7503), University of Nancy, France</dd></dl>
<dl class="section date"><dt>Date</dt><dd>2014/06/2014</dd></dl>
<p>An example file named qglViewer.</p>
<p>This file is part of the <a class="el" href="namespaceDGtal.html">DGtal</a> library. </p>
<p class="definition">Definition in file <a class="el" href="3dHeightMapViewer_8cpp_source.html">3dHeightMapViewer.cpp</a>.</p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a3c04138a5bfe5d72780bb7e82a18e627"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3c04138a5bfe5d72780bb7e82a18e627">◆ </a></span>main()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int main </td>
<td>(</td>
<td class="paramtype">int </td>
<td class="paramname"><em>argc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char ** </td>
<td class="paramname"><em>argv</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="3dHeightMapViewer_8cpp_source.html#l00206">206</a> of file <a class="el" href="3dHeightMapViewer_8cpp_source.html">3dHeightMapViewer.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> {</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  </div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="comment">// parse command line using CLI ----------------------------------------------</span></div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  CLI::App app;</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  std::string inputFileName;</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordtype">double</span> scale {1.0};</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordtype">bool</span> colorMap {<span class="keyword">false</span>};</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  std::string colorTextureImage;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  app.description(<span class="stringliteral">"Displays 2D image as heightmap by using QGLviewer.\n Exemple of use: visualisation/3dHeightMapViewer ${DGtal}/examples/samples/church.pgm -s 0.2"</span>);</div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  </div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  app.add_option(<span class="stringliteral">"-i,--input,1"</span>, inputFileName, <span class="stringliteral">"2d input image representing the height map (given as grayscape image cast into 8 bits)."</span> )</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  ->required()</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  ->check(CLI::ExistingFile);</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  app.add_option(<span class="stringliteral">"--scale,-s"</span>,scale, <span class="stringliteral">"set the scale of the maximal level. (default 1.0)"</span>);</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  app.add_flag(<span class="stringliteral">"--colorMap,-c"</span>, colorMap, <span class="stringliteral">"define the heightmap color with a pre-defined colormap (GradientColorMap)"</span>);</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  app.add_option(<span class="stringliteral">"--colorTextureImage,-t"</span>, colorTextureImage, <span class="stringliteral">"define the heightmap color from a given color image (32 bits image)."</span>);</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  </div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  </div>
<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  </div>
<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  app.get_formatter()->column_width(40);</div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  CLI11_PARSE(app, argc, argv);</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="comment">// END parse command line using CLI ----------------------------------------------</span></div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  </div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  </div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <span class="keyword">typedef</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1ImageContainerBySTLVector.html">DGtal::ImageContainerBySTLVector<Z2i::Domain, unsigned char></a> Image2DG ;</div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keyword">typedef</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1ImageContainerBySTLVector.html">DGtal::ImageContainerBySTLVector<Z2i::Domain, unsigned int></a> Image2DCol ;</div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  </div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  Image2DG image = <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1GenericReader.html">GenericReader<Image2DG>::import</a>( inputFileName );</div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  Image2DCol imageTexture(image.domain());</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keywordtype">int</span> maxHeight = (int)(std::numeric_limits<Image2DG::Value>::max()*scale);</div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/namespaceDGtal.html#a604c07ec391ad12a1f3fb6479993f112">trace</a>.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#ad054990834d2763627166540087a2980">info</a>()<< <span class="stringliteral">"Max height from scale:"</span> << maxHeight << std::endl;</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  </div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keywordflow">if</span>(colorTextureImage != <span class="stringliteral">""</span>){</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  imageTexture = <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1GenericReader.html">GenericReader<Image2DCol>::import</a>( colorTextureImage );</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  }</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  </div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  QApplication application(argc,argv);</div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1PointVector.html">Z2i::RealPoint</a> plow (image.domain().lowerBound()[0]-0.5,</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  image.domain().lowerBound()[1]-0.5);</div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  </div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1PointVector.html">Z2i::RealPoint</a> pup (image.domain().upperBound()[0]+0.5,</div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  image.domain().upperBound()[1]+0.5);</div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  </div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  Viewer3DImageSpec<> viewer(plow, pup) ;</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  viewer.setWindowTitle(<span class="stringliteral">"Height Map Viewer"</span>);</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  viewer.show();</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  </div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  </div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html">KSpace</a> K;</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  K.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#a15dcbcaae831dd1c36090e6336c177d4">init</a>(<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1PointVector.html">Z3i::Point</a>(0,0,0),<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1PointVector.html">Z3i::Point</a>(image.domain().upperBound()[0], image.domain().upperBound()[1], maxHeight+1), <span class="keyword">true</span>);</div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  std::set<KSpace::SCell> boundVect;</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  Image3DPredicatFrom2DImage<Image2DG, Z3i::Point> image3Dpredicate(image, scale);</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/namespaceDGtal.html#a604c07ec391ad12a1f3fb6479993f112">trace</a>.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#ad054990834d2763627166540087a2980">info</a>() << <span class="stringliteral">"Constructing boundary... "</span>;</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Surfaces.html">Surfaces<KSpace>::sMakeBoundary</a> (boundVect, K, image3Dpredicate, <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1PointVector.html">Z3i::Point</a>(0,0,0),</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1PointVector.html">Z3i::Point</a>(image.domain().upperBound()[0], image.domain().upperBound()[1], maxHeight+1));</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/namespaceDGtal.html#a604c07ec391ad12a1f3fb6479993f112">trace</a>.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#ad054990834d2763627166540087a2980">info</a>() << <span class="stringliteral">"[done]"</span><< std::endl;</div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  </div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  viewer << <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1SetMode3D.html">SetMode3D</a>((*(boundVect.begin())).className(), <span class="stringliteral">"Basic"</span> );</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1GradientColorMap.html">GradientColorMap<Image2DG::Value,CMAP_JET></a> gradientShade( 0, std::numeric_limits<Image2DG::Value>::max());</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1GrayscaleColorMap.html">GrayscaleColorMap<Image2DG::Value></a> grayShade(0, std::numeric_limits<Image2DG::Value>::max());</div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  </div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  </div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordflow">for</span>(std::set<KSpace::SCell>::const_iterator it = boundVect.begin();</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  it!= boundVect.end(); it++){</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1PointVector.html">Z3i::Point</a> pt = K.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#acbbfda014d1a6c6a493bed7b448c52d5">sCoords</a>(K.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#a7b7bca3fd0e29bfd0128895d572141ef">sDirectIncident</a>( *it, 2 ));</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1functors_1_1Projector.html">functors::Projector<SpaceND<2,int></a> > proj;</div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  Image2DG::Value val = image(proj(pt));</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="keywordflow">if</span>(colorMap){</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  viewer.setFillColor(gradientShade(val));</div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  }<span class="keywordflow">else</span> <span class="keywordflow">if</span> (colorTextureImage != <span class="stringliteral">""</span>) {</div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  viewer.setFillColor(<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">Color</a>(imageTexture(proj(pt))));</div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  }<span class="keywordflow">else</span>{</div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  viewer.setFillColor(grayShade(val));</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  }</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  viewer << *it;</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  }</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  </div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  viewer << Viewer3D<>::updateDisplay;</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="keywordflow">return</span> application.exec();</div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span> }</div>
<div class="ttc" id="aclassDGtal_1_1Color_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">DGtal::Color</a></div></div>
<div class="ttc" id="aclassDGtal_1_1GradientColorMap_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1GradientColorMap.html">DGtal::GradientColorMap</a></div></div>
<div class="ttc" id="aclassDGtal_1_1GrayscaleColorMap_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1GrayscaleColorMap.html">DGtal::GrayscaleColorMap</a></div></div>
<div class="ttc" id="aclassDGtal_1_1ImageContainerBySTLVector_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1ImageContainerBySTLVector.html">DGtal::ImageContainerBySTLVector</a></div></div>
<div class="ttc" id="aclassDGtal_1_1KhalimskySpaceND_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html">DGtal::KhalimskySpaceND</a></div></div>
<div class="ttc" id="aclassDGtal_1_1KhalimskySpaceND_html_a15dcbcaae831dd1c36090e6336c177d4"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#a15dcbcaae831dd1c36090e6336c177d4">DGtal::KhalimskySpaceND::init</a></div><div class="ttdeci">bool init(const Point &lower, const Point &upper, bool isClosed)</div></div>
<div class="ttc" id="aclassDGtal_1_1KhalimskySpaceND_html_a7b7bca3fd0e29bfd0128895d572141ef"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#a7b7bca3fd0e29bfd0128895d572141ef">DGtal::KhalimskySpaceND::sDirectIncident</a></div><div class="ttdeci">SCell sDirectIncident(const SCell &p, Dimension k) const</div></div>
<div class="ttc" id="aclassDGtal_1_1KhalimskySpaceND_html_acbbfda014d1a6c6a493bed7b448c52d5"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#acbbfda014d1a6c6a493bed7b448c52d5">DGtal::KhalimskySpaceND::sCoords</a></div><div class="ttdeci">Point sCoords(const SCell &c) const</div></div>
<div class="ttc" id="aclassDGtal_1_1PointVector_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1PointVector.html">DGtal::PointVector</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Surfaces_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Surfaces.html">DGtal::Surfaces</a></div></div>
<div class="ttc" id="aclassDGtal_1_1Trace_html_ad054990834d2763627166540087a2980"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#ad054990834d2763627166540087a2980">DGtal::Trace::info</a></div><div class="ttdeci">std::ostream & info()</div></div>
<div class="ttc" id="anamespaceDGtal_html_a604c07ec391ad12a1f3fb6479993f112"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/namespaceDGtal.html#a604c07ec391ad12a1f3fb6479993f112">DGtal::trace</a></div><div class="ttdeci">Trace trace(traceWriterTerm)</div></div>
<div class="ttc" id="astructDGtal_1_1GenericReader_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1GenericReader.html">DGtal::GenericReader</a></div></div>
<div class="ttc" id="astructDGtal_1_1SetMode3D_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1SetMode3D.html">DGtal::SetMode3D</a></div></div>
<div class="ttc" id="astructDGtal_1_1functors_1_1Projector_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1functors_1_1Projector.html">DGtal::functors::Projector</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="elRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#ad054990834d2763627166540087a2980">DGtal::Trace::info()</a>, <a class="elRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#a15dcbcaae831dd1c36090e6336c177d4">DGtal::KhalimskySpaceND< dim, TInteger >::init()</a>, <a class="elRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#acbbfda014d1a6c6a493bed7b448c52d5">DGtal::KhalimskySpaceND< dim, TInteger >::sCoords()</a>, <a class="elRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#a7b7bca3fd0e29bfd0128895d572141ef">DGtal::KhalimskySpaceND< dim, TInteger >::sDirectIncident()</a>, and <a class="elRef" href="https://dgtal-team.github.io/doc-nightly/namespaceDGtal.html#a604c07ec391ad12a1f3fb6479993f112">DGtal::trace</a>.</p>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.11-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Companion project associated to <a href= "http://liris.cnrs.fr/dgtal/doc/nightly/"> DGtal </a>;
Generated on Mon Dec 23 2024 09:51:49 for DGtalTools by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.9.1
</small></address>
</body>
</html>