-
Notifications
You must be signed in to change notification settings - Fork 0
/
at-u2-v0_8cpp_source.html
426 lines (424 loc) · 69 KB
/
at-u2-v0_8cpp_source.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
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
<!-- 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: at-u2-v0.cpp Source File</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_6cf9063572cd6d4016e1e45cf4f66eb2.html">imageProcessing</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">at-u2-v0.cpp</div> </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>  </div>
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> <span class="preprocessor">#include <iostream></span></div>
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
<div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#include <sstream></span></div>
<div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#include <string></span></div>
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include <functional></span></div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <boost/format.hpp></span></div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  </div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  </div>
<div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#include "CLI11.hpp"</span></div>
<div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  </div>
<div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  </div>
<div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#include "DGtal/base/Common.h"</span></div>
<div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="preprocessor">#include "DGtal/helpers/StdDefs.h"</span></div>
<div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor">#include "DGtal/io/readers/GenericReader.h"</span></div>
<div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#include "DGtal/io/writers/GenericWriter.h"</span></div>
<div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  </div>
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span> <span class="preprocessor">#include "ATu2v0.h"</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  </div>
<div class="line"><a name="l00197"></a><span class="lineno"> 197</span> <span class="keyword">using namespace </span>std;</div>
<div class="line"><a name="l00198"></a><span class="lineno"> 198</span> <span class="keyword">using namespace </span><a class="code" href="namespaceDGtal.html">DGtal</a>;</div>
<div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  </div>
<div class="line"><a name="l00200"></a><span class="lineno"> 200</span> <span class="keywordtype">int</span> <a class="code" href="3dHeightMapViewer_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a>( <span class="keywordtype">int</span> argc, <span class="keywordtype">char</span>* argv[] )</div>
<div class="line"><a name="l00201"></a><span class="lineno"> 201</span> {</div>
<div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <span class="keyword">using namespace </span>Z2i;</div>
<div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  </div>
<div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="comment">// parse command line ----------------------------------------------</span></div>
<div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  CLI::App app;</div>
<div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <span class="keywordtype">string</span> f1;</div>
<div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordtype">string</span> f2 {<span class="stringliteral">"AT"</span>};</div>
<div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  <span class="keywordtype">string</span> inpainting_mask;</div>
<div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordtype">double</span> l;</div>
<div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordtype">double</span> l1 {0.3125};</div>
<div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keywordtype">double</span> l2 {0.0005};</div>
<div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <span class="keywordtype">double</span> lr {sqrt(2)};</div>
<div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordtype">double</span> a {1.0};</div>
<div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordtype">double</span> epsilon;</div>
<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  </div>
<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordtype">double</span> e1 {2.0};</div>
<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  <span class="keywordtype">double</span> e2 {0.25};</div>
<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keywordtype">double</span> er {2.0};</div>
<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keywordtype">int</span> verb {0};</div>
<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="keywordtype">int</span> nbiter = {10};</div>
<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordtype">int</span> pix_sz = {1};</div>
<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordtype">string</span> scv {<span class="stringliteral">"0xff0000"</span>};</div>
<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keywordtype">string</span> isnr;</div>
<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordtype">bool</span> metric;</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>  </div>
<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  stringstream ssDescr;</div>
<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  ssDescr << <span class="stringliteral">"Computes a piecewise smooth approximation of a grey-level or color image, by optimizing the Ambrosio-Tortorelli functional (with u a 2-form and v a 0-form)."</span>;</div>
<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  ssDescr << <span class="stringliteral">"Usage: "</span> << argv[0] << <span class="stringliteral">" -i toto.pgm\n"</span></div>
<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  << <span class="stringliteral">"Computes the Ambrosio-Tortorelli reconstruction/segmentation of an input image."</span></div>
<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  << <span class="stringliteral">"It outputs 2 or 3 images (of basename given by option --output) giving the"</span></div>
<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  << <span class="stringliteral">" reconstructed image u, and other images superposing u and the discontinuities v."</span></div>
<div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  << endl << endl</div>
<div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  << <span class="stringliteral">" / "</span></div>
<div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  << endl</div>
<div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  << <span class="stringliteral">" | a.(u-g)^2 + v^2 |grad u|^2 + le.|grad v|^2 + (l/4e).(1-v)^2 "</span></div>
<div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  << endl</div>
<div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  << <span class="stringliteral">" / "</span></div>
<div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  << endl</div>
<div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  << <span class="stringliteral">"Discretized as (u 2-form, v 0-form, A vertex-edge bdry, B edge-face bdy, M vertex-edge average)"</span> << endl</div>
<div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  << <span class="stringliteral">"E(u,v) = a(u-g)^t (u-g) + u^t B diag(M v)^2 B^t u + l e v^t A^t A v + l/(4e) (1-v)^t (1-v)"</span> << endl</div>
<div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  << endl</div>
<div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  << <span class="stringliteral">"Example: ./at-u2-v0 -i ../Images/cerclesTriangle64b02.pgm -o tmp -a 0.05 -e 1 --lambda-1 0.1 --lambda-2 0.00001 -g"</span></div>
<div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  << endl;</div>
<div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  </div>
<div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  app.description(ssDescr.str());</div>
<div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  </div>
<div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  </div>
<div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  app.add_option(<span class="stringliteral">"-i,--input,1"</span>, f1, <span class="stringliteral">"the input image PPM filename."</span> )</div>
<div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  ->required()</div>
<div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  ->check(CLI::ExistingFile);</div>
<div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  app.add_option(<span class="stringliteral">"--inpainting-mask,-m"</span>, inpainting_mask, <span class="stringliteral">"the input inpainting mask filename."</span> );</div>
<div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  app.add_option(<span class="stringliteral">"--output,-o"</span>, f2, <span class="stringliteral">"the output image basename."</span>, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keyword">auto</span> lambdaOpt = app.add_option(<span class="stringliteral">"--lambda,-l"</span>,l, <span class="stringliteral">"the parameter lambda."</span>);</div>
<div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  app.add_flag(<span class="stringliteral">"--metric-average,-M"</span>,metric, <span class="stringliteral">"use metric average to smooth L1-metric."</span> );</div>
<div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  </div>
<div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  app.add_option(<span class="stringliteral">"--lambda-1,-1"</span>,l1, <span class="stringliteral">"the initial parameter lambda (l1)."</span>, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  app.add_option(<span class="stringliteral">"--lambda-2,-2"</span>,l2, <span class="stringliteral">"the final parameter lambda (l2)."</span>, <span class="keyword">true</span> );</div>
<div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  app.add_option(<span class="stringliteral">"--lambda-ratio,-q"</span>,lr, <span class="stringliteral">"the division ratio for lambda from l1 to l2."</span>, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  app.add_option(<span class="stringliteral">"--alpha,-a"</span>,a, <span class="stringliteral">"the parameter alpha."</span>, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="keyword">auto</span> epsOpt = app.add_option(<span class="stringliteral">"--epsilon,-e"</span>, <span class="stringliteral">"the initial and final parameter epsilon of AT functional at the same time."</span>);</div>
<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  </div>
<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  app.add_option(<span class="stringliteral">"--epsilon-1"</span>,e1, <span class="stringliteral">"the initial parameter epsilon."</span>, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  app.add_option(<span class="stringliteral">"--epsilon-2"</span>,e2, <span class="stringliteral">"the final parameter epsilon."</span>, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  app.add_option(<span class="stringliteral">"--epsilon-r"</span>,er, <span class="stringliteral">"sets the ratio between two consecutive epsilon values of AT functional."</span>, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  </div>
<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  app.add_option(<span class="stringliteral">"--nbiter,-n"</span>,nbiter, <span class="stringliteral">"the maximum number of iterations."</span>, <span class="keyword">true</span> );</div>
<div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keyword">auto</span> snrOpt = app.add_option(<span class="stringliteral">"--image-snr"</span>, isnr, <span class="stringliteral">"the input image without deterioration if you wish to compute the SNR."</span>);</div>
<div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  app.add_option(<span class="stringliteral">"--pixel-size,-p"</span>, pix_sz, <span class="stringliteral">"the pixel size for outputing images (useful when one wants to see the discontinuities v on top of u)."</span>, <span class="keyword">true</span>);</div>
<div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  app.add_option(<span class="stringliteral">"--color-v,-c"</span>,scv, <span class="stringliteral">"the color chosen for displaying the singularities v (e.g. red is 0xff0000)."</span>, <span class="keyword">true</span> );</div>
<div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  app.add_option(<span class="stringliteral">"--verbose,-v"</span>, verb, <span class="stringliteral">"the verbose level (0: silent, 1: less silent, etc)."</span>, <span class="keyword">true</span> );</div>
<div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  </div>
<div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  app.get_formatter()->column_width(40);</div>
<div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  CLI11_PARSE(app, argc, argv);</div>
<div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="comment">// END parse comm"metric-average,Mand line using CLI ----------------------------------------------</span></div>
<div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  </div>
<div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  </div>
<div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  </div>
<div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">Color</a> color_v( (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>) std::stoul( scv, <span class="keyword">nullptr</span>, 16 ), 255 );</div>
<div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordflow">if</span> ( lambdaOpt->count()) l1 = l2 = l;</div>
<div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordflow">if</span> ( l2 > l1 ) l2 = l1;</div>
<div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  <span class="keywordflow">if</span> ( lr <= 1.0 ) lr = sqrt(2);</div>
<div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <span class="keywordflow">if</span> ( epsOpt->count() > 0 ){</div>
<div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  e1 = e2 = epsilon;</div>
<div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  </div>
<div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  }</div>
<div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keywordtype">bool</span> snr = snrOpt->count() > 0;</div>
<div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  </div>
<div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  </div>
<div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keywordtype">bool</span> color_image = f1.size() > 4 && f1.compare( f1.size() - 4, 4, <span class="stringliteral">".ppm"</span> ) == 0;</div>
<div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keywordtype">bool</span> grey_image = f1.size() > 4 && f1.compare( f1.size() - 4, 4, <span class="stringliteral">".pgm"</span> ) == 0;</div>
<div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordflow">if</span> ( ! color_image && ! grey_image ) </div>
<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  {</div>
<div class="line"><a name="l00294"></a><span class="lineno"> 294</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#a1e786a1f3b1047e92b73c82f67e3c295">error</a>() << <span class="stringliteral">"Input image file must be either a PGM (grey-level) or a PPM (color) image with these extensions."</span></div>
<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  << endl;</div>
<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <span class="keywordflow">return</span> 2;</div>
<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  }</div>
<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  </div>
<div class="line"><a name="l00299"></a><span class="lineno"> 299</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="l00300"></a><span class="lineno"> 300</span>  <a class="code" href="structDGtal_1_1ATu2v0.html">ATu2v0< KSpace ></a> AT( verb );</div>
<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1IteratorCompletionTraits_3_01ArrayImageAdapter_3_01TArrayIterator_00_01TDomain_01_4_01_4_1_1DistanceFunctor.html#a79a0f67cc951326052b97eeea300e2c1">Domain</a> domain;</div>
<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  AT.setMetricAverage( metric );</div>
<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  </div>
<div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keyword">typedef</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1DiscreteExteriorCalculus.html">ATu2v0<KSpace>::Calculus</a> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1DiscreteExteriorCalculus.html">Calculus</a>;</div>
<div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keyword">typedef</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1ImageContainerBySTLVector.html">ImageContainerBySTLVector<Domain, Color></a> ColorImage;</div>
<div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="keyword">typedef</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1ImageContainerBySTLVector.html">ImageContainerBySTLVector<Domain, unsigned char></a> GreyLevelImage;</div>
<div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="comment">//---------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  <span class="keywordflow">if</span> ( color_image ) </div>
<div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  {</div>
<div class="line"><a name="l00310"></a><span class="lineno"> 310</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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Reading PPM image"</span>);</div>
<div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  ColorImage image = <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PPMReader.html">PPMReader<ColorImage>::importPPM</a>( f1 );</div>
<div class="line"><a name="l00312"></a><span class="lineno"> 312</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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00313"></a><span class="lineno"> 313</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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Building AT"</span>);</div>
<div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  domain = image.domain();</div>
<div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  K.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#a15dcbcaae831dd1c36090e6336c177d4">init</a>( domain.lowerBound(), domain.upperBound(), <span class="keyword">true</span> );</div>
<div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  AT.init( K );</div>
<div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  AT.addInput( image, [] ( <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">Color</a> c ) -> <span class="keywordtype">double</span> { <span class="keywordflow">return</span> ((<span class="keywordtype">double</span>) c.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#aa487b3d008dc44964b10971ce8a26432">red</a>()) / 255.0; } );</div>
<div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  AT.addInput( image, [] ( <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">Color</a> c ) -> <span class="keywordtype">double</span> { <span class="keywordflow">return</span> ((<span class="keywordtype">double</span>) c.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#a5917f9d174eb75eae2ce49e7f40edbb7">green</a>()) / 255.0; } );</div>
<div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  AT.addInput( image, [] ( <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">Color</a> c ) -> <span class="keywordtype">double</span> { <span class="keywordflow">return</span> ((<span class="keywordtype">double</span>) c.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#af51469f44cfc0603c66efe150b1b0c33">blue</a>()) / 255.0; } );</div>
<div class="line"><a name="l00320"></a><span class="lineno"> 320</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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  }</div>
<div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( grey_image ) </div>
<div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  {</div>
<div class="line"><a name="l00324"></a><span class="lineno"> 324</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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Reading PGM image"</span>);</div>
<div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  GreyLevelImage image = <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PGMReader.html">PGMReader<GreyLevelImage>::importPGM</a>( f1 );</div>
<div class="line"><a name="l00326"></a><span class="lineno"> 326</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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00327"></a><span class="lineno"> 327</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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Building AT"</span>);</div>
<div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  domain = image.domain();</div>
<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  K.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#a15dcbcaae831dd1c36090e6336c177d4">init</a>( domain.lowerBound(), domain.upperBound(), <span class="keyword">true</span> );</div>
<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  AT.init( K );</div>
<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  AT.addInput( image, [] (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> c ) { <span class="keywordflow">return</span> ((<span class="keywordtype">double</span>) c) / 255.0; } );</div>
<div class="line"><a name="l00332"></a><span class="lineno"> 332</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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  }</div>
<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  </div>
<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="comment">//---------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  <span class="keywordflow">if</span> ( snr && color_image ) </div>
<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  {</div>
<div class="line"><a name="l00338"></a><span class="lineno"> 338</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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Reading ideal PPM image"</span>);</div>
<div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  ColorImage image = <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PPMReader.html">PPMReader<ColorImage>::importPPM</a>( isnr );</div>
<div class="line"><a name="l00340"></a><span class="lineno"> 340</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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  AT.addInput( image, [] ( <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">Color</a> c ) -> <span class="keywordtype">double</span> { <span class="keywordflow">return</span> ((<span class="keywordtype">double</span>) c.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#aa487b3d008dc44964b10971ce8a26432">red</a>()) / 255.0; }, true );</div>
<div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  AT.addInput( image, [] ( <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">Color</a> c ) -> <span class="keywordtype">double</span> { <span class="keywordflow">return</span> ((<span class="keywordtype">double</span>) c.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#a5917f9d174eb75eae2ce49e7f40edbb7">green</a>()) / 255.0; }, true );</div>
<div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  AT.addInput( image, [] ( <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html">Color</a> c ) -> <span class="keywordtype">double</span> { <span class="keywordflow">return</span> ((<span class="keywordtype">double</span>) c.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#af51469f44cfc0603c66efe150b1b0c33">blue</a>()) / 255.0; }, true );</div>
<div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  }</div>
<div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( snr && grey_image ) </div>
<div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  {</div>
<div class="line"><a name="l00347"></a><span class="lineno"> 347</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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Reading ideal PGM image"</span>);</div>
<div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  GreyLevelImage image = <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PGMReader.html">PGMReader<GreyLevelImage>::importPGM</a>( isnr );</div>
<div class="line"><a name="l00349"></a><span class="lineno"> 349</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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  AT.addInput( image, [] (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> c ) { <span class="keywordflow">return</span> ((<span class="keywordtype">double</span>) c) / 255.0; }, true );</div>
<div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  }</div>
<div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  </div>
<div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="comment">//---------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  <span class="comment">// Prepare zoomed output domain</span></div>
<div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1IteratorCompletionTraits_3_01ArrayImageAdapter_3_01TArrayIterator_00_01TDomain_01_4_01_4_1_1DistanceFunctor.html#a79a0f67cc951326052b97eeea300e2c1">Domain</a> out_domain( pix_sz * domain.lowerBound(), </div>
<div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  pix_sz * domain.upperBound() + Point::diagonal( pix_sz ) );</div>
<div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  <span class="comment">//---------------------------------------------------------------------------</span></div>
<div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  AT.setUFromInput();</div>
<div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  <span class="keywordtype">double</span> g_snr = snr ? AT.computeSNR() : 0.0;</div>
<div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  </div>
<div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="keywordflow">if</span> ( inpainting_mask.size() > 0 )</div>
<div class="line"><a name="l00362"></a><span class="lineno"> 362</span>  {</div>
<div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="keywordtype">string</span> fm = inpainting_mask;</div>
<div class="line"><a name="l00364"></a><span class="lineno"> 364</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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Reading inpainting mask"</span>);</div>
<div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  GreyLevelImage mask = <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1GenericReader.html">GenericReader<GreyLevelImage>::import</a>( fm );</div>
<div class="line"><a name="l00366"></a><span class="lineno"> 366</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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> m( AT.calculus );</div>
<div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <span class="keywordflow">for</span> ( <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1DiscreteExteriorCalculus.html#ab4367cb06a628fc96e6c637d0f822df0">Calculus::Index</a> index = 0; index < m.myContainer.rows(); index++)</div>
<div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  {</div>
<div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  <span class="keyword">auto</span> cell = m.getSCell( index );</div>
<div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <span class="keywordtype">double</span> col = ((double) mask( K.<a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KhalimskySpaceND.html#acbbfda014d1a6c6a493bed7b448c52d5">sCoords</a>( cell ) )) / 255.0;</div>
<div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  m.myContainer( index ) = col > 0.0 ? 1.0 : 0.0;</div>
<div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  }</div>
<div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  AT.setAlpha( a, m );</div>
<div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  AT.setUFromInputAndMask();</div>
<div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <span class="keywordflow">if</span> ( grey_image )</div>
<div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  {</div>
<div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  ostringstream ossGM;</div>
<div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  ossGM << boost::format(<span class="stringliteral">"%s-g-mask.pgm"</span>) %f2;</div>
<div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  GreyLevelImage image_mg( domain );</div>
<div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> mg = functions::dec::diagonal( m ) * AT.getG( 0 );</div>
<div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  functions::dec::form2ToGreyLevelImage</div>
<div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  ( AT.calculus, mg, image_mg, 0.0, 1.0, 1 ); </div>
<div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PGMWriter.html">PGMWriter<GreyLevelImage>::exportPGM</a>( ossGM.str(), image_mg );</div>
<div class="line"><a name="l00385"></a><span class="lineno"> 385</span>  }</div>
<div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( color_image )</div>
<div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  {</div>
<div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  ostringstream ossGM;</div>
<div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  ossGM << boost::format(<span class="stringliteral">"%s-g-mask.ppm"</span>) %f2;</div>
<div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  ColorImage image_mg( domain );</div>
<div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> mg0 = functions::dec::diagonal( m ) * AT.getG( 0 );</div>
<div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> mg1 = functions::dec::diagonal( m ) * AT.getG( 1 );</div>
<div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> mg2 = functions::dec::diagonal( m ) * AT.getG( 2 );</div>
<div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  functions::dec::threeForms2ToRGBColorImage</div>
<div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  ( AT.calculus, mg0, mg1, mg2, image_mg, 0.0, 1.0, 1 ); </div>
<div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PPMWriter.html">PPMWriter<ColorImage, functors::Identity >::exportPPM</a>( ossGM.str(), image_mg );</div>
<div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  }</div>
<div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  }</div>
<div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <span class="keywordflow">else</span> </div>
<div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  AT.setAlpha( a );</div>
<div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  </div>
<div class="line"><a name="l00402"></a><span class="lineno"> 402</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>() << AT << std::endl;</div>
<div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  <span class="keywordtype">double</span> n_v = 0.0;</div>
<div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="keywordtype">double</span> eps = 0.0;</div>
<div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  <span class="keywordflow">while</span> ( l1 >= l2 )</div>
<div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  {</div>
<div class="line"><a name="l00407"></a><span class="lineno"> 407</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">"************ lambda = "</span> << l1 << <span class="stringliteral">" **************"</span> << endl;</div>
<div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  AT.setLambda( l1 );</div>
<div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keywordflow">for</span> ( eps = e1; eps >= e2; eps /= er )</div>
<div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  {</div>
<div class="line"><a name="l00411"></a><span class="lineno"> 411</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">" ======= epsilon = "</span> << eps << <span class="stringliteral">" ========"</span> << endl;</div>
<div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  AT.setEpsilon( eps );</div>
<div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="keywordtype">int</span> n = 0;</div>
<div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <span class="keywordflow">do</span> {</div>
<div class="line"><a name="l00415"></a><span class="lineno"> 415</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#ad8efd553b31277903be115e7aa256f74">progressBar</a>( n, nbiter );</div>
<div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  AT.solveU();</div>
<div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  AT.solveV();</div>
<div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  AT.checkV();</div>
<div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  n_v = AT.computeVariation();</div>
<div class="line"><a name="l00420"></a><span class="lineno"> 420</span>  } <span class="keywordflow">while</span> ( ( n_v > 0.0001 ) && ( ++n < nbiter ) );</div>
<div class="line"><a name="l00421"></a><span class="lineno"> 421</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#ad8efd553b31277903be115e7aa256f74">progressBar</a>( n, nbiter );</div>
<div class="line"><a name="l00422"></a><span class="lineno"> 422</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">"[#### last variation = "</span> << n_v << <span class="stringliteral">" "</span> << endl;</div>
<div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  }</div>
<div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="keywordflow">if</span> ( grey_image ) </div>
<div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  {</div>
<div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  <span class="keywordflow">if</span> ( verb > 0 ) <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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Writing u[0] as PGM image"</span>);</div>
<div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  ostringstream ossU, ossV, ossW;</div>
<div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  ossU << boost::format(<span class="stringliteral">"%s-a%.5f-l%.7f-u.pgm"</span>) % f2 % a % l1;</div>
<div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  ossV << boost::format(<span class="stringliteral">"%s-a%.5f-l%.7f-u-v.pgm"</span>) % f2 % a % l1;</div>
<div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  ossW << boost::format(<span class="stringliteral">"%s-a%.5f-l%.7f-u-v.ppm"</span>) % f2 % a % l1;</div>
<div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> u = AT.getU( 0 );</div>
<div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm1</a> v = AT.M01 * AT.getV();</div>
<div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="comment">// Restored image</span></div>
<div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  GreyLevelImage image_u( domain );</div>
<div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  functions::dec::form2ToGreyLevelImage</div>
<div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  ( AT.calculus, u, image_u, 0.0, 1.0, 1 ); </div>
<div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PGMWriter.html">PGMWriter<GreyLevelImage>::exportPGM</a>( ossU.str(), image_u );</div>
<div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  <span class="comment">// Zoomed restored image with discontinuities (in black).</span></div>
<div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  GreyLevelImage image_uv( out_domain );</div>
<div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  functions::dec::form2ToGreyLevelImage</div>
<div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  ( AT.calculus, u, image_uv, 0.0, 1.0, pix_sz ); </div>
<div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  functions::dec::primalForm1ToGreyLevelImage</div>
<div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  ( AT.calculus, v, image_uv, 0.0, 1.0, pix_sz ); </div>
<div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PGMWriter.html">PGMWriter<GreyLevelImage>::exportPGM</a>( ossV.str(), image_uv );</div>
<div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="comment">// Zoomed restored image with discontinuities (in specified color).</span></div>
<div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  ColorImage cimage( out_domain );</div>
<div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  functions::dec::threeForms2ToRGBColorImage</div>
<div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  ( AT.calculus, u, u, u, cimage, 0.0, 1.0, pix_sz ); </div>
<div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  functions::dec::primalForm1ToRGBColorImage</div>
<div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  ( AT.calculus, v, cimage, color_v, 0.0, 1.0, pix_sz ); </div>
<div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PPMWriter.html">PPMWriter<ColorImage, functors::Identity >::exportPPM</a>( ossW.str(), cimage );</div>
<div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <span class="keywordflow">if</span> ( verb > 0 ) <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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  }</div>
<div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( color_image )</div>
<div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  {</div>
<div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="keywordflow">if</span> ( verb > 0 ) <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#a352b7160bf722e2f0bcbee5d0bad6ef3">beginBlock</a>(<span class="stringliteral">"Writing u[0,1,2] as PGM image"</span>);</div>
<div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  ostringstream ossU, ossV;</div>
<div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  ossU << boost::format(<span class="stringliteral">"%s-a%.5f-l%.7f-u.ppm"</span>) % f2 % a % l1;</div>
<div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  ossV << boost::format(<span class="stringliteral">"%s-a%.5f-l%.7f-u-v.ppm"</span>) % f2 % a % l1;</div>
<div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> u0 = AT.getU( 0 );</div>
<div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> u1 = AT.getU( 1 );</div>
<div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm2</a> u2 = AT.getU( 2 );</div>
<div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  <span class="keyword">const</span> <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">Calculus::PrimalForm1</a> v = AT.M01 * AT.getV();</div>
<div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  <span class="comment">// Restored image</span></div>
<div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  ColorImage image_u( domain );</div>
<div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  functions::dec::threeForms2ToRGBColorImage</div>
<div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  ( AT.calculus, u0, u1, u2, image_u, 0.0, 1.0, 1 ); </div>
<div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PPMWriter.html">PPMWriter<ColorImage, functors::Identity >::exportPPM</a>( ossU.str(), image_u );</div>
<div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  ColorImage image_uv( out_domain );</div>
<div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  functions::dec::threeForms2ToRGBColorImage</div>
<div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  ( AT.calculus, u0, u1, u2, image_uv, 0.0, 1.0, pix_sz ); </div>
<div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  functions::dec::primalForm1ToRGBColorImage</div>
<div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  ( AT.calculus, v, image_uv, color_v, 0.0, 1.0, pix_sz ); </div>
<div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <a class="codeRef" href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PPMWriter.html">PPMWriter<ColorImage, functors::Identity >::exportPPM</a>( ossV.str(), image_uv );</div>
<div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <span class="keywordflow">if</span> ( verb > 0 ) <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#afa3a2874289734884107b1ce68ccb93d">endBlock</a>();</div>
<div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  }</div>
<div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <span class="comment">// Compute SNR if possible</span></div>
<div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  <span class="keywordflow">if</span> ( snr )</div>
<div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  {</div>
<div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  <span class="keywordtype">double</span> u_snr = AT.computeSNR();</div>
<div class="line"><a name="l00481"></a><span class="lineno"> 481</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">"- SNR of u = "</span> << u_snr << <span class="stringliteral">" SNR of g = "</span> << g_snr << endl;</div>
<div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  }</div>
<div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  l1 /= lr;</div>
<div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  }</div>
<div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  <span class="keywordflow">return</span> 0;</div>
<div class="line"><a name="l00486"></a><span class="lineno"> 486</span> }</div>
<div class="ttc" id="a3dHeightMapViewer_8cpp_html_a3c04138a5bfe5d72780bb7e82a18e627"><div class="ttname"><a href="3dHeightMapViewer_8cpp.html#a3c04138a5bfe5d72780bb7e82a18e627">main</a></div><div class="ttdeci">int main(int argc, char **argv)</div><div class="ttdef"><b>Definition:</b> <a href="3dHeightMapViewer_8cpp_source.html#l00206">3dHeightMapViewer.cpp:206</a></div></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_1Color_html_a5917f9d174eb75eae2ce49e7f40edbb7"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#a5917f9d174eb75eae2ce49e7f40edbb7">DGtal::Color::green</a></div><div class="ttdeci">void green(const unsigned char aGreenValue)</div></div>
<div class="ttc" id="aclassDGtal_1_1Color_html_aa487b3d008dc44964b10971ce8a26432"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#aa487b3d008dc44964b10971ce8a26432">DGtal::Color::red</a></div><div class="ttdeci">void red(const unsigned char aRedValue)</div></div>
<div class="ttc" id="aclassDGtal_1_1Color_html_af51469f44cfc0603c66efe150b1b0c33"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Color.html#af51469f44cfc0603c66efe150b1b0c33">DGtal::Color::blue</a></div><div class="ttdeci">void blue(const unsigned char aBlueValue)</div></div>
<div class="ttc" id="aclassDGtal_1_1DiscreteExteriorCalculus_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1DiscreteExteriorCalculus.html">DGtal::DiscreteExteriorCalculus< 2, 2, LinearAlgebra ></a></div></div>
<div class="ttc" id="aclassDGtal_1_1DiscreteExteriorCalculus_html_ab4367cb06a628fc96e6c637d0f822df0"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1DiscreteExteriorCalculus.html#ab4367cb06a628fc96e6c637d0f822df0">DGtal::DiscreteExteriorCalculus::Index</a></div><div class="ttdeci">LinearAlgebraBackend::DenseVector::Index Index</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_1IteratorCompletionTraits_3_01ArrayImageAdapter_3_01TArrayIterator_00_01TDomain_01_4_01_4_1_1DistanceFunctor_html_a79a0f67cc951326052b97eeea300e2c1"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1IteratorCompletionTraits_3_01ArrayImageAdapter_3_01TArrayIterator_00_01TDomain_01_4_01_4_1_1DistanceFunctor.html#a79a0f67cc951326052b97eeea300e2c1">Domain</a></div><div class="ttdeci">typename Self::Domain Domain</div></div>
<div class="ttc" id="aclassDGtal_1_1KForm_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1KForm.html">DGtal::KForm</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_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_1Trace_html_a1e786a1f3b1047e92b73c82f67e3c295"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#a1e786a1f3b1047e92b73c82f67e3c295">DGtal::Trace::error</a></div><div class="ttdeci">std::ostream & error()</div></div>
<div class="ttc" id="aclassDGtal_1_1Trace_html_a352b7160bf722e2f0bcbee5d0bad6ef3"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#a352b7160bf722e2f0bcbee5d0bad6ef3">DGtal::Trace::beginBlock</a></div><div class="ttdeci">void beginBlock(const std::string &keyword="")</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="aclassDGtal_1_1Trace_html_ad8efd553b31277903be115e7aa256f74"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#ad8efd553b31277903be115e7aa256f74">DGtal::Trace::progressBar</a></div><div class="ttdeci">void progressBar(const double currentValue, const double maximalValue)</div></div>
<div class="ttc" id="aclassDGtal_1_1Trace_html_afa3a2874289734884107b1ce68ccb93d"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/classDGtal_1_1Trace.html#afa3a2874289734884107b1ce68ccb93d">DGtal::Trace::endBlock</a></div><div class="ttdeci">double endBlock()</div></div>
<div class="ttc" id="anamespaceDGtal_html"><div class="ttname"><a href="namespaceDGtal.html">DGtal</a></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_1ATu2v0_html"><div class="ttname"><a href="structDGtal_1_1ATu2v0.html">DGtal::ATu2v0</a></div><div class="ttdoc">Aim: This class solves Ambrosio-Tortorelli functional in a plane for u a (vector of) 2-form(s) and v ...</div><div class="ttdef"><b>Definition:</b> <a href="ATu2v0_8h_source.html#l00074">ATu2v0.h:75</a></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_1PGMReader_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PGMReader.html">DGtal::PGMReader</a></div></div>
<div class="ttc" id="astructDGtal_1_1PGMWriter_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PGMWriter.html">DGtal::PGMWriter</a></div></div>
<div class="ttc" id="astructDGtal_1_1PPMReader_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PPMReader.html">DGtal::PPMReader</a></div></div>
<div class="ttc" id="astructDGtal_1_1PPMWriter_html"><div class="ttname"><a href="https://dgtal-team.github.io/doc-nightly/structDGtal_1_1PPMWriter.html">DGtal::PPMWriter</a></div></div>
</div><!-- fragment --></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 Aug 26 2024 21:31:30 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>