-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.html
478 lines (465 loc) · 28.6 KB
/
install.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
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="Build and installation instructions for the MIRTK." name="description" />
<meta content="MIRTK installation, MIRTK dependencies" name="keywords" />
<title>Installation — MIRTK</title>
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: 'v2.0 (8c2aa10)',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/bizstyle.js"></script>
<link rel="top" title="MIRTK" href="sidebar.html" />
<link rel="next" title="Support" href="help.html" />
<link rel="prev" title="Download" href="download.html" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!--[if lt IE 9]>
<script type="text/javascript" src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="help.html" title="Support"
accesskey="N">next</a></li>
<li class="right" >
<a href="download.html" title="Download"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="sidebar.html">MIRTK</a> »</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
<h3><a href="sidebar.html">Table Of Contents</a></h3>
<ul>
<li class="toctree-l1"><a class="reference internal" href="index.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="getstarted.html">Get Started</a></li>
<li class="toctree-l1"><a class="reference internal" href="commands.html">Applications</a></li>
<li class="toctree-l1"><a class="reference internal" href="modules.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="apidoc.html">Reference</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="changelog.html">News</a></li>
<li class="toctree-l1"><a class="reference internal" href="download.html">Download</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Installation</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#requirements">Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="#dependencies">Dependencies</a></li>
<li class="toctree-l2"><a class="reference internal" href="#configuration">Configuration</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#cmake-gui-example">CMake GUI Example</a></li>
<li class="toctree-l3"><a class="reference internal" href="#step-by-step">Step-by-step</a></li>
<li class="toctree-l3"><a class="reference internal" href="#dependency-not-found">Dependency not found</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#build">Build</a></li>
<li class="toctree-l2"><a class="reference internal" href="#installationsteps">Installation</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="help.html">Support</a></li>
<li class="toctree-l1"><a class="reference internal" href="publications.html">Publications</a></li>
<li class="toctree-l1"><a class="reference internal" href="people.html">People</a></li>
</ul>
</div>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="installation">
<h1>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h1>
<div class="section" id="requirements">
<span id="buildrequirements"></span><h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2>
<p>For the generation of build environment specific build configuration files,
the Cross-platform Make tool named <a class="reference external" href="http://cmake.org/">CMake</a> is needed. The minimum required version
for Linux and OS X is 2.8.12, while version 3.4 or newer is needed on Windows.</p>
<p>For the compilation of the MIRTK source code, a C++ compiler with support for the
<a class="reference external" href="https://isocpp.org/wiki/faq/cpp11">C++11</a> standard is required. On Windows, the minimum required Visual Studio compiler
version is 18.0. A compatible compiler is shipped with Visual Studio 2013 or newer.
For Unix operation systems, we recommend the use of the <a class="reference external" href="https://gcc.gnu.org/">GNU Compiler Collection</a> (GCC).</p>
<p>To execute the <a class="reference internal" href="commands.html"><span class="doc">MIRTK commands</span></a>, a <a class="reference external" href="https://www.python.org">Python</a> installation is required.
Note that Python has to be installed before configuring the MIRTK build using CMake.</p>
</div>
<div class="section" id="dependencies">
<span id="builddependencies"></span><h2>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h2>
<p>The MIRTK source code makes use of the following third-party libraries:</p>
<table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="5%" />
<col width="18%" />
<col width="35%" />
<col width="26%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Third-party library</th>
<th class="head">Version</th>
<th class="head">Included as</th>
<th class="head">Required by module(s)</th>
<th class="head">Optionally used by</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference external" href="https://www.threadingbuildingblocks.org">Intel TBB</a></td>
<td>any</td>
<td>System</td>
<td>No module</td>
<td>All modules</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="http://www.boost.org">Boost</a></td>
<td>1.48</td>
<td>System</td>
<td><a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a>, <a class="reference internal" href="modules/pointset.html"><span class="doc">Point Set</span></a>, <a class="reference internal" href="modules/transformation.html"><span class="doc">Transformation</span></a></td>
<td> </td>
</tr>
<tr class="row-even"><td><a class="reference external" href="http://eigen.tuxfamily.org">Eigen</a></td>
<td>3.0</td>
<td>System</td>
<td><a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a>, <a class="reference internal" href="modules/mapping.html"><span class="doc">Mapping</span></a></td>
<td> </td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="http://www.caam.rice.edu/software/ARPACK/">ARPACK</a> / <a class="reference external" href="https://people.sc.fsu.edu/~jburkardt/cpp_src/umfpack/umfpack.html">UMFPACK</a></td>
<td>any</td>
<td>System</td>
<td>No module</td>
<td><a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference external" href="http://www.vtk.org">VTK</a></td>
<td>6.0</td>
<td>System</td>
<td><a class="reference internal" href="modules/pointset.html"><span class="doc">Point Set</span></a>, <a class="reference internal" href="modules/deformable.html"><span class="doc">Deformable</span></a>, <a class="reference internal" href="modules/mapping.html"><span class="doc">Mapping</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a>, <a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a>, <a class="reference internal" href="modules/registration.html"><span class="doc">Registration</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="http://www.libpng.org">libpng</a></td>
<td>any</td>
<td>System</td>
<td>No module</td>
<td><a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a></td>
</tr>
<tr class="row-even"><td><a class="reference external" href="http://sourceforge.net/projects/niftilib/">NiftiCLib</a></td>
<td>any</td>
<td>System or Source code</td>
<td>No module</td>
<td><a class="reference internal" href="modules/io.html"><span class="doc">I/O</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="http://www.chokkan.org/software/liblbfgs/">libLBFGS</a></td>
<td>any</td>
<td>Source code</td>
<td>No module</td>
<td><a class="reference internal" href="modules/io.html"><span class="doc">I/O</span></a></td>
</tr>
</tbody>
</table>
<p><a class="reference external" href="http://www.boost.org">Boost</a> and <a class="reference external" href="http://eigen.tuxfamily.org">Eigen</a> are a minimum requirement to build MIRTK. The source code of the <a class="reference external" href="http://sourceforge.net/projects/niftilib/">NiftiCLib</a> and
<a class="reference external" href="http://www.chokkan.org/software/liblbfgs/">libLBFGS</a> libraries are included in the basic download package and need not be installed.
The WITH_NiftiCLib build option can be used, however, to force the use of an existing NiftiCLib
installation. See <a class="reference internal" href="#configurationsteps"><span class="std std-ref">build configuration steps below</span></a>.</p>
<p>The UMFPACK library is part of the <a class="reference external" href="http://faculty.cse.tamu.edu/davis/suitesparse.html">SuiteSparse</a> installation.</p>
<p>The intra-module dependencies are as follows. When a module is enabled,
all modules required by this module are automatically enabled as well.</p>
<table border="1" class="docutils">
<colgroup>
<col width="16%" />
<col width="50%" />
<col width="34%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Module</th>
<th class="head">Requires module(s)</th>
<th class="head">Optionally uses module(s)</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a></td>
<td>No other module</td>
<td> </td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a></td>
<td> </td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a>, <a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a></td>
<td> </td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="modules/io.html"><span class="doc">I/O</span></a></td>
<td><a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a></td>
<td> </td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="modules/transformation.html"><span class="doc">Transformation</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a>, <a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a>, <a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a></td>
<td> </td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="modules/pointset.html"><span class="doc">Point Set</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a>, <a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a>, <a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a>, <a class="reference internal" href="modules/transformation.html"><span class="doc">Transformation</span></a></td>
<td> </td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="modules/registration.html"><span class="doc">Registration</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a>, <a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a>, <a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a>, <a class="reference internal" href="modules/transformation.html"><span class="doc">Transformation</span></a></td>
<td><a class="reference internal" href="modules/pointset.html"><span class="doc">Point Set</span></a>, <a class="reference internal" href="modules/deformable.html"><span class="doc">Deformable</span></a></td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="modules/deformable.html"><span class="doc">Deformable</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a>, <a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a>, <a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a>, <a class="reference internal" href="modules/transformation.html"><span class="doc">Transformation</span></a>, <a class="reference internal" href="modules/pointset.html"><span class="doc">Point Set</span></a></td>
<td> </td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="modules/mapping.html"><span class="doc">Mapping</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a>, <a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a>, <a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a>, <a class="reference internal" href="modules/pointset.html"><span class="doc">Point Set</span></a></td>
<td> </td>
</tr>
<tr class="row-odd"><td><a class="reference internal" href="modules/scripting.html"><span class="doc">Scripting</span></a></td>
<td> </td>
<td> </td>
</tr>
<tr class="row-even"><td><a class="reference internal" href="modules/drawem.html"><span class="doc">Draw-EM</span></a></td>
<td><a class="reference internal" href="modules/common.html"><span class="doc">Common</span></a>, <a class="reference internal" href="modules/numerics.html"><span class="doc">Numerics</span></a>, <a class="reference internal" href="modules/image.html"><span class="doc">Image</span></a>, <a class="reference internal" href="modules/io.html"><span class="doc">I/O</span></a></td>
<td> </td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>Notice that the <a class="reference internal" href="modules/io.html"><span class="doc">I/O</span></a> module is required only by the <a class="reference internal" href="commands.html"><span class="doc">Applications</span></a> which read/write images or point sets.</p>
<p class="last">For a complete list of module dependencies, see the BasisProject.cmake file and in
some cases also the config/Depends.cmake file if present in the respective module directory.</p>
</div>
</div>
<div class="section" id="configuration">
<span id="configurationsteps"></span><h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
<div class="section" id="cmake-gui-example">
<h3>CMake GUI Example<a class="headerlink" href="#cmake-gui-example" title="Permalink to this headline">¶</a></h3>
<p>After obtaining a copy of the MIRTK source files, generate the build configuration
files for your build tool of choice using <a class="reference external" href="http://cmake.org/">CMake</a>.
We recommend the use of the CMake GUI with the “Grouped” checkbox enabled.
Advanced options should normally not be required to be modified.</p>
<p>An example screenshot of a CMake configuration is shown below.</p>
<img alt="Screenshot of example MIRTK CMake configuration" src="_images/CMakeGUIDefaultConfig.png" />
</div>
<div class="section" id="step-by-step">
<h3>Step-by-step<a class="headerlink" href="#step-by-step" title="Permalink to this headline">¶</a></h3>
<ol class="arabic">
<li><p class="first"><strong>Set source code and build directory paths.</strong></p>
<p>For the build directory path, a subdirectory within the MIRTK source
directory named “Build” is recommended.</p>
</li>
<li><p class="first"><strong>Click “Configure” to initialize the build system.</strong></p>
<p>CMake will ask for the build tool for which configuration files are to be generated.
For Linux, the Makefile (i.e., GNU Make), Ninja, or CodeBlocks/Qt Creator
generators are recommended. On OS X, the Xcode generator should be selected.</p>
</li>
<li><p class="first"><strong>Enable/disable MIRTK Modules to be build and features to be enabled.</strong></p>
<p>Which <a class="reference internal" href="modules.html"><span class="doc">modules</span></a> are enabled is specified by the MODULE family of options.
Optional library features are enabled by forcing the use of the respective
external libraries required by the implementation of the feature using
the WITH family of options. After the change of an option or other CMake
variable, re-configure the build system by clicking on “Configure” again
until no further changes are made and the “Generate” button is enabled.</p>
<table border="1" class="docutils">
<colgroup>
<col width="25%" />
<col width="75%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Option/Variable</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>BUILD_APPLICATIONS</td>
<td>Build command-line tools of enabled modules.</td>
</tr>
<tr class="row-odd"><td>BUILD_DOCUMENTATION</td>
<td>Configure build of online documentation (“doc” target).</td>
</tr>
<tr class="row-even"><td>BUILD_DOCUMENTATION_SOURCES</td>
<td>(Re-)generate .rst source files of auto-generated pages.</td>
</tr>
<tr class="row-odd"><td>BUILD_TESTING</td>
<td>Build the regression tests. (advanced, unused)</td>
</tr>
<tr class="row-even"><td>CMAKE_BUILD_TYPE</td>
<td>Build configuration (e.g. “Release” for optimized code).</td>
</tr>
<tr class="row-odd"><td>CMAKE_INSTALL_PREFIX</td>
<td>Installation directory (default on Linux and OS X is <cite>/opt/mirtk-<version></cite>).</td>
</tr>
<tr class="row-even"><td>PYTHON_EXECUTABLE</td>
<td><a class="reference external" href="https://www.python.org">Python</a> executable used for execution of Python scripts.</td>
</tr>
<tr class="row-odd"><td>WITH_ARPACK</td>
<td>Enable eigendecomposition of sparse matrices. Required for spectral surface matching.</td>
</tr>
<tr class="row-even"><td>WITH_FLANN</td>
<td>Use the Fast Library for Approximate Nearest Neighbors to locate points.</td>
</tr>
<tr class="row-odd"><td>WITH_MATLAB</td>
<td>Enable output of matrices to .mat files and use of MATLAB functions.</td>
</tr>
<tr class="row-even"><td>WITH_NiftiCLib</td>
<td>Force use of existing system installation of <a class="reference external" href="http://sourceforge.net/projects/niftilib/">NiftiCLib</a>.</td>
</tr>
<tr class="row-odd"><td>WITH_PNG</td>
<td>Enable writing of 2D images in <a class="reference external" href="http://www.libpng.org/pub/png/spec/1.2/PNG-Structure.html">PNG</a> file format.</td>
</tr>
<tr class="row-even"><td>WITH_PROFILING</td>
<td>Enable profiling of code execution to find runtime bottlenecks.</td>
</tr>
<tr class="row-odd"><td>WITH_TBB</td>
<td>Enable multi-threaded execution using Intel Threading Building Blocks. (recommended)</td>
</tr>
<tr class="row-even"><td>WITH_UMFPACK</td>
<td>Automatically enabled when WITH_ARPACK is ON.</td>
</tr>
<tr class="row-odd"><td>WITH_VTK</td>
<td>Enable processing of VTK files. Automatically enabled when PointSet module is enabled.</td>
</tr>
<tr class="row-even"><td>WITH_ZLIB</td>
<td>Enable reading/writing of compressed files using <a class="reference external" href="http://www.zlib.net">zlib</a>. (recommended)</td>
</tr>
</tbody>
</table>
</li>
</ol>
<ol class="arabic" start="5">
<li><p class="first"><strong>Generate build tool configuration files.</strong></p>
<p>When done, click the “Generate” button to write the configuration
files for the build tool selected in step 2.</p>
</li>
</ol>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Enabling a module may require additional external libraries or add
further WITH options. The location of required external libraries is
specified by the DEPENDS family of variables. These are marked as advanced
and hence hidden from the default view when an installation of the external
library was found automatically. To see which external libraries the MIRTK
will be linked with, enable the “Advanced” checkbox at the top of the CMake GUI.</p>
</div>
</div>
<div class="section" id="dependency-not-found">
<h3>Dependency not found<a class="headerlink" href="#dependency-not-found" title="Permalink to this headline">¶</a></h3>
<p>When a <a class="reference internal" href="#builddependencies"><span class="std std-ref">build dependency</span></a> such as VTK, for example, was not found,
a DEPENDS variable becomes visible in the GUI (i.e. not marked as advanced) which must be set
to either the installation prefix of the dependency or the directory containing a CMake package
configuration file (e.g., <cite>VTKConfig.cmake</cite>). See the following screenshot for an example where
VTK was not found automatically and the path to the <cite>VTKConfig.cmake</cite> file in the VTK build directory
was set manually after the error was reported.</p>
<img alt="VTK not found error in CMake GUI" src="_images/CMakeGUIVTKNotFound.png" />
</div>
</div>
<div class="section" id="build">
<span id="buildsteps"></span><h2>Build<a class="headerlink" href="#build" title="Permalink to this headline">¶</a></h2>
<p>After the configuration files for the chosen build tool were generated by CMake,
open the corresponding project file in case of an IDE such as Xcode or a
Terminal window in case of the GNU Make or Ninja build tools to build the MIRTK.</p>
<p>The following assumes the build directory to be located at,</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nv">MIRTK_BINARY_DIR</span><span class="o">=</span><span class="nv">$MIRTK_SOURCE_DIR</span>/Build
<span class="nb">cd</span> <span class="nv">$MIRTK_BINARY_DIR</span>
</pre></div>
</div>
<p>where <code class="docutils literal"><span class="pre">MIRTK_SOURCE_DIR</span></code> is the top-level directory containing the MIRTK source
files (see <a class="reference internal" href="download.html"><span class="doc">Download</span></a> command).</p>
<p>Using GNU Make, run:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="o">-</span><span class="n">j</span> <span class="mi">8</span>
</pre></div>
</div>
<p>Using Ninja, run:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">ninja</span>
</pre></div>
</div>
<p>When <code class="docutils literal"><span class="pre">BUILD_DOCUMENTATION</span></code> was set to <code class="docutils literal"><span class="pre">ON</span></code> during the build configuration, the
documentation files can be build (before installation!) using the “doc” target.</p>
<p>Using GNU Make, run:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">doc</span>
</pre></div>
</div>
<p>Using Ninja, run:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">ninja</span> <span class="n">doc</span>
</pre></div>
</div>
</div>
<div class="section" id="installationsteps">
<span id="id1"></span><h2>Installation<a class="headerlink" href="#installationsteps" title="Permalink to this headline">¶</a></h2>
<p>After the successful build of the MIRTK, the software can be installed by
building the “install” target.</p>
<p>Using GNU Make, run:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">install</span>
</pre></div>
</div>
<p>Using Ninja, run:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">ninja</span> <span class="n">install</span>
</pre></div>
</div>
<p>To enable the convenient use of the <a class="reference internal" href="commands.html"><span class="doc">Applications</span></a>, it is recommended
to permanently add the <code class="docutils literal"><span class="pre">$MIRTK_ROOT/bin</span></code> directory to the
<a class="reference external" href="https://en.wikipedia.org/wiki/PATH_(variable)">PATH environment variable</a> in the shell configuration file
(e.g., <code class="docutils literal"><span class="pre">$HOME/.bashrc</span></code> or <code class="docutils literal"><span class="pre">$HOME/.bash_profile</span></code>), where MIRTK_ROOT is the directory
chosen as CMAKE_INSTALL_PREFIX above.</p>
<p>The MIRTK installation further includes a <a class="reference external" href="https://www.gnu.org/software/bash/">Bash</a>
completions script which when sourced in your Bash configuration file,
enables <a class="reference external" href="https://www.gnu.org/software/bash/manual/html_node/Programmable-Completion.html">auto-completion</a> of available MIRTK commands for the <code class="docutils literal"><span class="pre">mirtk</span></code> command.
To enable the MIRTK Bash completions, add the following lines to <code class="docutils literal"><span class="pre">$HOME/.bashrc</span></code> (Linux)
or <code class="docutils literal"><span class="pre">$HOME/.bash_profile</span></code> (OS X):</p>
<div class="highlight-default"><div class="highlight"><pre><span></span>[ ! -f "$MIRTK_ROOT/share/completion/bash/mirtk" ] ||
source "$MIRTK_ROOT/share/completion/bash/mirtk"
[ ! -f "$MIRTK_ROOT/share/mirtk/completion/bash/mirtk" ] ||
source "$MIRTK_ROOT/share/mirtk/completion/bash/mirtk"
</pre></div>
</div>
<p>The Bash completions are then available when a new Terminal window is opened.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">When the CMAKE_INSTALL_PREFIX contains a directory named “mirtk” (or “mirtk-<version>”)
as in case of the default installation prefix “/opt/mirtk-<version>”, the library
files and MIRTK commands are installed into <code class="docutils literal"><span class="pre">$CMAKE_INSTALL_PREFIX/lib</span></code>. But when the
installation path does not include the project name, as in case of “/usr/local”, for example,
these files are copied into the directory <code class="docutils literal"><span class="pre">$CMAKE_INSTALL_PREFIX/lib/mirtk</span></code>.
The same applies to other installation subdirectories such as “share” and “doc”.
Only the executable files are always copied to <code class="docutils literal"><span class="pre">$CMAKE_INSTALL_PREFIX/bin</span></code>.</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="help.html" title="Support"
>next</a></li>
<li class="right" >
<a href="download.html" title="Download"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="sidebar.html">MIRTK</a> »</li>
</ul>
</div>
<div class="footer" role="contentinfo">
© Copyright 2013-2018 Imperial College London, Andreas Schuh.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.4.1.
</div>
</body>
</html>