[ismrmrd] 11/16: ISMRMRD really needs a top level README
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Wed Jan 14 20:02:31 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag v1.2.0
in repository ismrmrd.
commit 6a4a927d7d01817113e5ed9f083cbb795ec5b4f2
Author: Joseph Naegele <joseph.naegele at gmail.com>
Date: Thu Dec 18 14:12:24 2014 -0500
ISMRMRD really needs a top level README
at least for Github to render. moving from doc/
to top level of repo.
---
README.html | 1606 --------------------------------------------
doc/README.md => README.md | 0
doc/Doxyfile.in | 4 +-
3 files changed, 2 insertions(+), 1608 deletions(-)
diff --git a/README.html b/README.html
deleted file mode 100644
index 654c2e0..0000000
--- a/README.html
+++ /dev/null
@@ -1,1606 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!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" xml:lang="en" lang="en">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
-<title>ISMRM Raw Data Format (ISMRMRD)</title>
-<style type="text/css">
-
-/*
-:Author: David Goodger (goodger at python.org)
-:Id: $Id: html4css1.css 7514 2012-09-14 14:27:12Z milde $
-:Copyright: This stylesheet has been placed in the public domain.
-
-Default cascading style sheet for the HTML output of Docutils.
-
-See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
-customize this style sheet.
-*/
-
-/* used to remove borders from tables and images */
-.borderless, table.borderless td, table.borderless th {
- border: 0 }
-
-table.borderless td, table.borderless th {
- /* Override padding for "table.docutils td" with "! important".
- The right padding separates the table cells. */
- padding: 0 0.5em 0 0 ! important }
-
-.first {
- /* Override more specific margin styles with "! important". */
- margin-top: 0 ! important }
-
-.last, .with-subtitle {
- margin-bottom: 0 ! important }
-
-.hidden {
- display: none }
-
-a.toc-backref {
- text-decoration: none ;
- color: black }
-
-blockquote.epigraph {
- margin: 2em 5em ; }
-
-dl.docutils dd {
- margin-bottom: 0.5em }
-
-object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
- overflow: hidden;
-}
-
-/* Uncomment (and remove this text!) to get bold-faced definition list terms
-dl.docutils dt {
- font-weight: bold }
-*/
-
-div.abstract {
- margin: 2em 5em }
-
-div.abstract p.topic-title {
- font-weight: bold ;
- text-align: center }
-
-div.admonition, div.attention, div.caution, div.danger, div.error,
-div.hint, div.important, div.note, div.tip, div.warning {
- margin: 2em ;
- border: medium outset ;
- padding: 1em }
-
-div.admonition p.admonition-title, div.hint p.admonition-title,
-div.important p.admonition-title, div.note p.admonition-title,
-div.tip p.admonition-title {
- font-weight: bold ;
- font-family: sans-serif }
-
-div.attention p.admonition-title, div.caution p.admonition-title,
-div.danger p.admonition-title, div.error p.admonition-title,
-div.warning p.admonition-title, .code .error {
- color: red ;
- font-weight: bold ;
- font-family: sans-serif }
-
-/* Uncomment (and remove this text!) to get reduced vertical space in
- compound paragraphs.
-div.compound .compound-first, div.compound .compound-middle {
- margin-bottom: 0.5em }
-
-div.compound .compound-last, div.compound .compound-middle {
- margin-top: 0.5em }
-*/
-
-div.dedication {
- margin: 2em 5em ;
- text-align: center ;
- font-style: italic }
-
-div.dedication p.topic-title {
- font-weight: bold ;
- font-style: normal }
-
-div.figure {
- margin-left: 2em ;
- margin-right: 2em }
-
-div.footer, div.header {
- clear: both;
- font-size: smaller }
-
-div.line-block {
- display: block ;
- margin-top: 1em ;
- margin-bottom: 1em }
-
-div.line-block div.line-block {
- margin-top: 0 ;
- margin-bottom: 0 ;
- margin-left: 1.5em }
-
-div.sidebar {
- margin: 0 0 0.5em 1em ;
- border: medium outset ;
- padding: 1em ;
- background-color: #ffffee ;
- width: 40% ;
- float: right ;
- clear: right }
-
-div.sidebar p.rubric {
- font-family: sans-serif ;
- font-size: medium }
-
-div.system-messages {
- margin: 5em }
-
-div.system-messages h1 {
- color: red }
-
-div.system-message {
- border: medium outset ;
- padding: 1em }
-
-div.system-message p.system-message-title {
- color: red ;
- font-weight: bold }
-
-div.topic {
- margin: 2em }
-
-h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
-h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
- margin-top: 0.4em }
-
-h1.title {
- text-align: center }
-
-h2.subtitle {
- text-align: center }
-
-hr.docutils {
- width: 75% }
-
-img.align-left, .figure.align-left, object.align-left {
- clear: left ;
- float: left ;
- margin-right: 1em }
-
-img.align-right, .figure.align-right, object.align-right {
- clear: right ;
- float: right ;
- margin-left: 1em }
-
-img.align-center, .figure.align-center, object.align-center {
- display: block;
- margin-left: auto;
- margin-right: auto;
-}
-
-.align-left {
- text-align: left }
-
-.align-center {
- clear: both ;
- text-align: center }
-
-.align-right {
- text-align: right }
-
-/* reset inner alignment in figures */
-div.align-right {
- text-align: inherit }
-
-/* div.align-center * { */
-/* text-align: left } */
-
-ol.simple, ul.simple {
- margin-bottom: 1em }
-
-ol.arabic {
- list-style: decimal }
-
-ol.loweralpha {
- list-style: lower-alpha }
-
-ol.upperalpha {
- list-style: upper-alpha }
-
-ol.lowerroman {
- list-style: lower-roman }
-
-ol.upperroman {
- list-style: upper-roman }
-
-p.attribution {
- text-align: right ;
- margin-left: 50% }
-
-p.caption {
- font-style: italic }
-
-p.credits {
- font-style: italic ;
- font-size: smaller }
-
-p.label {
- white-space: nowrap }
-
-p.rubric {
- font-weight: bold ;
- font-size: larger ;
- color: maroon ;
- text-align: center }
-
-p.sidebar-title {
- font-family: sans-serif ;
- font-weight: bold ;
- font-size: larger }
-
-p.sidebar-subtitle {
- font-family: sans-serif ;
- font-weight: bold }
-
-p.topic-title {
- font-weight: bold }
-
-pre.address {
- margin-bottom: 0 ;
- margin-top: 0 ;
- font: inherit }
-
-pre.literal-block, pre.doctest-block, pre.math, pre.code {
- margin-left: 2em ;
- margin-right: 2em }
-
-pre.code .ln { color: grey; } /* line numbers */
-pre.code, code { background-color: #eeeeee }
-pre.code .comment, code .comment { color: #5C6576 }
-pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
-pre.code .literal.string, code .literal.string { color: #0C5404 }
-pre.code .name.builtin, code .name.builtin { color: #352B84 }
-pre.code .deleted, code .deleted { background-color: #DEB0A1}
-pre.code .inserted, code .inserted { background-color: #A3D289}
-
-span.classifier {
- font-family: sans-serif ;
- font-style: oblique }
-
-span.classifier-delimiter {
- font-family: sans-serif ;
- font-weight: bold }
-
-span.interpreted {
- font-family: sans-serif }
-
-span.option {
- white-space: nowrap }
-
-span.pre {
- white-space: pre }
-
-span.problematic {
- color: red }
-
-span.section-subtitle {
- /* font-size relative to parent (h1..h6 element) */
- font-size: 80% }
-
-table.citation {
- border-left: solid 1px gray;
- margin-left: 1px }
-
-table.docinfo {
- margin: 2em 4em }
-
-table.docutils {
- margin-top: 0.5em ;
- margin-bottom: 0.5em }
-
-table.footnote {
- border-left: solid 1px black;
- margin-left: 1px }
-
-table.docutils td, table.docutils th,
-table.docinfo td, table.docinfo th {
- padding-left: 0.5em ;
- padding-right: 0.5em ;
- vertical-align: top }
-
-table.docutils th.field-name, table.docinfo th.docinfo-name {
- font-weight: bold ;
- text-align: left ;
- white-space: nowrap ;
- padding-left: 0 }
-
-h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
-h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
- font-size: 100% }
-
-ul.auto-toc {
- list-style-type: none }
-
-</style>
-</head>
-<body>
-<div class="document" id="ismrm-raw-data-format-ismrmrd">
-<h1 class="title">ISMRM Raw Data Format (ISMRMRD)</h1>
-
-<div class="contents topic" id="contents">
-<p class="topic-title first">Contents</p>
-<ul class="simple">
-<li><a class="reference internal" href="#preamble" id="id1">Preamble</a></li>
-<li><a class="reference internal" href="#developers-contributors" id="id2">Developers/Contributors</a></li>
-<li><a class="reference internal" href="#obtaining-and-installing" id="id3">Obtaining and Installing</a><ul>
-<li><a class="reference internal" href="#dependencies" id="id4">Dependencies</a></li>
-<li><a class="reference internal" href="#linux-installation" id="id5">Linux installation</a></li>
-<li><a class="reference internal" href="#mac-osx-installation" id="id6">Mac OSX Installation</a></li>
-<li><a class="reference internal" href="#windows-installation" id="id7">Windows Installation</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#overview" id="id8">Overview</a><ul>
-<li><a class="reference internal" href="#flexible-data-header" id="id9">Flexible Data Header</a></li>
-<li><a class="reference internal" href="#fixed-data-structures" id="id10">Fixed Data structures</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#file-storage" id="id11">File Storage</a></li>
-<li><a class="reference internal" href="#c-support-library" id="id12">C++ Support Library</a><ul>
-<li><a class="reference internal" href="#c-example-applications" id="id13">C++ Example Applications</a></li>
-</ul>
-</li>
-<li><a class="reference internal" href="#matlab-example-code-and-datasets" id="id14">Matlab Example Code and Datasets</a></li>
-<li><a class="reference internal" href="#appendix" id="id15">Appendix</a><ul>
-<li><a class="reference internal" href="#frequently-asked-questions" id="id16">Frequently Asked Questions</a></li>
-<li><a class="reference internal" href="#xml-schema-definition" id="id17">XML Schema Definition</a></li>
-<li><a class="reference internal" href="#windows-7-64-bit-powershell-install-script" id="id18">Windows 7 (64-bit) Powershell Install Script</a></li>
-</ul>
-</li>
-</ul>
-</div>
-<div class="section" id="preamble">
-<h1><a class="toc-backref" href="#id1">Preamble</a></h1>
-<p>A prerequisite for sharing magnetic resonance (imaging) reconstruction algorithms and code is a common raw data format. This document describes such a common raw data format and attempts to capture the data fields that are require to describe enough details about the magnetic resonance experiment to reconstruct images from the data.</p>
-<p>This standard was developed by a subcommittee of the ISMRM Sedona 2013 workshop. Comments and requests for additions/modifications can be sent to:</p>
-<ul class="simple">
-<li>Michael S. Hansen (michael DOT hansen AT nih DOT gov)</li>
-<li>Wally Block (wblock AT cae DOT wisc DOT edu)</li>
-<li>Mark Griswold (mag46 AT case DOT edu)</li>
-<li>Brian Hargreaves (bah AT stanford DOT edu)</li>
-<li>Peter Boernert (peter DOT boernert AT philips DOT com)</li>
-<li>Sebastian Kozerke (kozerke AT biomed DOT ee DOT ethz DOT ch)</li>
-<li>Craig Meyer (cmeyer AT virginia DOT edu)</li>
-<li>Doug Noll (dnoll AT umich DOT edu)</li>
-<li>Jim Pipe (Jim.Pipe AT DignityHealth DOT org)</li>
-</ul>
-</div>
-<div class="section" id="developers-contributors">
-<h1><a class="toc-backref" href="#id2">Developers/Contributors</a></h1>
-<ul class="simple">
-<li>Michael S. Hansen, National Institutes of Health, USA</li>
-<li>Nick Zwart, Barrow Neurological Institute, Phoenix, Arizona</li>
-<li>Souheil Inati, National Institutes of Health, USA</li>
-<li>Joe Naegele, National Institutes of Health, USA</li>
-<li>Kaveh Vahedipour, Juelich Research Centre, Juelich, Germany</li>
-</ul>
-</div>
-<div class="section" id="obtaining-and-installing">
-<h1><a class="toc-backref" href="#id3">Obtaining and Installing</a></h1>
-<p>The source code, examples, and example datasets can be found on the ISMRM Raw Data Sourceforge <a class="reference external" href="http://sourceforge.net/projects/ismrmrd">website</a>.</p>
-<p>To download the source code, clone the git archive:</p>
-<pre class="literal-block">
-git clone git://git.code.sf.net/p/ismrmrd/code ismrmrd-code
-</pre>
-<p>Alternatively download the zip file with the source code:</p>
-<pre class="literal-block">
-wget https://sourceforge.net/projects/ismrmrd/files/src/ismrmrd_latest.zip
-</pre>
-<p>API Documentation can be found at <a class="reference external" href="http://ismrmrd.sourceforge.net/api">http://ismrmrd.sourceforge.net/api</a>.</p>
-<div class="section" id="dependencies">
-<h2><a class="toc-backref" href="#id4">Dependencies</a></h2>
-<p>The ISMRM Raw Data format is described by an XML <a class="reference internal" href="#schema">schema</a> 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 <a class="reference internal" href="#schema">schema</a>, we encourage using XML data binding when writi [...]
-<ul class="simple">
-<li>HDF5 (version 1.8 or higher) libraries. Available from <a class="reference external" href="http://www.hdfgroup.org/downloads/index.html">http://www.hdfgroup.org/downloads/index.html</a>.</li>
-<li>Boost (<a class="reference external" href="http://www.boost.org/">http://www.boost.org/</a>)</li>
-<li>CodeSynthesis XSD (<a class="reference external" href="http://www.codesynthesis.com/products/xsd/">http://www.codesynthesis.com/products/xsd/</a>)</li>
-<li>Xerces-C XML parser library (<a class="reference external" href="http://xerces.apache.org/xerces-c/">http://xerces.apache.org/xerces-c/</a>)</li>
-<li>Cmake build tool (<a class="reference external" href="http://www.cmake.org/">http://www.cmake.org/</a>)</li>
-<li>Doxygen if you would like to generate API documentation (<a class="reference external" href="http://www.doxygen.org">http://www.doxygen.org</a>)</li>
-<li>Git if you would like to use the source code archive (<a class="reference external" href="http://git-scm.com/">http://git-scm.com/</a>)</li>
-<li>FFTW if you would like to compile some of the example applications
-(<a class="reference external" href="http://www.fftw.org">http://www.fftw.org</a>)</li>
-</ul>
-<div class="note">
-<p class="first admonition-title">Note</p>
-<p class="last">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 without installing any additional software.</p>
-</div>
-</div>
-<div class="section" id="linux-installation">
-<h2><a class="toc-backref" href="#id5">Linux installation</a></h2>
-<p>The dependencies mentioned above should be included in most linux distributions. On Ubuntu you can install all required dependencies with:</p>
-<pre class="literal-block">
-sudo apt-get install libhdf5-serial-dev h5utils cmake cmake-curses-gui libboost-all-dev libxerces-c-dev xsdcxx doxygen git
-</pre>
-<p>After installation of dependencies, the library can be installed with:</p>
-<pre class="literal-block">
-git clone git://git.code.sf.net/p/ismrmrd/code ismrmrd-code
-cd ismrmrd-code/
-mkdir build
-cd build
-cmake ../
-make
-sudo make install
-</pre>
-<p>Last command will install the library in <tt class="docutils literal">/usr/local/ismrmrd</tt>.</p>
-</div>
-<div class="section" id="mac-osx-installation">
-<h2><a class="toc-backref" href="#id6">Mac OSX Installation</a></h2>
-<p>There are numerous different package management systems for Mac. In this example, we have used MacPorts (<a class="reference external" href="http://www.macports.org/">http://www.macports.org/</a>). First install the dependencies available in MacPorts:</p>
-<pre class="literal-block">
-sudo port install wget hdf5-18 h5utils boost xercesc3 git-core git-extras cmake doxygen
-</pre>
-<p>Next install CodeSynthesis XSD (<a class="reference external" href="http://www.codesynthesis.com/products/xsd/">http://www.codesynthesis.com/products/xsd/</a>):</p>
-<pre class="literal-block">
-wget http://www.codesynthesis.com/download/xsd/3.3/macosx/i686/xsd-3.3.0-i686-macosx.tar.bz2
-tar -xzf xsd-3.3.0-i686-macosx.tar.bz2
-cd xsd-3.3.0-i686-macosx
-sudo cp bin/xsd /usr/local/bin/
-sudo cp -r libxsd/xsd /usr/local/include/
-</pre>
-<p>See <a class="reference internal" href="#faq">faq</a> for details on problems on some Mac OSX Lion systems.</p>
-<p>Last step is to download and compile:</p>
-<pre class="literal-block">
-git clone git://git.code.sf.net/p/ismrmrd/code ismrmrd-code
-cd ismrmrd-code/
-mkdir build
-cd build/
-cmake ../
-make
-sudo make install
-</pre>
-<p>Last command will install the library in <tt class="docutils literal">/usr/local/ismrmrd</tt>.</p>
-</div>
-<div class="section" id="windows-installation">
-<h2><a class="toc-backref" href="#id7">Windows Installation</a></h2>
-<p>Setting up a Windows development environment is usually a bit more challenging than working on Unix platforms where most library dependencies are easily installed with package management systems (see above). The general Windows installation instructions (you may have to make adjustments for your setup) is as follows:</p>
-<ul class="simple">
-<li>Starting with a Windows 7 (64-bit) machine with Visual Studio 2010 installed.</li>
-<li>Install CMake (<a class="reference external" href="http://www.cmake.org/files/v2.8/cmake-2.8.9-win32-x86.exe">http://www.cmake.org/files/v2.8/cmake-2.8.9-win32-x86.exe</a>)</li>
-<li>Install Git (<a class="reference external" href="http://msysgit.googlecode.com/files/Git-1.7.11-preview20120710.exe">http://msysgit.googlecode.com/files/Git-1.7.11-preview20120710.exe</a>)</li>
-<li>Install HDF5 (<a class="reference external" href="http://www.hdfgroup.org/ftp/HDF5/current/bin/windows/HDF5189-win64-vs10-shared.zip">http://www.hdfgroup.org/ftp/HDF5/current/bin/windows/HDF5189-win64-vs10-shared.zip</a>)</li>
-<li>Install HDFView (<a class="reference external" href="http://www.hdfgroup.org/ftp/HDF5/hdf-java/hdfview/hdfview_install_win64.exe">http://www.hdfgroup.org/ftp/HDF5/hdf-java/hdfview/hdfview_install_win64.exe</a>)</li>
-<li>Install CodeSynthesis XSD (<a class="reference external" href="http://www.codesynthesis.com/download/xsd/3.3/windows/i686/xsd-3.3.msi">http://www.codesynthesis.com/download/xsd/3.3/windows/i686/xsd-3.3.msi</a>)</li>
-<li>Install Boost (<a class="reference external" href="http://boostpro.com/download/x64/boost_1_51_setup.exe">http://boostpro.com/download/x64/boost_1_51_setup.exe</a>)<ul>
-<li>Just install everything for VS2010 and worry about which versions you need later.</li>
-</ul>
-</li>
-<li>Install FFTW (<a class="reference external" href="ftp://ftp.fftw.org/pub/fftw/fftw-3.3.2-dll64.zip">ftp://ftp.fftw.org/pub/fftw/fftw-3.3.2-dll64.zip</a>)<ul>
-<li>You need to create <tt class="docutils literal">.lib</tt> files manually after installing. See instructions at <a class="reference external" href="http://www.fftw.org/install/windows.html">http://www.fftw.org/install/windows.html</a></li>
-</ul>
-</li>
-<li>Make sure the paths to your new libraries are in your PATH environment variable:<ul>
-<li>Boost libraries (typically <tt class="docutils literal"><span class="pre">C:\Program</span> Files\boost\boost_1_51\lib</tt>)</li>
-<li>Code Synthesis XSD (typically <tt class="docutils literal"><span class="pre">C:\Program</span> Files <span class="pre">(x86)\CodeSynthesis</span> XSD <span class="pre">3.3\bin\;C:\Program</span> Files <span class="pre">(x86)\CodeSynthesis</span> XSD 3.3\bin64\</tt>)</li>
-<li>FFTW libraries (typically <tt class="docutils literal"><span class="pre">C:\MRILibraries\fftw3</span></tt>)</li>
-<li>HDF5 libraries (typically <tt class="docutils literal"><span class="pre">C:\Program</span> Files\HDF Group\HDF5\1.8.9\bin</tt>)</li>
-<li>ISMRMRD (typically <tt class="docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files\ismrmrd\bin;C:\Program</span> Files\ismrmrd\bin</tt>)</li>
-</ul>
-</li>
-</ul>
-<p>This can seem a bit daunting, we have included a Windows <a class="reference internal" href="#powershell">powershell</a> script, which you can use to guide you through the installation process.</p>
-<p>After installing all dependencies, download the code, e.g. from a git bash shell:</p>
-<pre class="literal-block">
-git clone git://git.code.sf.net/p/ismrmrd/code ismrmrd-code
-cd ismrmrd-code/
-mkdir build
-cd build/
-cmake-gui.exe
-</pre>
-<p>Last command will open CMake's graphical user interface. Hit the configure button and deal with the dependencies that CMake is unable to find. Hit configure again and repeat the process until CMake has enough information to configure. Once the configuration is complete, you can hit generate to generate a Visual Studio project, which you can open and use to build ISMRMRD. There are step-by-step commands included in the <a class="reference internal" href="#powershell">powershell</a> scr [...]
-<pre class="literal-block">
-cmake -G"Visual Studio 10 Win64" -DBOOST_ROOT=C:/Program Files/boost/boost_1_51 \
- -DXERCESC_INCLUDE_DIR=C:/Program Files (x86)/CodeSynthesis XSD 3.3/include/xercesc \
- -DXERCESC_LIBRARIES=C:/Program Files (x86)/CodeSynthesis XSD 3.3/lib64/vc-10.0/xerces-c_3.lib \
- -DXSD_DIR=C:/Program Files (x86)/CodeSynthesis XSD 3.3 \
- -DFFTW3_INCLUDE_DIR=C:/MRILibraries/fftw3 \
- -DFFTW3F_LIBRARY=C:/MRILibraries/fftw3/libfftw3f-3.lib ../
-</pre>
-<p>Again, you may have to adjust for your specific installation paths. After generating the Visual Studio project, you can build from a Visual Studio Command Prompt with:</p>
-<pre class="literal-block">
-msbuild .\ISMRMRD.sln /p:Configuration=Release
-</pre>
-</div>
-</div>
-<div class="section" id="overview">
-<h1><a class="toc-backref" href="#id8">Overview</a></h1>
-<p>The raw data format combines a mix of flexible data structures (XML header) and fixed structures (equivalent to C-structs). A raw data set consist mainly of 2 sections:</p>
-<ol class="arabic simple">
-<li>A flexible XML format document that can contain an arbitrary number of fields and accommodate everything from simple values (b-values, etc.) to entire vendor protocols, etc. This purpose of this XML document is to provide parameters that may be meaningful for some experiments but not for others. This XML format is defined by an XML Schema Definition file (ismrmrd.xsd).</li>
-<li>Raw data section. This section contains all the acquired data in the experiment. Each data item is preceded by a C-struct with encoding numbers, etc. Following this data header is a channel header and data for each acquired channel. The raw data headers are defined in a C/C++ header file (ismrmrd.h)</li>
-</ol>
-<p>In addition to these sections, the ISMRMRD format also specifies an image header for storing reconstructed images and the accompanying C++ library provides a convenient way of writing such images into HDF5 files along with generic arrays for storing less well defined data structures, e.g. coil sensitivity maps or other calibration data.</p>
-<div class="section" id="flexible-data-header">
-<h2><a class="toc-backref" href="#id9">Flexible Data Header</a></h2>
-<p>The flexible data structure is defined by the xml schema definition in <tt class="docutils literal">schema/ismrmrd.xsd</tt> (<a class="reference internal" href="#schema">schema</a> is included in appendix below).</p>
-<p>An example of an XML file for a Cartesian 3D acquisition could look like:</p>
-<pre class="literal-block">
-<?xml version="1.0"?>
-<ismrmrdHeader xmlns="http://www.ismrm.org/ISMRMRD" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="http://www.ismrm.org/ISMRMRD ismrmrd.xsd">
- <subjectInformation>
- <patientName>phantom</patientName>
- <patientWeight_kg>70.3068</patientWeight_kg>
- </subjectInformation>
- <acquisitionSystemInformation>
- <systemVendor>SIEMENS</systemVendor>
- <systemModel>Avanto</systemModel>
- <systemFieldStrength_T>1.494</systemFieldStrength_T>
- <receiverChannels>32</receiverChannels>
- <relativeReceiverNoiseBandwidth>0.79</relativeReceiverNoiseBandwidth>
- </acquisitionSystemInformation>
- <experimentalConditions>
- <H1resonanceFrequency_Hz>63642459</H1resonanceFrequency_Hz>
- </experimentalConditions>
- <encoding>
- <trajectory>cartesian</trajectory>
- <encodedSpace>
- <matrixSize>
- <x>256</x>
- <y>140</y>
- <z>80</z>
- </matrixSize>
- <fieldOfView_mm>
- <x>600</x>
- <y>328.153125</y>
- <z>160</z>
- </fieldOfView_mm>
- </encodedSpace>
- <reconSpace>
- <matrixSize>
- <x>128</x>
- <y>116</y>
- <z>64</z>
- </matrixSize>
- <fieldOfView_mm>
- <x>300</x>
- <y>271.875</y>
- <z>128</z>
- </fieldOfView_mm>
- </reconSpace>
- <encodingLimits>
- <kspace_encoding_step_1>
- <minimum>0</minimum>
- <maximum>83</maximum>
- <center>28</center>
- </kspace_encoding_step_1>
- <kspace_encoding_step_2>
- <minimum>0</minimum>
- <maximum>45</maximum>
- <center>20</center>
- </kspace_encoding_step_2>
- <slice>
- <minimum>0</minimum>
- <maximum>0</maximum>
- <center>0</center>
- </slice>
- <set>
- <minimum>0</minimum>
- <maximum>0</maximum>
- <center>0</center>
- </set>
- </encodingLimits>
- </encoding>
- <parallelImaging>
- <accelerationFactor>
- <kspace_encoding_step_1>1</kspace_encoding_step_1>
- <kspace_encoding_step_2>1</kspace_encoding_step_2>
- </accelerationFactor>
- <calibrationMode>other</calibrationMode>
- </parallelImaging>
- <sequenceParameters>
- <TR>4.6</TR>
- <TE>2.35</TE>
- <TI>300</TI>
- </sequenceParameters>
-</ismrmrdHeader>
-
-
-</pre>
-<p>The most critical elements for image reconstruction are contained in the <tt class="docutils literal"><encoding></tt> section of the document, which describes the encoded spaced and also the target reconstructed space. Along with the <tt class="docutils literal"><encodingLimits></tt> this section allows the reconstruction program to determine matrix sizes, oversampling factors, partial Fourier, etc. In the example above, data is acquired with two-fold oversampling in the r [...]
-<pre class="literal-block">
-0 70 139
-|-------------------------------------|-------------------------------------------|
- ****************************************************
- ^ ^ ^
- 0 28 83
-</pre>
-<p>After FFT, only the central 116 lines are kept, i.e. there is a reduced field of view in the phase encoding direction. Center and encoding limits for the readout dimension is not given in the XML header. This is to accommodate sequences where the center of the readout may change from readout to readout (alternating directions of readout). There is a field on the individual data headers (see below) to indicate the center of the readout.</p>
-<p>An experiment can have multiple encoding spaces and it is possible to indicate on each acquired data readout, which encoding space the data belongs to (see below).</p>
-<p>In addition to the defined field in the xml header, it is possible to add an arbitrary number of user defined parameters to accommodate special sequence parameters. Please consult the xml <a class="reference internal" href="#schema">schema</a> to see how user parameters are defined. Briefly, the XML header can have a section at the end which looks like:</p>
-<pre class="literal-block">
-<userParameters>
- <userParameterLong>
- <name>MyVar1</name><value>1003</value>
- </userParameterLong>
- <userParameterLong>
- <name>MyVar2</name><value>1999</value>
- </userParameterLong>
- <userParameterDouble>
- <name>MyDoubleVar</name><value>87.6676</value>
- </userParameterDouble>
-</userParameters>
-</pre>
-</div>
-<div class="section" id="fixed-data-structures">
-<h2><a class="toc-backref" href="#id10">Fixed Data structures</a></h2>
-<p>Each raw data acquisition is preceded by the following fixed layout structure:</p>
-<pre class="literal-block">
-typedef struct AcquisitionHeader
-{
- uint16_t version; /**< First unsigned int indicates the version */
- uint64_t flags; /**< bit field with flags */
- uint32_t measurement_uid; /**< Unique ID for the measurement */
- uint32_t scan_counter; /**< Current acquisition number in the measurement */
- uint32_t acquisition_time_stamp; /**< Acquisition clock */
- uint32_t physiology_time_stamp[ISMRMRD_PHYS_STAMPS]; /**< Physiology time stamps, e.g. ecg, breating, etc. */
- uint16_t number_of_samples; /**< Number of samples acquired */
- uint16_t available_channels; /**< Available coils */
- uint16_t active_channels; /**< Active coils on current acquisiton */
- uint64_t channel_mask[ISMRMRD_CHANNEL_MASKS]; /**< Mask to indicate which channels are active. Support for 1024 channels */
- uint16_t discard_pre; /**< Samples to be discarded at the beginning of acquisition */
- uint16_t discard_post; /**< Samples to be discarded at the end of acquisition */
- uint16_t center_sample; /**< Sample at the center of k-space */
- uint16_t encoding_space_ref; /**< Reference to an encoding space, typically only one per acquisition */
- uint16_t trajectory_dimensions; /**< Indicates the dimensionality of the trajectory vector (0 means no trajectory) */
- float sample_time_us; /**< Time between samples in micro seconds, sampling BW */
- float position[ISMRMRD_POSITION_LENGTH]; /**< Three-dimensional spatial offsets from isocenter */
- float read_dir[ISMRMRD_DIRECTION_LENGTH]; /**< Directional cosines of the readout/frequency encoding */
- float phase_dir[ISMRMRD_DIRECTION_LENGTH]; /**< Directional cosines of the phase */
- float slice_dir[ISMRMRD_DIRECTION_LENGTH]; /**< Directional cosines of the slice direction */
- float patient_table_position[ISMRMRD_POSITION_LENGTH]; /**< Patient table off-center */
- EncodingCounters idx; /**< Encoding loop counters, see above */
- int32_t user_int[ISMRMRD_USER_INTS]; /**< Free user parameters */
- float user_float[ISMRMRD_USER_FLOATS]; /**< Free user parameters */
-} AcquisitionHeader;
-
-</pre>
-<p>Where EncodingCounters are defined as:</p>
-<pre class="literal-block">
-typedef struct EncodingCounters {
- uint16_t kspace_encode_step_1; /**< e.g. phase encoding line number */
- uint16_t kspace_encode_step_2; /**< e.g. partition encodning number */
- uint16_t average; /**< e.g. signal average number */
- uint16_t slice; /**< e.g. imaging slice number */
- uint16_t contrast; /**< e.g. echo number in multi-echo */
- uint16_t phase; /**< e.g. cardiac phase number */
- uint16_t repetition; /**< e.g. dynamic number for dynamic scanning */
- uint16_t set; /**< e.g. flow encodning set */
- uint16_t segment; /**< e.g. segment number for segmented acquisition */
- uint16_t user[ISMRMRD_USER_INTS]; /**< Free user parameters */
-} EncodingCounters;
-
-</pre>
-<p>The interpretation of some of these fields may vary from sequence to sequence, i.e. for a Cartesian sequence, <tt class="docutils literal">kspace_encode_step_1</tt> would be the phase encoding step, for a spiral sequence where phase encoding direction does not make sense, it would be the spiral interleave number. The <tt class="docutils literal">encoding_space_ref</tt> enables the user to tie an acquisition to a specific encoding space (see above) in case there are multiple, e.g. in s [...]
-<p>The flags field is a bit mask, which in principle can be used freely by the user, but suggested flag values are given in <tt class="docutils literal">ismrmrd.h</tt>, it is recommended not to use already designated flag bits for custom purposes. There are a set of bits reserved for prototyping (bits 57-64), please see <tt class="docutils literal">ismrmrd.h</tt> for details.</p>
-<p>The header contains a <tt class="docutils literal">trajectory_dimensions</tt> field. If the value of this field is larger than 0, it means that trajectories are stored with each individual acquisition. For a 2D acquisition, the <tt class="docutils literal">trajectory_dimensions</tt> would typically be 2 and the convention (for memory layout) is that the header is followed immediately by the trajectory before the complex data. There is an example of how this memory layout could be impl [...]
-<pre class="literal-block">
-class Acquisition
-{
-
-//....
-
-AcquisitionHeader head_; //Header, see above
-
-float* traj_; //Trajectory, elements = head_.trajectory_dimensions*head_.number_of_samples
- // [kx,ky,kx,ky.....] (for head_.trajectory_dimensions = 2)
- // [kx,ky,kz,kx,ky,kz,.....] (for head_.trajectory_dimensions = 3)
-
-float* data_; //Actual data, elements = head_.number_of_samples*head_.active_channels*2
- // [re,im,re,im,.....,re,im,re,im,.....,re,im,re,im,.....]
- // ---channel 1-------channel 2---------channel 3-----
-
-};
-</pre>
-<p>This suggested memory layout is only a suggestion. The HDF5 interface (see below) can be used to read the data into many different data structures. In fact, the user can choose to read only part of the header or not read the data, etc.</p>
-<p>As mentioned above, the ISMRMRD format also suggests a way to store reconstructed images (or maybe image data used for calibration). An <tt class="docutils literal">ImageHeader</tt> structure is defined in <tt class="docutils literal">ismrmrd.h</tt>:</p>
-<pre class="literal-block">
-typedef struct ImageHeader
-{
- uint16_t version; /**< First unsigned int indicates the version */
- uint64_t flags; /**< bit field with flags */
- uint32_t measurement_uid; /**< Unique ID for the measurement */
- uint16_t matrix_size[3]; /**< Pixels in the 3 spatial dimensions */
- float field_of_view[3]; /**< Size (in mm) of the 3 spatial dimensions */
- uint16_t channels; /**< Number of receive channels */
- float position[ISMRMRD_POSITION_LENGTH]; /**< Three-dimensional spatial offsets from isocenter */
- float read_dir[ISMRMRD_DIRECTION_LENGTH]; /**< Directional cosines of the readout/frequency encoding */
- float phase_dir[ISMRMRD_DIRECTION_LENGTH]; /**< Directional cosines of the phase */
- float slice_dir[ISMRMRD_DIRECTION_LENGTH]; /**< Directional cosines of the slice direction */
- float patient_table_position[ISMRMRD_POSITION_LENGTH]; /**< Patient table off-center */
- uint16_t average; /**< e.g. signal average number */
- uint16_t slice; /**< e.g. imaging slice number */
- uint16_t contrast; /**< e.g. echo number in multi-echo */
- uint16_t phase; /**< e.g. cardiac phase number */
- uint16_t repetition; /**< e.g. dynamic number for dynamic scanning */
- uint16_t set; /**< e.g. flow encodning set */
- uint32_t acquisition_time_stamp; /**< Acquisition clock */
- uint32_t physiology_time_stamp[ISMRMRD_PHYS_STAMPS]; /**< Physiology time stamps, e.g. ecg, breating, etc. */
- uint16_t image_data_type; /**< e.g. unsigned short, float, complex float, etc. */
- uint16_t image_type; /**< e.g. magnitude, phase, complex, real, imag, etc. */
- uint16_t image_index; /**< e.g. image number in series of images */
- uint16_t image_series_index; /**< e.g. series number */
- int32_t user_int[ISMRMRD_USER_INTS]; /**< Free user parameters */
- float user_float[ISMRMRD_USER_FLOATS]; /**< Free user parameters */
-} ImageHeader;
-
-</pre>
-<p>In a similar fashion to the raw data acquisition data, the intention is to store a header followed by the image data. Since image data can be in several different format (e.g. float, complex, etc.), the memory layout is less well defined but can be described as:</p>
-<pre class="literal-block">
-template <typename T> class Image {
-
-ImageHeader head_; //ImageHeader as defined above
-T* data_; //Data, array of size (matrix_size[0]*matrix_size[1]*matrix_size[2]*channels),
- //first spatial dimension is fastest changing array index, channels outer most (slowest changing).
-};
-</pre>
-</div>
-</div>
-<div class="section" id="file-storage">
-<h1><a class="toc-backref" href="#id11">File Storage</a></h1>
-<p>The ISMRM Raw Data format is stored in HDF5 format. Details on this format can be found at the <a class="reference external" href="http://www.hdfgroup.org/HDF5/">HDF5</a> website. Briefly it is a hierarchical data format (much like a file system), which can contain multiple variable organized in groups (like folders in a file system). The variables can contain arrays of data values, custom defined structs, or simple text fields. It is the convention (but not a requirement) that the IS [...]
-<pre class="literal-block">
->> data = h5read('simple_gre.h5', '/dataset/data');
->> data
-
-data =
-
-head: [1x1 struct]
-traj: {1x1281 cell}
-data: {1x1281 cell}
-
- >> data.head
-
- ans =
-
- version: [1x1281 uint16]
- flags: [1x1281 uint64]
- measurement_uid: [1x1281 uint32]
- scan_counter: [1x1281 uint32]
- acquisition_time_stamp: [1x1281 uint32]
- physiology_time_stamp: [3x1281 uint32]
- number_of_samples: [1x1281 uint16]
- available_channels: [1x1281 uint16]
- active_channels: [1x1281 uint16]
- channel_mask: [16x1281 uint64]
- discard_pre: [1x1281 uint16]
- discard_post: [1x1281 uint16]
- center_sample: [1x1281 uint16]
- encoding_space_ref: [1x1281 uint16]
- trajectory_dimensions: [1x1281 uint16]
- sample_time_us: [1x1281 single]
- position: [3x1281 single]
- read_dir: [3x1281 single]
- phase_dir: [3x1281 single]
- slice_dir: [3x1281 single]
- patient_table_position: [3x1281 single]
- idx: [1x1 struct]
- user_int: [8x1281 int32]
- user_float: [8x1281 single]
-
- >>
-</pre>
-<p>The HDF5 file format can be access from C, C++, and java using the libraries provided on the HDF5 website. The ISMRMRD distribution also comes with some C++ wrappers that can be used for easy access (read and write) from C++ programs. See below.</p>
-<p>In addition to storing acquisition data and images as defined by the headers above, the HDF5 format also enables storage of generic multi-dimensional arrays. The ISMRMRD format does not explicitly define how such data should be stored, but leaves it open for the user to add variables and data as dictated by a given application.</p>
-</div>
-<div class="section" id="c-support-library">
-<h1><a class="toc-backref" href="#id12">C++ Support Library</a></h1>
-<p>To enable easy prototyping of C++ software using the ISMRMRD data format, a simple C++ wrapper class is provided (defined in <tt class="docutils literal">ismrmrd_hdf5.h</tt>):</p>
-<pre class="literal-block">
-class EXPORTISMRMRD IsmrmrdDataset
-{
- public:
-
- IsmrmrdDataset(const char* filename, const char* groupname, bool create_file_if_needed = true)
- : filename_(filename)
- , groupname_(groupname)
- , file_open_(false)
- , dataset_open_(false)
- , create_file_if_needed_(create_file_if_needed)
- {
- std::ifstream ifile(filename_.c_str());
- file_exists_ = ifile;
-
- if (openHDF5File() < 0) {
- std::cerr << "IsmrmrdDataset: Error opening HDF file." << std::endl;
- }
-
- if (!linkExists(groupname_.c_str())) {
- if (createGroupForDataset(groupname_.c_str()) < 0) {
- std::cerr << "IsmrmrdDataset: Error create HDF5 group." << std::endl;
- }
- }
-
- xml_header_path_ = groupname_ + std::string("/xml");
- data_path_ = groupname_ + std::string("/data");
- }
-
- int appendAcquisition(Acquisition* a);
- boost::shared_ptr<Acquisition> readAcquisition(unsigned long index = 0);
- unsigned long getNumberOfAcquisitions();
-
- int writeHeader(std::string& xml);
- boost::shared_ptr<std::string> readHeader();
-
- template <typename T> int appendImage(Image<T>& m, const char* varname);
- template <typename T> boost::shared_ptr< Image<T> > readImage(const char* varname, unsigned long index = 0);
-
- int appendImageHeader(ImageHeader& h, const char* varname);
- boost::shared_ptr< ImageHeader > readImageHeader(const char* varname, unsigned long index = 0);
-
- template <typename T> int appendArray(NDArrayContainer<T>& a, const char* varname);
- template <typename T> int appendArray(std::vector<unsigned int>& dimensions, T* data, const char* varname);
- template <typename T> boost::shared_ptr< NDArrayContainer<T> > readArray(const char* varname, unsigned long index = 0);
- };
-</pre>
-<p>Using this wrapper, C++ applications can be programmed as:</p>
-<pre class="literal-block">
-boost::shared_ptr<ISMRMRD::IsmrmrdDataset> ismrmrd_dataset(new ISMRMRD::IsmrmrdDataset(hdf5_in_data_file,hdf5_in_group));
-boost::shared_ptr<std::string> xml_config = ismrmrd_dataset->readHeader();
-
-//Do something with the header
-
-unsigned long acquisitions = ismrmrd_dataset->getNumberOfAcquisitions();
-
-for (unsigned long int i = 0; i < acquisitions; i++) {
- boost::shared_ptr<ISMRMRD::Acquisition> acq_tmp = ismrmrd_dataset->readAcquisition(i);
- //Do something with the data
-}
-</pre>
-<p>Since the XML part of the header is defined in the <tt class="docutils literal">schema/ismrmrd.xsd</tt> file, it is possible to use XML data binding tools such as CodeSynthesys XSD to generate a C++ class representation of the header for easy access to the fields. The <tt class="docutils literal">cmake</tt> build files that accompany the ISMRMRD distribution automatically tries to find CodeSynthesis XSD and generate such a binding. With the C++ representation of the header it can be p [...]
-<pre class="literal-block">
-xml_schema::properties props;
-props.schema_location ("http://www.ismrm.org/ISMRMRD",std::string("/full/path/to/ismrmrd.xsd"));
-std::istringstream str_stream(xml, std::stringstream::in);
-boost::shared_ptr<ISMRMRD::ismrmrdHeader> cfg;
-
-try {
- cfg = boost::shared_ptr<ISMRMRD::ismrmrdHeader>(ISMRMRD::ismrmrdHeader_ (str_stream,0,props));
-} catch (const xml_schema::exception& e) {
- std::cout << "Failed to parse XML Parameters: " << e.what() << std::endl;
-}
-
-//Use the configuration, e.g.:
-std::cout << "Number of encoding spaces: " << cfg->encoding().size() << std::endl;
-</pre>
-<p>Again, this is not a requirement for using the ISMRMRD format, the XML can be parsed with numerous other xml parsing libraries. The schema file <tt class="docutils literal">schema/ismrmrd.xsd</tt> gives the user the option of validating the XML header before parsing, which is recommended to reduce the chance of hard to detect errors in your code due to missing or malformed parameters.</p>
-<div class="section" id="c-example-applications">
-<h2><a class="toc-backref" href="#id13">C++ Example Applications</a></h2>
-<p>The distribution includes two example applications, one that creates a simple 2D single-channel dataset from scratch and one that reconstructs this dataset (you need FFTW installed to compile these test applications). The data generation application looks like this (<tt class="docutils literal">test_create_dataset.cpp</tt>):</p>
-<pre class="literal-block">
-
-int main(int argc, char** argv)
-{
- std::cout << "ISMRMRD Test Dataset Creation App" << std::endl;
-
- const unsigned int readout = 256;
- const unsigned int phase_encoding_lines = 128;
-
- ISMRMRD::IsmrmrdDataset d("testdata.h5","dataset");
-
- //Let's create the "original" image in the file for reference
- if (appendImageArray< std::complex<float>, readout, phase_encoding_lines >(d, "the_square") < 0) {
- std::cout << "Error adding image to dataset" << std::endl;
- return -1;
- }
-
- //Read it back from the file
- boost::shared_ptr< ISMRMRD::NDArrayContainer<std::complex<float> > > img_test =
- d.readArray< std::complex<float> >("the_square", 0);
-
- if (img_test.get() == 0) {
- std::cout << "Error reading image array from file" << std::endl;
- return -1;
- }
-
- std::cout << "Image Array dimensions: ";
- for (int di = 0; di < img_test->dimensions_.size(); di++) {
- std::cout << img_test->dimensions_[di] << " ";
- }
- std::cout << std::endl;
-
- //Let's FFT this image to k-space
- fftwf_complex* tmp = (fftwf_complex*)fftwf_malloc(sizeof(fftwf_complex)*img_test->data_.size());
-
- if (!tmp) {
- std::cout << "Error allocating temporary storage for FFTW" << std::endl;
- return -1;
- }
-
- fftshift(reinterpret_cast<std::complex<float>*>(tmp),&img_test->data_[0],img_test->dimensions_[0],img_test->dimensions_[1]);
-
- //Create the FFTW plan
- fftwf_plan p = fftwf_plan_dft_2d(img_test->dimensions_[1], img_test->dimensions_[0], tmp,tmp, FFTW_FORWARD, FFTW_ESTIMATE);
-
- fftwf_execute(p);
-
- fftshift(&img_test->data_[0],reinterpret_cast<std::complex<float>*>(tmp),img_test->dimensions_[0],img_test->dimensions_[1]);
-
- //Clean up.
- fftwf_destroy_plan(p);
- fftwf_free(tmp);
-
- //Let keep the "original" k-space in the file for reference
- if (d.appendArray(*img_test,"the_square_k") < 0) {
- std::cout << "Error adding kspace to dataset" << std::endl;
- return -1;
- }
-
- //Let's append the data to the file
- ISMRMRD::Acquisition acq;
-
- for (unsigned int i = 0; i < phase_encoding_lines; i++) {
- acq.setFlags(0);
- //acq.head_.flags = 0;
-
- //Set some flags
- if (i == 0) {
- acq.setFlag(ISMRMRD::FlagBit(ISMRMRD::ACQ_FIRST_IN_SLICE));
- }
- if (i == (phase_encoding_lines-1)) {
- acq.setFlag(ISMRMRD::FlagBit(ISMRMRD::ACQ_LAST_IN_SLICE));
- }
- acq.getIdx().kspace_encode_step_1 = i;
- acq.setActiveChannels(1);
- acq.setAvailableChannels(1);
- acq.setNumberOfSamples(readout);
- acq.setCenterSample(readout>>1);
- acq.setSampleTimeUs(5.0);
- memcpy(&acq[0],&img_test->data_[i*readout],sizeof(float)*readout*2);
- d.appendAcquisition(&acq);
- }
-
- //Let's create a header, we will use the C++ class generated by XSD
- ISMRMRD::experimentalConditionsType exp(63500000); //~1.5T
- ISMRMRD::ismrmrdHeader h(exp);
-
- //Create an encoding section
- ISMRMRD::encodingSpaceType es(ISMRMRD::matrixSize(readout,phase_encoding_lines,1),ISMRMRD::fieldOfView_mm(600,300,6));
- ISMRMRD::encodingSpaceType rs(ISMRMRD::matrixSize((readout>>1),phase_encoding_lines,1),ISMRMRD::fieldOfView_mm(300,300,6));
- ISMRMRD::encodingLimitsType el;
- el.kspace_encoding_step_1(ISMRMRD::limitType(0,phase_encoding_lines-1,(phase_encoding_lines>>1)));
- ISMRMRD::encoding e(es,rs,el,ISMRMRD::trajectoryType::cartesian);
-
- //Add the encoding section to the header
- h.encoding().push_back(e);
-
- //Add any additional fields that you may want would go here....
-
- //e.g. parallel imaging
- //ISMRMRD::parallelImagingType parallel(ISMRMRD::accelerationFactorType(2,1));
- //parallel.calibrationMode(ISMRMRD::calibrationModeType::embedded);
- //h.parallelImaging(parallel);
-
- //Serialize the header
- xml_schema::namespace_infomap map;
- map[""].name = "http://www.ismrm.org/ISMRMRD";
- map[""].schema = "ismrmrd.xsd";
- std::stringstream str;
- ISMRMRD::ismrmrdHeader_(str, h, map);
- std::string xml_header = str.str();
-
- //Write the header to the data file.
- d.writeHeader(xml_header);
-
- return 0;
-}
-
-</pre>
-<p>To reconstruct this synthetic dataset, you can use the test reconstruction application (<tt class="docutils literal">test_recon_dataset.cpp</tt>):</p>
-<pre class="literal-block">
-
-int main(int argc, char** argv)
-{
- if (argc < 3) {
- print_usage(argv[0]);
- return -1;
- }
-
- std::string datafile(argv[1]);
- std::string schemafile(argv[2]);
-
- std::cout << "Simple ISMRMRD Reconstruction program" << std::endl;
- std::cout << " - filename: " << datafile << std::endl;
- std::cout << " - schema : " << schemafile << std::endl;
-
- //Let's open the dataset
- ISMRMRD::IsmrmrdDataset d(datafile.c_str(),"dataset");
-
- //We will start by getting the header and turning it into a C++ class
- //In order to do true validation of the XML, we will use the XML schema
- xml_schema::properties props;
- props.schema_location ("http://www.ismrm.org/ISMRMRD", schemafile);
-
- boost::shared_ptr<std::string> xml = d.readHeader();
- std::istringstream str_stream(*xml, std::stringstream::in);
-
- boost::shared_ptr<ISMRMRD::ismrmrdHeader> cfg;
-
- try {
- cfg = boost::shared_ptr<ISMRMRD::ismrmrdHeader>(ISMRMRD::ismrmrdHeader_ (str_stream,0,props));
- } catch (const xml_schema::exception& e) {
- std::cout << "Failed to parse XML Parameters: " << e.what() << std::endl;
- }
-
- //Let's print some information from the header
- ISMRMRD::ismrmrdHeader::encoding_sequence e_seq = cfg->encoding();
- if (e_seq.size() != 1) {
- std::cout << "Number of encoding spaces: " << e_seq.size() << std::endl;
- std::cout << "This simple reconstruction application only supports one encoding space" << std::endl;
- return -1;
- }
-
- ISMRMRD::encodingSpaceType e_space = (*e_seq.begin()).encodedSpace();
- ISMRMRD::encodingSpaceType r_space = (*e_seq.begin()).reconSpace();
- ISMRMRD::encodingLimitsType e_limits = (*e_seq.begin()).encodingLimits();
-
- std::cout << "Encoding Matrix Size : [" << e_space.matrixSize().x() << ", " << e_space.matrixSize().y() << ", " << e_space.matrixSize().z() << "]" << std::endl;
- std::cout << "Reconstruction Matrix Size : [" << r_space.matrixSize().x() << ", " << r_space.matrixSize().y() << ", " << r_space.matrixSize().z() << "]" << std::endl;
- std::cout << "Number of acquisitions : " << d.getNumberOfAcquisitions() << std::endl;
-
- if (e_space.matrixSize().z() != 1) {
- std::cout << "This simple reconstruction application only supports 2D encoding spaces" << std::endl;
- return -1;
- }
-
-
- //Allocate a buffer for the data
- ISMRMRD::NDArrayContainer< std::complex<float> > buffer;
- buffer.dimensions_.push_back(e_space.matrixSize().x());
- buffer.dimensions_.push_back(e_space.matrixSize().y());
- buffer.resize(e_space.matrixSize().x()*e_space.matrixSize().y(), std::complex<float>(0.0,0.0));
-
-
- //Now loop through and copy data
- unsigned int number_of_acquisitions = d.getNumberOfAcquisitions();
- for (unsigned int i = 0; i < number_of_acquisitions; i++) {
- //Read one acquisition at a time
- boost::shared_ptr<ISMRMRD::Acquisition> acq = d.readAcquisition(i);
-
- //Copy data, we should probably be more careful here and do more tests....
- //We are not considering multiple channels here.
- unsigned int offset = acq->getIdx().kspace_encode_step_1*buffer.dimensions_[0];
- memcpy(&buffer[offset],&acq->getData()[0],sizeof(float)*2*buffer.dimensions_[0]);
- }
-
- //Let's FFT the k-space to image
- fftwf_complex* tmp = (fftwf_complex*)fftwf_malloc(sizeof(fftwf_complex)*buffer.data_.size());
-
- if (!tmp) {
- std::cout << "Error allocating temporary storage for FFTW" << std::endl;
- return -1;
- }
-
- fftshift(reinterpret_cast<std::complex<float>*>(tmp),&buffer.data_[0],buffer.dimensions_[0],buffer.dimensions_[1]);
-
- //Create the FFTW plan
- fftwf_plan p = fftwf_plan_dft_2d(buffer.dimensions_[1], buffer.dimensions_[0], tmp,tmp, FFTW_BACKWARD, FFTW_ESTIMATE);
-
- fftwf_execute(p);
-
- fftshift(&buffer.data_[0],reinterpret_cast<std::complex<float>*>(tmp),buffer.dimensions_[0],buffer.dimensions_[1]);
-
- //Clean up.
- fftwf_destroy_plan(p);
- fftwf_free(tmp);
-
- //Now, let's remove the oversampling in the readout and take the magnitude
- //Allocate a buffer for the data
- ISMRMRD::NDArrayContainer< float > img;
- img.dimensions_.push_back(r_space.matrixSize().x());
- img.dimensions_.push_back(r_space.matrixSize().y());
- img.data_.resize(r_space.matrixSize().x()*r_space.matrixSize().y(), 0.0);
-
- for (unsigned int y = 0; y < img.dimensions_[1]; y++) {
- for (unsigned int x = 0; x < img.dimensions_[0]; x++) {
- img.data_[y*img.dimensions_[0]+x] =
- std::abs(buffer.data_[y*buffer.dimensions_[0] + x + ((e_space.matrixSize().x()-r_space.matrixSize().x())>>1)]);
- }
- }
-
- //Let's write the reconstructed image straight in the same data file
- ISMRMRD::ImageHeader img_h;
- img_h.channels = 1;
- img_h.image_data_type = ISMRMRD::DATA_COMPLEX_FLOAT; //This is actually just guidance
- img_h.image_type = ISMRMRD::TYPE_COMPLEX; //This is actually just guidance
- img_h.slice = 0;
- //And so on
-
- //Now append, we will append image and header separately (in two different datasets)
- d.appendImageHeader(img_h,"myimage.head");
- d.appendArray(img,"myimage.img");
-
-
- return 0;
-}
-
-</pre>
-</div>
-</div>
-<div class="section" id="matlab-example-code-and-datasets">
-<h1><a class="toc-backref" href="#id14">Matlab Example Code and Datasets</a></h1>
-<p>The <tt class="docutils literal">examples</tt> folder contains some matlab code to illustrate simple interaction with the ISMRMRD data format. The examples use test data sets, wich can be downloaded from the Sourceforge <a class="reference external" href="http://sourceforge.net/projects/ismrmrd">website</a>. Go to the <tt class="docutils literal">examples/data</tt> folder and type the following to download the data:</p>
-<pre class="literal-block">
-wget https://sourceforge.net/projects/ismrmrd/files/data/3D_partial_fourier.h5
-wget https://sourceforge.net/projects/ismrmrd/files/data/simple_gre.h5
-wget https://sourceforge.net/projects/ismrmrd/files/data/simple_spiral.h5
-</pre>
-<p>For instance, to reconstruct a 2D Cartesian acquisition (10 image repetitions), type (from the <tt class="docutils literal">examples/matlab</tt> folder):</p>
-<pre class="literal-block">
->> images = simple_cartesian_recon('../data/simple_gre.h5');
-Reconstructing image 1....done
-Reconstructing image 2....done
-Reconstructing image 3....done
-Reconstructing image 4....done
-Reconstructing image 5....done
-Reconstructing image 6....done
-Reconstructing image 7....done
-Reconstructing image 8....done
-Reconstructing image 9....done
-Reconstructing image 10....done
->>
-</pre>
-<p>You should see one of the reconstructed images display. An example is also given of a 3D acquisition with partial Fourier, phase and slice oversampling, etc. Reconstruct this dataset with:</p>
-<pre class="literal-block">
->> images = simple_cartesian_recon('../data/3D_partial_fourier.h5');
-Reconstructing image 1....done
-</pre>
-<p>The center slice of the volume should be displayed at the end of the reconstruction.</p>
-<p>Finally, there is also a spiral dataset. This dataset illustrates how the flexible section of the <tt class="docutils literal"><trajectoryDescription></tt> can be used to add user defined parameters and an identifier to describe the trajectory. This dataset is also an example of storing the trajectory with the data for direct reconstruction. Reconstruct this dataset with:</p>
-<pre class="literal-block">
->> images = simple_spiral_recon('../data/simple_spiral.h5');
-Reconstructing image 1....done
-Reconstructing image 2....done
-Reconstructing image 3....done
-Reconstructing image 4....done
-Reconstructing image 5....done
-Reconstructing image 6....done
-Reconstructing image 7....done
-Reconstructing image 8....done
-Reconstructing image 9....done
-Reconstructing image 10....done
->>
-</pre>
-</div>
-<div class="section" id="appendix">
-<h1><a class="toc-backref" href="#id15">Appendix</a></h1>
-<div class="section" id="frequently-asked-questions">
-<h2><a class="toc-backref" href="#id16">Frequently Asked Questions</a></h2>
-<ul id="faq">
-<li><p class="first">I am trying to compile on Mac OSX Lion and I am getting strange errors.</p>
-<blockquote>
-<p>in version 3.3.0 of CodeSynthesis XSD there is a problem with the clang compiler. It can build with clang on os x 10.7 (Lion) by editing
-<cite>/usr/local/include/xsd/cxx/zc-istream.txx</cite>. Change line 35 from:</p>
-<pre class="literal-block">
-setg (b, b, e);
-</pre>
-<p>to:</p>
-<pre class="literal-block">
-std::streambuf::setg (b, b, e);
-</pre>
-<p>See also:
-<a class="reference external" href="http://codesynthesis.com/pipermail/xsd-users/2011-May/003283.html">http://codesynthesis.com/pipermail/xsd-users/2011-May/003283.html</a></p>
-</blockquote>
-</li>
-</ul>
-</div>
-<div class="section" id="xml-schema-definition">
-<h2><a class="toc-backref" href="#id17">XML Schema Definition</a></h2>
-<pre class="literal-block" id="schema">
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<xs:schema xmlns="http://www.ismrm.org/ISMRMRD" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.ismrm.org/ISMRMRD">
-
- <xs:element name="ismrmrdHeader">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="1" minOccurs="0" name="subjectInformation" type="subjectInformationType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="studyInformation" type="studyInformationType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="measurementInformation" type="measurementInformationType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="acquisitionSystemInformation" type="acquisitionSystemInformationType"/>
- <xs:element maxOccurs="1" minOccurs="1" name="experimentalConditions" type="experimentalConditionsType"/>
- <xs:element maxOccurs="unbounded" minOccurs="1" name="encoding">
- <xs:complexType>
- <xs:all>
- <xs:element maxOccurs="1" minOccurs="1" name="encodedSpace" type="encodingSpaceType"/>
- <xs:element maxOccurs="1" minOccurs="1" name="reconSpace" type="encodingSpaceType"/>
- <xs:element maxOccurs="1" minOccurs="1" name="encodingLimits" type="encodingLimitsType"/>
- <xs:element maxOccurs="1" minOccurs="1" name="trajectory" type="trajectoryType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="trajectoryDescription" type="trajectoryDescriptionType"/>
- </xs:all>
- </xs:complexType>
- </xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="parallelImaging" type="parallelImagingType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="sequenceParameters" type="sequenceParametersType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="dicomParameters" type="dicomParametersType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="userParameters">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="userParameterLong" type="userParameterLongType"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="userParameterDouble" type="userParameterDoubleType"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="userParameterBase64" type="userParameterBase64Type"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:complexType name="subjectInformationType">
- <xs:all>
- <xs:element minOccurs="0" name="patientName" type="xs:string"/>
- <xs:element minOccurs="0" name="patientWeight_kg" type="xs:float"/>
- <xs:element minOccurs="0" name="patientID" type="xs:string"/>
- <xs:element minOccurs="0" name="patientBirthdate" type="xs:date"/>
- <xs:element minOccurs="0" name="patientGender">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:pattern value="[MFO]"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:element>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="studyInformationType">
- <xs:all>
- <xs:element minOccurs="1" name="studyDate" type="xs:date"/>
- <xs:element minOccurs="1" name="studyTime" type="xs:time"/>
- <xs:element minOccurs="0" name="studyID" type="xs:string"/>
- <xs:element minOccurs="0" name="accessionNumber" type="xs:long"/>
- <xs:element minOccurs="0" name="referringPhysicianName" type="xs:string"/>
- <xs:element minOccurs="0" name="studyDescription" type="xs:string"/>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="experimentalConditionsType">
- <xs:all>
- <xs:element name="H1resonanceFrequency_Hz" type="xs:long"/>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="acquisitionSystemInformationType">
- <xs:all>
- <xs:element minOccurs="0" name="systemVendor" type="xs:string"/>
- <xs:element minOccurs="0" name="systemModel" type="xs:string"/>
- <xs:element minOccurs="0" name="systemFieldStrength_T" type="xs:float"/>
- <xs:element minOccurs="0" name="relativeReceiverNoiseBandwidth" type="xs:float"/>
- <xs:element minOccurs="0" name="receiverChannels" type="xs:unsignedShort"/>
- <xs:element minOccurs="0" name="institutionName" type="xs:string"/>
- <xs:element minOccurs="0" name="stationName" type="xs:string"/>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="encodingSpaceType">
- <xs:all>
- <xs:element name="matrixSize">
- <xs:complexType>
- <xs:sequence>
- <xs:element default="1" maxOccurs="1" minOccurs="1" name="x" type="xs:unsignedShort"/>
- <xs:element default="1" maxOccurs="1" minOccurs="1" name="y" type="xs:unsignedShort"/>
- <xs:element default="1" maxOccurs="1" minOccurs="1" name="z" type="xs:unsignedShort"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- <xs:element name="fieldOfView_mm">
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs="1" minOccurs="1" name="x" type="xs:float"/>
- <xs:element maxOccurs="1" minOccurs="1" name="y" type="xs:float"/>
- <xs:element maxOccurs="1" minOccurs="1" name="z" type="xs:float"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="limitType">
- <xs:all>
- <xs:element default="0" name="minimum" type="xs:unsignedShort"/>
- <xs:element default="0" name="maximum" type="xs:unsignedShort"/>
- <xs:element default="0" name="center" type="xs:unsignedShort"/>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="encodingLimitsType">
- <xs:all>
- <xs:element maxOccurs="1" minOccurs="0" name="kspace_encoding_step_0" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="kspace_encoding_step_1" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="kspace_encoding_step_2" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="average" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="slice" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="contrast" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="phase" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="repetition" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="set" type="limitType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="segment" type="limitType"/>
- </xs:all>
- </xs:complexType>
-
- <xs:simpleType name="trajectoryType">
- <xs:restriction base="xs:string">
- <xs:enumeration value="cartesian"/>
- <xs:enumeration value="epi"/>
- <xs:enumeration value="radial"/>
- <xs:enumeration value="goldenangle"/>
- <xs:enumeration value="spiral"/>
- <xs:enumeration value="other"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:complexType name="trajectoryDescriptionType">
- <xs:sequence>
- <xs:element maxOccurs="1" minOccurs="1" name="identifier" type="xs:string"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="userParameterLong" type="userParameterLongType"/>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="userParameterDouble" type="userParameterDoubleType"/>
- <xs:element maxOccurs="1" minOccurs="0" name="comment" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="sequenceParametersType">
- <xs:sequence>
- <xs:element minOccurs="1" maxOccurs="unbounded" type="xs:float" name="TR"/>
- <xs:element minOccurs="1" maxOccurs="unbounded" type="xs:float" name="TE"/>
- <xs:element minOccurs="0" maxOccurs="unbounded" type="xs:float" name="TI"/>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="userParameterLongType">
- <xs:all>
- <xs:element name="name" type="xs:string"/>
- <xs:element name="value" type="xs:long"/>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="userParameterDoubleType">
- <xs:all>
- <xs:element name="name" type="xs:string"/>
- <xs:element name="value" type="xs:double"/>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="userParameterBase64Type">
- <xs:all>
- <xs:element name="name" type="xs:string"/>
- <xs:element name="value" type="xs:base64Binary"/>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="measurementInformationType">
- <xs:all>
- <xs:element minOccurs="1" name="seriesDate" type="xs:date"/>
- <xs:element minOccurs="1" name="seriesTime" type="xs:time"/>
- <xs:element minOccurs="1" name="patientPosition">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="HFP"/>
- <xs:enumeration value="HFS"/>
- <xs:enumeration value="HFDR"/>
- <xs:enumeration value="HFDL"/>
- <xs:enumeration value="FFP"/>
- <xs:enumeration value="FFS"/>
- <xs:enumeration value="FFDR"/>
- <xs:enumeration value="FFDL"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:element>
- <xs:element minOccurs="0" name="initialSeriesNumber" type="xs:long"/>
- <xs:element minOccurs="0" name="protocolName" type="xs:string"/>
- <xs:element minOccurs="0" name="seriesDescription" type="xs:string"/>
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="dicomParametersType">
- <xs:all>
- <xs:element minOccurs="1" name="studyInstanceUID" type="xs:string"/>
- <xs:element minOccurs="0" name="seriesInstanceUIDRoot" type="xs:string"/>
- <xs:element minOccurs="0" name="frameOfReferenceUID" type="xs:string"/>
-
- <xs:element minOccurs="0" name="referencedImageSequence">
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs="0" maxOccurs="unbounded" name="referencedSOPInstanceUID" type="xs:string"/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-
- <xs:element minOccurs="0" name="MRImageModule">
- <xs:complexType>
- <xs:all>
- <xs:element minOccurs="0" name="imageType" type="xs:string"/>
- <xs:element minOccurs="0" name="scanningSequence" type="xs:string"/>
- <xs:element minOccurs="0" name="sequenceVariant" type="xs:string"/>
- <xs:element minOccurs="0" name="scanOptions" type="xs:string"/>
- <xs:element minOccurs="0" name="mrAcquisitionType" type="xs:string"/>
- <xs:element minOccurs="0" name="echoTrainLength" type="xs:long"/>
- <xs:element minOccurs="0" name="triggerTime" type="xs:float"/>
- <xs:element minOccurs="0" name="flipAngle_deg" type="xs:long"/>
- <xs:element minOccurs="0" name="freqEncodingDirection">
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="ROW"/>
- <xs:enumeration value="COL"/>
- </xs:restriction>
- </xs:simpleType>
- </xs:element>
- </xs:all>
- </xs:complexType>
- </xs:element>
-
- </xs:all>
- </xs:complexType>
-
- <xs:complexType name="accelerationFactorType">
- <xs:all>
- <xs:element name="kspace_encoding_step_1" type="xs:unsignedShort"/>
- <xs:element name="kspace_encoding_step_2" type="xs:unsignedShort"/>
- </xs:all>
- </xs:complexType>
-
- <xs:simpleType name="calibrationModeType">
- <xs:restriction base="xs:string">
- <xs:enumeration value="embedded"/>
- <xs:enumeration value="interleaved"/>
- <xs:enumeration value="separate"/>
- <xs:enumeration value="external"/>
- <xs:enumeration value="other"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType name="interleavingDimensionType">
- <xs:restriction base="xs:string">
- <xs:enumeration value="phase"/>
- <xs:enumeration value="repetition"/>
- <xs:enumeration value="contrast"/>
- <xs:enumeration value="average"/>
- <xs:enumeration value="other"/>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:complexType name="parallelImagingType">
- <xs:sequence>
- <xs:element type="accelerationFactorType" name="accelerationFactor"/>
- <xs:element maxOccurs="1" minOccurs="0" type="calibrationModeType" name="calibrationMode"/>
- <xs:element maxOccurs="1" minOccurs="0" type="interleavingDimensionType" name="interleavingDimension"/>
- </xs:sequence>
- </xs:complexType>
-</xs:schema>
-
-</pre>
-</div>
-<div class="section" id="windows-7-64-bit-powershell-install-script">
-<h2><a class="toc-backref" href="#id18">Windows 7 (64-bit) Powershell Install Script</a></h2>
-<pre class="literal-block" id="powershell">
- # S c r i p t f o r i n s t a l l i n g t h e r e q u i r e d d e p e n d e n c i e d f o r
- # t h e I S M R M R a w D a t a F o r m a t o n W i n d o w s .
- #
- # P r e r e q u i s i t e s :
- # - W i n d o w s 7 ( 6 4 - b i t )
- # - V i s u a l S t u d i o ( C / C + + ) i n s t a l l e d
- #
-
- f u n c t i o n d o w n l o a d _ f i l e ( $ u r l , $ d e s t i n a t i o n ) {
- # L e t ' s s e t u p a w e b c l i e n t f o r a l l t h e f i l e s w e h a v e t o d o w n l o a d
- $ c l i e n t = N e w - O b j e c t S y s t e m . N e t . W e b C l i e n t
- $ c l i e n t . D o w n l o a d F i l e ( $ u r l , $ d e s t i n a t i o n )
- }
-
- f u n c t i o n u n z i p ( $ z i p P a t h , $ d e s t i n a t i o n ) {
- $ s h e l l = n e w - o b j e c t - c o m s h e l l . a p p l i c a t i o n ;
- $ z i p = $ s h e l l . N a m e S p a c e ( $ z i p P a t h ) ;
- i f ( ( T e s t - P a t h - p a t h $ d e s t i n a t i o n ) - n e $ T r u e )
- {
- N e w - I t e m $ d e s t i n a t i o n - t y p e d i r e c t o r y
- }
- f o r e a c h ( $ i t e m i n $ z i p . i t e m s ( ) ) {
- $ s h e l l . N a m e s p a c e ( $ d e s t i n a t i o n ) . c o p y h e r e ( $ i t e m )
- }
- }
-
- f u n c t i o n S e t - V S - E n v i r o n m e n t ( ) {
- $ f i l e = ( G e t - C h i l d I t e m E n v : V S 1 0 0 C O M N T O O L S ) . V a l u e + " v s v a r s 3 2 . b a t "
- $ c m d = " ` " $ f i l e ` " & s e t "
- c m d / c $ c m d | F o r e a c h - O b j e c t {
- $ p , $ v = $ _ . s p l i t ( ' = ' )
- S e t - I t e m - p a t h e n v : $ p - v a l u e $ v
- }
- }
-
- f u n c t i o n a d d _ p a t h ( $ p a t h n a m e ) {
- i f ( $ e n v : p a t h - m a t c h [ r e g e x ] : : e s c a p e ( $ p a t h n a m e ) ) {
- W r i t e - H o s t " P a t h $ p a t h a l r e a d y e x i s t s "
- } e l s e {
- s e t x P A T H " $ e n v : p a t h ; $ p a t h n a m e " - m
- }
- }
-
- W r i t e - H o s t " I S M R M R D R a w D a t a F o r m a t D e p e n d e n c i e s I n s t a l l a t i o n "
-
- $ l i b r a r y _ l o c a t i o n = " C : \ M R I L i b r a r i e s "
- $ d o w n l o a d _ l o c a t i o n = " C : \ M R I L i b r a r i e s \ d o w n l o a d s "
-
- # L e t ' s f i r s t c h e c k i f w e h a v e t h e l i b r a r y f o l d e r a n d i f n o t c r e a t e i t
- i f ( ( T e s t - P a t h - p a t h $ l i b r a r y _ l o c a t i o n ) - n e $ T r u e )
- {
- W r i t e - H o s t " L i b r a r y l o c a t i o n : " $ l i b r a r y _ l o c a t i o n " n o t f o u n d , c r e a t i n g "
- N e w - I t e m $ l i b r a r y _ l o c a t i o n - t y p e d i r e c t o r y
- }
- e l s e
- {
- W r i t e - H o s t " L i b r a r y l o c a t i o n : " $ l i b r a r y _ l o c a t i o n " f o u n d . "
- }
-
- # N o w c h e c k i f w e h a v e t h e l i b r a r y f o l d e r a n d i f n o t c r e a t e i t
- i f ( ( T e s t - P a t h - p a t h $ d o w n l o a d _ l o c a t i o n ) - n e $ T r u e )
- {
- W r i t e - H o s t " D o w n l o a d l o c a t i o n : " $ d o w n l o a d _ l o c a t i o n " n o t f o u n d , c r e a t i n g "
- N e w - I t e m $ d o w n l o a d _ l o c a t i o n - t y p e d i r e c t o r y
- }
- e l s e
- {
- W r i t e - H o s t " D o w n l o a d l o c a t i o n : " $ d o w n l o a d _ l o c a t i o n " f o u n d . "
- }
-
- # D o w n l o a d a n d i n s t a l l C M A K E
- d o w n l o a d _ f i l e " h t t p : / / w w w . c m a k e . o r g / f i l e s / v 2 . 8 / c m a k e - 2 . 8 . 9 - w i n 3 2 - x 8 6 . e x e " ( $ d o w n l o a d _ l o c a t i o n + " \ c m a k e - 2 . 8 . 9 - w i n 3 2 - x 8 6 . e x e " )
- & ( $ d o w n l o a d _ l o c a t i o n + " \ c m a k e - 2 . 8 . 9 - w i n 3 2 - x 8 6 . e x e " )
-
- # D o w n l o a d a n d i n s t a l l G i t
- d o w n l o a d _ f i l e " h t t p : / / m s y s g i t . g o o g l e c o d e . c o m / f i l e s / G i t - 1 . 7 . 1 1 - p r e v i e w 2 0 1 2 0 7 1 0 . e x e " ( $ d o w n l o a d _ l o c a t i o n + " \ G i t - 1 . 7 . 1 1 - p r e v i e w 2 0 1 2 0 7 1 0 . e x e " )
- & ( $ d o w n l o a d _ l o c a t i o n + " \ G i t - 1 . 7 . 1 1 - p r e v i e w 2 0 1 2 0 7 1 0 . e x e " )
-
- # D o w n l o a d , u n z i p , a n d i n s t a l l H D F 5
- d o w n l o a d _ f i l e " h t t p : / / w w w . h d f g r o u p . o r g / f t p / H D F 5 / c u r r e n t / b i n / w i n d o w s / H D F 5 1 8 9 - w i n 6 4 - v s 1 0 - s h a r e d . z i p " ( $ d o w n l o a d _ l o c a t i o n + " \ H D F 5 1 8 9 - w i n 6 4 - v s 1 0 - s h a r e d . z i p " )
- u n z i p ( $ d o w n l o a d _ l o c a t i o n + " \ H D F 5 1 8 9 - w i n 6 4 - v s 1 0 - s h a r e d . z i p " ) " $ d o w n l o a d _ l o c a t i o n \ h d f 5 _ b i n a r i e s "
- & " $ d o w n l o a d _ l o c a t i o n \ h d f 5 _ b i n a r i e s \ H D F 5 - 1 . 8 . 9 - w i n 6 4 . e x e "
-
- # D o w n l o a d , i n s t a l l H D F V i e w
- d o w n l o a d _ f i l e " h t t p : / / w w w . h d f g r o u p . o r g / f t p / H D F 5 / h d f - j a v a / h d f v i e w / h d f v i e w _ i n s t a l l _ w i n 6 4 . e x e " ( $ d o w n l o a d _ l o c a t i o n + " \ h d f v i e w _ i n s t a l l _ w i n 6 4 . e x e " )
- & ( $ d o w n l o a d _ l o c a t i o n + " \ h d f v i e w _ i n s t a l l _ w i n 6 4 . e x e " )
-
-# D o w n l o a d a n d i n s t a l l C o d e S y n t h e s i s X S D
- d o w n l o a d _ f i l e " h t t p : / / w w w . c o d e s y n t h e s i s . c o m / d o w n l o a d / x s d / 3 . 3 / w i n d o w s / i 6 8 6 / x s d - 3 . 3 . m s i " ( $ d o w n l o a d _ l o c a t i o n + " \ x s d - 3 . 3 . m s i " )
- & ( $ d o w n l o a d _ l o c a t i o n + " \ x s d - 3 . 3 . m s i " )
-
- # D o w n l o a d a n d i n s t a l l b o o s t
- d o w n l o a d _ f i l e " h t t p : / / b o o s t p r o . c o m / d o w n l o a d / x 6 4 / b o o s t _ 1 _ 5 1 _ s e t u p . e x e " ( $ d o w n l o a d _ l o c a t i o n + " \ b o o s t _ 1 _ 5 1 _ s e t u p . e x e " )
- & ( $ d o w n l o a d _ l o c a t i o n + " \ b o o s t _ 1 _ 5 1 _ s e t u p . e x e " )
-
- # F F T W
- d o w n l o a d _ f i l e " f t p : / / f t p . f f t w . o r g / p u b / f f t w / f f t w - 3 . 3 . 2 - d l l 6 4 . z i p " ( $ d o w n l o a d _ l o c a t i o n + " \ f f t w - 3 . 3 . 2 - d l l 6 4 . z i p " )
- S e t - V S - E n v i r o n m e n t
- u n z i p ( $ d o w n l o a d _ l o c a t i o n + " \ f f t w - 3 . 3 . 2 - d l l 6 4 . z i p " ) " $ l i b r a r y _ l o c a t i o n \ f f t w 3 "
- c d " $ l i b r a r y _ l o c a t i o n \ f f t w 3 "
- & l i b " / m a c h i n e : X 6 4 " " / d e f : l i b f f t w 3 - 3 . d e f "
- & l i b " / m a c h i n e : X 6 4 " " / d e f : l i b f f t w 3 f - 3 . d e f "
- & l i b " / m a c h i n e : X 6 4 " " / d e f : l i b f f t w 3 l - 3 . d e f "
-
- # M e s s a g e r e m i n d i n g t o s e t p a t h s
- W r i t e - H o s t " P l e a s e e n s u r e t h a t p a t h s t o t h e f o l l o w i n g l o c a t i o n s a r e i n y o u r P A T H e n v i r o n m e n t v a r i a b l e : "
- W r i t e - H o s t " - B o o s t l i b r a r i e s ( t y p i c a l l y C : \ P r o g r a m F i l e s \ b o o s t \ b o o s t _ 1 _ 5 1 \ l i b ) "
- W r i t e - H o s t " - C o d e S y n t h e s i s X S D ( t y p i c a l l y C : \ P r o g r a m F i l e s ( x 8 6 ) \ C o d e S y n t h e s i s X S D 3 . 3 \ b i n \ ; C : \ P r o g r a m F i l e s ( x 8 6 ) \ C o d e S y n t h e s i s X S D 3 . 3 \ b i n 6 4 \ ) "
- W r i t e - H o s t " - F F T W l i b r a r i e s ( t y p i c a l l y C : \ M R I L i b r a r i e s \ f f t w 3 ) "
- W r i t e - H o s t " - H D F 5 l i b r a r i e s ( t y p i c a l l y C : \ P r o g r a m F i l e s \ H D F G r o u p \ H D F 5 \ 1 . 8 . 9 \ b i n ) "
- W r i t e - H o s t " - I S M R M R D ( t y p i c a l l y C : \ P r o g r a m F i l e s \ i s m r m r d \ b i n ; C : \ P r o g r a m F i l e s \ i s m r m r d \ b i n ) "
-
-
- # N o w d o w n l o a d a n d c o m p i l e I S M R M R D
- d o w n l o a d _ f i l e " h t t p : / / s o u r c e f o r g e . n e t / p r o j e c t s / i s m r m r d / f i l e s / s r c / i s m r m r d _ l a t e s t . z i p " ( $ d o w n l o a d _ l o c a t i o n + " \ i s m r m r d _ l a t e s t . z i p " )
- u n z i p ( $ d o w n l o a d _ l o c a t i o n + " \ i s m r m r d _ l a t e s t . z i p " ) " $ l i b r a r y _ l o c a t i o n \ i s m r m r d "
- c d " $ l i b r a r y _ l o c a t i o n \ i s m r m r d "
- N e w - I t e m " b u i l d " - t y p e d i r e c t o r y
- c d b u i l d
- & c m a k e " - G " " V i s u a l S t u d i o 1 0 W i n 6 4 " " - D B O O S T _ R O O T = C : / P r o g r a m F i l e s / b o o s t / b o o s t _ 1 _ 5 1 " " - D X E R C E S C _ I N C L U D E _ D I R = C : / P r o g r a m F i l e s ( x 8 6 ) / C o d e S y n t h e s i s X S D 3 . 3 / i n c l u d e / x e r c e s c " " - D X E R C E S C _ L I B R A R I E S = C : / P r o g r a m F i l e s ( x 8 6 ) / C o d e S [...]
- m s b u i l d . \ I S M R M R D . s l n / p : C o n f i g u r a t i o n = R e l e a s e
-</pre>
-</div>
-</div>
-</div>
-</body>
-</html>
diff --git a/doc/README.md b/README.md
similarity index 100%
rename from doc/README.md
rename to README.md
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index c7c93c4..890e881 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -753,7 +753,7 @@ WARN_LOGFILE =
# spaces.
# Note: If this tag is empty the current directory is searched.
-INPUT = @CMAKE_CURRENT_SOURCE_DIR@/README.md \
+INPUT = @CMAKE_SOURCE_DIR@/README.md \
@CMAKE_SOURCE_DIR@/include/ismrmrd \
@CMAKE_SOURCE_DIR@/libsrc
@@ -891,7 +891,7 @@ FILTER_SOURCE_PATTERNS =
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.
-USE_MDFILE_AS_MAINPAGE = @CMAKE_CURRENT_SOURCE_DIR@/README.md
+USE_MDFILE_AS_MAINPAGE = @CMAKE_SOURCE_DIR@/README.md
#---------------------------------------------------------------------------
# Configuration options related to source browsing
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/ismrmrd.git
More information about the debian-science-commits
mailing list