Debian Codegraph @

doc/building.md

raw
1 # Build instructions
2
3 The ISMRM Raw Data format is described by an XML schema and some C-style structs with fixed memory layout and as such does not have dependencies. However, it uses HDF5 files for storage and a C++ library for reading and writing the ISMRMRD files is included in this distribution. Furthermore, since the XML header is defined with an XML schema, we encourage using XML data binding when writing software using the format. To compile all components of this distribution you need:
4
5 * [HDF5](http://www.hdfgroup.org/downloads/index.html) (version 1.8 or higher) libraries.
6 * [Boost](http://www.boost.org/)
7 * [Pugixml](https://pugixml.org)
8 * [Cmake build tool](http://www.cmake.org/)
9 * [Git](http://git-scm.com/) if you would like to use the source code archive
10 * [FFTW](http://www.fftw.org) if you would like to compile some of the example applications
11 * [Doxygen](http://www.doxygen.org) if you would like to generate API documentation
12
13 It is only necessary to install the dependencies if you wish to develop compiled C/C++ software, which uses the ISMRMRD format. The format can be read in Matlab or Python without installing any additional software.
14
15 ## Linux installation
16
17 The dependencies mentioned above should be included in most linux distributions. On Ubuntu you can install all required dependencies with::
18
19 ```bash
20 sudo apt-get -y install doxygen git-core graphviz libboost-all-dev libfftw3-dev libhdf5-serial-dev libxml2-utils libpugixml-dev
21 ```
22
23 After installation of dependencies, the library can be installed with:
24
25 ```bash
26 git clone https://github.com/ismrmrd/ismrmrd
27 cd ismrmrd/
28 mkdir build
29 cd build
30 cmake ../
31 make
32 sudo make install
33 ```
34
35 This will install the library in `/usr/local/` by default. To specify
36 an alternative installation directory, pass `-D CMAKE_INSTALL_PREFIX=<install dir>` to `cmake`.
37
38
39 ## External use of ISMRMRD C++ library in other projects
40
41 To use ISMRMRD for your externally developed projects, add the following to your CMakeLists.txt file:
42
43 ```
44 find_package( ISMRMRD REQUIRED )
45 link_directories( ${ISMRMRD_LIBRARY_DIRS} )
46 include_directories( ${ISMRMRD_INCLUDE_DIRS} )
47 target_link_libraries( mytarget ${ISMRMRD_LIBRARIES} )
48 ```
49
50 then when configuring your package use set the following cmake variables (command line variant shown):
51
52 ```
53 cmake -DISMRMRD_DIR:PATH=<path to build/install tree of ISMRMRD> <path to my source tree>
54 ```