[Debian-med-packaging] [mrtrix] 01/09: Imported Upstream version 0.2.11

Michael Hanke mih at alioth.debian.org
Sat Oct 5 08:59:00 UTC 2013


This is an automated email from the git hooks/post-receive script.

mih pushed a commit to branch master
in repository mrtrix.

commit a758c7f8d0e524a570ff294d09896fc4d1aee7a8
Author: Michael Hanke <michael.hanke at gmail.com>
Date:   Fri Sep 27 11:34:10 2013 +0200

    Imported Upstream version 0.2.11
---
 Doxyfile                                           | 1462 ++++++-----
 build                                              |   62 +-
 cmd/cleanup_ANTS_warp.cpp                          |  122 +
 cmd/disp_profile.cpp                               |    2 +-
 cmd/filter_tracks.cpp                              |  131 +-
 cmd/mrcat.cpp                                      |   21 +
 cmd/mrconvert.cpp                                  |    6 +-
 cmd/mrtransform.cpp                                |    6 +-
 cmd/read_dicom.cpp                                 |   38 +-
 cmd/streamtrack.cpp                                |    8 +-
 cmd/tracks2prob.cpp                                |   32 +-
 cmd/tracks2vtk.cpp                                 |    4 +-
 doc/appendix/config.html                           |    6 +-
 doc/appendix/index.html                            |    6 +-
 doc/appendix/mrtrix.html                           |    6 +-
 doc/appendix/refs.html                             |    6 +-
 doc/commands/average.html                          |    8 +-
 .../{mrinfo.html => cleanup_ANTS_warp.html}        |   30 +-
 doc/commands/csdeconv.html                         |    8 +-
 doc/commands/dicom_filename.html                   |    6 +-
 doc/commands/dir2amp.html                          |    6 +-
 doc/commands/disp_profile.html                     |    6 +-
 doc/commands/dwi2SH.html                           |    6 +-
 doc/commands/dwi2tensor.html                       |    6 +-
 doc/commands/erode.html                            |    6 +-
 doc/commands/estimate_response.html                |    6 +-
 doc/commands/filter_tracks.html                    |   14 +-
 doc/commands/find_SH_peaks.html                    |    6 +-
 doc/commands/gen_ROI.html                          |    6 +-
 doc/commands/gen_WM_mask.html                      |    6 +-
 doc/commands/gen_unit_warp.html                    |    6 +-
 doc/commands/gendir.html                           |    6 +-
 doc/commands/import_tracks.html                    |    6 +-
 doc/commands/index.html                            |    5 +-
 doc/commands/median3D.html                         |    6 +-
 doc/commands/mrabs.html                            |    6 +-
 doc/commands/mradd.html                            |    6 +-
 doc/commands/mrcat.html                            |    6 +-
 doc/commands/mrconvert.html                        |    6 +-
 doc/commands/mrinfo.html                           |    6 +-
 doc/commands/mrmult.html                           |    6 +-
 doc/commands/mrstats.html                          |    6 +-
 doc/commands/mrtransform.html                      |    6 +-
 doc/commands/mrview.html                           |    6 +-
 doc/commands/normalise_tracks.html                 |    6 +-
 doc/commands/read_dicom.html                       |    6 +-
 doc/commands/read_ximg.html                        |    6 +-
 doc/commands/resample_tracks.html                  |    6 +-
 doc/commands/sample_tracks.html                    |    6 +-
 doc/commands/sdeconv.html                          |    6 +-
 doc/commands/select_tracks.html                    |    6 +-
 doc/commands/streamtrack.html                      |    6 +-
 doc/commands/tensor2ADC.html                       |    6 +-
 doc/commands/tensor2FA.html                        |    6 +-
 doc/commands/tensor2vector.html                    |    6 +-
 doc/commands/tensor_metric.html                    |    6 +-
 doc/commands/threshold.html                        |    6 +-
 doc/commands/track_info.html                       |    6 +-
 doc/commands/tracks2prob.html                      |    8 +-
 doc/commands/tracks2vtk.html                       |    6 +-
 doc/commands/truncate_tracks.html                  |    6 +-
 doc/faq.html                                       |    6 +-
 doc/general/cmdline.html                           |    6 +-
 doc/general/formats.html                           |    6 +-
 doc/general/index.html                             |    6 +-
 doc/general/mrview.html                            |    6 +-
 doc/general/overview.html                          |    6 +-
 doc/index.html                                     |    8 +-
 doc/install/index.html                             |    6 +-
 doc/install/macosx.html                            |    8 +-
 doc/install/unix.html                              |   10 +-
 doc/install/windows.html                           |    6 +-
 doc/intro.html                                     |    6 +-
 doc/tractography/dwi.html                          |    6 +-
 doc/tractography/index.html                        |    6 +-
 doc/tractography/preprocess.html                   |    6 +-
 doc/tractography/roi.html                          |    6 +-
 doc/tractography/tracking.html                     |    6 +-
 icons/tracks.png                                   |  Bin 0 -> 3779 bytes
 icons/tracks.svg                                   |  289 +++
 install_mime_types.sh                              |   14 +
 lib/file/dicom/csa_entry.h                         |    2 +-
 lib/file/dicom/dict.cpp                            | 2526 ++++++++++++++++----
 lib/file/dicom/element.cpp                         |   68 +-
 lib/file/dicom/element.h                           |   12 +-
 lib/file/dicom/image.cpp                           |  456 +++-
 lib/file/dicom/image.h                             |  161 +-
 lib/file/dicom/mapper.cpp                          |  298 +--
 lib/file/dicom/select_cmdline.cpp                  |    1 -
 lib/file/dicom/series.cpp                          |    3 +-
 lib/file/dicom/series.h                            |    8 -
 lib/file/dicom/tree.cpp                            |    8 +-
 lib/file/mmap.cpp                                  |   28 +-
 lib/file/mmap.h                                    |    2 +-
 lib/image/format/dicom.cpp                         |   16 +-
 lib/image/format/list.cpp                          |    2 +
 lib/image/format/list.h                            |    2 +-
 lib/image/format/mrtrix.cpp                        |   49 +-
 lib/image/format/nifti1.cpp                        |   58 +-
 lib/image/header.cpp                               |    4 +-
 lib/image/mapper.cpp                               |  184 +-
 lib/image/mapper.h                                 |   45 +-
 lib/image/object.cpp                               |    5 +
 lib/image/object.h                                 |   14 +-
 lib/math/matrix.cpp                                |    1 -
 lib/mrtrix.cpp                                     |    3 +-
 lib/mrtrix.h                                       |    9 +-
 lib/svn_revision.h                                 |    2 +-
 matlab/write_mrtrix.m                              |   25 +-
 matlab/write_mrtrix_tracks.m                       |    1 +
 mrtrix-mime.xml                                    |   49 +
 mrtrix-mrview.desktop                              |   12 +
 src/doc/appendix/config.html                       |   98 -
 src/doc/appendix/gpl-3.0.html                      |  690 ------
 src/doc/appendix/index.html                        |   35 -
 src/doc/appendix/mrtrix.html                       |  178 --
 src/doc/appendix/refs.html                         |   58 -
 src/doc/faq.html                                   |  386 ---
 src/doc/general/cmdline.html                       |  363 ---
 src/doc/general/data_order.png                     |  Bin 11766 -> 0 bytes
 src/doc/general/filemenu.png                       |  Bin 19004 -> 0 bytes
 src/doc/general/fileopen.png                       |  Bin 24186 -> 0 bytes
 src/doc/general/fileproperties.png                 |  Bin 30171 -> 0 bytes
 src/doc/general/focus_ax.png                       |  Bin 65017 -> 0 bytes
 src/doc/general/focus_sag.png                      |  Bin 79493 -> 0 bytes
 src/doc/general/formats.html                       |  358 ---
 src/doc/general/index.html                         |   83 -
 src/doc/general/mrview.html                        |  276 ---
 src/doc/general/mrview.png                         |  Bin 76599 -> 0 bytes
 src/doc/general/new_roi.png                        |  Bin 78182 -> 0 bytes
 src/doc/general/open_track.png                     |  Bin 160890 -> 0 bytes
 src/doc/general/orientation_overlay.png            |  Bin 198817 -> 0 bytes
 src/doc/general/orientation_plot.png               |  Bin 155913 -> 0 bytes
 src/doc/general/overlay.png                        |  Bin 138044 -> 0 bytes
 src/doc/general/overview.html                      |  193 --
 src/doc/general/roi.png                            |  Bin 90206 -> 0 bytes
 src/doc/general/screenshot.png                     |  Bin 108698 -> 0 bytes
 src/doc/general/sidebar.png                        |  Bin 70828 -> 0 bytes
 src/doc/general/track_colour.png                   |  Bin 245915 -> 0 bytes
 src/doc/home.png                                   |  Bin 654 -> 0 bytes
 src/doc/index.html                                 |   72 -
 src/doc/install/index.html                         |   52 -
 src/doc/install/macosx.html                        |  133 --
 src/doc/install/unix.html                          |  284 ---
 src/doc/install/windows.html                       |  109 -
 src/doc/intro.html                                 |  164 --
 src/doc/left.png                                   |  Bin 459 -> 0 bytes
 src/doc/right.png                                  |  Bin 472 -> 0 bytes
 src/doc/stylesheet.css                             |   63 -
 src/doc/tractography/anat.png                      |  Bin 66931 -> 0 bytes
 src/doc/tractography/cst_csd.png                   |  Bin 240404 -> 0 bytes
 src/doc/tractography/cst_dt.png                    |  Bin 175090 -> 0 bytes
 src/doc/tractography/cst_dt_exclude.png            |  Bin 176741 -> 0 bytes
 src/doc/tractography/cst_dt_include.png            |  Bin 175469 -> 0 bytes
 src/doc/tractography/cst_dt_mask.png               |  Bin 181698 -> 0 bytes
 src/doc/tractography/cst_seed.png                  |  Bin 45789 -> 0 bytes
 src/doc/tractography/dwi.html                      |  226 --
 src/doc/tractography/dwi.png                       |  Bin 48690 -> 0 bytes
 src/doc/tractography/focus.png                     |  Bin 33293 -> 0 bytes
 src/doc/tractography/index.html                    |   60 -
 src/doc/tractography/position.png                  |  Bin 67004 -> 0 bytes
 src/doc/tractography/preprocess.html               |  247 --
 src/doc/tractography/response_function.png         |  Bin 27541 -> 0 bytes
 src/doc/tractography/roi.html                      |   90 -
 src/doc/tractography/tdi.png                       |  Bin 116755 -> 0 bytes
 src/doc/tractography/tracking.html                 |  164 --
 src/doc/tractography/whole_brain.png               |  Bin 327405 -> 0 bytes
 src/doc/up.png                                     |  Bin 406 -> 0 bytes
 src/dwi/gradient.cpp                               |   11 +-
 src/dwi/render_frame.cpp                           |    8 +-
 src/dwi/render_frame.h                             |   13 +-
 src/dwi/tractography/file.cpp                      |    6 +-
 src/dwi/tractography/file.h                        |    3 +
 src/dwi/tractography/tracker/base.cpp              |    9 +-
 src/dwi/tractography/tracker/base.h                |   12 +-
 src/mrview/mode/normal.cpp                         |    3 +-
 src/mrview/sidebar/overlay.cpp                     |    7 +-
 src/mrview/sidebar/roi_analysis.cpp                |   11 +-
 src/mrview/sidebar/roi_analysis.h                  |    4 +-
 src/mrview/sidebar/roi_analysis/roi_list.cpp       |   37 +-
 src/mrview/sidebar/roi_analysis/roi_list.h         |    6 +-
 src/mrview/sidebar/tractography/track_list.cpp     |    6 +-
 src/mrview/slice.cpp                               |    2 +-
 src/mrview/slice.h                                 |    4 +
 src/mrview/window.cpp                              |   12 +-
 sysconf/darwin.py                                  |   10 +-
 sysconf/linux.py                                   |    3 +-
 sysconf/windows.py                                 |   18 +-
 188 files changed, 4891 insertions(+), 6368 deletions(-)

diff --git a/Doxyfile b/Doxyfile
index 7a19b88..15bb09b 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.5.3
+# Doxyfile 1.7.1
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project
@@ -14,75 +14,76 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# This tag specifies the encoding used for all characters in the config file that 
-# follow. The default is UTF-8 which is also the encoding used for all text before 
-# the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into 
-# libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of 
-# possible encodings.
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
 
 DOXYFILE_ENCODING      = UTF-8
 
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded 
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
 # by quotes) that should identify the project.
 
 PROJECT_NAME           = MRtrix
 
-# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
-# This could be handy for archiving the generated documentation or 
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
 # if some version control system is used.
 
-PROJECT_NUMBER         = 0.2.9
+PROJECT_NUMBER         = 0.2.11
 
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
-# base path where the generated documentation will be put. 
-# If a relative path is entered, it will be relative to the location 
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
 OUTPUT_DIRECTORY       = dev
 
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
-# 4096 sub-directories (in 2 levels) under the output directory of each output 
-# format and will distribute the generated files over these directories. 
-# Enabling this option can be useful when feeding doxygen a huge amount of 
-# source files, where putting all generated files in the same directory would 
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
 # otherwise cause performance problems for the file system.
 
 CREATE_SUBDIRS         = NO
 
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
-# documentation generated by doxygen is written. Doxygen will use this 
-# information to generate all constant output in the proper language. 
-# The default language is English, other supported languages are: 
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
-# Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, 
-# Italian, Japanese, Japanese-en (Japanese with English messages), Korean, 
-# Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, 
-# Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
 
 OUTPUT_LANGUAGE        = English
 
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
-# include brief member descriptions after the members that are listed in 
-# the file and class documentation (similar to JavaDoc). 
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
 # Set to NO to disable this.
 
 BRIEF_MEMBER_DESC      = YES
 
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
-# the brief description of a member or function before the detailed description. 
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
 # brief descriptions will be completely suppressed.
 
 REPEAT_BRIEF           = YES
 
-# This tag implements a quasi-intelligent brief description abbreviator 
-# that is used to form the text in various listings. Each string 
-# in this list, if found as the leading text of the brief description, will be 
-# stripped from the text and the result after processing the whole list, is 
-# used as the annotated text. Otherwise, the brief description is used as-is. 
-# If left blank, the following values are used ("$name" is automatically 
-# replaced with the name of the entity): "The $name class" "The $name widget" 
-# "The $name file" "is" "provides" "specifies" "contains" 
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
 # "represents" "a" "an" "the"
 
 ABBREVIATE_BRIEF       = "The $name class  " \
@@ -97,125 +98,142 @@ ABBREVIATE_BRIEF       = "The $name class  " \
                          an \
                          the
 
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
-# Doxygen will generate a detailed section even if there is only a brief 
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
 # description.
 
 ALWAYS_DETAILED_SEC    = NO
 
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
-# inherited members of a class in the documentation of that class as if those 
-# members were ordinary class members. Constructors, destructors and assignment 
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
 # operators of the base classes will not be shown.
 
 INLINE_INHERITED_MEMB  = NO
 
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
-# path before files name in the file list and in the header files. If set 
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
 # to NO the shortest path that makes the file name unique will be used.
 
 FULL_PATH_NAMES        = YES
 
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
-# can be used to strip a user-defined part of the path. Stripping is 
-# only done if one of the specified strings matches the left-hand part of 
-# the path. The tag can be used to show relative paths in the file list. 
-# If left blank the directory from which doxygen is run is used as the 
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
 # path to strip.
 
 STRIP_FROM_PATH        = /home/donald/
 
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
-# the path mentioned in the documentation of a class, which tells 
-# the reader which header file to include in order to use a class. 
-# If left blank only the name of the header file containing the class 
-# definition is used. Otherwise one should specify the include paths that 
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
 # are normally passed to the compiler using the -I flag.
 
-STRIP_FROM_INC_PATH    = 
+STRIP_FROM_INC_PATH    =
 
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
-# (but less readable) file names. This can be useful is your file systems 
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
 # doesn't support long names like on DOS, Mac, or CD-ROM.
 
 SHORT_NAMES            = NO
 
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
-# will interpret the first line (until the first dot) of a JavaDoc-style 
-# comment as the brief description. If set to NO, the JavaDoc 
-# comments will behave just like regular Qt-style comments 
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
 # (thus requiring an explicit @brief command for a brief description.)
 
 JAVADOC_AUTOBRIEF      = NO
 
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
-# interpret the first line (until the first dot) of a Qt-style 
-# comment as the brief description. If set to NO, the comments 
-# will behave just like regular Qt-style comments (thus requiring 
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
 # an explicit \brief command for a brief description.)
 
 QT_AUTOBRIEF           = NO
 
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
-# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
-# comments) as a brief description. This used to be the default behaviour. 
-# The new default is to treat a multi-line C++ comment block as a detailed 
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
 # description. Set this tag to YES if you prefer the old behaviour instead.
 
 MULTILINE_CPP_IS_BRIEF = NO
 
-# If the DETAILS_AT_TOP tag is set to YES then Doxygen 
-# will output the detailed description near the top, like JavaDoc.
-# If set to NO, the detailed description appears after the member 
-# documentation.
-
-DETAILS_AT_TOP         = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
-# member inherits the documentation from any documented member that it 
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
 # re-implements.
 
 INHERIT_DOCS           = YES
 
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
-# a new page for each member. If set to NO, the documentation of a member will 
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
 # be part of the file/class/namespace that contains it.
 
 SEPARATE_MEMBER_PAGES  = NO
 
-# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
 # Doxygen uses this value to replace tabs by spaces in code fragments.
 
 TAB_SIZE               = 8
 
-# This tag can be used to specify a number of aliases that acts 
-# as commands in the documentation. An alias has the form "name=value". 
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
-# put the command \sideeffect (or @sideeffect) in the documentation, which 
-# will result in a user-defined paragraph with heading "Side Effects:". 
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
 # You can put \n's in the value part of an alias to insert newlines.
 
-ALIASES                = 
+ALIASES                =
 
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
-# sources only. Doxygen will then generate output that is more tailored for C. 
-# For instance, some of the names that are used will be different. The list 
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
 # of all members will be omitted, etc.
 
 OPTIMIZE_OUTPUT_FOR_C  = NO
 
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
-# sources only. Doxygen will then generate output that is more tailored for Java. 
-# For instance, namespaces will be presented as packages, qualified scopes 
-# will look different, etc.
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
 
 OPTIMIZE_OUTPUT_JAVA   = NO
 
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to 
-# include (a tag file for) the STL sources as input, then you should 
-# set this tag to YES in order to let doxygen match functions declarations and 
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
-# func(std::string) {}). This also make the inheritance and collaboration 
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this
+# tag. The format is ext=language, where ext is a file extension, and language
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
 # diagrams that involve STL classes more complete and accurate.
 
 BUILTIN_STL_SUPPORT    = NO
@@ -225,366 +243,457 @@ BUILTIN_STL_SUPPORT    = NO
 
 CPP_CLI_SUPPORT        = NO
 
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
-# tag is set to YES, then doxygen will reuse the documentation of the first 
-# member in the group (if any) for the other members of the group. By default 
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
 # all members of a group must be documented explicitly.
 
 DISTRIBUTE_GROUP_DOC   = NO
 
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
-# the same type (for instance a group of public functions) to be put as a 
-# subgroup of that type (e.g. under the Public Functions section). Set it to 
-# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
 # the \nosubgrouping command.
 
 SUBGROUPING            = YES
 
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE      = 0
+
 #---------------------------------------------------------------------------
 # Build related configuration options
 #---------------------------------------------------------------------------
 
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
-# documentation are documented, even if no documentation was available. 
-# Private class members and static file members will be hidden unless 
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
 # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
 
 EXTRACT_ALL            = YES
 
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
 # will be included in the documentation.
 
 EXTRACT_PRIVATE        = YES
 
-# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
 # will be included in the documentation.
 
 EXTRACT_STATIC         = NO
 
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
-# defined locally in source files will be included in the documentation. 
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
 # If set to NO only classes defined in header files are included.
 
 EXTRACT_LOCAL_CLASSES  = NO
 
-# This flag is only useful for Objective-C code. When set to YES local 
-# methods, which are defined in the implementation section but not in 
-# the interface are included in the documentation. 
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
 # If set to NO (the default) only methods in the interface are included.
 
 EXTRACT_LOCAL_METHODS  = NO
 
-# If this flag is set to YES, the members of anonymous namespaces will be extracted 
-# and appear in the documentation as a namespace called 'anonymous_namespace{file}', 
-# where file will be replaced with the base name of the file that contains the anonymous 
-# namespace. By default anonymous namespace are hidden.
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
 
 EXTRACT_ANON_NSPACES   = NO
 
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
-# undocumented members of documented classes, files or namespaces. 
-# If set to NO (the default) these members will be included in the 
-# various overviews, but no documentation section is generated. 
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
 # This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_MEMBERS     = NO
 
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
-# undocumented classes that are normally visible in the class hierarchy. 
-# If set to NO (the default) these classes will be included in the various 
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
 # overviews. This option has no effect if EXTRACT_ALL is enabled.
 
 HIDE_UNDOC_CLASSES     = NO
 
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
-# friend (class|struct|union) declarations. 
-# If set to NO (the default) these declarations will be included in the 
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
 # documentation.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
-# documentation blocks found inside the body of a function. 
-# If set to NO (the default) these blocks will be appended to the 
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
 # function's detailed documentation block.
 
 HIDE_IN_BODY_DOCS      = NO
 
-# The INTERNAL_DOCS tag determines if documentation 
-# that is typed after a \internal command is included. If the tag is set 
-# to NO (the default) then the documentation will be excluded. 
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
 # Set it to YES to include the internal documentation.
 
 INTERNAL_DOCS          = NO
 
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
-# file names in lower-case letters. If set to YES upper-case letters are also 
-# allowed. This is useful if you have classes or files whose names only differ 
-# in case and if your file system supports case sensitive file names. Windows 
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
 # and Mac users are advised to set this option to NO.
 
 CASE_SENSE_NAMES       = YES
 
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
-# will show members with their full class and namespace scopes in the 
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
 # documentation. If set to YES the scope will be hidden.
 
 HIDE_SCOPE_NAMES       = NO
 
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
-# will put a list of the files that are included by a file in the documentation 
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
 # of that file.
 
 SHOW_INCLUDE_FILES     = YES
 
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
 # is inserted in the documentation for inline members.
 
 INLINE_INFO            = YES
 
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
-# will sort the (detailed) documentation of file and class members 
-# alphabetically by member name. If set to NO the members will appear in 
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
 # declaration order.
 
 SORT_MEMBER_DOCS       = NO
 
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
-# brief documentation of file, namespace and class members alphabetically 
-# by member name. If set to NO (the default) the members will appear in 
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
 # declaration order.
 
 SORT_BRIEF_DOCS        = NO
 
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
-# sorted by fully-qualified names, including namespaces. If set to 
-# NO (the default), the class list will be sorted only by class name, 
-# not including the namespace part. 
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
 # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the 
+# Note: This option applies only to the class list, not to the
 # alphabetical list.
 
 SORT_BY_SCOPE_NAME     = YES
 
-# The GENERATE_TODOLIST tag can be used to enable (YES) or 
-# disable (NO) the todo list. This list is created by putting \todo 
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
 # commands in the documentation.
 
 GENERATE_TODOLIST      = YES
 
-# The GENERATE_TESTLIST tag can be used to enable (YES) or 
-# disable (NO) the test list. This list is created by putting \test 
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
 # commands in the documentation.
 
 GENERATE_TESTLIST      = YES
 
-# The GENERATE_BUGLIST tag can be used to enable (YES) or 
-# disable (NO) the bug list. This list is created by putting \bug 
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
 # commands in the documentation.
 
 GENERATE_BUGLIST       = YES
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
-# disable (NO) the deprecated list. This list is created by putting 
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
 # \deprecated commands in the documentation.
 
 GENERATE_DEPRECATEDLIST= YES
 
-# The ENABLED_SECTIONS tag can be used to enable conditional 
+# The ENABLED_SECTIONS tag can be used to enable conditional
 # documentation sections, marked by \if sectionname ... \endif.
 
-ENABLED_SECTIONS       = 
+ENABLED_SECTIONS       =
 
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
-# the initial value of a variable or define consists of for it to appear in 
-# the documentation. If the initializer consists of more lines than specified 
-# here it will be hidden. Use a value of 0 to hide initializers completely. 
-# The appearance of the initializer of individual variables and defines in the 
-# documentation can be controlled using \showinitializer or \hideinitializer 
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
 # command in the documentation regardless of this setting.
 
 MAX_INITIALIZER_LINES  = 30
 
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
-# at the bottom of the documentation of classes and structs. If set to YES the 
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
 # list will mention the files that were used to generate the documentation.
 
 SHOW_USED_FILES        = YES
 
-# If the sources in your project are distributed over multiple directories 
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy 
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
 # in the documentation. The default is NO.
 
 SHOW_DIRECTORIES       = NO
 
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
-# doxygen should invoke to get the current version for each file (typically from the 
-# version control system). Doxygen will invoke the program by executing (via 
-# popen()) the command <command> <input-file>, where <command> is the value of 
-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
-# provided by doxygen. Whatever the program writes to standard output 
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
 # is used as the file version. See the manual for examples.
 
-FILE_VERSION_FILTER    = 
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. The create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            =
 
 #---------------------------------------------------------------------------
 # configuration options related to warning and progress messages
 #---------------------------------------------------------------------------
 
-# The QUIET tag can be used to turn on/off the messages that are generated 
+# The QUIET tag can be used to turn on/off the messages that are generated
 # by doxygen. Possible values are YES and NO. If left blank NO is used.
 
 QUIET                  = YES
 
-# The WARNINGS tag can be used to turn on/off the warning messages that are 
-# generated by doxygen. Possible values are YES and NO. If left blank 
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
 # NO is used.
 
 WARNINGS               = YES
 
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
 # automatically be disabled.
 
 WARN_IF_UNDOCUMENTED   = NO
 
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
-# potential errors in the documentation, such as not documenting some 
-# parameters in a documented function, or documenting parameters that 
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
 # don't exist or using markup commands wrongly.
 
 WARN_IF_DOC_ERROR      = YES
 
-# This WARN_NO_PARAMDOC option can be abled to get warnings for 
-# functions that are documented, but have no documentation for their parameters 
-# or return value. If set to NO (the default) doxygen will only warn about 
-# wrong or incomplete parameter documentation, but not about the absence of 
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
 # documentation.
 
 WARN_NO_PARAMDOC       = NO
 
-# The WARN_FORMAT tag determines the format of the warning messages that 
-# doxygen can produce. The string should contain the $file, $line, and $text 
-# tags, which will be replaced by the file and line number from which the 
-# warning originated and the warning text. Optionally the format may contain 
-# $version, which will be replaced by the version of the file (if it could 
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
 # be obtained via FILE_VERSION_FILTER)
 
 WARN_FORMAT            = "$file:$line: $text  "
 
-# The WARN_LOGFILE tag can be used to specify a file to which warning 
-# and error messages should be written. If left blank the output is written 
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
 # to stderr.
 
-WARN_LOGFILE           = 
+WARN_LOGFILE           =
 
 #---------------------------------------------------------------------------
 # configuration options related to the input files
 #---------------------------------------------------------------------------
 
-# The INPUT tag can be used to specify the files and/or directories that contain 
-# documented source files. You may enter file names like "myfile.cpp" or 
-# directories like "/usr/src/myproject". Separate the files or directories 
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
 # with spaces.
 
-INPUT                  = 
+INPUT                  =
 
-# This tag can be used to specify the character encoding of the source files that 
-# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
-# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
-# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
 
 INPUT_ENCODING         = UTF-8
 
-# If the value of the INPUT tag contains directories, you can use the 
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
-# blank the following patterns are tested: 
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx 
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
 
 FILE_PATTERNS          = *.h
 
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
-# should be searched for input files as well. Possible values are YES and NO. 
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
 # If left blank NO is used.
 
 RECURSIVE              = YES
 
-# The EXCLUDE tag can be used to specify files and/or directories that should 
-# excluded from the INPUT source files. This way you can easily exclude a 
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
 # subdirectory from a directory tree whose root is specified with the INPUT tag.
 
-EXCLUDE                = 
+EXCLUDE                =
 
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or 
-# directories that are symbolic links (a Unix filesystem feature) are excluded 
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
 # from the input.
 
 EXCLUDE_SYMLINKS       = NO
 
-# If the value of the INPUT tag contains directories, you can use the 
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
-# certain files from those directories. Note that the wildcards are matched 
-# against the file with absolute path, so to exclude all test directories 
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
 # for example use the pattern */test/*
 
-EXCLUDE_PATTERNS       = 
+EXCLUDE_PATTERNS       =
 
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
-# (namespaces, classes, functions, etc.) that should be excluded from the output. 
-# The symbol name can be a fully qualified name, a word, or if the wildcard * is used, 
-# a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
 
-EXCLUDE_SYMBOLS        = 
+EXCLUDE_SYMBOLS        =
 
-# The EXAMPLE_PATH tag can be used to specify one or more files or 
-# directories that contain example code fragments that are included (see 
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
 # the \include command).
 
-EXAMPLE_PATH           = 
+EXAMPLE_PATH           =
 
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
-# and *.h) to filter out the source-files in the directories. If left 
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
 # blank all files are included.
 
 EXAMPLE_PATTERNS       = *
 
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
-# searched for input files to be used with the \include or \dontinclude 
-# commands irrespective of the value of the RECURSIVE tag. 
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
 # Possible values are YES and NO. If left blank NO is used.
 
 EXAMPLE_RECURSIVE      = NO
 
-# The IMAGE_PATH tag can be used to specify one or more files or 
-# directories that contain image that are included in the documentation (see 
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
 # the \image command).
 
-IMAGE_PATH             = 
+IMAGE_PATH             =
 
-# The INPUT_FILTER tag can be used to specify a program that doxygen should 
-# invoke to filter for each input file. Doxygen will invoke the filter program 
-# by executing (via popen()) the command <filter> <input-file>, where <filter> 
-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
-# input file. Doxygen will then use the output that the filter program writes 
-# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
 # ignored.
 
-INPUT_FILTER           = 
+INPUT_FILTER           =
 
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
-# basis.  Doxygen will compare the file name with each pattern and apply the 
-# filter if there is a match.  The filters are a list of the form: 
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER 
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
 # is applied to all files.
 
-FILTER_PATTERNS        = 
+FILTER_PATTERNS        =
 
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
-# INPUT_FILTER) will be used to filter the input files when producing source 
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
 # files to browse (i.e. when SOURCE_BROWSER is set to YES).
 
 FILTER_SOURCE_FILES    = NO
@@ -593,34 +702,32 @@ FILTER_SOURCE_FILES    = NO
 # configuration options related to source browsing
 #---------------------------------------------------------------------------
 
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
-# be generated. Documented entities will be cross-referenced with these sources. 
-# Note: To get rid of all source code in the generated output, make sure also 
-# VERBATIM_HEADERS is set to NO. If you have enabled CALL_GRAPH or CALLER_GRAPH 
-# then you must also enable this option. If you don't then doxygen will produce 
-# a warning and turn it on anyway
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
 
 SOURCE_BROWSER         = YES
 
-# Setting the INLINE_SOURCES tag to YES will include the body 
+# Setting the INLINE_SOURCES tag to YES will include the body
 # of functions and classes directly in the documentation.
 
 INLINE_SOURCES         = NO
 
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
-# doxygen to hide any special comment blocks from generated source code 
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
 # fragments. Normal C and C++ comments will always remain visible.
 
 STRIP_CODE_COMMENTS    = YES
 
-# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
-# then for each documented function all documented 
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
 # functions referencing it will be listed.
 
 REFERENCED_BY_RELATION = NO
 
-# If the REFERENCES_RELATION tag is set to YES (the default) 
-# then for each documented function all documented entities 
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
 # called/used by that function will be listed.
 
 REFERENCES_RELATION    = NO
@@ -628,20 +735,21 @@ REFERENCES_RELATION    = NO
 # If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
 # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
 # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.  Otherwise they will link to the documentstion.
+# link to the source code.
+# Otherwise they will link to the documentation.
 
 REFERENCES_LINK_SOURCE = YES
 
-# If the USE_HTAGS tag is set to YES then the references to source code 
-# will point to the HTML generated by the htags(1) tool instead of doxygen 
-# built-in source browser. The htags tool is part of GNU's global source 
-# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
 # will need version 4.8.6 or higher.
 
 USE_HTAGS              = NO
 
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
-# will generate a verbatim copy of the header file for each class for 
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
 # which an include is specified. Set to NO to disable this.
 
 VERBATIM_HEADERS       = YES
@@ -650,287 +758,488 @@ VERBATIM_HEADERS       = YES
 # configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
 
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
-# of all compounds will be generated. Enable this if the project 
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
 # contains a lot of classes, structs, unions or interfaces.
 
 ALPHABETICAL_INDEX     = YES
 
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
 # in which this list will be split (can be a number in the range [1..20])
 
 COLS_IN_ALPHA_INDEX    = 5
 
-# In case all classes in a project start with a common prefix, all 
-# classes will be put under the same header in the alphabetical index. 
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
 # should be ignored while generating the index headers.
 
-IGNORE_PREFIX          = 
+IGNORE_PREFIX          =
 
 #---------------------------------------------------------------------------
 # configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
 # generate HTML output.
 
 GENERATE_HTML          = YES
 
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `html' will be used as the default path.
 
 HTML_OUTPUT            = html
 
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
 # doxygen will generate files with .html extension.
 
 HTML_FILE_EXTENSION    = .html
 
-# The HTML_HEADER tag can be used to specify a personal HTML header for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard header.
 
-HTML_HEADER            = 
+HTML_HEADER            =
 
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
-# each generated HTML page. If it is left blank doxygen will generate a 
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
 # standard footer.
 
-HTML_FOOTER            = 
+HTML_FOOTER            =
 
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
-# style sheet that is used by each HTML page. It can be used to 
-# fine-tune the look of the HTML output. If the tag is left blank doxygen 
-# will generate a default style sheet. Note that doxygen will try to copy 
-# the style sheet file to the HTML output directory, so don't put your own 
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
 # stylesheet in the HTML output directory as well, or it will be erased!
 
-HTML_STYLESHEET        = 
+HTML_STYLESHEET        =
 
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
-# files or namespaces will be aligned in HTML using tables. If set to 
-# NO a bullet list will be used.
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the stylesheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
 
-HTML_ALIGN_MEMBERS     = YES
+HTML_COLORSTYLE_HUE    = 220
 
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
-# will be generated that can be used as input for tools like the 
-# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
-# of the generated HTML documentation.
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
 
-GENERATE_HTMLHELP      = NO
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
 
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
-# documentation will contain sections that can be hidden and shown after the 
-# page has loaded. For this to work a browser that supports 
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox 
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
 # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
 
 HTML_DYNAMIC_SECTIONS  = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
-# be used to specify the file name of the resulting .chm file. You 
-# can add a path in front of the file if the result should not be 
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
 # written to the html output directory.
 
-CHM_FILE               = 
+CHM_FILE               =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
-# be used to specify the location (absolute path including file name) of 
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
 # the HTML help compiler on the generated index.hhp.
 
-HHC_LOCATION           = 
+HHC_LOCATION           =
 
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
-# controls if a separate .chi index file is generated (YES) or that 
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
 # it should be included in the master .chm file (NO).
 
 GENERATE_CHI           = NO
 
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
-# controls whether a binary table of contents is generated (YES) or a 
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
 # normal table of contents (NO) in the .chm file.
 
 BINARY_TOC             = NO
 
-# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
 # to the contents of the HTML help documentation and to the tree view.
 
 TOC_EXPAND             = NO
 
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
-# top of each HTML page. The value NO (the default) enables the index and 
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+#  will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
 # the value YES disables it.
 
 DISABLE_INDEX          = NO
 
-# This tag can be used to set the number of enum values (range [1..20]) 
+# This tag can be used to set the number of enum values (range [1..20])
 # that doxygen will group on one line in the generated HTML documentation.
 
 ENUM_VALUES_PER_LINE   = 4
 
-# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
-# generated containing a tree-like index structure (just like the one that 
-# is generated for HTML Help). For this to work a browser that supports 
-# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
-# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
-# probably better off using the HTML help feature.
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
 
 GENERATE_TREEVIEW      = YES
 
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
-# used to set the initial width (in pixels) of the frame in which the tree 
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES       = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
 # is shown.
 
 TREEVIEW_WIDTH         = 250
 
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a PHP enabled web server instead of at the web client
+# using Javascript. Doxygen will generate the search PHP script and index
+# file to put on the web server. The advantage of the server
+# based approach is that it scales better to large projects and allows
+# full text search. The disadvances is that it is more difficult to setup
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
 # generate Latex output.
 
 GENERATE_LATEX         = NO
 
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `latex' will be used as the default path.
 
 LATEX_OUTPUT           = latex
 
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
 # invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
 
 LATEX_CMD_NAME         = latex
 
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
-# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
 # default command name.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
-# LaTeX documents. This may be useful for small projects and may help to 
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_LATEX          = NO
 
-# The PAPER_TYPE tag can be used to set the paper type that is used 
-# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
 # executive. If left blank a4wide will be used.
 
 PAPER_TYPE             = a4wide
 
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
 # packages that should be included in the LaTeX output.
 
-EXTRA_PACKAGES         = 
+EXTRA_PACKAGES         =
 
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
-# the generated latex document. The header should contain everything until 
-# the first chapter. If it is left blank doxygen will generate a 
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
 # standard header. Notice: only use this tag if you know what you are doing!
 
-LATEX_HEADER           = 
+LATEX_HEADER           =
 
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
-# contain links (just like the HTML output) instead of page references 
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
 # This makes the output suitable for online browsing using a pdf viewer.
 
 PDF_HYPERLINKS         = NO
 
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
-# plain latex in the generated Makefile. Set this option to YES to get a 
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
 # higher quality PDF documentation.
 
 USE_PDFLATEX           = NO
 
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
-# command to the generated LaTeX files. This will instruct LaTeX to keep 
-# running if errors occur, instead of asking the user for help. 
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
 # This option is also used when generating formulas in HTML.
 
 LATEX_BATCHMODE        = NO
 
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
-# include the index chapters (such as File Index, Compound Index, etc.) 
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
 # in the output.
 
 LATEX_HIDE_INDICES     = NO
 
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
 #---------------------------------------------------------------------------
 # configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
-# The RTF output is optimized for Word 97 and may not look very pretty with 
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
 # other RTF readers or editors.
 
 GENERATE_RTF           = NO
 
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `rtf' will be used as the default path.
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
-# RTF documents. This may be useful for small projects and may help to 
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
 # save some trees in general.
 
 COMPACT_RTF            = NO
 
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
-# will contain hyperlink fields. The RTF file will 
-# contain links (just like the HTML output) instead of page references. 
-# This makes the output suitable for online browsing using WORD or other 
-# programs which support those fields. 
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
 # Note: wordpad (write) and others do not support links.
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's 
-# config file, i.e. a series of assignments. You only have to provide 
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
 # replacements, missing definitions are set to their default value.
 
-RTF_STYLESHEET_FILE    = 
+RTF_STYLESHEET_FILE    =
 
-# Set optional variables used in the generation of an rtf document. 
+# Set optional variables used in the generation of an rtf document.
 # Syntax is similar to doxygen's config file.
 
-RTF_EXTENSIONS_FILE    = 
+RTF_EXTENSIONS_FILE    =
 
 #---------------------------------------------------------------------------
 # configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
 # generate man pages
 
 GENERATE_MAN           = NO
 
-# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `man' will be used as the default path.
 
 MAN_OUTPUT             = man
 
-# The MAN_EXTENSION tag determines the extension that is added to 
+# The MAN_EXTENSION tag determines the extension that is added to
 # the generated man pages (default is the subroutine's section .3)
 
 MAN_EXTENSION          = .3
 
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
-# then it will generate one additional man file for each entity 
-# documented in the real man page(s). These additional files 
-# only source the real man page, but without them the man command 
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
 # would be unable to find the correct page. The default is NO.
 
 MAN_LINKS              = NO
@@ -939,33 +1248,33 @@ MAN_LINKS              = NO
 # configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES Doxygen will 
-# generate an XML file that captures the structure of 
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
 # the code including all documentation.
 
 GENERATE_XML           = NO
 
-# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
 # put in front of it. If left blank `xml' will be used as the default path.
 
 XML_OUTPUT             = xml
 
-# The XML_SCHEMA tag can be used to specify an XML schema, 
-# which can be used by a validating XML parser to check the 
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_SCHEMA             = 
+XML_SCHEMA             =
 
-# The XML_DTD tag can be used to specify an XML DTD, 
-# which can be used by a validating XML parser to check the 
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
 # syntax of the XML files.
 
-XML_DTD                = 
+XML_DTD                =
 
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
-# dump the program listings (including syntax highlighting 
-# and cross-referencing information) to the XML output. Note that 
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
 # enabling this will significantly increase the size of the XML output.
 
 XML_PROGRAMLISTING     = YES
@@ -974,10 +1283,10 @@ XML_PROGRAMLISTING     = YES
 # configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
-# generate an AutoGen Definitions (see autogen.sf.net) file 
-# that captures the structure of the code including all 
-# documentation. Note that this feature is still experimental 
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
 # and incomplete at the moment.
 
 GENERATE_AUTOGEN_DEF   = NO
@@ -986,319 +1295,346 @@ GENERATE_AUTOGEN_DEF   = NO
 # configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
-# generate a Perl module file that captures the structure of 
-# the code including all documentation. Note that this 
-# feature is still experimental and incomplete at the 
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
 # moment.
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
 # to generate PDF and DVI output from the Perl module output.
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
-# nicely formatted so it can be parsed by a human reader.  This is useful 
-# if you want to understand what is going on.  On the other hand, if this 
-# tag is set to NO the size of the Perl module output will be much smaller 
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
 # and Perl will parse it just the same.
 
 PERLMOD_PRETTY         = YES
 
-# The names of the make variables in the generated doxyrules.make file 
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
-# This is useful so different doxyrules.make files included by the same 
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
 # Makefile don't overwrite each other's variables.
 
-PERLMOD_MAKEVAR_PREFIX = 
+PERLMOD_MAKEVAR_PREFIX =
 
 #---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
+# Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
-# evaluate all C-preprocessor directives found in the sources and include 
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
 # files.
 
 ENABLE_PREPROCESSING   = YES
 
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
-# names in the source code. If set to NO (the default) only conditional 
-# compilation will be performed. Macro expansion can be done in a controlled 
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
 # way by setting EXPAND_ONLY_PREDEF to YES.
 
 MACRO_EXPANSION        = YES
 
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
-# then the macro expansion is limited to the macros specified with the 
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
 # PREDEFINED and EXPAND_AS_DEFINED tags.
 
 EXPAND_ONLY_PREDEF     = NO
 
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
 # in the INCLUDE_PATH (see below) will be search if a #include is found.
 
 SEARCH_INCLUDES        = YES
 
-# The INCLUDE_PATH tag can be used to specify one or more directories that 
-# contain include files that are not input files but should be processed by 
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
 # the preprocessor.
 
-INCLUDE_PATH           = 
+INCLUDE_PATH           =
 
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
-# patterns (like *.h and *.hpp) to filter out the header-files in the 
-# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
 # be used.
 
-INCLUDE_FILE_PATTERNS  = 
+INCLUDE_FILE_PATTERNS  =
 
-# The PREDEFINED tag can be used to specify one or more macro names that 
-# are defined before the preprocessor is started (similar to the -D option of 
-# gcc). The argument of the tag is a list of macros of the form: name 
-# or name=definition (no spaces). If the definition and the = are 
-# omitted =1 is assumed. To prevent a macro definition from being 
-# undefined via #undef or recursively expanded use the := operator 
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
 # instead of the = operator.
 
-PREDEFINED             = 
+PREDEFINED             =
 
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
-# this tag can be used to specify a list of macro names that should be expanded. 
-# The macro definition that is found in the sources will be used. 
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
 # Use the PREDEFINED tag if you want to use a different macro definition.
 
-EXPAND_AS_DEFINED      = 
+EXPAND_AS_DEFINED      =
 
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
-# doxygen's preprocessor will remove all function-like macros that are alone 
-# on a line, have an all uppercase name, and do not end with a semicolon. Such 
-# function macros are typically used for boiler-plate code, and will confuse 
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
 # the parser if not removed.
 
 SKIP_FUNCTION_MACROS   = YES
 
 #---------------------------------------------------------------------------
-# Configuration::additions related to external references   
+# Configuration::additions related to external references
 #---------------------------------------------------------------------------
 
-# The TAGFILES option can be used to specify one or more tagfiles. 
-# Optionally an initial location of the external documentation 
-# can be added for each tagfile. The format of a tag file without 
-# this location is as follows: 
-#   TAGFILES = file1 file2 ... 
-# Adding location for the tag files is done as follows: 
-#   TAGFILES = file1=loc1 "file2 = loc2" ... 
-# where "loc1" and "loc2" can be relative or absolute paths or 
-# URLs. If a location is present for each tag, the installdox tool 
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
 # does not have to be run to correct the links.
 # Note that each tag file must have a unique name
 # (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen 
+# If a tag file is not located in the directory in which doxygen
 # is run, you must also specify the path to the tagfile here.
 
-TAGFILES               = 
+TAGFILES               =
 
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
 # a tag file that is based on the input files it reads.
 
-GENERATE_TAGFILE       = 
+GENERATE_TAGFILE       =
 
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
-# in the class index. If set to NO only the inherited external classes 
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
 # will be listed.
 
 ALLEXTERNALS           = NO
 
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
-# in the modules index. If set to NO, only the current project's groups will 
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
 # be listed.
 
 EXTERNAL_GROUPS        = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script 
+# The PERL_PATH should be the absolute path and name of the perl script
 # interpreter (i.e. the result of `which perl').
 
 PERL_PATH              = /usr/bin/perl
 
 #---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
+# Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
-# or super classes. Setting the tag to NO turns the diagrams off. Note that 
-# this option is superseded by the HAVE_DOT option below. This is only a 
-# fallback. It is recommended to install and use dot, since it yields more 
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
 # powerful graphs.
 
 CLASS_DIAGRAMS         = NO
 
-# You can define message sequence charts within doxygen comments using the \msc 
-# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
-# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
-# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
-# be found in the default search path.
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
 
-MSCGEN_PATH            = 
+MSCGEN_PATH            =
 
-# If set to YES, the inheritance and collaboration graphs will hide 
-# inheritance and usage relations if the target is undocumented 
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
 # or is not a class.
 
 HIDE_UNDOC_RELATIONS   = YES
 
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
-# available from the path. This tool is part of Graphviz, a graph visualization 
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
 # have no effect if this option is set to NO (the default)
 
 HAVE_DOT               = NO
 
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect inheritance relations. Setting this tag to YES will force the 
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME           = FreeSans.ttf
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
 # the CLASS_DIAGRAMS tag to NO.
 
 CLASS_GRAPH            = YES
 
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
-# will generate a graph for each documented class showing the direct and 
-# indirect implementation dependencies (inheritance, containment, and 
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
 # class references variables) of the class with other documented classes.
 
 COLLABORATION_GRAPH    = YES
 
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
 # will generate a graph for groups, showing the direct groups dependencies
 
 GROUP_GRAPHS           = YES
 
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
-# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
 # Language.
 
 UML_LOOK               = NO
 
-# If set to YES, the inheritance and collaboration graphs will show the 
+# If set to YES, the inheritance and collaboration graphs will show the
 # relations between templates and their instances.
 
 TEMPLATE_RELATIONS     = NO
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
-# tags are set to YES then doxygen will generate a graph for each documented 
-# file showing the direct and indirect include dependencies of the file with 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
 # other documented files.
 
 INCLUDE_GRAPH          = YES
 
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
-# documented header file showing the documented files that directly or 
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
 # indirectly include this file.
 
 INCLUDED_BY_GRAPH      = YES
 
-# If the CALL_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will 
-# generate a call dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable call graphs for selected 
-# functions only using the \callgraph command.
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
 
 CALL_GRAPH             = NO
 
-# If the CALLER_GRAPH, SOURCE_BROWSER and HAVE_DOT tags are set to YES then doxygen will 
-# generate a caller dependency graph for every global function or class method. 
-# Note that enabling this option will significantly increase the time of a run. 
-# So in most cases it will be better to enable caller graphs for selected 
-# functions only using the \callergraph command.
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
 
 CALLER_GRAPH           = NO
 
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
 # will graphical hierarchy of all classes instead of a textual one.
 
 GRAPHICAL_HIERARCHY    = YES
 
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
-# then doxygen will show the dependencies a directory has on other directories 
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
 # in a graphical way. The dependency relations are determined by the #include
 # relations between the files in the directories.
 
 DIRECTORY_GRAPH        = YES
 
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
 # generated by dot. Possible values are png, jpg, or gif
 # If left blank png will be used.
 
 DOT_IMAGE_FORMAT       = png
 
-# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
 # found. If left blank, it is assumed the dot tool can be found in the path.
 
-DOT_PATH               = 
+DOT_PATH               =
 
-# The DOTFILE_DIRS tag can be used to specify one or more directories that 
-# contain dot files that are included in the documentation (see the 
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
 # \dotfile command).
 
-DOTFILE_DIRS           = 
+DOTFILE_DIRS           =
 
-# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
-# nodes that will be shown in the graph. If the number of nodes in a graph 
-# becomes larger than this value, doxygen will truncate the graph, which is 
-# visualized by representing a node as a red box. Note that doxygen if the number 
-# of direct children of the root node in a graph is already larger than 
-# MAX_DOT_GRAPH_NOTES then the graph will not be shown at all. Also note 
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
 # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
 
 DOT_GRAPH_MAX_NODES    = 50
 
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
-# graphs generated by dot. A depth value of 3 means that only nodes reachable 
-# from the root by following a path via at most 3 edges will be shown. Nodes 
-# that lay further from the root node will be omitted. Note that setting this 
-# option to 1 or 2 may greatly reduce the computation time needed for large 
-# code bases. Also note that the size of a graph can be further restricted by 
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
 # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
 
 MAX_DOT_GRAPH_DEPTH    = 1000
 
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
-# background. This is disabled by default, which results in a white background. 
-# Warning: Depending on the platform used, enabling this option may lead to 
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
-# read).
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
 
 DOT_TRANSPARENT        = NO
 
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
-# files in one run (i.e. multiple -o and -T options on the command line). This 
-# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
 # support this, this feature is disabled by default.
 
 DOT_MULTI_TARGETS      = NO
 
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
-# generate a legend page explaining the meaning of the various boxes and 
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
 # arrows in the dot generated graphs.
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
-# remove the intermediate dot files that are used to generate 
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
 # the various graphs.
 
 DOT_CLEANUP            = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-
-# The SEARCHENGINE tag specifies whether or not a search engine should be 
-# used. If set to NO the values of all tags below this one will be ignored.
-
-SEARCHENGINE           = NO
diff --git a/build b/build
index 594454f..149e862 100755
--- a/build
+++ b/build
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 
 import platform, sys, os, time, threading, subprocess, shutil, stat
 
@@ -164,23 +164,26 @@ if profile:
 if not os.path.exists (svn_revision_file):
   with open(svn_revision_file, 'wb') as fd:
     fd.write('')
+svn_revision = '#define SVN_REVISION 0\n'
 
 try:
-  process = subprocess.Popen ([ 'svn', 'info' ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+  process = subprocess.Popen ([ 'svn', 'info', '--xml' ], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
   if process.wait() != 0: raise 0
-  for line in process.stdout:
-    if line.startswith ('Revision:'):
-      svn_rev_number = line.split()[1]
-      revision = '#define SVN_REVISION ' + str(svn_rev_number) + '\n'
-      if revision != open(svn_revision_file).read():
-        with open(svn_revision_file, 'wb') as fd:
-          fd.write ('#define SVN_REVISION ' + str(svn_rev_number) + '\n')
-      if verbose:
-        print 'SVN revision: ' + str(svn_rev_number)
-      break
+  svn_info = process.stdout.read().translate (None, ' \t\n')
+  svn_revision_index = svn_info.find ('revision=')
+  svn_revision = 0
+  if svn_revision_index > 0:
+    svn_revision = svn_info[svn_revision_index:-1].split('"')[1]
+  if verbose:
+    print svn_revision
+  svn_revision = '#define SVN_REVISION ' + svn_revision + '\n'
 except:
   pass
 
+if svn_revision != open(svn_revision_file).read():
+  with open(svn_revision_file, 'wb') as fd:
+    fd.write (svn_revision)
+
 
 
 
@@ -211,7 +214,7 @@ cflags_gtk = pkg (pkgconfig_gtk, 'cflags')
 cflags_gtkgl = pkg (pkgconfig_gtk, 'cflags', [ pkgconfig_gl ])
 libs_glib = pkg (pkgconfig_glib, 'libs')
 libs_gtk = pkg (pkgconfig_gtk, 'libs')
-libs_gtkgl = pkg (pkgconfig_gtk, 'libs', [ pkgconfig_gl ])
+libs_gtkgl = pkg (pkgconfig_gtk, 'libs', [ pkgconfig_gl ]) + ld_flags_gl
 
 if verbose:
   print 'Settings:'
@@ -273,6 +276,7 @@ class Entry:
       '$mrtrix$': ld_flags_lib,
       '$gsl$': ld_flags_gsl,
       '$gtk$': gtk,
+      '$lz$': ld_flags_zlib,
       '$bin$': [ self.name ] })
 
     try:
@@ -311,7 +315,7 @@ class Entry:
           self.deps.add (os.path.join (root, file[:-len(cpp_suffix)] + obj_suffix))
 
     self.cmd = fillin (ld_lib, { '$flags$': ld_lib_flags,
-      '$obj$': [ item for item in self.deps ] + pkg (pkgconfig_glib, 'libs') + ld_flags_gsl,
+      '$obj$': [ item for item in self.deps ] + pkg (pkgconfig_glib, 'libs') + ld_flags_gsl + ld_flags_zlib,
       '$lib$': [ self.name ] })
 
     try:
@@ -387,7 +391,8 @@ def execute (message, cmd):
 
   try: 
     process = subprocess.Popen (cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    if process.wait() != 0:
+    ( stdoutdata, stderrdata ) = process.communicate()
+    if process.returncode != 0:
       print ''
       print 'ERROR:', message
       print ''
@@ -395,24 +400,24 @@ def execute (message, cmd):
       print ''
       print 'failed with output:'
       print ''
-      print process.stderr.read()
+      print stderrdata
       sys.stdout.flush()
       return 1
-    out = process.stdout.read()
-    if len(out):
+    if len(stdoutdata):
       print 'STDOUT:', message
-      print out
+      print stdoutdata
       sys.stdout.flush()
-    out = process.stderr.read()
-    if len(out):
+    if len(stderrdata):
       print 'STDERR:', message
-      print out
+      print stderrdata
       sys.stdout.flush()
 
   except OSError:
     print cmd[0] + ': command not found'
     sys.stdout.flush()
     return 1
+  except Exception as inst:
+    print 'unexpected exception: ' + str(inst)
 
 
 
@@ -503,6 +508,7 @@ def build_next (id):
   
       target = todo[current]
       if execute ('[' + target.action + '] ' + target.name, target.cmd):
+        print 'STOP'
         stop = 2
         return
 
@@ -556,12 +562,18 @@ def gen_command_html_help ():
     print '[DOC] ' + binaries[n]
     sys.stdout.flush()
      
-    process = subprocess.Popen ([ binaries[n], '__print_full_usage__' ], stdout=subprocess.PIPE)
-    if process.wait() != 0:
+    env = dict(os.environ)
+    if platform.system().lower() == 'windows':
+      env['PATH'] = lib_dir + ';' + env['PATH']
+    else:
+      env['PATH'] = lib_dir + ':' + env['PATH']
+    process = subprocess.Popen ([os.path.join(bin_dir,binaries[n]), '__print_full_usage__' ], stdout=subprocess.PIPE, env=env) 
+    a = process.communicate()
+    if process.returncode != 0:
       print 'ERROR: unable to execute', binaries[n], ' - aborting'
       sys.stdout.flush()
       return 1
-    H = process.stdout.read()
+    H = a[0]
     H = H.splitlines()
 
     fid = open (os.path.join (doc_dir, 'commands', binaries[n] + '.html'), 'wb')
diff --git a/cmd/cleanup_ANTS_warp.cpp b/cmd/cleanup_ANTS_warp.cpp
new file mode 100644
index 0000000..0df58bd
--- /dev/null
+++ b/cmd/cleanup_ANTS_warp.cpp
@@ -0,0 +1,122 @@
+/*
+    Copyright 2008 Brain Research Institute, Melbourne, Australia
+
+    Written by J-Donald Tournier, 27/06/08.
+
+    This file is part of MRtrix.
+
+    MRtrix is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    MRtrix is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with MRtrix.  If not, see <http://www.gnu.org/licenses/>.
+
+
+    04-11-2009 J-Donald Tournier <d.tournier at brain.org.au>
+    * fix -axis option
+
+    09-12-2010 J-Donald Tournier <d.tournier at brain.org.au>
+    * fix -axis option again
+
+*/
+
+#include "app.h"
+#include "image/position.h"
+
+using namespace std; 
+using namespace MR; 
+
+SET_VERSION_DEFAULT;
+
+DESCRIPTION = {
+  "clean up warp field generated by ANTS (or more specifically, WarpMultiImageTransform, "
+  "replacing background voxels with NaN when they map to regions outside the original image.",
+  NULL
+};
+
+ARGUMENTS = {
+  Argument ("unit_warp", "unit warp", "the original unit warp image").type_image_in (),
+  Argument ("ants_warp", "ANTS warp", "the warp image as produced by WarpMultiImageTransform.").type_image_in (),
+  Argument ("clean_warp", "clean warp", "the output cleaned-up warp image.").type_image_out (),
+  Argument::End
+};
+
+OPTIONS = { 
+  Option::End 
+};
+
+
+
+
+EXECUTE {
+
+  float background[3];
+  {
+    Image::Object &unit_warp_obj (*argument[0].get_image());
+    if (unit_warp_obj.ndim() < 4) 
+      throw Exception ("expected 4D image for unit_warp - aborting");
+    if (unit_warp_obj.dim(3) < 3) 
+      throw Exception ("expected unit_warp image to contain 3 volumes - aborting");
+
+    Image::Position bg (unit_warp_obj);
+    bg.set (0,0);
+    bg.set (1,0);
+    bg.set (2,0);
+    bg.set (3,0);
+    background[0] = bg.value();
+    bg.inc (3);
+    background[1] = bg.value();
+    bg.inc (3);
+    background[2] = bg.value();
+  }
+
+
+  Image::Object &warp_obj (*argument[1].get_image());
+  Image::Header header (warp_obj);
+
+  Image::Position in (warp_obj);
+  Image::Position out (*argument[2].get_image (header));
+  
+  ProgressBar::init (out.dim(0)*out.dim(1)*out.dim(2), "cleaning up ANTS transform...");
+
+  for (out.set(2,0), in.set(2,0); out[2] < out.dim(2); out.inc(2), in.inc(2)) {
+    for (out.set(1,0), in.set(1,0); out[1] < out.dim(1); out.inc(1), in.inc(1)) {
+      for (out.set(0,0), in.set(0,0); out[0] < out.dim(0); out.inc(0), in.inc(0)) {
+        float val[3];
+
+        in.set(3,0);
+        val[0] = in.value();
+        in.inc(3);
+        val[1] = in.value();
+        in.inc(3);
+        val[2] = in.value();
+
+        if (val[0] == background[0] && val[1] == background[1] && val[2] == background[2]) {
+          out.set (3,0);
+          out.value (GSL_NAN);
+          out.inc(3);
+          out.value (GSL_NAN);
+          out.inc(3);
+          out.value (GSL_NAN);
+        }
+        else {
+          out.set (3,0);
+          out.value (val[0]);
+          out.inc(3);
+          out.value (val[1]);
+          out.inc(3);
+          out.value (val[2]);
+        }
+      }
+    }
+  }
+
+  ProgressBar::done();
+}
diff --git a/cmd/disp_profile.cpp b/cmd/disp_profile.cpp
index 82744d0..1a5a91c 100644
--- a/cmd/disp_profile.cpp
+++ b/cmd/disp_profile.cpp
@@ -127,7 +127,7 @@ class Window : public Gtk::Window
       realize();
 
       int lmax = DWI::SH::LforN (values.columns());
-      if (values.columns() != guint (DWI::SH::NforL (lmax))) {
+      if (!is_response && values.columns() != guint (DWI::SH::NforL (lmax))) {
         is_response = true;
         error ("unexpected number of SH coefficients - assuming response function");
       }
diff --git a/cmd/filter_tracks.cpp b/cmd/filter_tracks.cpp
index 34ae944..1f1c6f1 100644
--- a/cmd/filter_tracks.cpp
+++ b/cmd/filter_tracks.cpp
@@ -38,7 +38,11 @@ SET_VERSION_DEFAULT;
 
 DESCRIPTION = {
   "Use regions-of-interest to select a sub-set of tracks from a given track file.\n ",
-  "Each region-of-interest should be either the path to a binary mask image, or a comma-separated list of 4 floating-point values, specifying the [x,y,z] coordinates of the centre and radius of a spherical ROI.",
+
+  "Each region-of-interest should be either the path to a binary mask image, "
+   "or a comma-separated list of 4 floating-point values, specifying the [x,y,z] "
+   "coordinates of the centre and radius of a spherical ROI.",
+
   NULL
 };
 
@@ -57,6 +61,12 @@ OPTIONS = {
   Option ("exclude", "exclusion ROI", "specify an exclusion region of interest. Tracks that enter ANY such exclusion ROI will NOT be included.", false, true)
     .append (Argument ("spec", "ROI specification", "specifies the parameters necessary to define the ROI.").type_string()),
 
+  Option ("minlength", "minimum track length", "the minimum length of a track. Tracks shorter than this value will NOT be included.")
+    .append (Argument ("value", "track distance",
+          "the minimum length to use in mm.").type_float (1e-2, 1e6, 10.0)),
+
+  Option ("invert", "invert match", "invert the matching process, so that tracks that would otherwise have been included are now excluded and vice-versa."),
+
   Option ("nomaskinterp", "no interpolation of mask regions", "do NOT perform tri-linear interpolation of mask images."),
 
   Option::End
@@ -67,56 +77,65 @@ OPTIONS = {
 class ROI_filter {
 
   public:
-    ROI_filter (Properties& properties)
-    {
-
-      bool no_mask_interp;
-      if (properties["no_mask_interp"].empty()) {
-        no_mask_interp = false;
-        properties["no_mask_interp"] = "0";
-      } else {
-        no_mask_interp = to<bool> (properties["no_mask_interp"]);
-      }
-
-      for (std::vector< RefPtr<ROI> >::iterator i = properties.roi.begin(); i != properties.roi.end(); ++i) {
-        ROI& roi (**i);
-        if (!roi.mask.empty() && !roi.mask_object) {
-          roi.mask_object = new MR::Image::Object;
-          roi.mask_object->open (roi.mask);
+    ROI_filter (Properties& properties, int min_num_points, bool invert) :
+      min_num_points (min_num_points),
+      invert (invert) {
+
+        bool no_mask_interp;
+        if (properties["no_mask_interp"].empty()) {
+          no_mask_interp = false;
+          properties["no_mask_interp"] = "0";
+        } else {
+          no_mask_interp = to<bool> (properties["no_mask_interp"]);
         }
-        switch (roi.type) {
-
-          case ROI::Seed:
-            throw Exception ("filter_tracks should not receive any seed regions");
-
-          case ROI::Include:
-            if (roi.mask.empty())
-              spheres.include.push_back (Tracker::Base::Sphere (roi.position, roi.radius));
-            else
-              masks  .include.push_back (Tracker::Base::Mask   (*roi.mask_object, no_mask_interp));
-            break;
-
-          case ROI::Exclude:
-            if (roi.mask.empty())
-              spheres.exclude.push_back (Tracker::Base::Sphere (roi.position, roi.radius));
-            else
-              masks  .exclude.push_back (Tracker::Base::Mask   (*roi.mask_object, no_mask_interp));
-            break;
-
-          case ROI::Mask:
-            throw Exception ("filter_tracks should not receive any mask regions");
-
-          default:
-            assert (0);
 
+        for (std::vector< RefPtr<ROI> >::iterator i = properties.roi.begin(); i != properties.roi.end(); ++i) {
+          ROI& roi (**i);
+          if (!roi.mask.empty() && !roi.mask_object) {
+            roi.mask_object = new MR::Image::Object;
+            roi.mask_object->open (roi.mask);
+          }
+          switch (roi.type) {
+
+            case ROI::Seed:
+              throw Exception ("filter_tracks should not receive any seed regions");
+
+            case ROI::Include:
+              if (roi.mask.empty())
+                spheres.include.push_back (Tracker::Base::Sphere (roi.position, roi.radius));
+              else
+                masks  .include.push_back (Tracker::Base::Mask   (*roi.mask_object, no_mask_interp));
+              break;
+
+            case ROI::Exclude:
+              if (roi.mask.empty())
+                spheres.exclude.push_back (Tracker::Base::Sphere (roi.position, roi.radius));
+              else
+                masks  .exclude.push_back (Tracker::Base::Mask   (*roi.mask_object, no_mask_interp));
+              break;
+
+            case ROI::Mask:
+              throw Exception ("filter_tracks should not receive any mask regions");
+
+            default:
+              assert (0);
+
+          }
         }
+
       }
 
+    bool accept_track (const std::vector<Point>& tck) { 
+      bool match = check_track (tck);
+      return invert ? !match : match;
     }
 
 
-    bool accept_track (const std::vector<Point>& tck)
+    bool check_track (const std::vector<Point>& tck)
     {
+      if (min_num_points > 0) 
+        if (tck.size() < guint (min_num_points)) 
+          return false;
 
       for (std::vector<Tracker::Base::Sphere>::iterator i = spheres.include.begin(); i != spheres.include.end(); ++i)
         i->included = false;
@@ -126,10 +145,10 @@ class ROI_filter {
       for (std::vector<Point>::const_iterator pos = tck.begin(); pos != tck.end(); ++pos) {
 
         for (std::vector<Tracker::Base::Sphere>::iterator i = spheres.exclude.begin(); i != spheres.exclude.end(); ++i)
-          if (i->contains (*pos)) return (false);
+          if (i->contains (*pos)) return false;
 
         for (std::vector<Tracker::Base::Mask  >::iterator i = masks  .exclude.begin(); i != masks  .exclude.end(); ++i)
-          if (i->contains (*pos)) return (false);
+          if (i->contains (*pos)) return false;
 
         for (std::vector<Tracker::Base::Sphere>::iterator i = spheres.include.begin(); i != spheres.include.end(); ++i)
           if (!i->included && i->contains (*pos)) i->included = true;
@@ -153,6 +172,8 @@ class ROI_filter {
   private:
     Tracker::Base::ROISphere spheres;
     Tracker::Base::ROIMask   masks;
+    int min_num_points;
+    bool invert;
 
 };
 
@@ -182,10 +203,24 @@ EXECUTE
   for (std::vector<OptBase>::iterator i = opt.begin(); i != opt.end(); ++i)
     properties.roi.push_back (RefPtr<ROI> (new ROI (ROI::Exclude, (*i)[0].get_string())));
 
-  opt = get_options (2); // nomaskinterp
+  opt = get_options (2); // minlength
+  int min_num_points = -1;
+  if (opt.size()) {
+    float step_size = 1.0;
+    if (properties["step_size"].empty()) 
+      error ("WARNING: no step size defined in track file header - assuming 1 mm");
+    else 
+      step_size = to<float> (properties["step_size"]);
+
+    min_num_points = (int) ceil (opt[0][0].get_float() / step_size);
+  }
+
+  bool invert = get_options(3).size(); // invert
+
+  opt = get_options (4); // nomaskinterp
   properties["no_mask_interp"] = opt.size() ? "1" : "0"; // need to override any existing property entry
 
-  ROI_filter filter (properties);
+  ROI_filter filter (properties, min_num_points, invert);
   writer.create (argument[1].get_string(), properties);
 
   std::vector<Point> tck;
@@ -194,11 +229,11 @@ EXECUTE
     if (filter.accept_track (tck))
       writer.append (tck);
     fprintf (stderr, "\r%8u read, %8u selected    [%3d%%]",
-      writer.total_count, writer.count, int(progress_multiplier * writer.total_count));
+        writer.total_count, writer.count, int(progress_multiplier * writer.total_count));
   }
   reader.close();
   writer.close();
   fprintf (stderr, "\r%8u read, %8u selected    [100%%]\n",
-    writer.total_count, writer.count);
+      writer.total_count, writer.count);
 
 }
diff --git a/cmd/mrcat.cpp b/cmd/mrcat.cpp
index c09f5f2..bf319e4 100644
--- a/cmd/mrcat.cpp
+++ b/cmd/mrcat.cpp
@@ -112,6 +112,27 @@ EXECUTE {
       header.data_type = DataType::CFloat32;
   }
 
+  if (axis > 2) {
+    guint nrows = 0;
+    for (int n = 0; n < num_images; ++n) {
+      if (in[n]->header().DW_scheme.rows() == 0 || 
+          in[n]->header().DW_scheme.columns() != 4) {
+        nrows = 0;
+        break;
+      }
+      nrows += in[n]->header().DW_scheme.rows();
+    }
+
+    if (nrows) {
+      header.DW_scheme.allocate (nrows, 4);
+      int row = 0;
+      for (int n = 0; n < num_images; ++n) 
+        for (guint i = 0; i < in[n]->header().DW_scheme.rows(); ++i, ++row)
+          for (guint j = 0; j < 4; ++j) 
+            header.DW_scheme(row,j) = in[n]->header().DW_scheme(i,j);
+    }
+  }
+
   Image::Position out (*argument[num_images].get_image (header));
 
   ProgressBar::init (out.voxel_count(), "concatenating...");
diff --git a/cmd/mrconvert.cpp b/cmd/mrconvert.cpp
index 59ac9e7..d901bac 100644
--- a/cmd/mrconvert.cpp
+++ b/cmd/mrconvert.cpp
@@ -101,8 +101,10 @@ inline bool next (Image::Position& ref, Image::Position& other, const std::vecto
   int axis = 0;
   do {
     ref.inc (axis);
-    other.set (axis, pos[axis][ref[axis]]);
-    if (ref[axis] < ref.dim(axis)) return (true);
+    if (ref[axis] < ref.dim(axis)) {
+      other.set (axis, pos[axis][ref[axis]]);
+      return (true);
+    }
     ref.set (axis, 0);
     other.set (axis, pos[axis][0]);
     axis++;
diff --git a/cmd/mrtransform.cpp b/cmd/mrtransform.cpp
index b69a336..d09d78b 100644
--- a/cmd/mrtransform.cpp
+++ b/cmd/mrtransform.cpp
@@ -165,9 +165,9 @@ EXECUTE {
     M.multiply (Mi, header.P2R());
 
     float R[] = { 
-      M(0,0), M(0,1), M(0,2), M(0,3), 
-      M(1,0), M(1,1), M(1,2), M(1,3), 
-      M(2,0), M(2,1), M(2,2), M(2,3)
+      float(M(0,0)), float(M(0,1)), float(M(0,2)), float(M(0,3)), 
+      float(M(1,0)), float(M(1,1)), float(M(1,2)), float(M(1,3)), 
+      float(M(2,0)), float(M(2,1)), float(M(2,2)), float(M(2,3))
     };
 
     in_obj.optimise();
diff --git a/cmd/read_dicom.cpp b/cmd/read_dicom.cpp
index 819c4ad..1e02137 100644
--- a/cmd/read_dicom.cpp
+++ b/cmd/read_dicom.cpp
@@ -24,7 +24,7 @@
 #include <glibmm/stringutils.h>
 
 #include "app.h"
-#include "file/dicom/quick_scan.h"
+#include "file/dicom/image.h"
 
 using namespace std; 
 using namespace MR; 
@@ -51,8 +51,6 @@ OPTIONS = {
 
 
 EXECUTE {
-  File::Dicom::QuickScan reader;
-
   bool print_DICOM_fields = false;
   bool print_CSA_fields = false;
 
@@ -69,15 +67,37 @@ EXECUTE {
       
       String entry;
       while ((entry = dir->read_name()).size()) {
-        if (reader.read (Glib::build_filename (argument[n].get_string(), entry), print_DICOM_fields, print_CSA_fields))
-          error ("error reading file \"" + reader.filename + "\"");
-        else cout << reader << "\n";
+        String filename = Glib::build_filename (argument[n].get_string(), entry);
+        try {
+          File::Dicom::Image image;
+          image.filename = filename;
+          image.read (print_DICOM_fields, print_CSA_fields);
+          if (!print_DICOM_fields && !print_CSA_fields) 
+            cout << image << "\n";
+        }
+        catch (Exception) {
+          throw Exception ("error reading file \"" + filename + "\"");
+        }
+      }
+
+    }
+    else {
+
+      try {
+        File::Dicom::Image image;
+        image.filename = argument[n].get_string();
+        image.read (print_DICOM_fields, print_CSA_fields);
+        // if (!print_DICOM_fields && !print_CSA_fields) 
+          // cout << image << "\n";
+        std::sort (image.frames.begin(), image.frames.end());
+        cout << image << "\n";
+      }
+      catch (Exception) {
+        throw Exception (String("error reading file \"") + argument[n].get_string() + "\"");
       }
+      
     }
-    else if (reader.read (argument[n].get_string(), print_DICOM_fields, print_CSA_fields))
-      error ("error reading file \"" + reader.filename + "\"");
 
-    else if (!print_DICOM_fields) cout << reader << "\n";
   }
 
 }
diff --git a/cmd/streamtrack.cpp b/cmd/streamtrack.cpp
index d3a0956..fe238a6 100644
--- a/cmd/streamtrack.cpp
+++ b/cmd/streamtrack.cpp
@@ -251,7 +251,13 @@ class Threader {
       }
 
       max_num_tracks = to<guint> (properties["max_num_tracks"]);
-      max_num_attempts = properties["max_num_attempts"].empty() ? 100 * max_num_tracks : to<guint> (properties["max_num_attempts"]);
+      if (properties["max_num_attempts"].empty()) {
+        max_num_attempts = 100 * max_num_tracks;
+        properties["max_num_attempts"] = str(max_num_attempts);
+      }
+      else 
+        max_num_attempts = to<guint> (properties["max_num_attempts"]);
+
       unidirectional = to<int> (properties["unidirectional"]);
       min_size = round (to<float> (properties["min_dist"]) / to<float> (properties["step_size"]));
 
diff --git a/cmd/tracks2prob.cpp b/cmd/tracks2prob.cpp
index 6520d17..c744e09 100644
--- a/cmd/tracks2prob.cpp
+++ b/cmd/tracks2prob.cpp
@@ -86,6 +86,8 @@ OPTIONS = {
 
   Option ("fraction", "output fibre fraction", "produce an image of the fraction of fibres through each voxel (as a proportion of the total number in the file), rather than the count."),
 
+  Option ("totalcount", "fraction by total count", "when using the -fraction option, compute fractions as proportion of total_count header entry rather than number of tracks in the file. This total_count corresponds to the total number of streamlines actually generated rather than those that were eventually selected."),
+
   Option ("lstdi", "length-scaled TDI", "scale the contribution of each track to the density image by the inverse of the streamline length"),
 
   Option ("datatype", "data type", "specify output image data type.")
@@ -634,12 +636,14 @@ EXECUTE {
   DWI::Tractography::Reader file;
   file.open (argument[0].get_string(), properties);
 
-  const size_t num_tracks = properties["count"]    .empty() ? 0   : to<size_t> (properties["count"]);
-  const float  step_size  = properties["step_size"].empty() ? 0.0 : to<float>  (properties["step_size"]);
+  const size_t num_tracks       = properties["count"]      .empty() ? 0   : to<size_t> (properties["count"]);
+  const size_t total_num_tracks = properties["total_count"].empty() ? 0   : to<size_t> (properties["total_count"]);
+  const float  step_size        = properties["step_size"]  .empty() ? 0.0 : to<float>  (properties["step_size"]);
 
-  const bool colour         = get_options (2).size();
-  const bool fibre_fraction = get_options (3).size();
-  const bool lstdi          = get_options (4).size();
+  const bool colour                  = get_options (2).size();
+  const bool fibre_fraction          = get_options (3).size();
+  const bool fraction_by_total_count = get_options (4).size();
+  const bool lstdi                   = get_options (5).size();
 
   std::vector<float> voxel_size;
   std::vector<OptBase> opt = get_options(1);
@@ -669,7 +673,7 @@ EXECUTE {
     file.open (argument[0].get_string(), properties);
   }
 
-  opt = get_options (5);
+  opt = get_options (6);
   if (opt.size())
     header.data_type.parse (data_type_choices[opt[0][0].get_int()]);
   else
@@ -682,12 +686,21 @@ EXECUTE {
   for (std::vector<std::string>::const_iterator i = properties.comments.begin(); i != properties.comments.end(); ++i)
     header.comments.push_back ("comment: " + *i);
 
-  float scaling_factor = fibre_fraction ? 1.0 / float(num_tracks) : 1.0;
+  float scaling_factor = 1.0;
+  if (fibre_fraction) {
+    if (fraction_by_total_count) {
+      if (!total_num_tracks)
+        throw Exception ("required entry 'total_count' not found in header - aborting");
+      scaling_factor /= total_num_tracks;
+    }
+    else 
+      scaling_factor /= num_tracks;
+  }
   header.comments.push_back("scaling_factor: " + str(scaling_factor));
   info ("intensity scaling factor set to " + str(scaling_factor));
 
   size_t resample_factor;
-  opt = get_options (6);
+  opt = get_options (7);
   if (opt.size()) {
     resample_factor = opt[0][0].get_int();
     info ("track interpolation factor manually set to " + str(resample_factor));
@@ -749,6 +762,7 @@ EXECUTE {
         writer.write (mapped_voxels);
         ProgressBar::inc();
       }
+      ProgressBar::done();
 
     } else {
 
@@ -761,10 +775,10 @@ EXECUTE {
         writer.write (mapped_voxels);
         ProgressBar::inc();
       }
+      ProgressBar::done();
 
     }
 
-    ProgressBar::done();
 
   }
 
diff --git a/cmd/tracks2vtk.cpp b/cmd/tracks2vtk.cpp
index ba39e5a..19c4e36 100644
--- a/cmd/tracks2vtk.cpp
+++ b/cmd/tracks2vtk.cpp
@@ -73,7 +73,9 @@ Point scanner_to_voxel_space (const Image::Object& H, const Point& pos)
 }
 
 
-SET_VERSION_DEFAULT;
+SET_VERSION (MRTRIX_MAJOR_VERSION, MRTRIX_MINOR_VERSION, MRTRIX_MICRO_VERSION); 
+SET_COPYRIGHT ("Copyright 2008 Brain Research Institute, Melbourne, Australia"); 
+SET_AUTHOR ("Philip Broser (philip.broser at me.com)");
 
 DESCRIPTION = {
   "convert a track file to a vtk format, cave: coordinates are in XYZ coordinates not reference",
diff --git a/doc/appendix/config.html b/doc/appendix/config.html
index 56a6151..9c3ef1b 100644
--- a/doc/appendix/config.html
+++ b/doc/appendix/config.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -89,8 +89,8 @@ These parameters are currently interpreted by MRtrix:
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/appendix/index.html b/doc/appendix/index.html
index 7b008b9..57a0706 100644
--- a/doc/appendix/index.html
+++ b/doc/appendix/index.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -26,8 +26,8 @@
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/appendix/mrtrix.html b/doc/appendix/mrtrix.html
index 557b966..403fd82 100644
--- a/doc/appendix/mrtrix.html
+++ b/doc/appendix/mrtrix.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -169,8 +169,8 @@ triplet of Inf values is used to indicate the end of the file.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/appendix/refs.html b/doc/appendix/refs.html
index 968a7e8..9693587 100644
--- a/doc/appendix/refs.html
+++ b/doc/appendix/refs.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -49,8 +49,8 @@
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/commands/average.html b/doc/commands/average.html
index 6ad31b7..85104c3 100644
--- a/doc/commands/average.html
+++ b/doc/commands/average.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -14,7 +14,7 @@
     <td><a href="index.html"><img src="../up.png"></a></td>
     <td><a href="../index.html"><img src="../home.png"></a></td>
     <th>average</th>
-    <td><a href="csdeconv.html"><img src="../right.png"></a></td>
+    <td><a href="cleanup_ANTS_warp.html"><img src="../right.png"></a></td>
   </tr>
 </table>
 
@@ -54,8 +54,8 @@ average an image along a specific axis.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrinfo.html b/doc/commands/cleanup_ANTS_warp.html
similarity index 56%
copy from doc/commands/mrinfo.html
copy to doc/commands/cleanup_ANTS_warp.html
index 37a028a..d0e34d9 100644
--- a/doc/commands/mrinfo.html
+++ b/doc/commands/cleanup_ANTS_warp.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -10,32 +10,30 @@
 
 <table class=nav>
   <tr>
-    <td><a href="mrconvert.html"><img src="../left.png"></a></td>
+    <td><a href="average.html"><img src="../left.png"></a></td>
     <td><a href="index.html"><img src="../up.png"></a></td>
     <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>mrinfo</th>
-    <td><a href="mrmult.html"><img src="../right.png"></a></td>
+    <th>cleanup_ANTS_warp</th>
+    <td><a href="csdeconv.html"><img src="../right.png"></a></td>
   </tr>
 </table>
 
 <h2>Description</h2>
 <p>
-display header information
+clean up warp field generated by ANTS (or more specifically, WarpMultiImageTransform, replacing background voxels with NaN when they map to regions outside the original image.
 </p>
-<p class=indented><strong>syntax:</strong>     mrinfo [ options ] image [ image ... ] </p>
+<p class=indented><strong>syntax:</strong>     cleanup_ANTS_warp [ options ] unit_warp ants_warp clean_warp </p>
 <h2>Arguments</h2>
 <table class=args>
-<tr><td><b>image</b> [ multiples allowed ]</td>
-<td>the input image.</td></tr>
+<tr><td><b>unit_warp</b></td>
+<td>the original unit warp image</td></tr>
+<tr><td><b>ants_warp</b></td>
+<td>the warp image as produced by WarpMultiImageTransform.</td></tr>
+<tr><td><b>clean_warp</b></td>
+<td>the output cleaned-up warp image.</td></tr>
 </table>
 <h2>Options</h2>
 <table class=args>
-<tr><td nowrap><b>-grad</b> <i>file</i></td>
-<td>write DW gradient scheme to file
-<table class=opts>
-<tr><td><i>file</i></td>
-<td>the DW gradient scheme file.</td></tr>
-</table></td></tr>
 <tr><td nowrap><b>-info</b></td>
 <td>display information messages.</td></tr>
 <tr><td nowrap><b>-quiet</b></td>
@@ -50,8 +48,8 @@ display header information
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/csdeconv.html b/doc/commands/csdeconv.html
index d756f1c..6c9b9ac 100644
--- a/doc/commands/csdeconv.html
+++ b/doc/commands/csdeconv.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -10,7 +10,7 @@
 
 <table class=nav>
   <tr>
-    <td><a href="average.html"><img src="../left.png"></a></td>
+    <td><a href="cleanup_ANTS_warp.html"><img src="../left.png"></a></td>
     <td><a href="index.html"><img src="../up.png"></a></td>
     <td><a href="../index.html"><img src="../home.png"></a></td>
     <th>csdeconv</th>
@@ -143,8 +143,8 @@ etc...
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/dicom_filename.html b/doc/commands/dicom_filename.html
index 18805af..ee7ec6c 100644
--- a/doc/commands/dicom_filename.html
+++ b/doc/commands/dicom_filename.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -44,8 +44,8 @@ read a DICOM file and output a suitable filename for its storage.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/dir2amp.html b/doc/commands/dir2amp.html
index d0a23a4..6374a29 100644
--- a/doc/commands/dir2amp.html
+++ b/doc/commands/dir2amp.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ convert directions image to amplitudes.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/disp_profile.html b/doc/commands/disp_profile.html
index b49737b..69e334e 100644
--- a/doc/commands/disp_profile.html
+++ b/doc/commands/disp_profile.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ view spherical harmonics surface plots.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/dwi2SH.html b/doc/commands/dwi2SH.html
index aecb319..26a3c6f 100644
--- a/doc/commands/dwi2SH.html
+++ b/doc/commands/dwi2SH.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -108,8 +108,8 @@ etc...
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/dwi2tensor.html b/doc/commands/dwi2tensor.html
index b91dc36..97cc8c9 100644
--- a/doc/commands/dwi2tensor.html
+++ b/doc/commands/dwi2tensor.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -66,8 +66,8 @@ convert diffusion-weighted images to tensor images.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/erode.html b/doc/commands/erode.html
index ece9aff..ae397be 100644
--- a/doc/commands/erode.html
+++ b/doc/commands/erode.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -54,8 +54,8 @@ erode (or dilate) mask (i.e. binary) image
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/estimate_response.html b/doc/commands/estimate_response.html
index 3e1339e..a5eb313 100644
--- a/doc/commands/estimate_response.html
+++ b/doc/commands/estimate_response.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -62,8 +62,8 @@ estimate the fibre response function for use in spherical deconvolution.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/filter_tracks.html b/doc/commands/filter_tracks.html
index 5b33dd8..3374694 100644
--- a/doc/commands/filter_tracks.html
+++ b/doc/commands/filter_tracks.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -50,6 +50,14 @@ Each region-of-interest should be either the path to a binary mask image, or a c
 <tr><td><i>spec</i></td>
 <td>specifies the parameters necessary to define the ROI.</td></tr>
 </table></td></tr>
+<tr><td nowrap><b>-minlength</b> <i>value</i></td>
+<td>the minimum length of a track. Tracks shorter than this value will NOT be included.
+<table class=opts>
+<tr><td><i>value</i></td>
+<td>the minimum length to use in mm.</td></tr>
+</table></td></tr>
+<tr><td nowrap><b>-invert</b></td>
+<td>invert the matching process, so that tracks that would otherwise have been included are now excluded and vice-versa.</td></tr>
 <tr><td nowrap><b>-nomaskinterp</b></td>
 <td>do NOT perform tri-linear interpolation of mask images.</td></tr>
 <tr><td nowrap><b>-info</b></td>
@@ -66,8 +74,8 @@ Each region-of-interest should be either the path to a binary mask image, or a c
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/find_SH_peaks.html b/doc/commands/find_SH_peaks.html
index b492e42..f6a93dd 100644
--- a/doc/commands/find_SH_peaks.html
+++ b/doc/commands/find_SH_peaks.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -74,8 +74,8 @@ identify the orientations of the N largest peaks of a SH profile
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/gen_ROI.html b/doc/commands/gen_ROI.html
index d547395..ae128f1 100644
--- a/doc/commands/gen_ROI.html
+++ b/doc/commands/gen_ROI.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -60,8 +60,8 @@ generate a mask ROI with the same dimensions as the input dataset, and all voxel
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/gen_WM_mask.html b/doc/commands/gen_WM_mask.html
index 230d226..f1e8701 100644
--- a/doc/commands/gen_WM_mask.html
+++ b/doc/commands/gen_WM_mask.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -60,8 +60,8 @@ generate a white matter probability mask from the DW images.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/gen_unit_warp.html b/doc/commands/gen_unit_warp.html
index b6ccca9..f867d68 100644
--- a/doc/commands/gen_unit_warp.html
+++ b/doc/commands/gen_unit_warp.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ generate a warp field corresponding to a no-warp operation. This is useful to ob
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/gendir.html b/doc/commands/gendir.html
index 04b728e..cd1147e 100644
--- a/doc/commands/gendir.html
+++ b/doc/commands/gendir.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -58,8 +58,8 @@ generate a set of directions evenly distributed over a hemisphere.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/import_tracks.html b/doc/commands/import_tracks.html
index 9e60dbf..dc17a41 100644
--- a/doc/commands/import_tracks.html
+++ b/doc/commands/import_tracks.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -49,8 +49,8 @@ The input ascii files should consist of 3xN matrices, corresponding to the [ X Y
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/index.html b/doc/commands/index.html
index 6da6a8b..4c9a439 100644
--- a/doc/commands/index.html
+++ b/doc/commands/index.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -20,6 +20,7 @@
 
 <table class=cmdindex width=100%>
 <tr><td><a href="average.html">average</a></td><td>average an image along a specific axis.</td></tr>
+<tr><td><a href="cleanup_ANTS_warp.html">cleanup_ANTS_warp</a></td><td>clean up warp field generated by ANTS (or more specifically, WarpMultiImageTransform, replacing background voxels with NaN when they map to regions outside the original image.</td></tr>
 <tr><td><a href="csdeconv.html">csdeconv</a></td><td>perform non-negativity constrained spherical deconvolution.</td></tr>
 <tr><td><a href="dicom_filename.html">dicom_filename</a></td><td>read a DICOM file and output a suitable filename for its storage.</td></tr>
 <tr><td><a href="dir2amp.html">dir2amp</a></td><td>convert directions image to amplitudes.</td></tr>
@@ -66,7 +67,7 @@
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
+MRtrix version 0.2.11<br>
 </p>
 
 </body>
diff --git a/doc/commands/median3D.html b/doc/commands/median3D.html
index 1ed4daa..7c9d592 100644
--- a/doc/commands/median3D.html
+++ b/doc/commands/median3D.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ smooth images using a 3x3x3 median filter.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrabs.html b/doc/commands/mrabs.html
index b277f6f..e5c648d 100644
--- a/doc/commands/mrabs.html
+++ b/doc/commands/mrabs.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ take absolute value of image intensity
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mradd.html b/doc/commands/mradd.html
index ab7c1e9..bf07035 100644
--- a/doc/commands/mradd.html
+++ b/doc/commands/mradd.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -48,8 +48,8 @@ add or subtract images
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrcat.html b/doc/commands/mrcat.html
index a1f4acb..c4144a4 100644
--- a/doc/commands/mrcat.html
+++ b/doc/commands/mrcat.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -54,8 +54,8 @@ concatenate several images into one
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrconvert.html b/doc/commands/mrconvert.html
index aa1aad1..ecf5dd4 100644
--- a/doc/commands/mrconvert.html
+++ b/doc/commands/mrconvert.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -97,8 +97,8 @@ If used correctly, this program can be a very useful workhorse. In addition to c
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrinfo.html b/doc/commands/mrinfo.html
index 37a028a..0ae2e1e 100644
--- a/doc/commands/mrinfo.html
+++ b/doc/commands/mrinfo.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -50,8 +50,8 @@ display header information
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrmult.html b/doc/commands/mrmult.html
index 60afe61..3c9a6cd 100644
--- a/doc/commands/mrmult.html
+++ b/doc/commands/mrmult.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ multiply images
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrstats.html b/doc/commands/mrstats.html
index 4cf99a3..1e5c0bd 100644
--- a/doc/commands/mrstats.html
+++ b/doc/commands/mrstats.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -68,8 +68,8 @@ compute images statistics.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrtransform.html b/doc/commands/mrtransform.html
index 455e733..29429cc 100644
--- a/doc/commands/mrtransform.html
+++ b/doc/commands/mrtransform.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -76,8 +76,8 @@ apply spatial transformations or reslice images.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/mrview.html b/doc/commands/mrview.html
index 71e74ca..aaf81b9 100644
--- a/doc/commands/mrview.html
+++ b/doc/commands/mrview.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -44,8 +44,8 @@ the MRtrix image viewer.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/normalise_tracks.html b/doc/commands/normalise_tracks.html
index d1364fe..e631eb5 100644
--- a/doc/commands/normalise_tracks.html
+++ b/doc/commands/normalise_tracks.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -48,8 +48,8 @@ apply a normalisation map to a tracks file.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/read_dicom.html b/doc/commands/read_dicom.html
index 9370971..4bf136e 100644
--- a/doc/commands/read_dicom.html
+++ b/doc/commands/read_dicom.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -48,8 +48,8 @@ output DICOM fields in human-readable format.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/read_ximg.html b/doc/commands/read_ximg.html
index 52a4c45..7f59c11 100644
--- a/doc/commands/read_ximg.html
+++ b/doc/commands/read_ximg.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -44,8 +44,8 @@ output XIMG fields in human-readable format.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/resample_tracks.html b/doc/commands/resample_tracks.html
index 4178e23..8f7fe36 100644
--- a/doc/commands/resample_tracks.html
+++ b/doc/commands/resample_tracks.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -83,8 +83,8 @@ Use the -extent option to specify the range within which the resampling should t
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/sample_tracks.html b/doc/commands/sample_tracks.html
index 8a8e33c..6672546 100644
--- a/doc/commands/sample_tracks.html
+++ b/doc/commands/sample_tracks.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -51,8 +51,8 @@ the track file should generally have been produced by resample_tracks to ensure
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/sdeconv.html b/doc/commands/sdeconv.html
index 00cee2d..5d129c6 100644
--- a/doc/commands/sdeconv.html
+++ b/doc/commands/sdeconv.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -119,8 +119,8 @@ etc...
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/select_tracks.html b/doc/commands/select_tracks.html
index adad0ae..5a55b7f 100644
--- a/doc/commands/select_tracks.html
+++ b/doc/commands/select_tracks.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -55,8 +55,8 @@ Note that the track properties (as listed in the header of the file, and display
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/streamtrack.html b/doc/commands/streamtrack.html
index 1bb26dd..fe81aaa 100644
--- a/doc/commands/streamtrack.html
+++ b/doc/commands/streamtrack.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -146,8 +146,8 @@ perform streamlines tracking.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/tensor2ADC.html b/doc/commands/tensor2ADC.html
index e024783..1b48623 100644
--- a/doc/commands/tensor2ADC.html
+++ b/doc/commands/tensor2ADC.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ calculate map of mean apparent diffusion coefficient (ADC) from diffusion tensor
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/tensor2FA.html b/doc/commands/tensor2FA.html
index 7716b95..9351df6 100644
--- a/doc/commands/tensor2FA.html
+++ b/doc/commands/tensor2FA.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ calculate map of fractional anisotropy from diffusion tensor image.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/tensor2vector.html b/doc/commands/tensor2vector.html
index 316e224..b90bc0c 100644
--- a/doc/commands/tensor2vector.html
+++ b/doc/commands/tensor2vector.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -46,8 +46,8 @@ generate map of the major eigenvector.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/tensor_metric.html b/doc/commands/tensor_metric.html
index 596505b..2001a9f 100644
--- a/doc/commands/tensor_metric.html
+++ b/doc/commands/tensor_metric.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -80,8 +80,8 @@ generate maps of tensor-derived parameters.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/threshold.html b/doc/commands/threshold.html
index 42117e8..4eed4a6 100644
--- a/doc/commands/threshold.html
+++ b/doc/commands/threshold.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -67,8 +67,8 @@ By default, the threshold level is determined using a histogram analysis to cut
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/track_info.html b/doc/commands/track_info.html
index 721c01d..14626d7 100644
--- a/doc/commands/track_info.html
+++ b/doc/commands/track_info.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -50,8 +50,8 @@ print out information about track file
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/tracks2prob.html b/doc/commands/tracks2prob.html
index 3438373..79d8919 100644
--- a/doc/commands/tracks2prob.html
+++ b/doc/commands/tracks2prob.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -48,6 +48,8 @@ convert a tracks file into a map of the fraction of tracks to enter each voxel.
 <td>add colour to the output image according to the direction of the tracks.</td></tr>
 <tr><td nowrap><b>-fraction</b></td>
 <td>produce an image of the fraction of fibres through each voxel (as a proportion of the total number in the file), rather than the count.</td></tr>
+<tr><td nowrap><b>-totalcount</b></td>
+<td>when using the -fraction option, compute fractions as proportion of total_count header entry rather than number of tracks in the file. This total_count corresponds to the total number of streamlines actually generated rather than those that were eventually selected.</td></tr>
 <tr><td nowrap><b>-lstdi</b></td>
 <td>scale the contribution of each track to the density image by the inverse of the streamline length</td></tr>
 <tr><td nowrap><b>-datatype</b> <i>spec</i></td>
@@ -76,8 +78,8 @@ convert a tracks file into a map of the fraction of tracks to enter each voxel.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/tracks2vtk.html b/doc/commands/tracks2vtk.html
index adf039c..92250a2 100644
--- a/doc/commands/tracks2vtk.html
+++ b/doc/commands/tracks2vtk.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -58,8 +58,8 @@ convert a track file to a vtk format, cave: coordinates are in XYZ coordinates n
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/commands/truncate_tracks.html b/doc/commands/truncate_tracks.html
index 9d44e79..471d5d2 100644
--- a/doc/commands/truncate_tracks.html
+++ b/doc/commands/truncate_tracks.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -48,8 +48,8 @@ truncate a tracks file by selecting only the first N tracks.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/faq.html b/doc/faq.html
index fe2fd77..70c122a 100644
--- a/doc/faq.html
+++ b/doc/faq.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -377,8 +377,8 @@ achieved as follows:
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/general/cmdline.html b/doc/general/cmdline.html
index 1fdef08..496786f 100644
--- a/doc/general/cmdline.html
+++ b/doc/general/cmdline.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -354,8 +354,8 @@ and compute the corresponding tensor components. The resulting data set is then
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/general/formats.html b/doc/general/formats.html
index f35d5ab..e0ccc54 100644
--- a/doc/general/formats.html
+++ b/doc/general/formats.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -349,8 +349,8 @@ the <a href='overview.html#axes'>coordinate system convention</a> used by MRtrix
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/general/index.html b/doc/general/index.html
index a53a682..db0d576 100644
--- a/doc/general/index.html
+++ b/doc/general/index.html
@@ -2,7 +2,7 @@
 <html>
 <head>
   <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix 0.2.10 documentation</title>
+  <title>MRtrix 0.2.11 documentation</title>
   <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -74,8 +74,8 @@
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/general/mrview.html b/doc/general/mrview.html
index ed2337e..dfe6031 100644
--- a/doc/general/mrview.html
+++ b/doc/general/mrview.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -267,8 +267,8 @@ The Screen Capture tool is used to create simple snapshots of the contents of th
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/general/overview.html b/doc/general/overview.html
index b12773c..2ea46a2 100644
--- a/doc/general/overview.html
+++ b/doc/general/overview.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -184,8 +184,8 @@ Note also that pixel coordinates and study numbers start from zero. For example,
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/index.html b/doc/index.html
index 4e5f8be..9b20342 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -13,7 +13,7 @@
     <td><a href="index.html"><img src="left.png"></a></td>
     <td><a href="index.html"><img src="up.png"></a></td>
     <td><a href="index.html"><img src="home.png"></a></td>
-    <th>MRtrix 0.2.10 - table of contents</th>
+    <th>MRtrix 0.2.11 - table of contents</th>
     <td><a href="intro.html"><img src="right.png"></a></td>
   </tr>
 </table>
@@ -63,8 +63,8 @@
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/install/index.html b/doc/install/index.html
index eeb0bae..9bbfa60 100644
--- a/doc/install/index.html
+++ b/doc/install/index.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -43,8 +43,8 @@
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/install/macosx.html b/doc/install/macosx.html
index 9e5a371..f0383af 100644
--- a/doc/install/macosx.html
+++ b/doc/install/macosx.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -52,7 +52,7 @@ href="http://www.macports.org/install.php">
 http://www.macports.org/install.php</a>.</dd>
 <dt>Get and build the dependencies</dt>
 <dd><pre>
-$ port install glib2 glibmm libpng gtk2 gtkmm gtkglext gsl
+$ port install glib2 glibmm libpng gtk2 gtkmm gtkglext gsl pkgconfig
 </pre></dd>
 </dl>
 
@@ -124,8 +124,8 @@ href=unix.html#config>Unix instructions</a>.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/install/unix.html b/doc/install/unix.html
index 71b6ed9..5afed20 100644
--- a/doc/install/unix.html
+++ b/doc/install/unix.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -203,7 +203,7 @@ respectively, and then create symbolic links to these in the corresponding
 <p>
 In some cases, it may not be possible to install the executables (or symbolic 
 links to them) into a location that is in the default path. This can happen for 
-instance if installing into a user account. In these case, the location of the 
+instance if installing into a user account. In these cases, the location of the 
 executables needs to be added to the PATH environment variable, and the 
 location of the dynamic library needs to be added to the LD_LIBRARY_PATH 
 environment variable (alternatively, it may also be possible to add the latter 
@@ -211,7 +211,7 @@ to the dynamic loader's search path, although this is system-specific).
 <p>
 This can typically be done by adding a couple of lines to the relevant startup 
 script.  Unfortunately, each Unix variant may use a different procedure for 
-this. For single user accounrs, it should be sufficient to add these lines to 
+this. For single user accounts, it should be sufficient to add these lines to 
 the <kbd>~/.bashrc</kbd> file:
 <pre>
 PATH=/home/user/mrtrix/bin:$PATH
@@ -275,8 +275,8 @@ default values will be used instead.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/install/windows.html b/doc/install/windows.html
index 78174f7..c5e7198 100644
--- a/doc/install/windows.html
+++ b/doc/install/windows.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -99,8 +99,8 @@ href="unix.html#compile">Unix installation instructions</a>.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/intro.html b/doc/intro.html
index 22d7668..15d8fc9 100644
--- a/doc/intro.html
+++ b/doc/intro.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="stylesheet.css" type="text/css" media=screen>
 </head>
 
@@ -155,8 +155,8 @@ For example, in Microsoft Windows, you may need to use the backslash <kbd>'\'</k
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 
diff --git a/doc/tractography/dwi.html b/doc/tractography/dwi.html
index 2cdde3d..937d429 100644
--- a/doc/tractography/dwi.html
+++ b/doc/tractography/dwi.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -216,8 +216,8 @@ will scan the DICOM data set specified and store the DW scheme in the file <kbd>
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/tractography/index.html b/doc/tractography/index.html
index a73557c..6709537 100644
--- a/doc/tractography/index.html
+++ b/doc/tractography/index.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -50,8 +50,8 @@
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/tractography/preprocess.html b/doc/tractography/preprocess.html
index 1193418..b20e9fa 100644
--- a/doc/tractography/preprocess.html
+++ b/doc/tractography/preprocess.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -237,8 +237,8 @@ sidebar tool within <a href='../general/mrview.html'>MRview</a>.
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/tractography/roi.html b/doc/tractography/roi.html
index 6634d32..b55079b 100644
--- a/doc/tractography/roi.html
+++ b/doc/tractography/roi.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -80,8 +80,8 @@ The 'ROI analysis' of MRView can be used to define such ROIs (see <a href='../ge
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/doc/tractography/tracking.html b/doc/tractography/tracking.html
index 6cc0ef6..b0b2454 100644
--- a/doc/tractography/tracking.html
+++ b/doc/tractography/tracking.html
@@ -2,7 +2,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix 0.2.10 documentation</title>
+<title>MRtrix 0.2.11 documentation</title>
 <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
 </head>
 <body>
@@ -154,8 +154,8 @@ href='../commands/tracks2prob.html'>tracks2prob</a>.  </p>
 
 <p class=footer>
 Donald Tournier<br>
-MRtrix version 0.2.10<br>
-Last updated 2012-02-10
+MRtrix version 0.2.11<br>
+Last updated 2013-03-13
 </p>
 
 </body>
diff --git a/icons/tracks.png b/icons/tracks.png
new file mode 100644
index 0000000..29f0c52
Binary files /dev/null and b/icons/tracks.png differ
diff --git a/icons/tracks.svg b/icons/tracks.svg
new file mode 100644
index 0000000..813270e
--- /dev/null
+++ b/icons/tracks.svg
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="48"
+   height="48"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="New document 1">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3974">
+      <stop
+         style="stop-color:#ff0000;stop-opacity:1;"
+         offset="0"
+         id="stop3976" />
+      <stop
+         style="stop-color:#ff4a4e;stop-opacity:1;"
+         offset="1"
+         id="stop3978" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3966">
+      <stop
+         style="stop-color:#1c56ff;stop-opacity:1;"
+         offset="0"
+         id="stop3968" />
+      <stop
+         style="stop-color:#0043ff;stop-opacity:1;"
+         offset="1"
+         id="stop3970" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3966"
+       id="linearGradient3972"
+       x1="7"
+       y1="1043.3622"
+       x2="39"
+       y2="1016.3622"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3974"
+       id="linearGradient3980"
+       x1="10"
+       y1="1019.3622"
+       x2="42"
+       y2="1040.3622"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3966-8"
+       id="linearGradient3972-0"
+       x1="7"
+       y1="1043.3622"
+       x2="39"
+       y2="1016.3622"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient3966-8">
+      <stop
+         style="stop-color:#1c56ff;stop-opacity:1;"
+         offset="0"
+         id="stop3968-2" />
+      <stop
+         style="stop-color:#0043ff;stop-opacity:1;"
+         offset="1"
+         id="stop3970-3" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3966-8"
+       id="linearGradient3996"
+       x1="7"
+       y1="1043.3622"
+       x2="39"
+       y2="1016.3622"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient3998">
+      <stop
+         style="stop-color:#1c56ff;stop-opacity:1;"
+         offset="0"
+         id="stop4000" />
+      <stop
+         style="stop-color:#0043ff;stop-opacity:1;"
+         offset="1"
+         id="stop4002" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3966-8"
+       id="linearGradient4004"
+       x1="7"
+       y1="1043.3622"
+       x2="39"
+       y2="1016.3622"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient4006">
+      <stop
+         style="stop-color:#1c56ff;stop-opacity:1;"
+         offset="0"
+         id="stop4008" />
+      <stop
+         style="stop-color:#0043ff;stop-opacity:1;"
+         offset="1"
+         id="stop4010" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3966-8"
+       id="linearGradient4012"
+       x1="7"
+       y1="1043.3622"
+       x2="39"
+       y2="1016.3622"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient4014">
+      <stop
+         style="stop-color:#1c56ff;stop-opacity:1;"
+         offset="0"
+         id="stop4016" />
+      <stop
+         style="stop-color:#0043ff;stop-opacity:1;"
+         offset="1"
+         id="stop4018" />
+    </linearGradient>
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="1.4"
+     inkscape:cx="-27.495021"
+     inkscape:cy="70.174566"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:snap-global="true"
+     inkscape:object-nodes="true"
+     inkscape:snap-smooth-nodes="true"
+     inkscape:window-width="1611"
+     inkscape:window-height="1087"
+     inkscape:window-x="0"
+     inkscape:window-y="26"
+     inkscape:window-maximized="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid2985"
+       empspacing="5"
+       visible="true"
+       enabled="true"
+       snapvisiblegridlinesonly="true" />
+  </sodipodi:namedview>
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1004.3622)">
+    <g
+       transform="translate(0.1109167,-0.0017)"
+       id="g3955-2"
+       style="stroke:#000000;stroke-opacity:1;stroke-width:3;stroke-miterlimit:4;stroke-dasharray:none">
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-61"
+         d="m 2,1050.364 c 11,-39.0018 27,-22.0018 34,-44.0018"
+         style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-9-1"
+         d="M 4.1933542,1050.4411 C 16,1014.3622 33,1031.3622 41,1006.3622"
+         style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-9-4-2"
+         d="M 6.8890833,1050.3639 C 16,1019.3622 38,1032.3622 46,1006.3622"
+         style="fill:none;stroke:#000000;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" />
+    </g>
+    <g
+       id="g3955"
+       style="stroke:url(#linearGradient3972);stroke-opacity:1">
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987"
+         d="m 2,1050.364 c 11,-39.0018 27,-22.0018 34,-44.0018"
+         style="fill:none;stroke:url(#linearGradient3972);stroke-width:0.97781664px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-9"
+         d="M 4.1933542,1050.4411 C 16,1014.3622 33,1031.3622 41,1006.3622"
+         style="fill:none;stroke:url(#linearGradient3972);stroke-width:0.97781664px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-9-4"
+         d="M 6.8890833,1050.3639 C 16,1019.3622 38,1032.3622 46,1006.3622"
+         style="fill:none;stroke:url(#linearGradient3972);stroke-width:0.97781664px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+    </g>
+    <g
+       id="g3937">
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-6-0"
+         d="m 2.9778166,1009.2956 c 4.8890834,0 19.5563334,25.4233 42.0461164,22.4898"
+         style="fill:none;stroke:#000000;stroke-width:2.93344998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-6-9-3"
+         d="m 2.9778166,1012.2291 c 5.5309444,0.051 14.6672504,19.5563 42.0461164,24.4454"
+         style="fill:none;stroke:#000000;stroke-width:2.93344998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-6-8-6"
+         d="m 2.9778166,1017.1182 c 4.8890834,-1.9557 9.7781664,11.7338 42.0461164,25.4232"
+         style="fill:none;stroke:#000000;stroke-width:2.93344998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+      <path
+         sodipodi:nodetypes="csc"
+         inkscape:connector-curvature="0"
+         id="path2987-6-4-7"
+         d="m 2.9778166,1022.9851 c 3.9112667,-2.9335 14.9107374,6.5094 24.4454164,13.6894 4.116367,3.0998 8.166721,7.4213 13.689434,13.6894"
+         style="fill:none;stroke:#000000;stroke-width:2.93344998;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
+    </g>
+    <g
+       id="g3960"
+       style="stroke:url(#linearGradient3980);stroke-opacity:1">
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-6"
+         d="m 2.9778166,1009.2956 c 4.8890834,0 19.5563334,25.4233 42.0461164,22.4898"
+         style="fill:none;stroke:url(#linearGradient3980);stroke-width:0.97781664000000001px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-6-9"
+         d="m 2.9778166,1012.2291 c 5.5309444,0.051 14.6672504,19.5563 42.0461164,24.4454"
+         style="fill:none;stroke:url(#linearGradient3980);stroke-width:0.97781664000000001px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+      <path
+         sodipodi:nodetypes="cc"
+         inkscape:connector-curvature="0"
+         id="path2987-6-8"
+         d="m 2.9778166,1017.1182 c 4.8890834,-1.9557 9.7781664,11.7338 42.0461164,25.4232"
+         style="fill:none;stroke:url(#linearGradient3980);stroke-width:0.97781664000000001px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+      <path
+         sodipodi:nodetypes="csc"
+         inkscape:connector-curvature="0"
+         id="path2987-6-4"
+         d="m 2.9778166,1022.9851 c 3.9112667,-2.9335 14.9107374,6.5094 24.4454164,13.6894 4.116367,3.0998 8.166721,7.4213 13.689434,13.6894"
+         style="fill:none;stroke:url(#linearGradient3980);stroke-width:0.97781664000000001px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" />
+    </g>
+  </g>
+</svg>
diff --git a/install_mime_types.sh b/install_mime_types.sh
new file mode 100755
index 0000000..d3714b3
--- /dev/null
+++ b/install_mime_types.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+xdg-icon-resource install --context apps --size 64 icons/mrtrix.png application-x-mrtrix
+xdg-icon-resource install --context apps --size 64 icons/mrtrix.png application-x-mrtrix-gz
+xdg-icon-resource install --context apps --size 64 icons/mrtrix.png application-x-nifti
+xdg-icon-resource install --context apps --size 64 icons/mrtrix.png application-x-nifti-gz
+xdg-icon-resource install --context apps --size 64 icons/mrtrix.png application-x-mgh
+xdg-icon-resource install --context apps --size 64 icons/mrtrix.png application-x-mgz
+xdg-icon-resource install --context apps --size 64 icons/mrtrix.png application-x-analyze
+xdg-icon-resource install --context apps --size 64 icons/tracks.png application-x-mrtrix-tracks
+
+xdg-mime install mrtrix-mime.xml
+xdg-desktop-menu install mrtrix-mrview.desktop
+
diff --git a/lib/file/dicom/csa_entry.h b/lib/file/dicom/csa_entry.h
index fdef7b1..13e0e67 100644
--- a/lib/file/dicom/csa_entry.h
+++ b/lib/file/dicom/csa_entry.h
@@ -75,7 +75,7 @@ namespace MR {
         print (output_fields)
       {
         if (strncmp ("SV10", (const gchar*) start, 4)) 
-          throw Exception ("CSA data is not in SV10 format");
+          debug ("WARNING: CSA data is not in SV10 format");
 
         cnum = 0;
         num = getLE<guint32> (start+8);
diff --git a/lib/file/dicom/dict.cpp b/lib/file/dicom/dict.cpp
index dadec20..5c4c502 100644
--- a/lib/file/dicom/dict.cpp
+++ b/lib/file/dicom/dict.cpp
@@ -1,24 +1,24 @@
 /*
-    Copyright 2008 Brain Research Institute, Melbourne, Australia
+   Copyright 2008 Brain Research Institute, Melbourne, Australia
 
-    Written by J-Donald Tournier, 27/06/08.
+   Written by J-Donald Tournier, 27/06/08.
 
-    This file is part of MRtrix.
+   This file is part of MRtrix.
 
-    MRtrix is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
+   MRtrix is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
 
-    MRtrix is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
+   MRtrix is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
 
-    You should have received a copy of the GNU General Public License
-    along with MRtrix.  If not, see <http://www.gnu.org/licenses/>.
+   You should have received a copy of the GNU General Public License
+   along with MRtrix.  If not, see <http://www.gnu.org/licenses/>.
 
-*/
+ */
 
 #include "file/dicom/element.h"
 
@@ -33,15 +33,14 @@ namespace MR {
       {
         info ("initialising DICOM dictionary");
 
-        /* the following was generated by running the following command on the SPM2 dicom dictionary file:
+        /* the following was generated by running the following command on the dicom dictionary file:
 
-           awk '{ print "dict[0x"$1$2"UL] =  \""$4$3"\";" }' spm_dicom_dict.txt 
+           awk '{ print "dict[0x"$1$2"UL] =  \""$3$4"\";" }' dict.txt 
 
+         */
 
-           need to remove all 0x60xx... and 0x50xx... entries
-           */
 
-        dict[0x00020000UL] =  "ULGroupLength";
+        dict[0x00020000UL] =  "ULFileMetaInformationGroupLength";
         dict[0x00020001UL] =  "OBFileMetaInformationVersion";
         dict[0x00020002UL] =  "UIMediaStorageSOPClassUID";
         dict[0x00020003UL] =  "UIMediaStorageSOPInstanceUID";
@@ -51,61 +50,61 @@ namespace MR {
         dict[0x00020016UL] =  "AESourceApplicationEntityTitle";
         dict[0x00020100UL] =  "UIPrivateInformationCreatorUID";
         dict[0x00020102UL] =  "OBPrivateInformation";
-        dict[0x00040000UL] =  "ULGroupLength";
-        dict[0x00041130UL] =  "CSFilesetID";
-        dict[0x00041141UL] =  "CSFilesetDescriptorFileID";
-        dict[0x00041142UL] =  "CSSpecificCharacterSetofFilesetDescriptorFile";
-        dict[0x00041200UL] =  "ULOffsetoftheFirstDirectoryRecordoftheRootDirectoryEntity";
-        dict[0x00041202UL] =  "ULOffsetoftheLastDirectoryRecordoftheRootDirectoryEntity";
-        dict[0x00041212UL] =  "USFilesetConsistencyFlag";
+        dict[0x00041130UL] =  "CSFileSetID";
+        dict[0x00041141UL] =  "CSFileSetDescriptorFileID";
+        dict[0x00041142UL] =  "CSSpecificCharacterSetOfFileSetDescriptorFile";
+        dict[0x00041200UL] =  "ULOffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity";
+        dict[0x00041202UL] =  "ULOffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity";
+        dict[0x00041212UL] =  "USFileSetConsistencyFlag";
         dict[0x00041220UL] =  "SQDirectoryRecordSequence";
-        dict[0x00041400UL] =  "ULOffsetoftheNextDirectoryRecord";
-        dict[0x00041410UL] =  "USRecordInuseFlag";
-        dict[0x00041420UL] =  "ULOffsetofReferencedLowerLevelDirectoryEntity";
+        dict[0x00041400UL] =  "ULOffsetOfTheNextDirectoryRecord";
+        dict[0x00041410UL] =  "USRecordInUseFlag";
+        dict[0x00041420UL] =  "ULOffsetOfReferencedLowerLevelDirectoryEntity";
         dict[0x00041430UL] =  "CSDirectoryRecordType";
         dict[0x00041432UL] =  "UIPrivateRecordUID";
         dict[0x00041500UL] =  "CSReferencedFileID";
-        dict[0x00041504UL] =  "ULMRDRDirectoryRecordOffset";
-        dict[0x00041510UL] =  "UIReferencedSOPClassUIDinFile";
-        dict[0x00041511UL] =  "UIReferencedSOPInstanceUIDinFile";
-        dict[0x00041512UL] =  "UIReferencedTransferSyntaxUIDinFile";
-        dict[0x00041600UL] =  "ULNumberofReferences";
+        dict[0x00041510UL] =  "UIReferencedSOPClassUIDInFile";
+        dict[0x00041511UL] =  "UIReferencedSOPInstanceUIDInFile";
+        dict[0x00041512UL] =  "UIReferencedTransferSyntaxUIDInFile";
+        dict[0x0004151AUL] =  "UIReferencedRelatedGeneralSOPClassUIDInFile";
         dict[0x00080005UL] =  "CSSpecificCharacterSet";
+        dict[0x00080006UL] =  "SQLanguageCodeSequence";
         dict[0x00080008UL] =  "CSImageType";
         dict[0x00080012UL] =  "DAInstanceCreationDate";
         dict[0x00080013UL] =  "TMInstanceCreationTime";
         dict[0x00080014UL] =  "UIInstanceCreatorUID";
         dict[0x00080016UL] =  "UISOPClassUID";
         dict[0x00080018UL] =  "UISOPInstanceUID";
+        dict[0x0008001AUL] =  "UIRelatedGeneralSOPClassUID";
+        dict[0x0008001BUL] =  "UIOriginalSpecializedSOPClassUID";
         dict[0x00080020UL] =  "DAStudyDate";
         dict[0x00080021UL] =  "DASeriesDate";
         dict[0x00080022UL] =  "DAAcquisitionDate";
         dict[0x00080023UL] =  "DAContentDate";
-        dict[0x00080024UL] =  "DAOverlayDate";
-        dict[0x00080025UL] =  "DACurveDate";
-        dict[0x0008002AUL] =  "DTAcquisitionDatetime";
+        dict[0x0008002AUL] =  "DTAcquisitionDateTime";
         dict[0x00080030UL] =  "TMStudyTime";
         dict[0x00080031UL] =  "TMSeriesTime";
         dict[0x00080032UL] =  "TMAcquisitionTime";
         dict[0x00080033UL] =  "TMContentTime";
-        dict[0x00080034UL] =  "TMOverlayTime";
-        dict[0x00080035UL] =  "TMCurveTime";
         dict[0x00080050UL] =  "SHAccessionNumber";
+        dict[0x00080051UL] =  "SQIssuerOfAccessionNumberSequence";
         dict[0x00080052UL] =  "CSQueryRetrieveLevel";
         dict[0x00080054UL] =  "AERetrieveAETitle";
         dict[0x00080056UL] =  "CSInstanceAvailability";
         dict[0x00080058UL] =  "UIFailedSOPInstanceUIDList";
         dict[0x00080060UL] =  "CSModality";
-        dict[0x00080061UL] =  "CSModalitiesinStudy";
+        dict[0x00080061UL] =  "CSModalitiesInStudy";
+        dict[0x00080062UL] =  "UISOPClassesInStudy";
         dict[0x00080064UL] =  "CSConversionType";
         dict[0x00080068UL] =  "CSPresentationIntentType";
         dict[0x00080070UL] =  "LOManufacturer";
         dict[0x00080080UL] =  "LOInstitutionName";
         dict[0x00080081UL] =  "STInstitutionAddress";
         dict[0x00080082UL] =  "SQInstitutionCodeSequence";
-        dict[0x00080090UL] =  "PNReferringPhysiciansName";
-        dict[0x00080092UL] =  "STReferringPhysiciansAddress";
-        dict[0x00080094UL] =  "SHReferringPhysiciansTelephoneNumbers";
+        dict[0x00080090UL] =  "PNReferringPhysicianName";
+        dict[0x00080092UL] =  "STReferringPhysicianAddress";
+        dict[0x00080094UL] =  "SHReferringPhysicianTelephoneNumbers";
+        dict[0x00080096UL] =  "SQReferringPhysicianIdentificationSequence";
         dict[0x00080100UL] =  "SHCodeValue";
         dict[0x00080102UL] =  "SHCodingSchemeDesignator";
         dict[0x00080103UL] =  "SHCodingSchemeVersion";
@@ -113,98 +112,296 @@ namespace MR {
         dict[0x00080105UL] =  "CSMappingResource";
         dict[0x00080106UL] =  "DTContextGroupVersion";
         dict[0x00080107UL] =  "DTContextGroupLocalVersion";
-        dict[0x0008010BUL] =  "CSCodeSetExtensionFlag";
-        dict[0x0008010CUL] =  "UIPrivateCodingSchemeCreatorUID";
-        dict[0x0008010DUL] =  "UICodeSetExtensionCreatorUID";
+        dict[0x0008010BUL] =  "CSContextGroupExtensionFlag";
+        dict[0x0008010CUL] =  "UICodingSchemeUID";
+        dict[0x0008010DUL] =  "UIContextGroupExtensionCreatorUID";
         dict[0x0008010FUL] =  "CSContextIdentifier";
+        dict[0x00080110UL] =  "SQCodingSchemeIdentificationSequence";
+        dict[0x00080112UL] =  "LOCodingSchemeRegistry";
+        dict[0x00080114UL] =  "STCodingSchemeExternalID";
+        dict[0x00080115UL] =  "STCodingSchemeName";
+        dict[0x00080116UL] =  "STCodingSchemeResponsibleOrganization";
+        dict[0x00080117UL] =  "UIContextUID";
         dict[0x00080201UL] =  "SHTimezoneOffsetFromUTC";
         dict[0x00081010UL] =  "SHStationName";
         dict[0x00081030UL] =  "LOStudyDescription";
         dict[0x00081032UL] =  "SQProcedureCodeSequence";
         dict[0x0008103EUL] =  "LOSeriesDescription";
+        dict[0x0008103FUL] =  "SQSeriesDescriptionCodeSequence";
         dict[0x00081040UL] =  "LOInstitutionalDepartmentName";
-        dict[0x00081048UL] =  "PNPhysiciansofRecord";
-        dict[0x00081050UL] =  "PNPerformingPhysiciansName";
-        dict[0x00081060UL] =  "PNNameofPhysiciansReadingStudy";
+        dict[0x00081048UL] =  "PNPhysiciansOfRecord";
+        dict[0x00081049UL] =  "SQPhysiciansOfRecordIdentificationSequence";
+        dict[0x00081050UL] =  "PNPerformingPhysicianName";
+        dict[0x00081052UL] =  "SQPerformingPhysicianIdentificationSequence";
+        dict[0x00081060UL] =  "PNNameOfPhysiciansReadingStudy";
+        dict[0x00081062UL] =  "SQPhysiciansReadingStudyIdentificationSequence";
         dict[0x00081070UL] =  "PNOperatorsName";
+        dict[0x00081072UL] =  "SQOperatorIdentificationSequence";
         dict[0x00081080UL] =  "LOAdmittingDiagnosesDescription";
         dict[0x00081084UL] =  "SQAdmittingDiagnosesCodeSequence";
-        dict[0x00081090UL] =  "LOManufacturersModelName";
-        dict[0x00081100UL] =  "SQReferencedResultsSequence";
+        dict[0x00081090UL] =  "LOManufacturerModelName";
         dict[0x00081110UL] =  "SQReferencedStudySequence";
-        dict[0x00081111UL] =  "SQReferencedStudyComponentSequence";
+        dict[0x00081111UL] =  "SQReferencedPerformedProcedureStepSequence";
         dict[0x00081115UL] =  "SQReferencedSeriesSequence";
         dict[0x00081120UL] =  "SQReferencedPatientSequence";
         dict[0x00081125UL] =  "SQReferencedVisitSequence";
-        dict[0x00081130UL] =  "SQReferencedOverlaySequence";
+        dict[0x00081134UL] =  "SQReferencedStereometricInstanceSequence";
         dict[0x0008113AUL] =  "SQReferencedWaveformSequence";
         dict[0x00081140UL] =  "SQReferencedImageSequence";
-        dict[0x00081145UL] =  "SQReferencedCurveSequence";
         dict[0x0008114AUL] =  "SQReferencedInstanceSequence";
+        dict[0x0008114BUL] =  "SQReferencedRealWorldValueMappingInstanceSequence";
         dict[0x00081150UL] =  "UIReferencedSOPClassUID";
         dict[0x00081155UL] =  "UIReferencedSOPInstanceUID";
         dict[0x0008115AUL] =  "UISOPClassesSupported";
         dict[0x00081160UL] =  "ISReferencedFrameNumber";
+        dict[0x00081161UL] =  "ULSimpleFrameList";
+        dict[0x00081162UL] =  "ULCalculatedFrameList";
+        dict[0x00081163UL] =  "FDTimeRange";
+        dict[0x00081164UL] =  "SQFrameExtractionSequence";
+        dict[0x00081167UL] =  "UIMultiFrameSourceSOPInstanceUID";
         dict[0x00081195UL] =  "UITransactionUID";
         dict[0x00081197UL] =  "USFailureReason";
         dict[0x00081198UL] =  "SQFailedSOPSequence";
         dict[0x00081199UL] =  "SQReferencedSOPSequence";
+        dict[0x00081200UL] =  "SQStudiesContainingOtherReferencedInstancesSequence";
+        dict[0x00081250UL] =  "SQRelatedSeriesSequenceired";
         dict[0x00082111UL] =  "STDerivationDescription";
         dict[0x00082112UL] =  "SQSourceImageSequence";
         dict[0x00082120UL] =  "SHStageName";
         dict[0x00082122UL] =  "ISStageNumber";
-        dict[0x00082124UL] =  "ISNumberofStages";
+        dict[0x00082124UL] =  "ISNumberOfStages";
         dict[0x00082127UL] =  "SHViewName";
         dict[0x00082128UL] =  "ISViewNumber";
-        dict[0x00082129UL] =  "ISNumberofEventTimers";
-        dict[0x0008212AUL] =  "ISNumberofViewsinStage";
+        dict[0x00082129UL] =  "ISNumberOfEventTimers";
+        dict[0x0008212AUL] =  "ISNumberOfViewsInStage";
         dict[0x00082130UL] =  "DSEventElapsedTimes";
         dict[0x00082132UL] =  "LOEventTimerNames";
+        dict[0x00082133UL] =  "SQEventTimerSequence";
+        dict[0x00082134UL] =  "FDEventTimeOffset";
+        dict[0x00082135UL] =  "SQEventCodeSequence";
         dict[0x00082142UL] =  "ISStartTrim";
         dict[0x00082143UL] =  "ISStopTrim";
         dict[0x00082144UL] =  "ISRecommendedDisplayFrameRate";
         dict[0x00082218UL] =  "SQAnatomicRegionSequence";
         dict[0x00082220UL] =  "SQAnatomicRegionModifierSequence";
         dict[0x00082228UL] =  "SQPrimaryAnatomicStructureSequence";
-        dict[0x00082229UL] =  "SQAnatomicStructureSpaceorRegionSequence";
+        dict[0x00082229UL] =  "SQAnatomicStructureSpaceOrRegionSequence";
         dict[0x00082230UL] =  "SQPrimaryAnatomicStructureModifierSequence";
-        dict[0x00082240UL] =  "SQTransducerPositionSequence";
-        dict[0x00082242UL] =  "SQTransducerPositionModifierSequence";
-        dict[0x00082244UL] =  "SQTransducerOrientationSequence";
-        dict[0x00082246UL] =  "SQTransducerOrientationModifierSequence";
-        dict[0x00100010UL] =  "PNPatientsName";
+        dict[0x00083001UL] =  "SQAlternateRepresentationSequence";
+        dict[0x00083010UL] =  "UIIrradiationEventUID";
+        dict[0x00089007UL] =  "CSFrameType";
+        dict[0x00089092UL] =  "SQReferencedImageEvidenceSequence";
+        dict[0x00089121UL] =  "SQReferencedRawDataSequence";
+        dict[0x00089123UL] =  "UICreatorVersionUID";
+        dict[0x00089124UL] =  "SQDerivationImageSequence";
+        dict[0x00089154UL] =  "SQSourceImageEvidenceSequence";
+        dict[0x00089205UL] =  "CSPixelPresentation";
+        dict[0x00089206UL] =  "CSVolumetricProperties";
+        dict[0x00089207UL] =  "CSVolumeBasedCalculationTechnique";
+        dict[0x00089208UL] =  "CSComplexImageComponent";
+        dict[0x00089209UL] =  "CSAcquisitionContrast";
+        dict[0x00089215UL] =  "SQDerivationCodeSequence";
+        dict[0x00089237UL] =  "SQReferencedPresentationStateSequence";
+        dict[0x00089410UL] =  "SQReferencedOtherPlaneSequence";
+        dict[0x00089458UL] =  "SQFrameDisplaySequence";
+        dict[0x00089459UL] =  "FLRecommendedDisplayFrameRateInFloat";
+        dict[0x00089460UL] =  "CSSkipFrameRangeFlag";
+        dict[0x00100010UL] =  "PNPatientName";
         dict[0x00100020UL] =  "LOPatientID";
-        dict[0x00100021UL] =  "LOIssuerofPatientID";
-        dict[0x00100030UL] =  "DAPatientsBirthDate";
-        dict[0x00100032UL] =  "TMPatientsBirthTime";
-        dict[0x00100040UL] =  "CSPatientsSex";
-        dict[0x00100050UL] =  "SQPatientsInsurancePlanCodeSequence";
-        dict[0x00100101UL] =  "SQPatientsPrimaryLanguageCodeSequence";
-        dict[0x00100102UL] =  "SQPatientsPrimaryLanguageCodeModifierSequence";
+        dict[0x00100021UL] =  "LOIssuerOfPatientID";
+        dict[0x00100022UL] =  "CSTypeOfPatientID";
+        dict[0x00100024UL] =  "SQIssuerOfPatientIDQualifiersSequence";
+        dict[0x00100030UL] =  "DAPatientBirthDate";
+        dict[0x00100032UL] =  "TMPatientBirthTime";
+        dict[0x00100040UL] =  "CSPatientSex";
+        dict[0x00100050UL] =  "SQPatientInsurancePlanCodeSequence";
+        dict[0x00100101UL] =  "SQPatientPrimaryLanguageCodeSequence";
+        dict[0x00100102UL] =  "SQPatientPrimaryLanguageModifierCodeSequence";
         dict[0x00101000UL] =  "LOOtherPatientIDs";
         dict[0x00101001UL] =  "PNOtherPatientNames";
-        dict[0x00101005UL] =  "PNPatientsBirthName";
-        dict[0x00101010UL] =  "ASPatientsAge";
-        dict[0x00101020UL] =  "DSPatientsSize";
-        dict[0x00101030UL] =  "DSPatientsWeight";
-        dict[0x00101040UL] =  "LOPatientsAddress";
-        dict[0x00101060UL] =  "PNPatientsMothersBirthName";
+        dict[0x00101002UL] =  "SQOtherPatientIDsSequence";
+        dict[0x00101005UL] =  "PNPatientBirthName";
+        dict[0x00101010UL] =  "ASPatientAge";
+        dict[0x00101020UL] =  "DSPatientSize";
+        dict[0x00101021UL] =  "SQPatientSizeCodeSequence";
+        dict[0x00101030UL] =  "DSPatientWeight";
+        dict[0x00101040UL] =  "LOPatientAddress";
+        dict[0x00101060UL] =  "PNPatientMotherBirthName";
         dict[0x00101080UL] =  "LOMilitaryRank";
-        dict[0x00101081UL] =  "LOBranchofService";
+        dict[0x00101081UL] =  "LOBranchOfService";
         dict[0x00101090UL] =  "LOMedicalRecordLocator";
         dict[0x00102000UL] =  "LOMedicalAlerts";
-        dict[0x00102110UL] =  "LOContrastAllergies";
-        dict[0x00102150UL] =  "LOCountryofResidence";
-        dict[0x00102152UL] =  "LORegionofResidence";
-        dict[0x00102154UL] =  "SHPatientsTelephoneNumbers";
+        dict[0x00102110UL] =  "LOAllergies";
+        dict[0x00102150UL] =  "LOCountryOfResidence";
+        dict[0x00102152UL] =  "LORegionOfResidence";
+        dict[0x00102154UL] =  "SHPatientTelephoneNumbers";
         dict[0x00102160UL] =  "SHEthnicGroup";
         dict[0x00102180UL] =  "SHOccupation";
         dict[0x001021A0UL] =  "CSSmokingStatus";
         dict[0x001021B0UL] =  "LTAdditionalPatientHistory";
         dict[0x001021C0UL] =  "USPregnancyStatus";
         dict[0x001021D0UL] =  "DALastMenstrualDate";
-        dict[0x001021F0UL] =  "LOPatientsReligiousPreference";
+        dict[0x001021F0UL] =  "LOPatientReligiousPreference";
+        dict[0x00102201UL] =  "LOPatientSpeciesDescription";
+        dict[0x00102202UL] =  "SQPatientSpeciesCodeSequence";
+        dict[0x00102203UL] =  "CSPatientSexNeutered";
+        dict[0x00102210UL] =  "CSAnatomicalOrientationType";
+        dict[0x00102292UL] =  "LOPatientBreedDescription";
+        dict[0x00102293UL] =  "SQPatientBreedCodeSequence";
+        dict[0x00102294UL] =  "SQBreedRegistrationSequence";
+        dict[0x00102295UL] =  "LOBreedRegistrationNumber";
+        dict[0x00102296UL] =  "SQBreedRegistryCodeSequence";
+        dict[0x00102297UL] =  "PNResponsiblePerson";
+        dict[0x00102298UL] =  "CSResponsiblePersonRole";
+        dict[0x00102299UL] =  "LOResponsibleOrganization";
         dict[0x00104000UL] =  "LTPatientComments";
+        dict[0x00109431UL] =  "FLExaminedBodyThickness";
+        dict[0x00120010UL] =  "LOClinicalTrialSponsorName";
+        dict[0x00120020UL] =  "LOClinicalTrialProtocolID";
+        dict[0x00120021UL] =  "LOClinicalTrialProtocolName";
+        dict[0x00120030UL] =  "LOClinicalTrialSiteID";
+        dict[0x00120031UL] =  "LOClinicalTrialSiteName";
+        dict[0x00120040UL] =  "LOClinicalTrialSubjectID";
+        dict[0x00120042UL] =  "LOClinicalTrialSubjectReadingID";
+        dict[0x00120050UL] =  "LOClinicalTrialTimePointID";
+        dict[0x00120051UL] =  "STClinicalTrialTimePointDescription";
+        dict[0x00120060UL] =  "LOClinicalTrialCoordinatingCenterName";
+        dict[0x00120062UL] =  "CSPatientIdentityRemoved";
+        dict[0x00120063UL] =  "LODeidentificationMethod";
+        dict[0x00120064UL] =  "SQDeidentificationMethodCodeSequence";
+        dict[0x00120071UL] =  "LOClinicalTrialSeriesID";
+        dict[0x00120072UL] =  "LOClinicalTrialSeriesDescription";
+        dict[0x00120081UL] =  "LOClinicalTrialProtocolEthicsCommitteeName";
+        dict[0x00120082UL] =  "LOClinicalTrialProtocolEthicsCommitteeApprovalNumber";
+        dict[0x00120083UL] =  "SQConsentForClinicalTrialUseSequence";
+        dict[0x00120084UL] =  "CSDistributionType";
+        dict[0x00120085UL] =  "CSConsentForDistributionFlag";
+        dict[0x00140023UL] =  "STCADFileFormat";
+        dict[0x00140024UL] =  "STComponentReferenceSystem";
+        dict[0x00140025UL] =  "STComponentManufacturingProcedure";
+        dict[0x00140028UL] =  "STComponentManufacturer";
+        dict[0x00140030UL] =  "DSMaterialThickness";
+        dict[0x00140032UL] =  "DSMaterialPipeDiameter";
+        dict[0x00140034UL] =  "DSMaterialIsolationDiameter";
+        dict[0x00140042UL] =  "STMaterialGrade";
+        dict[0x00140044UL] =  "STMaterialPropertiesFileID";
+        dict[0x00140045UL] =  "STMaterialPropertiesFileFormat";
+        dict[0x00140046UL] =  "LTMaterialNotes";
+        dict[0x00140050UL] =  "CSComponentShape";
+        dict[0x00140052UL] =  "CSCurvatureType";
+        dict[0x00140054UL] =  "DSOuterDiameter";
+        dict[0x00140056UL] =  "DSInnerDiameter";
+        dict[0x00141010UL] =  "STActualEnvironmentalConditions";
+        dict[0x00141020UL] =  "DAExpiryDate";
+        dict[0x00141040UL] =  "STEnvironmentalConditions";
+        dict[0x00142002UL] =  "SQEvaluatorSequence";
+        dict[0x00142004UL] =  "ISEvaluatorNumber";
+        dict[0x00142006UL] =  "PNEvaluatorName";
+        dict[0x00142008UL] =  "ISEvaluationAttempt";
+        dict[0x00142012UL] =  "SQIndicationSequence";
+        dict[0x00142014UL] =  "ISIndicationNumber";
+        dict[0x00142016UL] =  "SHIndicationLabel";
+        dict[0x00142018UL] =  "STIndicationDescription";
+        dict[0x0014201AUL] =  "CSIndicationType";
+        dict[0x0014201CUL] =  "CSIndicationDisposition";
+        dict[0x0014201EUL] =  "SQIndicationROISequence";
+        dict[0x00142030UL] =  "SQIndicationPhysicalPropertySequence";
+        dict[0x00142032UL] =  "SHPropertyLabel";
+        dict[0x00142202UL] =  "ISCoordinateSystemNumberOfAxes";
+        dict[0x00142204UL] =  "SQCoordinateSystemAxesSequence";
+        dict[0x00142206UL] =  "STCoordinateSystemAxisDescription";
+        dict[0x00142208UL] =  "CSCoordinateSystemDataSetMapping";
+        dict[0x0014220AUL] =  "ISCoordinateSystemAxisNumber";
+        dict[0x0014220CUL] =  "CSCoordinateSystemAxisType";
+        dict[0x0014220EUL] =  "CSCoordinateSystemAxisUnits";
+        dict[0x00142210UL] =  "OBCoordinateSystemAxisValues";
+        dict[0x00142220UL] =  "SQCoordinateSystemTransformSequence";
+        dict[0x00142222UL] =  "STTransformDescription";
+        dict[0x00142224UL] =  "ISTransformNumberOfAxes";
+        dict[0x00142226UL] =  "ISTransformOrderOfAxes";
+        dict[0x00142228UL] =  "CSTransformedAxisUnits";
+        dict[0x0014222AUL] =  "DSCoordinateSystemTransformRotationAndScaleMatrix";
+        dict[0x0014222CUL] =  "DSCoordinateSystemTransformTranslationMatrix";
+        dict[0x00143011UL] =  "DSInternalDetectorFrameTime";
+        dict[0x00143012UL] =  "DSNumberOfFramesIntegrated";
+        dict[0x00143020UL] =  "SQDetectorTemperatureSequence";
+        dict[0x00143022UL] =  "DSSensorName";
+        dict[0x00143024UL] =  "DSHorizontalOffsetOfSensor";
+        dict[0x00143026UL] =  "DSVerticalOffsetOfSensor";
+        dict[0x00143028UL] =  "DSSensorTemperature";
+        dict[0x00143040UL] =  "SQDarkCurrentSequence";
+        dict[0x00143050UL] =  "OBDarkCurrentCounts";
+        dict[0x00143060UL] =  "SQGainCorrectionReferenceSequence";
+        dict[0x00143070UL] =  "OBAirCounts";
+        dict[0x00143071UL] =  "DSKVUsedInGainCalibration";
+        dict[0x00143072UL] =  "DSMAUsedInGainCalibration";
+        dict[0x00143073UL] =  "DSNumberOfFramesUsedForIntegration";
+        dict[0x00143074UL] =  "LOFilterMaterialUsedInGainCalibration";
+        dict[0x00143075UL] =  "DSFilterThicknessUsedInGainCalibration";
+        dict[0x00143076UL] =  "DADateOfGainCalibration";
+        dict[0x00143077UL] =  "TMTimeOfGainCalibration";
+        dict[0x00143080UL] =  "OBBadPixelImage";
+        dict[0x00143099UL] =  "LTCalibrationNotes";
+        dict[0x00144002UL] =  "SQPulserEquipmentSequence";
+        dict[0x00144004UL] =  "CSPulserType";
+        dict[0x00144006UL] =  "LTPulserNotes";
+        dict[0x00144008UL] =  "SQReceiverEquipmentSequence";
+        dict[0x0014400AUL] =  "CSAmplifierType";
+        dict[0x0014400CUL] =  "LTReceiverNotes";
+        dict[0x0014400EUL] =  "SQPreAmplifierEquipmentSequence";
+        dict[0x0014400FUL] =  "LTPreAmplifierNotes";
+        dict[0x00144010UL] =  "SQTransmitTransducerSequence";
+        dict[0x00144011UL] =  "SQReceiveTransducerSequence";
+        dict[0x00144012UL] =  "USNumberOfElements";
+        dict[0x00144013UL] =  "CSElementShape";
+        dict[0x00144014UL] =  "DSElementDimensionA";
+        dict[0x00144015UL] =  "DSElementDimensionB";
+        dict[0x00144016UL] =  "DSElementPitch";
+        dict[0x00144017UL] =  "DSMeasuredBeamDimensionA";
+        dict[0x00144018UL] =  "DSMeasuredBeamDimensionB";
+        dict[0x00144019UL] =  "DSLocationOfMeasuredBeamDiameter";
+        dict[0x0014401AUL] =  "DSNominalFrequency";
+        dict[0x0014401BUL] =  "DSMeasuredCenterFrequency";
+        dict[0x0014401CUL] =  "DSMeasuredBandwidth";
+        dict[0x00144020UL] =  "SQPulserSettingsSequence";
+        dict[0x00144022UL] =  "DSPulseWidth";
+        dict[0x00144024UL] =  "DSExcitationFrequency";
+        dict[0x00144026UL] =  "CSModulationType";
+        dict[0x00144028UL] =  "DSDamping";
+        dict[0x00144030UL] =  "SQReceiverSettingsSequence";
+        dict[0x00144031UL] =  "DSAcquiredSoundpathLength";
+        dict[0x00144032UL] =  "CSAcquisitionCompressionType";
+        dict[0x00144033UL] =  "ISAcquisitionSampleSize";
+        dict[0x00144034UL] =  "DSRectifierSmoothing";
+        dict[0x00144035UL] =  "SQDACSequence";
+        dict[0x00144036UL] =  "CSDACType";
+        dict[0x00144038UL] =  "DSDACGainPoints";
+        dict[0x0014403AUL] =  "DSDACTimePoints";
+        dict[0x0014403CUL] =  "DSDACAmplitude";
+        dict[0x00144040UL] =  "SQPreAmplifierSettingsSequence";
+        dict[0x00144050UL] =  "SQTransmitTransducerSettingsSequence";
+        dict[0x00144051UL] =  "SQReceiveTransducerSettingsSequence";
+        dict[0x00144052UL] =  "DSIncidentAngle";
+        dict[0x00144054UL] =  "STCouplingTechnique";
+        dict[0x00144056UL] =  "STCouplingMedium";
+        dict[0x00144057UL] =  "DSCouplingVelocity";
+        dict[0x00144058UL] =  "DSCrystalCenterLocationX";
+        dict[0x00144059UL] =  "DSCrystalCenterLocationZ";
+        dict[0x0014405AUL] =  "DSSoundPathLength";
+        dict[0x0014405CUL] =  "STDelayLawIdentifier";
+        dict[0x00144060UL] =  "SQGateSettingsSequence";
+        dict[0x00144062UL] =  "DSGateThreshold";
+        dict[0x00144064UL] =  "DSVelocityOfSound";
+        dict[0x00144070UL] =  "SQCalibrationSettingsSequence";
+        dict[0x00144072UL] =  "STCalibrationProcedure";
+        dict[0x00144074UL] =  "SHProcedureVersion";
+        dict[0x00144076UL] =  "DAProcedureCreationDate";
+        dict[0x00144078UL] =  "DAProcedureExpirationDate";
+        dict[0x0014407AUL] =  "DAProcedureLastModifiedDate";
+        dict[0x0014407CUL] =  "TMCalibrationTime";
+        dict[0x0014407EUL] =  "DACalibrationDate";
+        dict[0x00145002UL] =  "ISLINACEnergy";
+        dict[0x00145004UL] =  "ISLINACOutput";
         dict[0x00180010UL] =  "LOContrastBolusAgent";
         dict[0x00180012UL] =  "SQContrastBolusAgentSequence";
         dict[0x00180014UL] =  "SQContrastBolusAdministrationRouteSequence";
@@ -223,46 +420,48 @@ namespace MR {
         dict[0x00180031UL] =  "LORadiopharmaceutical";
         dict[0x00180034UL] =  "LOInterventionDrugName";
         dict[0x00180035UL] =  "TMInterventionDrugStartTime";
-        dict[0x00180036UL] =  "SQInterventionalTherapySequence";
-        dict[0x00180037UL] =  "CSTherapyType";
-        dict[0x00180038UL] =  "CSInterventionalStatus";
-        dict[0x00180039UL] =  "CSTherapyDescription";
+        dict[0x00180036UL] =  "SQInterventionSequence";
+        dict[0x00180038UL] =  "CSInterventionStatus";
+        dict[0x0018003AUL] =  "STInterventionDescription";
         dict[0x00180040UL] =  "ISCineRate";
+        dict[0x00180042UL] =  "CSInitialCineRunState";
         dict[0x00180050UL] =  "DSSliceThickness";
         dict[0x00180060UL] =  "DSKVP";
         dict[0x00180070UL] =  "ISCountsAccumulated";
         dict[0x00180071UL] =  "CSAcquisitionTerminationCondition";
-        dict[0x00180072UL] =  "DSEffectiveSeriesDuration";
+        dict[0x00180072UL] =  "DSEffectiveDuration";
         dict[0x00180073UL] =  "CSAcquisitionStartCondition";
         dict[0x00180074UL] =  "ISAcquisitionStartConditionData";
         dict[0x00180075UL] =  "ISAcquisitionTerminationConditionData";
         dict[0x00180080UL] =  "DSRepetitionTime";
         dict[0x00180081UL] =  "DSEchoTime";
         dict[0x00180082UL] =  "DSInversionTime";
-        dict[0x00180083UL] =  "DSNumberofAverages";
+        dict[0x00180083UL] =  "DSNumberOfAverages";
         dict[0x00180084UL] =  "DSImagingFrequency";
         dict[0x00180085UL] =  "SHImagedNucleus";
         dict[0x00180086UL] =  "ISEchoNumbers";
         dict[0x00180087UL] =  "DSMagneticFieldStrength";
         dict[0x00180088UL] =  "DSSpacingBetweenSlices";
-        dict[0x00180089UL] =  "ISNumberofPhaseEncodingSteps";
+        dict[0x00180089UL] =  "ISNumberOfPhaseEncodingSteps";
         dict[0x00180090UL] =  "DSDataCollectionDiameter";
         dict[0x00180091UL] =  "ISEchoTrainLength";
         dict[0x00180093UL] =  "DSPercentSampling";
-        dict[0x00180094UL] =  "DSPercentPhaseFieldofView";
+        dict[0x00180094UL] =  "DSPercentPhaseFieldOfView";
         dict[0x00180095UL] =  "DSPixelBandwidth";
         dict[0x00181000UL] =  "LODeviceSerialNumber";
+        dict[0x00181002UL] =  "UIDeviceUID";
+        dict[0x00181003UL] =  "LODeviceID";
         dict[0x00181004UL] =  "LOPlateID";
+        dict[0x00181005UL] =  "LOGeneratorID";
+        dict[0x00181006UL] =  "LOGridID";
+        dict[0x00181007UL] =  "LOCassetteID";
+        dict[0x00181008UL] =  "LOGantryID";
         dict[0x00181010UL] =  "LOSecondaryCaptureDeviceID";
-        dict[0x00181011UL] =  "LOHardcopyCreationDeviceID";
-        dict[0x00181012UL] =  "DADateofSecondaryCapture";
-        dict[0x00181014UL] =  "TMTimeofSecondaryCapture";
+        dict[0x00181012UL] =  "DADateOfSecondaryCapture";
+        dict[0x00181014UL] =  "TMTimeOfSecondaryCapture";
         dict[0x00181016UL] =  "LOSecondaryCaptureDeviceManufacturer";
-        dict[0x00181017UL] =  "LOHardcopyDeviceManufacturer";
-        dict[0x00181018UL] =  "LOSecondaryCaptureDeviceManufacturersModelName";
+        dict[0x00181018UL] =  "LOSecondaryCaptureDeviceManufacturerModelName";
         dict[0x00181019UL] =  "LOSecondaryCaptureDeviceSoftwareVersions";
-        dict[0x0018101AUL] =  "LOHardcopyDeviceSoftwareVersion";
-        dict[0x0018101BUL] =  "LOHardcopyDeviceManfuacturersModelName";
         dict[0x00181020UL] =  "LOSoftwareVersions";
         dict[0x00181022UL] =  "SHVideoImageFormatAcquired";
         dict[0x00181023UL] =  "LODigitalImageFormatAcquired";
@@ -273,16 +472,16 @@ namespace MR {
         dict[0x00181043UL] =  "TMContrastBolusStopTime";
         dict[0x00181044UL] =  "DSContrastBolusTotalDose";
         dict[0x00181045UL] =  "ISSyringeCounts";
-        dict[0x00181046UL] =  "DSContrastFlowRates";
-        dict[0x00181047UL] =  "DSContrastFlowDurations";
+        dict[0x00181046UL] =  "DSContrastFlowRate";
+        dict[0x00181047UL] =  "DSContrastFlowDuration";
         dict[0x00181048UL] =  "CSContrastBolusIngredient";
         dict[0x00181049UL] =  "DSContrastBolusIngredientConcentration";
         dict[0x00181050UL] =  "DSSpatialResolution";
         dict[0x00181060UL] =  "DSTriggerTime";
-        dict[0x00181061UL] =  "LOTriggerSourceorType";
+        dict[0x00181061UL] =  "LOTriggerSourceOrType";
         dict[0x00181062UL] =  "ISNominalInterval";
         dict[0x00181063UL] =  "DSFrameTime";
-        dict[0x00181064UL] =  "LOFramingType";
+        dict[0x00181064UL] =  "LOCardiacFramingType";
         dict[0x00181065UL] =  "DSFrameTimeVector";
         dict[0x00181066UL] =  "DSFrameDelay";
         dict[0x00181067UL] =  "DSImageTriggerDelay";
@@ -299,6 +498,8 @@ namespace MR {
         dict[0x00181075UL] =  "DSRadionuclideHalfLife";
         dict[0x00181076UL] =  "DSRadionuclidePositronFraction";
         dict[0x00181077UL] =  "DSRadiopharmaceuticalSpecificActivity";
+        dict[0x00181078UL] =  "DTRadiopharmaceuticalStartDateTime";
+        dict[0x00181079UL] =  "DTRadiopharmaceuticalStopDateTime";
         dict[0x00181080UL] =  "CSBeatRejectionFlag";
         dict[0x00181081UL] =  "ISLowRRValue";
         dict[0x00181082UL] =  "ISHighRRValue";
@@ -307,11 +508,11 @@ namespace MR {
         dict[0x00181085UL] =  "LOPVCRejection";
         dict[0x00181086UL] =  "ISSkipBeats";
         dict[0x00181088UL] =  "ISHeartRate";
-        dict[0x00181090UL] =  "ISCardiacNumberofImages";
+        dict[0x00181090UL] =  "ISCardiacNumberOfImages";
         dict[0x00181094UL] =  "ISTriggerWindow";
         dict[0x00181100UL] =  "DSReconstructionDiameter";
-        dict[0x00181110UL] =  "DSDistanceSourcetoDetector";
-        dict[0x00181111UL] =  "DSDistanceSourcetoPatient";
+        dict[0x00181110UL] =  "DSDistanceSourceToDetector";
+        dict[0x00181111UL] =  "DSDistanceSourceToPatient";
         dict[0x00181114UL] =  "DSEstimatedRadiographicMagnificationFactor";
         dict[0x00181120UL] =  "DSGantryDetectorTilt";
         dict[0x00181121UL] =  "DSGantryDetectorSlew";
@@ -324,29 +525,28 @@ namespace MR {
         dict[0x00181138UL] =  "DSTableAngle";
         dict[0x0018113AUL] =  "CSTableType";
         dict[0x00181140UL] =  "CSRotationDirection";
-        dict[0x00181141UL] =  "DSAngularPosition";
         dict[0x00181142UL] =  "DSRadialPosition";
         dict[0x00181143UL] =  "DSScanArc";
         dict[0x00181144UL] =  "DSAngularStep";
-        dict[0x00181145UL] =  "DSCenterofRotationOffset";
-        dict[0x00181147UL] =  "CSFieldofViewShape";
-        dict[0x00181149UL] =  "ISFieldofViewDimensions";
+        dict[0x00181145UL] =  "DSCenterOfRotationOffset";
+        dict[0x00181147UL] =  "CSFieldOfViewShape";
+        dict[0x00181149UL] =  "ISFieldOfViewDimensions";
         dict[0x00181150UL] =  "ISExposureTime";
-        dict[0x00181151UL] =  "ISXrayTubeCurrent";
+        dict[0x00181151UL] =  "ISXRayTubeCurrent";
         dict[0x00181152UL] =  "ISExposure";
-        dict[0x00181153UL] =  "ISExposureinuAs";
+        dict[0x00181153UL] =  "ISExposureInuAs";
         dict[0x00181154UL] =  "DSAveragePulseWidth";
         dict[0x00181155UL] =  "CSRadiationSetting";
         dict[0x00181156UL] =  "CSRectificationType";
         dict[0x0018115AUL] =  "CSRadiationMode";
-        dict[0x0018115EUL] =  "DSImageAreaDoseProduct";
+        dict[0x0018115EUL] =  "DSImageAndFluoroscopyAreaDoseProduct";
         dict[0x00181160UL] =  "SHFilterType";
-        dict[0x00181161UL] =  "LOTypeofFilters";
+        dict[0x00181161UL] =  "LOTypeOfFilters";
         dict[0x00181162UL] =  "DSIntensifierSize";
         dict[0x00181164UL] =  "DSImagerPixelSpacing";
         dict[0x00181166UL] =  "CSGrid";
         dict[0x00181170UL] =  "ISGeneratorPower";
-        dict[0x00181180UL] =  "SHCollimatorgridName";
+        dict[0x00181180UL] =  "SHCollimatorGridName";
         dict[0x00181181UL] =  "CSCollimatorType";
         dict[0x00181182UL] =  "ISFocalDistance";
         dict[0x00181183UL] =  "DSXFocusCenter";
@@ -355,21 +555,21 @@ namespace MR {
         dict[0x00181191UL] =  "CSAnodeTargetMaterial";
         dict[0x001811A0UL] =  "DSBodyPartThickness";
         dict[0x001811A2UL] =  "DSCompressionForce";
-        dict[0x00181200UL] =  "DADateofLastCalibration";
-        dict[0x00181201UL] =  "TMTimeofLastCalibration";
+        dict[0x00181200UL] =  "DADateOfLastCalibration";
+        dict[0x00181201UL] =  "TMTimeOfLastCalibration";
         dict[0x00181210UL] =  "SHConvolutionKernel";
         dict[0x00181242UL] =  "ISActualFrameDuration";
         dict[0x00181243UL] =  "ISCountRate";
         dict[0x00181244UL] =  "USPreferredPlaybackSequencing";
-        dict[0x00181250UL] =  "SHReceivingCoil";
-        dict[0x00181251UL] =  "SHTransmittingCoil";
+        dict[0x00181250UL] =  "SHReceiveCoilName";
+        dict[0x00181251UL] =  "SHTransmitCoilName";
         dict[0x00181260UL] =  "SHPlateType";
         dict[0x00181261UL] =  "LOPhosphorType";
         dict[0x00181300UL] =  "DSScanVelocity";
         dict[0x00181301UL] =  "CSWholeBodyTechnique";
         dict[0x00181302UL] =  "ISScanLength";
         dict[0x00181310UL] =  "USAcquisitionMatrix";
-        dict[0x00181312UL] =  "CSPhaseEncodingDirection";
+        dict[0x00181312UL] =  "CSInPlanePhaseEncodingDirection";
         dict[0x00181314UL] =  "DSFlipAngle";
         dict[0x00181315UL] =  "CSVariableFlipAngleFlag";
         dict[0x00181316UL] =  "DSSAR";
@@ -378,15 +578,18 @@ namespace MR {
         dict[0x00181401UL] =  "LOAcquisitionDeviceProcessingCode";
         dict[0x00181402UL] =  "CSCassetteOrientation";
         dict[0x00181403UL] =  "CSCassetteSize";
-        dict[0x00181404UL] =  "USExposuresonPlate";
-        dict[0x00181405UL] =  "ISRelativeXrayExposure";
-        dict[0x00181450UL] =  "CSColumnAngulation";
+        dict[0x00181404UL] =  "USExposuresOnPlate";
+        dict[0x00181405UL] =  "ISRelativeXRayExposure";
+        dict[0x00181411UL] =  "DSExposureIndex";
+        dict[0x00181412UL] =  "DSTargetExposureIndex";
+        dict[0x00181413UL] =  "DSDeviationIndex";
+        dict[0x00181450UL] =  "DSColumnAngulation";
         dict[0x00181460UL] =  "DSTomoLayerHeight";
         dict[0x00181470UL] =  "DSTomoAngle";
         dict[0x00181480UL] =  "DSTomoTime";
         dict[0x00181490UL] =  "CSTomoType";
         dict[0x00181491UL] =  "CSTomoClass";
-        dict[0x00181495UL] =  "ISNumberofTomosynthesisSourceImages";
+        dict[0x00181495UL] =  "ISNumberOfTomosynthesisSourceImages";
         dict[0x00181500UL] =  "CSPositionerMotion";
         dict[0x00181508UL] =  "CSPositionerType";
         dict[0x00181510UL] =  "DSPositionerPrimaryAngle";
@@ -400,22 +603,24 @@ namespace MR {
         dict[0x00181604UL] =  "ISShutterRightVerticalEdge";
         dict[0x00181606UL] =  "ISShutterUpperHorizontalEdge";
         dict[0x00181608UL] =  "ISShutterLowerHorizontalEdge";
-        dict[0x00181610UL] =  "ISCenterofCircularShutter";
-        dict[0x00181612UL] =  "ISRadiusofCircularShutter";
-        dict[0x00181620UL] =  "ISVerticesofthePolygonalShutter";
+        dict[0x00181610UL] =  "ISCenterOfCircularShutter";
+        dict[0x00181612UL] =  "ISRadiusOfCircularShutter";
+        dict[0x00181620UL] =  "ISVerticesOfThePolygonalShutter";
         dict[0x00181622UL] =  "USShutterPresentationValue";
         dict[0x00181623UL] =  "USShutterOverlayGroup";
+        dict[0x00181624UL] =  "USShutterPresentationColorCIELabValue";
         dict[0x00181700UL] =  "CSCollimatorShape";
         dict[0x00181702UL] =  "ISCollimatorLeftVerticalEdge";
         dict[0x00181704UL] =  "ISCollimatorRightVerticalEdge";
         dict[0x00181706UL] =  "ISCollimatorUpperHorizontalEdge";
         dict[0x00181708UL] =  "ISCollimatorLowerHorizontalEdge";
-        dict[0x00181710UL] =  "ISCenterofCircularCollimator";
-        dict[0x00181712UL] =  "ISRadiusofCircularCollimator";
-        dict[0x00181720UL] =  "ISVerticesofthePolygonalCollimator";
+        dict[0x00181710UL] =  "ISCenterOfCircularCollimator";
+        dict[0x00181712UL] =  "ISRadiusOfCircularCollimator";
+        dict[0x00181720UL] =  "ISVerticesOfThePolygonalCollimator";
         dict[0x00181800UL] =  "CSAcquisitionTimeSynchronized";
         dict[0x00181801UL] =  "SHTimeSource";
         dict[0x00181802UL] =  "CSTimeDistributionProtocol";
+        dict[0x00181803UL] =  "LONTPSourceAddress";
         dict[0x00182001UL] =  "ISPageNumberVector";
         dict[0x00182002UL] =  "SHFrameLabelVector";
         dict[0x00182003UL] =  "DSFramePrimaryAngleVector";
@@ -424,7 +629,7 @@ namespace MR {
         dict[0x00182006UL] =  "SHDisplayWindowLabelVector";
         dict[0x00182010UL] =  "DSNominalScannedPixelSpacing";
         dict[0x00182020UL] =  "CSDigitizingDeviceTransportDirection";
-        dict[0x00182030UL] =  "DSRotationofScannedFilm";
+        dict[0x00182030UL] =  "DSRotationOfScannedFilm";
         dict[0x00183100UL] =  "CSIVUSAcquisition";
         dict[0x00183101UL] =  "DSIVUSPullbackRate";
         dict[0x00183102UL] =  "DSIVUSGatedRate";
@@ -435,21 +640,18 @@ namespace MR {
         dict[0x00185010UL] =  "LOTransducerData";
         dict[0x00185012UL] =  "DSFocusDepth";
         dict[0x00185020UL] =  "LOProcessingFunction";
-        dict[0x00185021UL] =  "LOPostprocessingFunction";
         dict[0x00185022UL] =  "DSMechanicalIndex";
-        dict[0x00185024UL] =  "DSThermalIndex";
+        dict[0x00185024UL] =  "DSBoneThermalIndex";
         dict[0x00185026UL] =  "DSCranialThermalIndex";
         dict[0x00185027UL] =  "DSSoftTissueThermalIndex";
-        dict[0x00185028UL] =  "DSSoftTissuefocusThermalIndex";
-        dict[0x00185029UL] =  "DSSoftTissuesurfaceThermalIndex";
-        dict[0x00185050UL] =  "ISDepthofScanField";
+        dict[0x00185028UL] =  "DSSoftTissueFocusThermalIndex";
+        dict[0x00185029UL] =  "DSSoftTissueSurfaceThermalIndex";
+        dict[0x00185050UL] =  "ISDepthOfScanField";
         dict[0x00185100UL] =  "CSPatientPosition";
         dict[0x00185101UL] =  "CSViewPosition";
         dict[0x00185104UL] =  "SQProjectionEponymousNameCodeSequence";
-        dict[0x00185210UL] =  "DSImageTransformationMatrix";
-        dict[0x00185212UL] =  "DSImageTranslationVector";
         dict[0x00186000UL] =  "DSSensitivity";
-        dict[0x00186011UL] =  "SQSequenceofUltrasoundRegions";
+        dict[0x00186011UL] =  "SQSequenceOfUltrasoundRegions";
         dict[0x00186012UL] =  "USRegionSpatialFormat";
         dict[0x00186014UL] =  "USRegionDataType";
         dict[0x00186016UL] =  "ULRegionFlags";
@@ -461,33 +663,34 @@ namespace MR {
         dict[0x00186022UL] =  "SLReferencePixelY0";
         dict[0x00186024UL] =  "USPhysicalUnitsXDirection";
         dict[0x00186026UL] =  "USPhysicalUnitsYDirection";
-        dict[0x00186028UL] =  "FDReferencePixelPhysicalValueX";
-        dict[0x0018602AUL] =  "FDReferencePixelPhysicalValueY";
+        dict[0x00186028UL] =  "FDReferencePixelPhysicalValuX";
+        dict[0x0018602AUL] =  "FDReferencePixelPhysicalValuY";
         dict[0x0018602CUL] =  "FDPhysicalDeltaX";
         dict[0x0018602EUL] =  "FDPhysicalDeltaY";
         dict[0x00186030UL] =  "ULTransducerFrequency";
         dict[0x00186031UL] =  "CSTransducerType";
         dict[0x00186032UL] =  "ULPulseRepetitionFrequency";
         dict[0x00186034UL] =  "FDDopplerCorrectionAngle";
-        dict[0x00186036UL] =  "FDSteeringAngle";
-        dict[0x00186038UL] =  "ULDopplerSampleVolumeXPosition";
-        dict[0x0018603AUL] =  "ULDopplerSampleVolumeYPosition";
-        dict[0x0018603CUL] =  "ULTMLinePositionX0";
-        dict[0x0018603EUL] =  "ULTMLinePositionY0";
-        dict[0x00186040UL] =  "ULTMLinePositionX1";
-        dict[0x00186042UL] =  "ULTMLinePositionY1";
+        dict[0x00186036UL] =  "FDteeringAngle";
+        dict[0x00186039UL] =  "SLDopplerSampleVolumeXPosiion";
+        dict[0x0018603BUL] =  "SLDopplerSampleVolumeYPosiion";
+        dict[0x0018603DUL] =  "SLTMLinePositionX0";
+        dict[0x0018603FUL] =  "SLTMLinePositionY0";
+        dict[0x00186041UL] =  "SLTMLinePositionX1";
+        dict[0x00186043UL] =  "SLTMLinePositionY1";
         dict[0x00186044UL] =  "USPixelComponentOrganization";
         dict[0x00186046UL] =  "ULPixelComponentMask";
         dict[0x00186048UL] =  "ULPixelComponentRangeStart";
         dict[0x0018604AUL] =  "ULPixelComponentRangeStop";
         dict[0x0018604CUL] =  "USPixelComponentPhysicalUnits";
         dict[0x0018604EUL] =  "USPixelComponentDataType";
-        dict[0x00186050UL] =  "ULNumberofTableBreakPoints";
-        dict[0x00186052UL] =  "ULTableofXBreakPoints";
-        dict[0x00186054UL] =  "FDTableofYBreakPoints";
-        dict[0x00186056UL] =  "ULNumberofTableEntries";
-        dict[0x00186058UL] =  "ULTableofPixelValues";
-        dict[0x0018605AUL] =  "FLTableofParameterValues";
+        dict[0x00186050UL] =  "ULNumberOfTableBreakPoints";
+        dict[0x00186052UL] =  "ULTableOfXBreakPoints";
+        dict[0x00186054UL] =  "FDTableOfYBreakPoints";
+        dict[0x00186056UL] =  "ULNumberOfTableEntries";
+        dict[0x00186058UL] =  "ULTableOfPixelValues";
+        dict[0x0018605AUL] =  "FLTableOfParameterValues";
+        dict[0x00186060UL] =  "FLRWaveTimeVector";
         dict[0x00187000UL] =  "CSDetectorConditionsNominalFlag";
         dict[0x00187001UL] =  "DSDetectorTemperature";
         dict[0x00187004UL] =  "CSDetectorType";
@@ -495,10 +698,10 @@ namespace MR {
         dict[0x00187006UL] =  "LTDetectorDescription";
         dict[0x00187008UL] =  "LTDetectorMode";
         dict[0x0018700AUL] =  "SHDetectorID";
-        dict[0x0018700CUL] =  "DADateofLastDetectorCalibration";
-        dict[0x0018700EUL] =  "TMTimeofLastDetectorCalibration";
-        dict[0x00187010UL] =  "ISExposuresonDetectorSinceLastCalibration";
-        dict[0x00187011UL] =  "ISExposuresonDetectorSinceManufactured";
+        dict[0x0018700CUL] =  "DADateOfLastDetectorCalibration";
+        dict[0x0018700EUL] =  "TMTimeOfLastDetectorCalibration";
+        dict[0x00187010UL] =  "ISExposuresOnDetectorSinceLastCalibration";
+        dict[0x00187011UL] =  "ISExposuresOnDetectorSinceManufactured";
         dict[0x00187012UL] =  "DSDetectorTimeSinceLastExposure";
         dict[0x00187014UL] =  "DSDetectorActiveTime";
         dict[0x00187016UL] =  "DSDetectorActivationOffsetFromExposure";
@@ -508,9 +711,13 @@ namespace MR {
         dict[0x00187024UL] =  "CSDetectorActiveShape";
         dict[0x00187026UL] =  "DSDetectorActiveDimensions";
         dict[0x00187028UL] =  "DSDetectorActiveOrigin";
-        dict[0x00187030UL] =  "DSFieldofViewOrigin";
-        dict[0x00187032UL] =  "DSFieldofViewRotation";
-        dict[0x00187034UL] =  "CSFieldofViewHorizontalFlip";
+        dict[0x0018702AUL] =  "LODetectorManufacturerName";
+        dict[0x0018702BUL] =  "LODetectorManufacturerModelName";
+        dict[0x00187030UL] =  "DSFieldOfViewOrigin";
+        dict[0x00187032UL] =  "DSFieldOfViewRotation";
+        dict[0x00187034UL] =  "CSFieldOfViewHorizontalFlip";
+        dict[0x00187036UL] =  "FLPixelDataAreaOriginRelativeToFOV";
+        dict[0x00187038UL] =  "FLPixelDataAreaRotationAngleRelativeToFOV";
         dict[0x00187040UL] =  "LTGridAbsorbingMaterial";
         dict[0x00187041UL] =  "LTGridSpacingMaterial";
         dict[0x00187042UL] =  "DSGridThickness";
@@ -521,12 +728,350 @@ namespace MR {
         dict[0x00187050UL] =  "CSFilterMaterial";
         dict[0x00187052UL] =  "DSFilterThicknessMinimum";
         dict[0x00187054UL] =  "DSFilterThicknessMaximum";
+        dict[0x00187056UL] =  "FLFilterBeamPathLengthMinimum";
+        dict[0x00187058UL] =  "FLFilterBeamPathLengthMaximum";
         dict[0x00187060UL] =  "CSExposureControlMode";
         dict[0x00187062UL] =  "LTExposureControlModeDescription";
         dict[0x00187064UL] =  "CSExposureStatus";
         dict[0x00187065UL] =  "DSPhototimerSetting";
-        dict[0x00188150UL] =  "DSExposureTime";
-        dict[0x00188151UL] =  "DSXRayTubeCurrent";
+        dict[0x00188150UL] =  "DSExposureTimeInuS";
+        dict[0x00188151UL] =  "DSXRayTubeCurrentInuA";
+        dict[0x00189004UL] =  "CSContentQualification";
+        dict[0x00189005UL] =  "SHPulseSequenceName";
+        dict[0x00189006UL] =  "SQMRImagingModifierSequence";
+        dict[0x00189008UL] =  "CSEchoPulseSequence";
+        dict[0x00189009UL] =  "CSInversionRecovery";
+        dict[0x00189010UL] =  "CSFlowCompensation";
+        dict[0x00189011UL] =  "CSMultipleSpinEcho";
+        dict[0x00189012UL] =  "CSMultiPlanarExcitation";
+        dict[0x00189014UL] =  "CSPhaseContrast";
+        dict[0x00189015UL] =  "CSTimeOfFlightContrast";
+        dict[0x00189016UL] =  "CSSpoiling";
+        dict[0x00189017UL] =  "CSSteadyStatePulseSequence";
+        dict[0x00189018UL] =  "CSEchoPlanarPulseSequence";
+        dict[0x00189019UL] =  "FDTagAngleFirstAxis";
+        dict[0x00189020UL] =  "CSMagnetizationTransfer";
+        dict[0x00189021UL] =  "CST2Preparation";
+        dict[0x00189022UL] =  "CSBloodSignalNulling";
+        dict[0x00189024UL] =  "CSSaturationRecovery";
+        dict[0x00189025UL] =  "CSSpectrallySelectedSuppression";
+        dict[0x00189026UL] =  "CSSpectrallySelectedExcitation";
+        dict[0x00189027UL] =  "CSSpatialPresaturation";
+        dict[0x00189028UL] =  "CSTagging";
+        dict[0x00189029UL] =  "CSOversamplingPhase";
+        dict[0x00189030UL] =  "FDTagSpacingFirstDimension";
+        dict[0x00189032UL] =  "CSGeometryOfKSpaceTraversal";
+        dict[0x00189033UL] =  "CSSegmentedKSpaceTraversal";
+        dict[0x00189034UL] =  "CSRectilinearPhaseEncodeReordering";
+        dict[0x00189035UL] =  "FDTagThickness";
+        dict[0x00189036UL] =  "CSPartialFourierDirection";
+        dict[0x00189037UL] =  "CSCardiacSynchronizationTechnique";
+        dict[0x00189041UL] =  "LOReceiveCoilManufacturerName";
+        dict[0x00189042UL] =  "SQMRReceiveCoilSequence";
+        dict[0x00189043UL] =  "CSReceiveCoilType";
+        dict[0x00189044UL] =  "CSQuadratureReceiveCoil";
+        dict[0x00189045UL] =  "SQMultiCoilDefinitionSequence";
+        dict[0x00189046UL] =  "LOMultiCoilConfiguration";
+        dict[0x00189047UL] =  "SHMultiCoilElementName";
+        dict[0x00189048UL] =  "CSMultiCoilElementUsed";
+        dict[0x00189049UL] =  "SQMRTransmitCoilSequence";
+        dict[0x00189050UL] =  "LOTransmitCoilManufacturerName";
+        dict[0x00189051UL] =  "CSTransmitCoilType";
+        dict[0x00189052UL] =  "FDSpectralWidth";
+        dict[0x00189053UL] =  "FDChemicalShiftReference";
+        dict[0x00189054UL] =  "CSVolumeLocalizationTechnique";
+        dict[0x00189058UL] =  "USMRAcquisitionFrequencyEncodingSteps";
+        dict[0x00189059UL] =  "CSDecoupling";
+        dict[0x00189060UL] =  "CSDecoupledNucleus";
+        dict[0x00189061UL] =  "FDDecouplingFrequency";
+        dict[0x00189062UL] =  "CSDecouplingMethod";
+        dict[0x00189063UL] =  "FDDecouplingChemicalShiftReference";
+        dict[0x00189064UL] =  "CSKSpaceFiltering";
+        dict[0x00189065UL] =  "CSTimeDomainFiltering";
+        dict[0x00189066UL] =  "USNumberOfZeroFills";
+        dict[0x00189067UL] =  "CSBaselineCorrection";
+        dict[0x00189069UL] =  "FDParallelReductionFactorInPlane";
+        dict[0x00189070UL] =  "FDCardiacRRIntervalSpecified";
+        dict[0x00189073UL] =  "FDAcquisitionDuration";
+        dict[0x00189074UL] =  "DTFrameAcquisitionDateTime";
+        dict[0x00189075UL] =  "CSDiffusionDirectionality";
+        dict[0x00189076UL] =  "SQDiffusionGradientDirectionSequence";
+        dict[0x00189077UL] =  "CSParallelAcquisition";
+        dict[0x00189078UL] =  "CSParallelAcquisitionTechnique";
+        dict[0x00189079UL] =  "FDInversionTimes";
+        dict[0x00189080UL] =  "STMetaboliteMapDescription";
+        dict[0x00189081UL] =  "CSPartialFourier";
+        dict[0x00189082UL] =  "FDEffectiveEchoTime";
+        dict[0x00189083UL] =  "SQMetaboliteMapCodeSequence";
+        dict[0x00189084UL] =  "SQChemicalShiftSequence";
+        dict[0x00189085UL] =  "CSCardiacSignalSource";
+        dict[0x00189087UL] =  "FDDiffusionBValue";
+        dict[0x00189089UL] =  "FDDiffusionGradientOrientation";
+        dict[0x00189090UL] =  "FDVelocityEncodingDirection";
+        dict[0x00189091UL] =  "FDVelocityEncodingMinimumValue";
+        dict[0x00189092UL] =  "SQVelocityEncodingAcquisitionSequence";
+        dict[0x00189093UL] =  "USNumberOfKSpaceTrajectories";
+        dict[0x00189094UL] =  "CSCoverageOfKSpace";
+        dict[0x00189095UL] =  "ULSpectroscopyAcquisitionPhaseRows";
+        dict[0x00189098UL] =  "FDTransmitterFrequency";
+        dict[0x00189100UL] =  "CSResonantNucleus";
+        dict[0x00189101UL] =  "CSFrequencyCorrection";
+        dict[0x00189103UL] =  "SQMRSpectroscopyFOVGeometrySequence";
+        dict[0x00189104UL] =  "FDSlabThickness";
+        dict[0x00189105UL] =  "FDSlabOrientation";
+        dict[0x00189106UL] =  "FDMidSlabPosition";
+        dict[0x00189107UL] =  "SQMRSpatialSaturationSequence";
+        dict[0x00189112UL] =  "SQMRTimingAndRelatedParametersSequence";
+        dict[0x00189114UL] =  "SQMREchoSequence";
+        dict[0x00189115UL] =  "SQMRModifierSequence";
+        dict[0x00189117UL] =  "SQMRDiffusionSequence";
+        dict[0x00189118UL] =  "SQCardiacSynchronizationSequence";
+        dict[0x00189119UL] =  "SQMRAveragesSequence";
+        dict[0x00189125UL] =  "SQMRFOVGeometrySequence";
+        dict[0x00189126UL] =  "SQVolumeLocalizationSequence";
+        dict[0x00189127UL] =  "ULSpectroscopyAcquisitionDataColumns";
+        dict[0x00189147UL] =  "CSDiffusionAnisotropyType";
+        dict[0x00189151UL] =  "DTFrameReferenceDateTime";
+        dict[0x00189152UL] =  "SQMRMetaboliteMapSequence";
+        dict[0x00189155UL] =  "FDParallelReductionFactorOutOfPlane";
+        dict[0x00189159UL] =  "ULSpectroscopyAcquisitionOutOfPlanePhaseSteps";
+        dict[0x00189168UL] =  "FDarallelReductionFactorSecndInPlane";
+        dict[0x00189169UL] =  "CSCardiacBeatRejectionTechnique";
+        dict[0x00189170UL] =  "CSRespiratoryMotionCompensationTechnique";
+        dict[0x00189171UL] =  "CSRespiratorySignalSource";
+        dict[0x00189172UL] =  "CSBulkMotionCompensationTechnique";
+        dict[0x00189173UL] =  "CSBulkMotionSignalSource";
+        dict[0x00189178UL] =  "CSOperatingMode";
+        dict[0x00189179UL] =  "CSSpecificAbsorptionRateDefinition";
+        dict[0x00189180UL] =  "CSGradientOutputType";
+        dict[0x00189181UL] =  "FDSpecificAbsorptionRateValue";
+        dict[0x00189182UL] =  "FDGradientOutput";
+        dict[0x00189183UL] =  "CSFlowCompensationDirection";
+        dict[0x00189184UL] =  "FDTaggingDelay";
+        dict[0x00189185UL] =  "STRespiratoryMotionCompensationTechniqueDescription";
+        dict[0x00189186UL] =  "SHRespiratorySignalSourceIDationLimitInHzrationLimitInHz";
+        dict[0x00189197UL] =  "SQMRVelocityEncodingSequence";
+        dict[0x00189198UL] =  "CSFirstOrderPhaseCorrection";
+        dict[0x00189199UL] =  "CSWaterReferencedPhaseCorrection";
+        dict[0x00189200UL] =  "CSMRSpectroscopyAcquisitionType";
+        dict[0x00189214UL] =  "CSRespiratoryCyclePosition";
+        dict[0x00189217UL] =  "FDVelocityEncodingMaximumValue";
+        dict[0x00189218UL] =  "FDTagSpacingSecondDimension";
+        dict[0x00189219UL] =  "SSTagAngleSecondAxis";
+        dict[0x00189220UL] =  "FDFrameAcquisitionDuration";
+        dict[0x00189226UL] =  "SQMRImageFrameTypeSequence";
+        dict[0x00189227UL] =  "SQMRSpectroscopyFrameTypeSequence";
+        dict[0x00189231UL] =  "USMRAcquisitionPhaseEncodingStepsInPlane";
+        dict[0x00189232UL] =  "USMRAcquisitionPhaseEncodingStepsOutOfPlane";
+        dict[0x00189234UL] =  "ULSpectroscopyAcquisitionPhaseColumns";
+        dict[0x00189236UL] =  "CSCardiacCyclePosition";
+        dict[0x00189239UL] =  "SQSpecificAbsorptionRateSequence";
+        dict[0x00189240UL] =  "USRFEchoTrainLength";
+        dict[0x00189241UL] =  "USGradientEchoTrainLength";
+        dict[0x00189250UL] =  "CSArterialSpinLabelingContrast";
+        dict[0x00189251UL] =  "SQMRArterialSpinLabelingSequence";
+        dict[0x00189252UL] =  "LOASLTechniqueDescription";
+        dict[0x00189253UL] =  "USASLSlabNumber";
+        dict[0x00189254UL] =  "FDASLSlabThickness";
+        dict[0x00189255UL] =  "FDASLSlabOrientation";
+        dict[0x00189256UL] =  "FDASLMidSlabPosition";
+        dict[0x00189257UL] =  "CSASLContext";
+        dict[0x00189258UL] =  "ULASLPulseTrainDuration";
+        dict[0x00189259UL] =  "CSASLCrusherFlag";
+        dict[0x0018925AUL] =  "FDASLCrusherFlow";
+        dict[0x0018925BUL] =  "LOASLCrusherDescription";
+        dict[0x0018925CUL] =  "CSASLBolusCutoffFlag";
+        dict[0x0018925DUL] =  "SQASLBolusCutoffTimingSequence";
+        dict[0x0018925EUL] =  "LOASLBolusCutoffTechnique";
+        dict[0x0018925FUL] =  "ULASLBolusCutoffDelayTime";
+        dict[0x00189260UL] =  "SQASLSlabSequence";
+        dict[0x00189295UL] =  "FDChemicalShiftMinimumIntegrationLimitInppm";
+        dict[0x00189296UL] =  "FDChemicalShiftMaximumIntegrationLimitInppm";
+        dict[0x00189301UL] =  "SQCTAcquisitionTypeSequence";
+        dict[0x00189302UL] =  "CSAcquisitionType";
+        dict[0x00189303UL] =  "FDTubeAngle";
+        dict[0x00189304UL] =  "SQCTAcquisitionDetailsSequence";
+        dict[0x00189305UL] =  "FDRevolutionTime";
+        dict[0x00189306UL] =  "FDSingleCollimationWidth";
+        dict[0x00189307UL] =  "FDTotalCollimationWidth";
+        dict[0x00189308UL] =  "SQCTTableDynamicsSequence";
+        dict[0x00189309UL] =  "FDTableSpeed";
+        dict[0x00189310UL] =  "FDTableFeedPerRotation";
+        dict[0x00189311UL] =  "FDSpiralPitchFactor";
+        dict[0x00189312UL] =  "SQCTGeometrySequence";
+        dict[0x00189313UL] =  "FDDataCollectionCenterPatient";
+        dict[0x00189314UL] =  "SQCTReconstructionSequence";
+        dict[0x00189315UL] =  "CSReconstructionAlgorithm";
+        dict[0x00189316UL] =  "CSConvolutionKernelGroup";
+        dict[0x00189317UL] =  "FDReconstructionFieldOfView";
+        dict[0x00189318UL] =  "FDReconstructionTargetCenterPatient";
+        dict[0x00189319UL] =  "FDReconstructionAngle";
+        dict[0x00189320UL] =  "SHImageFilter";
+        dict[0x00189321UL] =  "SQCTExposureSequence";
+        dict[0x00189322UL] =  "FDReconstructionPixelSpacing";
+        dict[0x00189323UL] =  "CSExposureModulationType";
+        dict[0x00189324UL] =  "FDEstimatedDoseSaving";
+        dict[0x00189325UL] =  "SQCTXRayDetailsSequence";
+        dict[0x00189326UL] =  "SQCTPositionSequence";
+        dict[0x00189327UL] =  "FDTablePosition";
+        dict[0x00189328UL] =  "FDExposureTimeInms";
+        dict[0x00189329UL] =  "SQCTImageFrameTypeSequence";
+        dict[0x00189330UL] =  "FDXRayTubeCurrentInmA";
+        dict[0x00189332UL] =  "FDExposureInmAs";
+        dict[0x00189333UL] =  "CSConstantVolumeFlag";
+        dict[0x00189334UL] =  "CSFluoroscopyFlag";
+        dict[0x00189335UL] =  "FDDistanceSourceToDataCollectionCenter";
+        dict[0x00189337UL] =  "USContrastBolusAgentNumber";
+        dict[0x00189338UL] =  "SQContrastBolusIngredientCodeSequence";
+        dict[0x00189340UL] =  "SQContrastAdministrationProfileSequence";
+        dict[0x00189341UL] =  "SQContrastBolusUsageSequence";
+        dict[0x00189342UL] =  "CSContrastBolusAgentAdministered";
+        dict[0x00189343UL] =  "CSContrastBolusAgentDetected";
+        dict[0x00189344UL] =  "CSContrastBolusAgentPhase";
+        dict[0x00189345UL] =  "FDCTDIvol";
+        dict[0x00189346UL] =  "SQCTDIPhantomTypeCodeSequence";
+        dict[0x00189351UL] =  "FLCalciumScoringMassFactorPatient";
+        dict[0x00189352UL] =  "FLCalciumScoringMassFactorDevice";
+        dict[0x00189353UL] =  "FLEnergyWeightingFactor";
+        dict[0x00189360UL] =  "SQCTAdditionalXRaySourceSequence";
+        dict[0x00189401UL] =  "SQProjectionPixelCalibrationSequence";
+        dict[0x00189402UL] =  "FLDistanceSourceToIsocenter";
+        dict[0x00189403UL] =  "FLDistanceObjectToTableTop";
+        dict[0x00189404UL] =  "FLObjectPixelSpacingInCenterOfBeam";
+        dict[0x00189405UL] =  "SQPositionerPositionSequence";
+        dict[0x00189406UL] =  "SQTablePositionSequence";
+        dict[0x00189407UL] =  "SQCollimatorShapeSequence";
+        dict[0x00189410UL] =  "CSPlanesInAcquisition";
+        dict[0x00189412UL] =  "SQXAXRFFrameCharacteristicsSequence";
+        dict[0x00189417UL] =  "SQFrameAcquisitionSequence";
+        dict[0x00189420UL] =  "CSXRayReceptorType";
+        dict[0x00189423UL] =  "LOAcquisitionProtocolName";
+        dict[0x00189424UL] =  "LTAcquisitionProtocolDescription";
+        dict[0x00189425UL] =  "CSContrastBolusIngredientOpaque";
+        dict[0x00189426UL] =  "FLDistanceReceptorPlaneToDetectorHousing";
+        dict[0x00189427UL] =  "CSIntensifierActiveShape";
+        dict[0x00189428UL] =  "FLIntensifierActiveDimensions";
+        dict[0x00189429UL] =  "FLPhysicalDetectorSize";
+        dict[0x00189430UL] =  "FLPositionOfIsocenterProjection";
+        dict[0x00189432UL] =  "SQFieldOfViewSequence";
+        dict[0x00189433UL] =  "LOFieldOfViewDescription";
+        dict[0x00189434UL] =  "SQExposureControlSensingRegionsSequence";
+        dict[0x00189435UL] =  "CSExposureControlSensingRegionShape";
+        dict[0x00189436UL] =  "SSExposureControlSensingRegionLeftVerticalEdge";
+        dict[0x00189437UL] =  "SSExposureControlSensingRegionRightVerticalEdge";
+        dict[0x00189438UL] =  "SSExposureControlSensingRegionUpperHorizontalEdge";
+        dict[0x00189439UL] =  "SSExposureControlSensingRegionLowerHorizontalEdge";
+        dict[0x00189440UL] =  "SSCenterOfCircularExposureControlSensingRegion";
+        dict[0x00189441UL] =  "USRadiusOfCircularExposureControlSensingRegion";
+        dict[0x00189442UL] =  "SSVerticesOfThePolygonalExposureControlSensingRegion";
+        dict[0x00189447UL] =  "FLColumnAngulationPatient";
+        dict[0x00189449UL] =  "FLBeamAngle";
+        dict[0x00189451UL] =  "SQFrameDetectorParametersSequence";
+        dict[0x00189452UL] =  "FLCalculatedAnatomyThickness";
+        dict[0x00189455UL] =  "SQCalibrationSequence";
+        dict[0x00189456UL] =  "SQObjectThicknessSequence";
+        dict[0x00189457UL] =  "CSPlaneIdentification";
+        dict[0x00189461UL] =  "FLFieldOfViewDimensionsInFloat";
+        dict[0x00189462UL] =  "SQIsocenterReferenceSystemSequence";
+        dict[0x00189463UL] =  "FLPositionerIsocenterPrimaryAngle";
+        dict[0x00189464UL] =  "FLPositionerIsocenterSecondaryAngle";
+        dict[0x00189465UL] =  "FLPositionerIsocenterDetectorRotationAngle";
+        dict[0x00189466UL] =  "FLTableXPositionToIsocenter";
+        dict[0x00189467UL] =  "FLTableYPositionToIsocenter";
+        dict[0x00189468UL] =  "FLTableZPositionToIsocenter";
+        dict[0x00189469UL] =  "FLTableHorizontalRotationAngle";
+        dict[0x00189470UL] =  "FLTableHeadTiltAngle";
+        dict[0x00189471UL] =  "FLTableCradleTiltAngle";
+        dict[0x00189472UL] =  "SQFrameDisplayShutterSequence";
+        dict[0x00189473UL] =  "FLAcquiredImageAreaDoseProduct";
+        dict[0x00189474UL] =  "CSCArmPositionerTabletopRelationship";
+        dict[0x00189476UL] =  "SQXRayGeometrySequence";
+        dict[0x00189477UL] =  "SQIrradiationEventIdentificationSequence";
+        dict[0x00189504UL] =  "SQXRay3DFrameTypeSequence";
+        dict[0x00189506UL] =  "SQContributingSourcesSequence";
+        dict[0x00189507UL] =  "SQXRay3DAcquisitionSequence";
+        dict[0x00189508UL] =  "FLPrimaryPositionerScanArc";
+        dict[0x00189509UL] =  "FLSecondaryPositionerScanArc";
+        dict[0x00189510UL] =  "FLPrimaryPositionerScanStartAngle";
+        dict[0x00189511UL] =  "FLSecondaryPositionerScanStartAngle";
+        dict[0x00189514UL] =  "FLPrimaryPositionerIncrement";
+        dict[0x00189515UL] =  "FLSecondaryPositionerIncrement";
+        dict[0x00189516UL] =  "DTStartAcquisitionDateTime";
+        dict[0x00189517UL] =  "DTEndAcquisitionDateTime";
+        dict[0x00189524UL] =  "LOApplicationName";
+        dict[0x00189525UL] =  "LOApplicationVersion";
+        dict[0x00189526UL] =  "LOApplicationManufacturer";
+        dict[0x00189527UL] =  "CSAlgorithmType";
+        dict[0x00189528UL] =  "LOAlgorithmDescription";
+        dict[0x00189530UL] =  "SQXRay3DReconstructionSequence";
+        dict[0x00189531UL] =  "LOReconstructionDescription";
+        dict[0x00189538UL] =  "SQPerProjectionAcquisitionSequence";
+        dict[0x00189601UL] =  "SQDiffusionBMatrixSequence";
+        dict[0x00189602UL] =  "FDDiffusionBValueXX";
+        dict[0x00189603UL] =  "FDDiffusionBValueXY";
+        dict[0x00189604UL] =  "FDDiffusionBValueXZ";
+        dict[0x00189605UL] =  "FDDiffusionBValueYY";
+        dict[0x00189606UL] =  "FDDiffusionBValueYZ";
+        dict[0x00189607UL] =  "FDDiffusionBValueZZ";
+        dict[0x00189701UL] =  "DTDecayCorrectionDateTime";
+        dict[0x00189715UL] =  "FDStartDensityThreshold";
+        dict[0x00189716UL] =  "FDStartRelativeDensityDifferenceThreshold";
+        dict[0x00189717UL] =  "FDStartCardiacTriggerCountThreshold";
+        dict[0x00189718UL] =  "FDStartRespiratoryTriggerCountThreshold";
+        dict[0x00189719UL] =  "FDTerminationCountsThreshold";
+        dict[0x00189720UL] =  "FDTerminationDensityThreshold";
+        dict[0x00189721UL] =  "FDTerminationRelativeDensityThreshold";
+        dict[0x00189722UL] =  "FDTerminationTimeThreshold";
+        dict[0x00189723UL] =  "FDTerminationCardiacTriggerCountThreshold";
+        dict[0x00189724UL] =  "FDTerminationRespiratoryTriggerCountThreshold";
+        dict[0x00189725UL] =  "CSDetectorGeometry";
+        dict[0x00189726UL] =  "FDTransverseDetectorSeparation";
+        dict[0x00189727UL] =  "FDAxialDetectorDimension";
+        dict[0x00189729UL] =  "USRadiopharmaceuticalAgentNumber";
+        dict[0x00189732UL] =  "SQPETFrameAcquisitionSequence";
+        dict[0x00189733UL] =  "SQPETDetectorMotionDetailsSequence";
+        dict[0x00189734UL] =  "SQPETTableDynamicsSequence";
+        dict[0x00189735UL] =  "SQPETPositionSequence";
+        dict[0x00189736UL] =  "SQPETFrameCorrectionFactorsSequence";
+        dict[0x00189737UL] =  "SQRadiopharmaceuticalUsageSequence";
+        dict[0x00189738UL] =  "CSAttenuationCorrectionSource";
+        dict[0x00189739UL] =  "USNumberOfIterations";
+        dict[0x00189740UL] =  "USNumberOfSubsets";
+        dict[0x00189749UL] =  "SQPETReconstructionSequence";
+        dict[0x00189751UL] =  "SQPETFrameTypeSequence";
+        dict[0x00189755UL] =  "CSTimeOfFlightInformationUsed";
+        dict[0x00189756UL] =  "CSReconstructionType";
+        dict[0x00189758UL] =  "CSDecayCorrected";
+        dict[0x00189759UL] =  "CSAttenuationCorrected";
+        dict[0x00189760UL] =  "CSScatterCorrected";
+        dict[0x00189761UL] =  "CSDeadTimeCorrected";
+        dict[0x00189762UL] =  "CSGantryMotionCorrected";
+        dict[0x00189763UL] =  "CSPatientMotionCorrected";
+        dict[0x00189764UL] =  "CSCountLossNormalizationCorrected";
+        dict[0x00189765UL] =  "CSRandomsCorrected";
+        dict[0x00189766UL] =  "CSNonUniformRadialSamplingCorrected";
+        dict[0x00189767UL] =  "CSSensitivityCalibrated";
+        dict[0x00189768UL] =  "CSDetectorNormalizationCorrection";
+        dict[0x00189769UL] =  "CSIterativeReconstructionMethod";
+        dict[0x00189770UL] =  "CSAttenuationCorrectionTemporalRelationship";
+        dict[0x00189771UL] =  "SQPatientPhysiologicalStateSequence";
+        dict[0x00189772UL] =  "SQPatientPhysiologicalStateCodeSequence";
+        dict[0x00189801UL] =  "FDDepthsOfFocus";
+        dict[0x00189803UL] =  "SQExcludedIntervalsSequence";
+        dict[0x00189804UL] =  "DTExclusionStartDatetime";
+        dict[0x00189805UL] =  "FDExclusionDuration";
+        dict[0x00189806UL] =  "SQUSImageDescriptionSequence";
+        dict[0x00189807UL] =  "SQImageDataTypeSequence";
+        dict[0x00189808UL] =  "CSDataType";
+        dict[0x00189809UL] =  "SQTransducerScanPatternCodeSequence";
+        dict[0x0018980BUL] =  "CSAliasedDataType";
+        dict[0x0018980CUL] =  "CSPositionMeasuringDeviceUsed";
+        dict[0x0018980DUL] =  "SQTransducerGeometryCodeSequence";
+        dict[0x0018980EUL] =  "SQTransducerBeamSteeringCodeSequence";
+        dict[0x0018980FUL] =  "SQTransducerApplicationCodeSequence";
+        dict[0x0018A001UL] =  "SQContributingEquipmentSequence";
+        dict[0x0018A002UL] =  "DTContributionDateTime";
+        dict[0x0018A003UL] =  "STContributionDescription";
         dict[0x0020000DUL] =  "UIStudyInstanceUID";
         dict[0x0020000EUL] =  "UISeriesInstanceUID";
         dict[0x00200010UL] =  "SHStudyID";
@@ -535,39 +1080,300 @@ namespace MR {
         dict[0x00200013UL] =  "ISInstanceNumber";
         dict[0x00200019UL] =  "ISItemNumber";
         dict[0x00200020UL] =  "CSPatientOrientation";
-        dict[0x00200022UL] =  "ISOverlayNumber";
-        dict[0x00200024UL] =  "ISCurveNumber";
-        dict[0x00200026UL] =  "ISLookupTableNumber";
         dict[0x00200032UL] =  "DSImagePositionPatient";
         dict[0x00200037UL] =  "DSImageOrientationPatient";
-        dict[0x00200052UL] =  "UIFrameofReferenceUID";
+        dict[0x00200052UL] =  "UIFrameOfReferenceUID";
         dict[0x00200060UL] =  "CSLaterality";
         dict[0x00200062UL] =  "CSImageLaterality";
         dict[0x00200100UL] =  "ISTemporalPositionIdentifier";
-        dict[0x00200105UL] =  "ISNumberofTemporalPositions";
+        dict[0x00200105UL] =  "ISNumberOfTemporalPositions";
         dict[0x00200110UL] =  "DSTemporalResolution";
-        dict[0x00200200UL] =  "UISynchronizationFrameofReferenceUID";
-        dict[0x00201000UL] =  "ISSeriesinStudy";
-        dict[0x00201002UL] =  "ISImagesinAcquisition";
-        dict[0x00201004UL] =  "ISAcquisitionsinStudy";
+        dict[0x00200200UL] =  "UISynchronizationFrameOfReferenceUID";
+        dict[0x00200242UL] =  "UISOPInstanceUIDOfConcatenationSource";
+        dict[0x00201002UL] =  "ISImagesInAcquisition";
         dict[0x00201040UL] =  "LOPositionReferenceIndicator";
         dict[0x00201041UL] =  "DSSliceLocation";
-        dict[0x00201070UL] =  "ISOtherStudyNumbers";
-        dict[0x00201200UL] =  "ISNumberofPatientRelatedStudies";
-        dict[0x00201202UL] =  "ISNumberofPatientRelatedSeries";
-        dict[0x00201204UL] =  "ISNumberofPatientRelatedInstances";
-        dict[0x00201206UL] =  "ISNumberofStudyRelatedSeries";
-        dict[0x00201208UL] =  "ISNumberofStudyRelatedInstances";
-        dict[0x00201209UL] =  "ISNumberofSeriesRelatedInstances";
+        dict[0x00201200UL] =  "ISNumberOfPatientRelatedStudies";
+        dict[0x00201202UL] =  "ISNumberOfPatientRelatedSeries";
+        dict[0x00201204UL] =  "ISNumberOfPatientRelatedInstances";
+        dict[0x00201206UL] =  "ISNumberOfStudyRelatedSeries";
+        dict[0x00201208UL] =  "ISNumberOfStudyRelatedInstances";
+        dict[0x00201209UL] =  "ISNumberOfSeriesRelatedInstances";
         dict[0x00204000UL] =  "LTImageComments";
-        dict[0x00280002UL] =  "USSamplesperPixel";
+        dict[0x00209056UL] =  "SHStackID";
+        dict[0x00209057UL] =  "ULInStackPositionNumber";
+        dict[0x00209071UL] =  "SQFrameAnatomySequence";
+        dict[0x00209072UL] =  "CSFrameLaterality";
+        dict[0x00209111UL] =  "SQFrameContentSequence";
+        dict[0x00209113UL] =  "SQPlanePositionSequence";
+        dict[0x00209116UL] =  "SQPlaneOrientationSequence";
+        dict[0x00209128UL] =  "ULTemporalPositionIndex";
+        dict[0x00209153UL] =  "FDNominalCardiacTriggerDelayTime";
+        dict[0x00209154UL] =  "FLNominalCardiacTriggerTimePriorToRPeak";
+        dict[0x00209155UL] =  "FLActualCardiacTriggerTimePriorToRPeak";
+        dict[0x00209156UL] =  "USFrameAcquisitionNumber";
+        dict[0x00209157UL] =  "ULDimensionIndexValues";
+        dict[0x00209158UL] =  "LTFrameComments";
+        dict[0x00209161UL] =  "UIConcatenationUID";
+        dict[0x00209162UL] =  "USInConcatenationNumber";
+        dict[0x00209163UL] =  "USInConcatenationTotalNumber";
+        dict[0x00209164UL] =  "UIDimensionOrganizationUID";
+        dict[0x00209165UL] =  "ATDimensionIndexPointer";
+        dict[0x00209167UL] =  "ATFunctionalGroupPointer";
+        dict[0x00209213UL] =  "LODimensionIndexPrivateCreator";
+        dict[0x00209221UL] =  "SQDimensionOrganizationSequence";
+        dict[0x00209222UL] =  "SQDimensionIndexSequence";
+        dict[0x00209228UL] =  "ULConcatenationFrameOffsetNumber";
+        dict[0x00209238UL] =  "LOFunctionalGroupPrivateCreator";
+        dict[0x00209241UL] =  "FLNominalPercentageOfCardiacPhase";
+        dict[0x00209245UL] =  "FLNominalPercentageOfRespiratoryPhase";
+        dict[0x00209246UL] =  "FLStartingRespiratoryAmplitude";
+        dict[0x00209247UL] =  "CSStartingRespiratoryPhase";
+        dict[0x00209248UL] =  "FLEndingRespiratoryAmplitude";
+        dict[0x00209249UL] =  "CSEndingRespiratoryPhase";
+        dict[0x00209250UL] =  "CSRespiratoryTriggerType";
+        dict[0x00209251UL] =  "FDRRIntervalTimeNominal";
+        dict[0x00209252UL] =  "FDActualCardiacTriggerDelayTime";
+        dict[0x00209253UL] =  "SQRespiratorySynchronizationSequence";
+        dict[0x00209254UL] =  "FDRespiratoryIntervalTime";
+        dict[0x00209255UL] =  "FDNominalRespiratoryTriggerDelayTime";
+        dict[0x00209256UL] =  "FDRespiratoryTriggerDelayThreshold";
+        dict[0x00209257UL] =  "FDActualRespiratoryTriggerDelayTime";
+        dict[0x00209301UL] =  "FDImagePositionVolume";
+        dict[0x00209302UL] =  "FDImageOrientationVolume";
+        dict[0x00209307UL] =  "CSUltrasoundAcquisitionGeometry";
+        dict[0x00209308UL] =  "FDApexPosition";
+        dict[0x00209309UL] =  "FDVolumeToTransducerMappingMatrix";
+        dict[0x0020930AUL] =  "FDVolumeToTableMappingMatrix";
+        dict[0x0020930CUL] =  "CSPatientFrameOfReferenceSource";
+        dict[0x0020930DUL] =  "FDTemporalPositionTimeOffset";
+        dict[0x0020930EUL] =  "SQPlanePositionVolumeSequence";
+        dict[0x0020930FUL] =  "SQPlaneOrientationVolumeSequence";
+        dict[0x00209310UL] =  "SQTemporalPositionSequence";
+        dict[0x00209311UL] =  "CSDimensionOrganizationType";
+        dict[0x00209312UL] =  "UIVolumeFrameOfReferenceUID";
+        dict[0x00209313UL] =  "UITableFrameOfReferenceUID";
+        dict[0x00209421UL] =  "LODimensionDescriptionLabel";
+        dict[0x00209450UL] =  "SQPatientOrientationInFrameSequence";
+        dict[0x00209453UL] =  "LOFrameLabel";
+        dict[0x00209518UL] =  "USAcquisitionIndex";
+        dict[0x00209529UL] =  "SQContributingSOPInstancesReferenceSequence";
+        dict[0x00209536UL] =  "USReconstructionIndex";
+        dict[0x00220001UL] =  "USLightPathFilterPassThroughWavelength";
+        dict[0x00220002UL] =  "USLightPathFilterPassBand";
+        dict[0x00220003UL] =  "USImagePathFilterPassThroughWavelength";
+        dict[0x00220004UL] =  "USImagePathFilterPassBand";
+        dict[0x00220005UL] =  "CSPatientEyeMovementCommanded";
+        dict[0x00220006UL] =  "SQPatientEyeMovementCommandCodeSequence";
+        dict[0x00220007UL] =  "FLSphericalLensPower";
+        dict[0x00220008UL] =  "FLCylinderLensPower";
+        dict[0x00220009UL] =  "FLCylinderAxis";
+        dict[0x0022000AUL] =  "FLEmmetropicMagnification";
+        dict[0x0022000BUL] =  "FLIntraOcularPressure";
+        dict[0x0022000CUL] =  "FLHorizontalFieldOfView";
+        dict[0x0022000DUL] =  "CSPupilDilated";
+        dict[0x0022000EUL] =  "FLDegreeOfDilation";
+        dict[0x00220010UL] =  "FLStereoBaselineAngle";
+        dict[0x00220011UL] =  "FLStereoBaselineDisplacement";
+        dict[0x00220012UL] =  "FLStereoHorizontalPixelOffset";
+        dict[0x00220013UL] =  "FLStereoVerticalPixelOffset";
+        dict[0x00220014UL] =  "FLStereoRotation";
+        dict[0x00220015UL] =  "SQAcquisitionDeviceTypeCodeSequence";
+        dict[0x00220016UL] =  "SQIlluminationTypeCodeSequence";
+        dict[0x00220017UL] =  "SQLightPathFilterTypeStackCodeSequence";
+        dict[0x00220018UL] =  "SQImagePathFilterTypeStackCodeSequence";
+        dict[0x00220019UL] =  "SQLensesCodeSequence";
+        dict[0x0022001AUL] =  "SQChannelDescriptionCodeSequence";
+        dict[0x0022001BUL] =  "SQRefractiveStateSequence";
+        dict[0x0022001CUL] =  "SQMydriaticAgentCodeSequence";
+        dict[0x0022001DUL] =  "SQRelativeImagePositionCodeSequence";
+        dict[0x0022001EUL] =  "FLCameraAngleOfView";
+        dict[0x00220020UL] =  "SQStereoPairsSequence";
+        dict[0x00220021UL] =  "SQLeftImageSequence";
+        dict[0x00220022UL] =  "SQRightImageSequence";
+        dict[0x00220030UL] =  "FLAxialLengthOfTheEye";
+        dict[0x00220031UL] =  "SQOphthalmicFrameLocationSequence";
+        dict[0x00220032UL] =  "FLReferenceCoordinates";
+        dict[0x00220035UL] =  "FLDepthSpatialResolution";
+        dict[0x00220036UL] =  "FLMaximumDepthDistortion";
+        dict[0x00220037UL] =  "FLAlongScanSpatialResolution";
+        dict[0x00220038UL] =  "FLMaximumAlongScanDistortion";
+        dict[0x00220039UL] =  "CSOphthalmicImageOrientation";
+        dict[0x00220041UL] =  "FLDepthOfTransverseImage";
+        dict[0x00220042UL] =  "SQMydriaticAgentConcentrationUnitsSequence";
+        dict[0x00220048UL] =  "FLAcrossScanSpatialResolution";
+        dict[0x00220049UL] =  "FLMaximumAcrossScanDistortion";
+        dict[0x0022004EUL] =  "DSMydriaticAgentConcentration";
+        dict[0x00220055UL] =  "FLIlluminationWaveLength";
+        dict[0x00220056UL] =  "FLIlluminationPower";
+        dict[0x00220057UL] =  "FLIlluminationBandwidth";
+        dict[0x00220058UL] =  "SQMydriaticAgentSequence";
+        dict[0x00221007UL] =  "SQOphthalmicAxialMeasurementsRightEyeSequence";
+        dict[0x00221008UL] =  "SQOphthalmicAxialMeasurementsLeftEyeSequence";
+        dict[0x00221010UL] =  "CSOphthalmicAxialLengthMeasurementsType";
+        dict[0x00221019UL] =  "FLOphthalmicAxialLength";
+        dict[0x00221024UL] =  "SQLensStatusCodeSequence";
+        dict[0x00221025UL] =  "SQVitreousStatusCodeSequence";
+        dict[0x00221028UL] =  "SQIOLFormulaCodeSequence";
+        dict[0x00221029UL] =  "LOIOLFormulaDetail";
+        dict[0x00221033UL] =  "FLKeratometerIndex";
+        dict[0x00221035UL] =  "SQSourceOfOphthalmicAxialLengthCodeSequence";
+        dict[0x00221037UL] =  "FLTargetRefraction";
+        dict[0x00221039UL] =  "CSRefractiveProcedureOccurred";
+        dict[0x00221040UL] =  "SQRefractiveSurgeryTypeCodeSequence";
+        dict[0x00221044UL] =  "SQOphthalmicUltrasoundAxialMeasurementsTypeCodeSequence";
+        dict[0x00221050UL] =  "SQOphthalmicAxialLengthMeasurementsSequence";
+        dict[0x00221053UL] =  "FLIOLPower";
+        dict[0x00221054UL] =  "FLPredictedRefractiveError";
+        dict[0x00221059UL] =  "FLOphthalmicAxialLengthVelocity";
+        dict[0x00221065UL] =  "LOLensStatusDescription";
+        dict[0x00221066UL] =  "LOVitreousStatusDescription";
+        dict[0x00221090UL] =  "SQIOLPowerSequence";
+        dict[0x00221092UL] =  "SQLensConstantSequence";
+        dict[0x00221093UL] =  "LOIOLManufacturer";
+        dict[0x00221094UL] =  "LOLensConstantDescription";
+        dict[0x00221096UL] =  "SQKeratometryMeasurementTypeCodeSequence";
+        dict[0x00221100UL] =  "SQReferencedOphthalmicAxialMeasurementsSequence";
+        dict[0x00221101UL] =  "SQOphthalmicAxialLengthMeasurementsSegmentNameCodeSequence";
+        dict[0x00221103UL] =  "SQRefractiveErrorBeforeRefractiveSurgeryCodeSequence";
+        dict[0x00221121UL] =  "FLIOLPowerForExactEmmetropia";
+        dict[0x00221122UL] =  "FLIOLPowerForExactTargetRefraction";
+        dict[0x00221125UL] =  "SQAnteriorChamberDepthDefinitionCodeSequence";
+        dict[0x00221130UL] =  "FLLensThickness";
+        dict[0x00221131UL] =  "FLAnteriorChamberDepth";
+        dict[0x00221132UL] =  "SQSourceOfLensThicknessDataCodeSequence";
+        dict[0x00221133UL] =  "SQSourceOfAnteriorChamberDepthDataCodeSequence";
+        dict[0x00221135UL] =  "SQSourceOfRefractiveErrorDataCodeSequence";
+        dict[0x00221140UL] =  "CSOphthalmicAxialLengthMeasurementModified";
+        dict[0x00221150UL] =  "SQOphthalmicAxialLengthDataSourceCodeSequence";
+        dict[0x00221153UL] =  "SQOphthalmicAxialLengthAcquisitionMethodCodeSequence";
+        dict[0x00221155UL] =  "FLSignalToNoiseRatio";
+        dict[0x00221159UL] =  "LOOphthalmicAxialLengthDataSourceDescription";
+        dict[0x00221210UL] =  "SQOphthalmicAxialLengthMeasurementsTotalLengthSequence";
+        dict[0x00221211UL] =  "SQOphthalmicAxialLengthMeasurementsSegmentalLengthSequence";
+        dict[0x00221212UL] =  "SQOphthalmicAxialLengthMeasurementsLengthSummationSequence";
+        dict[0x00221220UL] =  "SQUltrasoundOphthalmicAxialLengthMeasurementsSequence";
+        dict[0x00221225UL] =  "SQOpticalOphthalmicAxialLengthMeasurementsSequence";
+        dict[0x00221230UL] =  "SQUltrasoundSelectedOphthalmicAxialLengthSequence";
+        dict[0x00221250UL] =  "SQOphthalmicAxialLengthSelectionMethodCodeSequence";
+        dict[0x00221255UL] =  "SQOpticalSelectedOphthalmicAxialLengthSequence";
+        dict[0x00221257UL] =  "SQSelectedSegmentalOphthalmicAxialLengthSequence";
+        dict[0x00221260UL] =  "SQSelectedTotalOphthalmicAxialLengthSequence";
+        dict[0x00221262UL] =  "SQOphthalmicAxialLengthQualityMetricSequence";
+        dict[0x00221273UL] =  "LOOphthalmicAxialLengthQualityMetricTypeDescription";
+        dict[0x00221300UL] =  "SQIntraocularLensCalculationsRightEyeSequence";
+        dict[0x00221310UL] =  "SQIntraocularLensCalculationsLeftEyeSequence";
+        dict[0x00221330UL] =  "SQReferencedOphthalmicAxialLengthMeasurementQCImageSequence";
+        dict[0x00240010UL] =  "FLVisualFieldHorizontalExtent";
+        dict[0x00240011UL] =  "FLVisualFieldVerticalExtent";
+        dict[0x00240012UL] =  "CSVisualFieldShape";
+        dict[0x00240016UL] =  "SQScreeningTestModeCodeSequence";
+        dict[0x00240018UL] =  "FLMaximumStimulusLuminance";
+        dict[0x00240020UL] =  "FLBackgroundLuminance";
+        dict[0x00240021UL] =  "SQStimulusColorCodeSequence";
+        dict[0x00240024UL] =  "SQBackgroundIlluminationColorCodeSequence";
+        dict[0x00240025UL] =  "FLStimulusArea";
+        dict[0x00240028UL] =  "FLStimulusPresentationTime";
+        dict[0x00240032UL] =  "SQFixationSequence";
+        dict[0x00240033UL] =  "SQFixationMonitoringCodeSequence";
+        dict[0x00240034UL] =  "SQVisualFieldCatchTrialSequence";
+        dict[0x00240035UL] =  "USFixationCheckedQuantity";
+        dict[0x00240036UL] =  "USPatientNotProperlyFixatedQuantity";
+        dict[0x00240037UL] =  "CSPresentedVisualStimuliDataFlag";
+        dict[0x00240038UL] =  "USNumberOfVisualStimuli";
+        dict[0x00240039UL] =  "CSExcessiveFixationLossesDataFlag";
+        dict[0x00240040UL] =  "CSExcessiveFixationLosses";
+        dict[0x00240042UL] =  "USStimuliRetestingQuantity";
+        dict[0x00240044UL] =  "LTCommentsOnPatientPerformanceOfVisualField";
+        dict[0x00240045UL] =  "CSFalseNegativesEstimateFlag";
+        dict[0x00240046UL] =  "FLFalseNegativesEstimate";
+        dict[0x00240048UL] =  "USNegativeCatchTrialsQuantity";
+        dict[0x00240050UL] =  "USFalseNegativesQuantity";
+        dict[0x00240051UL] =  "CSExcessiveFalseNegativesDataFlag";
+        dict[0x00240052UL] =  "CSExcessiveFalseNegatives";
+        dict[0x00240053UL] =  "CSFalsePositivesEstimateFlag";
+        dict[0x00240054UL] =  "FLFalsePositivesEstimate";
+        dict[0x00240055UL] =  "CSCatchTrialsDataFlag";
+        dict[0x00240056UL] =  "USPositiveCatchTrialsQuantity";
+        dict[0x00240057UL] =  "CSTestPointNormalsDataFlag";
+        dict[0x00240058UL] =  "SQTestPointNormalsSequence";
+        dict[0x00240059UL] =  "CSGlobalDeviationProbabilityNormalsFlag";
+        dict[0x00240060UL] =  "USFalsePositivesQuantity";
+        dict[0x00240061UL] =  "CSExcessiveFalsePositivesDataFlag";
+        dict[0x00240062UL] =  "CSExcessiveFalsePositives";
+        dict[0x00240063UL] =  "CSVisualFieldTestNormalsFlag";
+        dict[0x00240064UL] =  "SQResultsNormalsSequence";
+        dict[0x00240065UL] =  "SQAgeCorrectedSensitivityDeviationAlgorithmSequence";
+        dict[0x00240066UL] =  "FLGlobalDeviationFromNormal";
+        dict[0x00240067UL] =  "SQGeneralizedDefectSensitivityDeviationAlgorithmSequence";
+        dict[0x00240068UL] =  "FLLocalizedDeviationfromNormal";
+        dict[0x00240069UL] =  "LOPatientReliabilityIndicator";
+        dict[0x00240070UL] =  "FLVisualFieldMeanSensitivity";
+        dict[0x00240071UL] =  "FLGlobalDeviationProbability";
+        dict[0x00240072UL] =  "CSLocalDeviationProbabilityNormalsFlag";
+        dict[0x00240073UL] =  "FLLocalizedDeviationProbability";
+        dict[0x00240074UL] =  "CSShortTermFluctuationCalculated";
+        dict[0x00240075UL] =  "FLShortTermFluctuation";
+        dict[0x00240076UL] =  "CSShortTermFluctuationProbabilityCalculated";
+        dict[0x00240077UL] =  "FLShortTermFluctuationProbability";
+        dict[0x00240078UL] =  "CSCorrectedLocalizedDeviationFromNormalCalculated";
+        dict[0x00240079UL] =  "FLCorrectedLocalizedDeviationFromNormal";
+        dict[0x00240080UL] =  "CSCorrectedLocalizedDeviationFromNormalProbabilityCalculated";
+        dict[0x00240081UL] =  "FLCorrectedLocalizedDeviationFromNormalProbability";
+        dict[0x00240083UL] =  "SQGlobalDeviationProbabilitySequence";
+        dict[0x00240085UL] =  "SQLocalizedDeviationProbabilitySequence";
+        dict[0x00240086UL] =  "CSFovealSensitivityMeasured";
+        dict[0x00240087UL] =  "FLFovealSensitivity";
+        dict[0x00240088UL] =  "FLVisualFieldTestDuration";
+        dict[0x00240089UL] =  "SQVisualFieldTestPointSequence";
+        dict[0x00240090UL] =  "FLVisualFieldTestPointXCoordinate";
+        dict[0x00240091UL] =  "FLVisualFieldTestPointYCoordinate";
+        dict[0x00240092UL] =  "FLAgeCorrectedSensitivityDeviationValue";
+        dict[0x00240093UL] =  "CSStimulusResults";
+        dict[0x00240094UL] =  "FLSensitivityValue";
+        dict[0x00240095UL] =  "CSRetestStimulusSeen";
+        dict[0x00240096UL] =  "FLRetestSensitivityValue";
+        dict[0x00240097UL] =  "SQVisualFieldTestPointNormalsSequence";
+        dict[0x00240098UL] =  "FLQuantifiedDefect";
+        dict[0x00240100UL] =  "FLAgeCorrectedSensitivityDeviationProbabilityValue";
+        dict[0x00240102UL] =  "CSGeneralizedDefectCorrectedSensitivityDeviationFlag";
+        dict[0x00240103UL] =  "FLGeneralizedDefectCorrectedSensitivityDeviationValue";
+        dict[0x00240104UL] =  "FLGeneralizedDefectCorrectedSensitivityDeviationProbabilityValue";
+        dict[0x00240105UL] =  "FLMinimumSensitivityValue";
+        dict[0x00240106UL] =  "CSBlindSpotLocalized";
+        dict[0x00240107UL] =  "FLBlindSpotXCoordinate";
+        dict[0x00240108UL] =  "FLBlindSpotYCoordinate";
+        dict[0x00240110UL] =  "SQVisualAcuityMeasurementSequence";
+        dict[0x00240112UL] =  "SQRefractiveParametersUsedOnPatientSequence";
+        dict[0x00240113UL] =  "CSMeasurementLaterality";
+        dict[0x00240114UL] =  "SQOphthalmicPatientClinicalInformationLeftEyeSequence";
+        dict[0x00240115UL] =  "SQOphthalmicPatientClinicalInformationRightEyeSequence";
+        dict[0x00240117UL] =  "CSFovealPointNormativeDataFlag";
+        dict[0x00240118UL] =  "FLFovealPointProbabilityValue";
+        dict[0x00240120UL] =  "CSScreeningBaselineMeasured";
+        dict[0x00240122UL] =  "SQScreeningBaselineMeasuredSequence";
+        dict[0x00240124UL] =  "CSScreeningBaselineType";
+        dict[0x00240126UL] =  "FLScreeningBaselineValue";
+        dict[0x00240202UL] =  "LOAlgorithmSource";
+        dict[0x00240306UL] =  "LODataSetName";
+        dict[0x00240307UL] =  "LODataSetVersion";
+        dict[0x00240308UL] =  "LODataSetSource";
+        dict[0x00240309UL] =  "LODataSetDescription";
+        dict[0x00240317UL] =  "SQVisualFieldTestReliabilityGlobalIndexSequence";
+        dict[0x00240320UL] =  "SQVisualFieldGlobalResultsIndexSequence";
+        dict[0x00240325UL] =  "SQDataObservationSequence";
+        dict[0x00240338UL] =  "CSIndexNormalsFlag";
+        dict[0x00240341UL] =  "FLIndexProbability";
+        dict[0x00240344UL] =  "SQIndexProbabilitySequence";
+        dict[0x00280002UL] =  "USSamplesPerPixel";
+        dict[0x00280003UL] =  "USSamplesPerPixelUsed";
         dict[0x00280004UL] =  "CSPhotometricInterpretation";
         dict[0x00280006UL] =  "USPlanarConfiguration";
-        dict[0x00280008UL] =  "ISNumberofFrames";
+        dict[0x00280008UL] =  "ISNumberOfFrames";
         dict[0x00280009UL] =  "ATFrameIncrementPointer";
+        dict[0x0028000AUL] =  "ATFrameDimensionPointer";
         dict[0x00280010UL] =  "USRows";
         dict[0x00280011UL] =  "USColumns";
-        dict[0x00280012UL] =  "USPlanes";
         dict[0x00280014UL] =  "USUltrasoundColorDataPresent";
         dict[0x00280030UL] =  "DSPixelSpacing";
         dict[0x00280031UL] =  "DSZoomFactor";
@@ -578,15 +1384,18 @@ namespace MR {
         dict[0x00280101UL] =  "USBitsStored";
         dict[0x00280102UL] =  "USHighBit";
         dict[0x00280103UL] =  "USPixelRepresentation";
-        dict[0x00280106UL] =  "USSSSmallestImagePixelValue";
-        dict[0x00280107UL] =  "USSSLargestImagePixelValue";
-        dict[0x00280108UL] =  "USSSSmallestPixelValueinSeries";
-        dict[0x00280109UL] =  "USSSLargestPixelValueinSeries";
-        dict[0x00280110UL] =  "USSSSmallestImagePixelValueinPlane";
-        dict[0x00280111UL] =  "USSSLargestImagePixelValueinPlane";
-        dict[0x00280120UL] =  "USSSPixelPaddingValue";
+        dict[0x00280106UL] =  "USSmallestImagePixelValue";
+        dict[0x00280107UL] =  "USLargestImagePixelValue";
+        dict[0x00280108UL] =  "USSmallestPixelValueInSeries";
+        dict[0x00280109UL] =  "USLargestPixelValueInSeries";
+        dict[0x00280120UL] =  "USPixelPaddingValue";
+        dict[0x00280121UL] =  "USPixelPaddingRangeLimit";
         dict[0x00280300UL] =  "CSQualityControlImage";
         dict[0x00280301UL] =  "CSBurnedInAnnotation";
+        dict[0x00280302UL] =  "CSRecognizableVisualFeatures";
+        dict[0x00280303UL] =  "CSLongitudinalTemporalInformationModified";
+        dict[0x00280A02UL] =  "CSPixelSpacingCalibrationType";
+        dict[0x00280A04UL] =  "LOPixelSpacingCalibrationDescription";
         dict[0x00281040UL] =  "CSPixelIntensityRelationship";
         dict[0x00281041UL] =  "SSPixelIntensityRelationshipSign";
         dict[0x00281050UL] =  "DSWindowCenter";
@@ -595,92 +1404,131 @@ namespace MR {
         dict[0x00281053UL] =  "DSRescaleSlope";
         dict[0x00281054UL] =  "LORescaleType";
         dict[0x00281055UL] =  "LOWindowCenterWidthExplanation";
+        dict[0x00281056UL] =  "CSVOILUTFunction";
         dict[0x00281090UL] =  "CSRecommendedViewingMode";
-        dict[0x00281101UL] =  "USSSRedPaletteColorLookupTableDescriptor";
-        dict[0x00281102UL] =  "USSSGreenPaletteColorLookupTableDescriptor";
-        dict[0x00281103UL] =  "USSSBluePaletteColorLookupTableDescriptor";
+        dict[0x00281101UL] =  "USRedPaletteColorLookupTableDescriptor";
+        dict[0x00281102UL] =  "USGreenPaletteColorLookupTableDescriptor";
+        dict[0x00281103UL] =  "USBluePaletteColorLookupTableDescriptor";
+        dict[0x00281104UL] =  "USAlphaPaletteColorLookupTableDescriptor";
         dict[0x00281199UL] =  "UIPaletteColorLookupTableUID";
         dict[0x00281201UL] =  "OWRedPaletteColorLookupTableData";
         dict[0x00281202UL] =  "OWGreenPaletteColorLookupTableData";
         dict[0x00281203UL] =  "OWBluePaletteColorLookupTableData";
+        dict[0x00281204UL] =  "OWAlphaPaletteColorLookupTableData";
         dict[0x00281221UL] =  "OWSegmentedRedPaletteColorLookupTableData";
         dict[0x00281222UL] =  "OWSegmentedGreenPaletteColorLookupTableData";
         dict[0x00281223UL] =  "OWSegmentedBluePaletteColorLookupTableData";
-        dict[0x00281300UL] =  "CSImplantPresent";
+        dict[0x00281300UL] =  "CSBreastImplantPresent";
         dict[0x00281350UL] =  "CSPartialView";
         dict[0x00281351UL] =  "STPartialViewDescription";
+        dict[0x00281352UL] =  "SQPartialViewCodeSequence";
+        dict[0x0028135AUL] =  "CSSpatialLocationsPreserved";
+        dict[0x00281401UL] =  "SQDataFrameAssignmentSequence";
+        dict[0x00281402UL] =  "CSDataPathAssignment";
+        dict[0x00281403UL] =  "USBitsMappedToColorLookupTable";
+        dict[0x00281404UL] =  "SQBlendingLUT1Sequence";
+        dict[0x00281405UL] =  "CSBlendingLUT1TransferFunction";
+        dict[0x00281406UL] =  "FDBlendingWeightConstant";
+        dict[0x00281407UL] =  "USBlendingLookupTableDescriptor";
+        dict[0x00281408UL] =  "OWBlendingLookupTableData";
+        dict[0x0028140BUL] =  "SQEnhancedPaletteColorLookupTableSequence";
+        dict[0x0028140CUL] =  "SQBlendingLUT2Sequence";
+        dict[0x0028140DUL] =  "CSBlendingLUT2TransferFunction";
+        dict[0x0028140EUL] =  "CSDataPathID";
+        dict[0x0028140FUL] =  "CSRGBLUTTransferFunction";
+        dict[0x00281410UL] =  "CSAlphaLUTTransferFunction";
+        dict[0x00282000UL] =  "OBICCProfile";
         dict[0x00282110UL] =  "CSLossyImageCompression";
         dict[0x00282112UL] =  "DSLossyImageCompressionRatio";
+        dict[0x00282114UL] =  "CSLossyImageCompressionMethod";
         dict[0x00283000UL] =  "SQModalityLUTSequence";
-        dict[0x00283002UL] =  "USSSLUTDescriptor";
+        dict[0x00283002UL] =  "USLUTDescriptor";
         dict[0x00283003UL] =  "LOLUTExplanation";
         dict[0x00283004UL] =  "LOModalityLUTType";
-        dict[0x00283006UL] =  "USSSOWLUTData";
+        dict[0x00283006UL] =  "USLUTData";
         dict[0x00283010UL] =  "SQVOILUTSequence";
-        dict[0x00283110UL] =  "SQSoftcopyVOILUTSequence";
-        dict[0x00285000UL] =  "SQBiPlaneAcquisitionSequence";
+        dict[0x00283110UL] =  "SQSoftcopyVOILUTSequences";
         dict[0x00286010UL] =  "USRepresentativeFrameNumber";
-        dict[0x00286020UL] =  "USFrameNumbersofInterestFOI";
-        dict[0x00286022UL] =  "LOFramesofInterestDescription";
-        dict[0x00286030UL] =  "USMaskPointers";
+        dict[0x00286020UL] =  "USFrameNumbersOfInterest";
+        dict[0x00286022UL] =  "LOFrameOfInterestDescription";
+        dict[0x00286023UL] =  "CSFrameOfInterestType";
         dict[0x00286040UL] =  "USRWavePointer";
         dict[0x00286100UL] =  "SQMaskSubtractionSequence";
         dict[0x00286101UL] =  "CSMaskOperation";
         dict[0x00286102UL] =  "USApplicableFrameRange";
         dict[0x00286110UL] =  "USMaskFrameNumbers";
         dict[0x00286112UL] =  "USContrastFrameAveraging";
-        dict[0x00286114UL] =  "FLMaskSubpixelShift";
+        dict[0x00286114UL] =  "FLMaskSubPixelShift";
         dict[0x00286120UL] =  "SSTIDOffset";
         dict[0x00286190UL] =  "STMaskOperationExplanation";
-        dict[0x0032000AUL] =  "CSStudyStatusID";
-        dict[0x0032000CUL] =  "CSStudyPriorityID";
-        dict[0x00320012UL] =  "LOStudyIDIssuer";
-        dict[0x00320032UL] =  "DAStudyVerifiedDate";
-        dict[0x00320033UL] =  "TMStudyVerifiedTime";
-        dict[0x00320034UL] =  "DAStudyReadDate";
-        dict[0x00320035UL] =  "TMStudyReadTime";
-        dict[0x00321000UL] =  "DAScheduledStudyStartDate";
-        dict[0x00321001UL] =  "TMScheduledStudyStartTime";
-        dict[0x00321010UL] =  "DAScheduledStudyStopDate";
-        dict[0x00321011UL] =  "TMScheduledStudyStopTime";
-        dict[0x00321020UL] =  "LOScheduledStudyLocation";
-        dict[0x00321021UL] =  "AEScheduledStudyLocationAETitles";
-        dict[0x00321030UL] =  "LOReasonforStudy";
+        dict[0x00287FE0UL] =  "UTPixelDataProviderURL";
+        dict[0x00289001UL] =  "ULDataPointRows";
+        dict[0x00289002UL] =  "ULDataPointColumns";
+        dict[0x00289003UL] =  "CSSignalDomainColumnsue";
+        dict[0x00289108UL] =  "CSDataRepresentation";
+        dict[0x00289110UL] =  "SQPixelMeasuresSequence";
+        dict[0x00289132UL] =  "SQFrameVOILUTSequence";
+        dict[0x00289145UL] =  "SQPixelValueTransformationSequence";
+        dict[0x00289235UL] =  "CSSignalDomainRows";
+        dict[0x00289411UL] =  "FLDisplayFilterPercentage";
+        dict[0x00289415UL] =  "SQFramePixelShiftSequence";
+        dict[0x00289416UL] =  "USSubtractionItemID";
+        dict[0x00289422UL] =  "SQPixelIntensityRelationshipLUTSequence";
+        dict[0x00289443UL] =  "SQFramePixelDataPropertiesSequence";
+        dict[0x00289444UL] =  "CSGeometricalProperties";
+        dict[0x00289445UL] =  "FLGeometricMaximumDistortion";
+        dict[0x00289446UL] =  "CSImageProcessingApplied";
+        dict[0x00289454UL] =  "CSMaskSelectionMode";
+        dict[0x00289474UL] =  "CSLUTFunction";
+        dict[0x00289478UL] =  "FLMaskVisibilityPercentage";
+        dict[0x00289501UL] =  "SQPixelShiftSequence";
+        dict[0x00289502UL] =  "SQRegionPixelShiftSequence";
+        dict[0x00289503UL] =  "SSVerticesOfTheRegion";
+        dict[0x00289505UL] =  "SQMultiFramePresentationSequence";
+        dict[0x00289506UL] =  "USPixelShiftFrameRange";
+        dict[0x00289507UL] =  "USLUTFrameRange";
+        dict[0x00289520UL] =  "DSImageToEquipmentMappingMatrix";
+        dict[0x00289537UL] =  "CSEquipmentCoordinateSystemIdentification";
+        dict[0x00290010UL] =  "LOPrivateCreatorCode";
+        dict[0x00290011UL] =  "LOAnotherPrivateCreatorCode";
+        dict[0x00291008UL] =  "CSCSAImageHeaderType";
+        dict[0x00291009UL] =  "LOCSAImageHeaderVersion";
+        dict[0x00291010UL] =  "OBCSAImageHeaderInfo";
+        dict[0x00291018UL] =  "CSCSASeriesHeaderType";
+        dict[0x00291019UL] =  "LOCSASeriesHeaderVersion";
+        dict[0x00291020UL] =  "OBCSASeriesHeaderInfo";
+        dict[0x00291131UL] =  "LOPMTFInformation1";
+        dict[0x00291132UL] =  "ULPMTFInformation2";
+        dict[0x00291133UL] =  "ULPMTFInformation3";
+        dict[0x00291134UL] =  "CSPMTFInformation4";
+        dict[0x7fe11010UL] =  "OBCSAData";
+        dict[0x00321031UL] =  "SQRequestingPhysicianIdentificationSequence";
         dict[0x00321032UL] =  "PNRequestingPhysician";
         dict[0x00321033UL] =  "LORequestingService";
-        dict[0x00321040UL] =  "DAStudyArrivalDate";
-        dict[0x00321041UL] =  "TMStudyArrivalTime";
-        dict[0x00321050UL] =  "DAStudyCompletionDate";
-        dict[0x00321051UL] =  "TMStudyCompletionTime";
-        dict[0x00321055UL] =  "CSStudyComponentStatusID";
+        dict[0x00321034UL] =  "SQRequestingServiceCodeSequence";
         dict[0x00321060UL] =  "LORequestedProcedureDescription";
         dict[0x00321064UL] =  "SQRequestedProcedureCodeSequence";
         dict[0x00321070UL] =  "LORequestedContrastAgent";
-        dict[0x00324000UL] =  "LTStudyComments";
         dict[0x00380004UL] =  "SQReferencedPatientAliasSequence";
         dict[0x00380008UL] =  "CSVisitStatusID";
         dict[0x00380010UL] =  "LOAdmissionID";
-        dict[0x00380011UL] =  "LOIssuerofAdmissionID";
-        dict[0x00380016UL] =  "LORouteofAdmissions";
-        dict[0x0038001AUL] =  "DAScheduledAdmissionDate";
-        dict[0x0038001BUL] =  "TMScheduledAdmissionTime";
-        dict[0x0038001CUL] =  "DAScheduledDischargeDate";
-        dict[0x0038001DUL] =  "TMScheduledDischargeTime";
-        dict[0x0038001EUL] =  "LOScheduledPatientInstitutionResidence";
+        dict[0x00380014UL] =  "SQIssuerOfAdmissionIDSequence";
+        dict[0x00380016UL] =  "LORouteOfAdmissionsesidence";
         dict[0x00380020UL] =  "DAAdmittingDate";
         dict[0x00380021UL] =  "TMAdmittingTime";
-        dict[0x00380030UL] =  "DADischargeDate";
-        dict[0x00380032UL] =  "TMDischargeTime";
-        dict[0x00380040UL] =  "LODischargeDiagnosisDescription";
-        dict[0x00380044UL] =  "SQDischargeDiagnosisCodeSequence";
         dict[0x00380050UL] =  "LOSpecialNeeds";
+        dict[0x00380060UL] =  "LOServiceEpisodeID";
+        dict[0x00380062UL] =  "LOServiceEpisodeDescription";
+        dict[0x00380064UL] =  "SQIssuerOfServiceEpisodeIDSequence";
+        dict[0x00380100UL] =  "SQPertinentDocumentsSequence";
         dict[0x00380300UL] =  "LOCurrentPatientLocation";
-        dict[0x00380400UL] =  "LOPatientsInstitutionResidence";
+        dict[0x00380400UL] =  "LOPatientInstitutionResidence";
         dict[0x00380500UL] =  "LOPatientState";
+        dict[0x00380502UL] =  "SQPatientClinicalTrialParticipationSequence";
         dict[0x00384000UL] =  "LTVisitComments";
         dict[0x003A0004UL] =  "CSWaveformOriginality";
-        dict[0x003A0005UL] =  "USNumberofWaveformChannels";
-        dict[0x003A0010UL] =  "ULNumberofWaveformSamples";
+        dict[0x003A0005UL] =  "USNumberOfWaveformChannels";
+        dict[0x003A0010UL] =  "ULNumberOfWaveformSamples";
         dict[0x003A001AUL] =  "DSSamplingFrequency";
         dict[0x003A0020UL] =  "SHMultiplexGroupLabel";
         dict[0x003A0200UL] =  "SQChannelDefinitionSequence";
@@ -703,20 +1551,43 @@ namespace MR {
         dict[0x003A0221UL] =  "DSFilterHighFrequency";
         dict[0x003A0222UL] =  "DSNotchFilterFrequency";
         dict[0x003A0223UL] =  "DSNotchFilterBandwidth";
+        dict[0x003A0230UL] =  "FLWaveformDataDisplayScale";
+        dict[0x003A0231UL] =  "USWaveformDisplayBackgroundCIELabValue";
+        dict[0x003A0240UL] =  "SQWaveformPresentationGroupSequence";
+        dict[0x003A0241UL] =  "USPresentationGroupNumber";
+        dict[0x003A0242UL] =  "SQChannelDisplaySequence";
+        dict[0x003A0244UL] =  "USChannelRecommendedDisplayCIELabValue";
+        dict[0x003A0245UL] =  "FLChannelPosition";
+        dict[0x003A0246UL] =  "CSDisplayShadingFlag";
+        dict[0x003A0247UL] =  "FLFractionalChannelDisplayScale";
+        dict[0x003A0248UL] =  "FLAbsoluteChannelDisplayScale";
+        dict[0x003A0300UL] =  "SQMultiplexedAudioChannelsDescriptionCodeSequence";
+        dict[0x003A0301UL] =  "ISChannelIdentificationCode";
+        dict[0x003A0302UL] =  "CSChannelMode";
         dict[0x00400001UL] =  "AEScheduledStationAETitle";
         dict[0x00400002UL] =  "DAScheduledProcedureStepStartDate";
         dict[0x00400003UL] =  "TMScheduledProcedureStepStartTime";
         dict[0x00400004UL] =  "DAScheduledProcedureStepEndDate";
         dict[0x00400005UL] =  "TMScheduledProcedureStepEndTime";
-        dict[0x00400006UL] =  "PNScheduledPerformingPhysiciansName";
+        dict[0x00400006UL] =  "PNScheduledPerformingPhysicianName";
         dict[0x00400007UL] =  "LOScheduledProcedureStepDescription";
         dict[0x00400008UL] =  "SQScheduledProtocolCodeSequence";
         dict[0x00400009UL] =  "SHScheduledProcedureStepID";
         dict[0x0040000AUL] =  "SQStageCodeSequence";
+        dict[0x0040000BUL] =  "SQScheduledPerformingPhysicianIdentificationSequence";
         dict[0x00400010UL] =  "SHScheduledStationName";
         dict[0x00400011UL] =  "SHScheduledProcedureStepLocation";
         dict[0x00400012UL] =  "LOPreMedication";
         dict[0x00400020UL] =  "CSScheduledProcedureStepStatus";
+        dict[0x00400026UL] =  "SQOrderPlacerIdentifierSequence";
+        dict[0x00400027UL] =  "SQOrderFillerIdentifierSequence";
+        dict[0x00400031UL] =  "UTLocalNamespaceEntityID";
+        dict[0x00400032UL] =  "UTUniversalEntityID";
+        dict[0x00400033UL] =  "CSUniversalEntityIDType";
+        dict[0x00400035UL] =  "CSIdentifierTypeCode";
+        dict[0x00400036UL] =  "SQAssigningFacilitySequence";
+        dict[0x00400039UL] =  "SQAssigningJurisdictionCodeSequence";
+        dict[0x0040003AUL] =  "SQAssigningAgencyOrDepartmentCodeSequence";
         dict[0x00400100UL] =  "SQScheduledProcedureStepSequence";
         dict[0x00400220UL] =  "SQReferencedNonImageCompositeSOPInstanceSequence";
         dict[0x00400241UL] =  "AEPerformedStationAETitle";
@@ -731,73 +1602,91 @@ namespace MR {
         dict[0x00400254UL] =  "LOPerformedProcedureStepDescription";
         dict[0x00400255UL] =  "LOPerformedProcedureTypeDescription";
         dict[0x00400260UL] =  "SQPerformedProtocolCodeSequence";
+        dict[0x00400261UL] =  "CSPerformedProtocolType";
         dict[0x00400270UL] =  "SQScheduledStepAttributesSequence";
         dict[0x00400275UL] =  "SQRequestAttributesSequence";
-        dict[0x00400280UL] =  "STCommentsonthePerformedProcedureStep";
+        dict[0x00400280UL] =  "STCommentsOnThePerformedProcedureStep";
+        dict[0x00400281UL] =  "SQPerformedProcedureStepDiscontinuationReasonCodeSequence";
         dict[0x00400293UL] =  "SQQuantitySequence";
         dict[0x00400294UL] =  "DSQuantity";
         dict[0x00400295UL] =  "SQMeasuringUnitsSequence";
         dict[0x00400296UL] =  "SQBillingItemSequence";
-        dict[0x00400300UL] =  "USTotalTimeofFluoroscopy";
-        dict[0x00400301UL] =  "USTotalNumberofExposures";
+        dict[0x00400300UL] =  "USTotalTimeOfFluoroscopy";
+        dict[0x00400301UL] =  "USTotalNumberOfExposures";
         dict[0x00400302UL] =  "USEntranceDose";
         dict[0x00400303UL] =  "USExposedArea";
-        dict[0x00400306UL] =  "DSDistanceSourcetoEntrance";
-        dict[0x00400307UL] =  "DSDistanceSourcetoSupport";
+        dict[0x00400306UL] =  "DSDistanceSourceToEntrance";
         dict[0x0040030EUL] =  "SQExposureDoseSequence";
-        dict[0x00400310UL] =  "STCommentsonRadiationDose";
+        dict[0x00400310UL] =  "STCommentsOnRadiationDose";
         dict[0x00400312UL] =  "DSXRayOutput";
         dict[0x00400314UL] =  "DSHalfValueLayer";
         dict[0x00400316UL] =  "DSOrganDose";
         dict[0x00400318UL] =  "CSOrganExposed";
         dict[0x00400320UL] =  "SQBillingProcedureStepSequence";
         dict[0x00400321UL] =  "SQFilmConsumptionSequence";
-        dict[0x00400324UL] =  "SQBillingSuppliesandDevicesSequence";
-        dict[0x00400330UL] =  "SQReferencedProcedureStepSequence";
+        dict[0x00400324UL] =  "SQBillingSuppliesAndDevicesSequence";
         dict[0x00400340UL] =  "SQPerformedSeriesSequence";
-        dict[0x00400400UL] =  "LTCommentsontheScheduledProcedureStep";
-        dict[0x0040050AUL] =  "LOSpecimenAccessionNumber";
-        dict[0x00400550UL] =  "SQSpecimenSequence";
-        dict[0x00400551UL] =  "LOSpecimenIdentifier";
+        dict[0x00400400UL] =  "LTCommentsOnTheScheduledProcedureStep";
+        dict[0x00400440UL] =  "SQProtocolContextSequence";
+        dict[0x00400441UL] =  "SQContentItemModifierSequence";
+        dict[0x00400500UL] =  "SQScheduledSpecimenSequence";
+        dict[0x00400512UL] =  "LOContainerIdentifier";
+        dict[0x00400513UL] =  "SQIssuerOfTheContainerIdentifierSequence";
+        dict[0x00400515UL] =  "SQAlternateContainerIdentifierSequence";
+        dict[0x00400518UL] =  "SQContainerTypeCodeSequence";
+        dict[0x0040051AUL] =  "LOContainerDescription";
+        dict[0x00400520UL] =  "SQContainerComponentSequence";
+        dict[0x00400551UL] =  "LOSpecimenIdentifiernceTrial";
+        dict[0x00400554UL] =  "UISpecimenUID";
         dict[0x00400555UL] =  "SQAcquisitionContextSequence";
         dict[0x00400556UL] =  "STAcquisitionContextDescription";
+        dict[0x00400560UL] =  "SQSpecimenDescriptionSequence";
+        dict[0x00400562UL] =  "SQIssuerOfTheSpecimenIdentifierSequence";
         dict[0x0040059AUL] =  "SQSpecimenTypeCodeSequence";
-        dict[0x004006FAUL] =  "LOSlideIdentifier";
+        dict[0x00400600UL] =  "LOSpecimenShortDescription";
+        dict[0x00400602UL] =  "UTSpecimenDetailedDescription";
+        dict[0x00400610UL] =  "SQSpecimenPreparationSequence";
+        dict[0x00400612UL] =  "SQSpecimenPreparationStepContentItemSequence";
+        dict[0x00400620UL] =  "SQSpecimenLocalizationContentItemSequence";
         dict[0x0040071AUL] =  "SQImageCenterPointCoordinatesSequence";
-        dict[0x0040072AUL] =  "DSXoffsetinSlideCoordinateSystem";
-        dict[0x0040073AUL] =  "DSYoffsetinSlideCoordinateSystem";
-        dict[0x0040074AUL] =  "DSZoffsetinSlideCoordinateSystem";
-        dict[0x004008D8UL] =  "SQPixelSpacingSequence";
-        dict[0x004008DAUL] =  "SQCoordinateSystemAxisCodeSequence";
+        dict[0x0040072AUL] =  "DSXOffsetInSlideCoordinateSystem";
+        dict[0x0040073AUL] =  "DSYOffsetInSlideCoordinateSystem";
+        dict[0x0040074AUL] =  "DSZOffsetInSlideCoordinateSystem";
         dict[0x004008EAUL] =  "SQMeasurementUnitsCodeSequence";
         dict[0x00401001UL] =  "SHRequestedProcedureID";
-        dict[0x00401002UL] =  "LOReasonfortheRequestedProcedure";
+        dict[0x00401002UL] =  "LOReasonForTheRequestedProcedure";
         dict[0x00401003UL] =  "SHRequestedProcedurePriority";
         dict[0x00401004UL] =  "LOPatientTransportArrangements";
         dict[0x00401005UL] =  "LORequestedProcedureLocation";
         dict[0x00401008UL] =  "LOConfidentialityCode";
         dict[0x00401009UL] =  "SHReportingPriority";
-        dict[0x00401010UL] =  "PNNamesofIntendedRecipientsofResults";
+        dict[0x0040100AUL] =  "SQReasonForRequestedProcedureCodeSequence";
+        dict[0x00401010UL] =  "PNNamesOfIntendedRecipientsOfResults";
+        dict[0x00401011UL] =  "SQIntendedRecipientsOfResultsIdentificationSequence";
+        dict[0x00401012UL] =  "SQReasonForPerformedProcedureCodeSequence";
+        dict[0x00401101UL] =  "SQPersonIdentificationCodeSequence";
+        dict[0x00401102UL] =  "STPersonAddress";
+        dict[0x00401103UL] =  "LOPersonTelephoneNumbers";
         dict[0x00401400UL] =  "LTRequestedProcedureComments";
-        dict[0x00402001UL] =  "LOReasonfortheImagingServiceRequest";
-        dict[0x00402004UL] =  "DAIssueDateofImagingServiceRequest";
-        dict[0x00402005UL] =  "TMIssueTimeofImagingServiceRequest";
+        dict[0x00402004UL] =  "DAIssueDateOfImagingServiceRequest";
+        dict[0x00402005UL] =  "TMIssueTimeOfImagingServiceRequest";
         dict[0x00402008UL] =  "PNOrderEnteredBy";
-        dict[0x00402009UL] =  "SHOrderEnterersLocation";
+        dict[0x00402009UL] =  "SHOrderEntererLocation";
         dict[0x00402010UL] =  "SHOrderCallbackPhoneNumber";
         dict[0x00402016UL] =  "LOPlacerOrderNumberImagingServiceRequest";
         dict[0x00402017UL] =  "LOFillerOrderNumberImagingServiceRequest";
         dict[0x00402400UL] =  "LTImagingServiceRequestComments";
-        dict[0x00403001UL] =  "LOConfidentialityConstraintonPatientDataDescription";
+        dict[0x00403001UL] =  "LOConfidentialityConstraintOnPatientDataDescription";
         dict[0x00404001UL] =  "CSGeneralPurposeScheduledProcedureStepStatus";
         dict[0x00404002UL] =  "CSGeneralPurposePerformedProcedureStepStatus";
         dict[0x00404003UL] =  "CSGeneralPurposeScheduledProcedureStepPriority";
         dict[0x00404004UL] =  "SQScheduledProcessingApplicationsCodeSequence";
-        dict[0x00404005UL] =  "DTScheduledProcedureStepStartDateandTime";
+        dict[0x00404005UL] =  "DTScheduledProcedureStepStartDateTime";
         dict[0x00404006UL] =  "CSMultipleCopiesFlag";
         dict[0x00404007UL] =  "SQPerformedProcessingApplicationsCodeSequence";
         dict[0x00404009UL] =  "SQHumanPerformerCodeSequence";
-        dict[0x00404011UL] =  "DTExpectedCompletionDateandTime";
+        dict[0x00404010UL] =  "DTScheduledProcedureStepModificationDateTime";
+        dict[0x00404011UL] =  "DTExpectedCompletionDateTime";
         dict[0x00404015UL] =  "SQResultingGeneralPurposePerformedProcedureStepsSequence";
         dict[0x00404016UL] =  "SQReferencedGeneralPurposeScheduledProcedureStepSequence";
         dict[0x00404018UL] =  "SQScheduledWorkitemCodeSequence";
@@ -817,18 +1706,38 @@ namespace MR {
         dict[0x00404033UL] =  "SQOutputInformationSequence";
         dict[0x00404034UL] =  "SQScheduledHumanPerformersSequence";
         dict[0x00404035UL] =  "SQActualHumanPerformersSequence";
-        dict[0x00404036UL] =  "LOHumanPerformersOrganization";
-        dict[0x00404037UL] =  "PNHumanPerformersName";
-        dict[0x00408302UL] =  "DSEntranceDoseinmGy";
+        dict[0x00404036UL] =  "LOHumanPerformerOrganization";
+        dict[0x00404037UL] =  "PNHumanPerformerName";
+        dict[0x00404040UL] =  "CSRawDataHandling";
+        dict[0x00404041UL] =  "CSInputReadinessState";
+        dict[0x00404050UL] =  "DTPerformedProcedureStepStartDateTime";
+        dict[0x00404051UL] =  "DTPerformedProcedureStepEndDateTime";
+        dict[0x00404052UL] =  "DTProcedureStepCancellationDateTime";
+        dict[0x00408302UL] =  "DSEntranceDoseInmGy";
+        dict[0x00409094UL] =  "SQReferencedImageRealWorldValueMappingSequence";
+        dict[0x00409096UL] =  "SQRealWorldValueMappingSequence";
+        dict[0x00409098UL] =  "SQPixelValueMappingCodeSequence";
+        dict[0x00409210UL] =  "SHLUTLabel";
+        dict[0x00409211UL] =  "USRealWorldValueLastValueMapped";
+        dict[0x00409212UL] =  "FDRealWorldValueLUTData";
+        dict[0x00409216UL] =  "USRealWorldValueFirstValueMapped";
+        dict[0x00409224UL] =  "FDRealWorldValueIntercept";
+        dict[0x00409225UL] =  "FDRealWorldValueSlope";
         dict[0x0040A010UL] =  "CSRelationshipType";
-        dict[0x0040A027UL] =  "LOVerifyingOrganization";
+        dict[0x0040A027UL] =  "LOVerifyingOrganizationentifierCodeSequenceTrial";
         dict[0x0040A030UL] =  "DTVerificationDateTime";
         dict[0x0040A032UL] =  "DTObservationDateTime";
         dict[0x0040A040UL] =  "CSValueType";
-        dict[0x0040A043UL] =  "SQConceptnameCodeSequence";
+        dict[0x0040A043UL] =  "SQConceptNameCodeSequence";
         dict[0x0040A050UL] =  "CSContinuityOfContent";
         dict[0x0040A073UL] =  "SQVerifyingObserverSequence";
-        dict[0x0040A075UL] =  "PNVerifyingObserverName";
+        dict[0x0040A075UL] =  "PNVerifyingObserverNameierCodeSequenceTrial";
+        dict[0x0040A078UL] =  "SQAuthorObserverSequence";
+        dict[0x0040A07AUL] =  "SQParticipantSequence";
+        dict[0x0040A07CUL] =  "SQCustodialOrganizationSequence";
+        dict[0x0040A080UL] =  "CSParticipationType";
+        dict[0x0040A082UL] =  "DTParticipationDateTime";
+        dict[0x0040A084UL] =  "CSObserverType";
         dict[0x0040A088UL] =  "SQVerifyingObserverIdentificationCodeSequence";
         dict[0x0040A0B0UL] =  "USReferencedWaveformChannels";
         dict[0x0040A120UL] =  "DTDateTime";
@@ -840,43 +1749,188 @@ namespace MR {
         dict[0x0040A132UL] =  "ULReferencedSamplePositions";
         dict[0x0040A136UL] =  "USReferencedFrameNumbers";
         dict[0x0040A138UL] =  "DSReferencedTimeOffsets";
-        dict[0x0040A13AUL] =  "DTReferencedDatetime";
+        dict[0x0040A13AUL] =  "DTReferencedDateTime";
         dict[0x0040A160UL] =  "UTTextValue";
         dict[0x0040A168UL] =  "SQConceptCodeSequence";
-        dict[0x0040A170UL] =  "SQPurposeofReferenceCodeSequence";
+        dict[0x0040A170UL] =  "SQPurposeOfReferenceCodeSequence";
         dict[0x0040A180UL] =  "USAnnotationGroupNumber";
         dict[0x0040A195UL] =  "SQModifierCodeSequence";
         dict[0x0040A300UL] =  "SQMeasuredValueSequence";
+        dict[0x0040A301UL] =  "SQNumericValueQualifierCodeSequence";
         dict[0x0040A30AUL] =  "DSNumericValue";
         dict[0x0040A360UL] =  "SQPredecessorDocumentsSequence";
         dict[0x0040A370UL] =  "SQReferencedRequestSequence";
         dict[0x0040A372UL] =  "SQPerformedProcedureCodeSequence";
         dict[0x0040A375UL] =  "SQCurrentRequestedProcedureEvidenceSequence";
         dict[0x0040A385UL] =  "SQPertinentOtherEvidenceSequence";
+        dict[0x0040A390UL] =  "SQHL7StructuredDocumentReferenceSequencealeSequenceTrial";
         dict[0x0040A491UL] =  "CSCompletionFlag";
         dict[0x0040A492UL] =  "LOCompletionFlagDescription";
         dict[0x0040A493UL] =  "CSVerificationFlag";
+        dict[0x0040A494UL] =  "CSArchiveRequested";
+        dict[0x0040A496UL] =  "CSPreliminaryFlag";
         dict[0x0040A504UL] =  "SQContentTemplateSequence";
-        dict[0x0040A525UL] =  "SQIdenticalDocumentsSequence";
-        dict[0x0040A730UL] =  "SQContentSequence";
-        dict[0x0040B020UL] =  "SQAnnotationSequence";
-        dict[0x0040DB00UL] =  "CSTemplateIdentifier";
-        dict[0x0040DB06UL] =  "DTTemplateVersion";
-        dict[0x0040DB07UL] =  "DTTemplateLocalVersion";
-        dict[0x0040DB0BUL] =  "CSTemplateExtensionFlag";
-        dict[0x0040DB0CUL] =  "UITemplateExtensionOrganizationUID";
-        dict[0x0040DB0DUL] =  "UITemplateExtensionCreatorUID";
+        dict[0x0040A525UL] =  "SQIdenticalDocumentsSequencelagTrial";
+        dict[0x0040A730UL] =  "SQContentSequenceenceTrialall";
+        dict[0x0040B020UL] =  "SQWaveformAnnotationSequence";
+        dict[0x0040DB00UL] =  "CSTemplateIdentifierionUID";
         dict[0x0040DB73UL] =  "ULReferencedContentItemIdentifier";
+        dict[0x0040E001UL] =  "STHL7InstanceIdentifier";
+        dict[0x0040E004UL] =  "DTHL7DocumentEffectiveTime";
+        dict[0x0040E006UL] =  "SQHL7DocumentTypeCodeSequence";
+        dict[0x0040E008UL] =  "SQDocumentClassCodeSequence";
+        dict[0x0040E010UL] =  "UTRetrieveURI";
+        dict[0x0040E011UL] =  "UIRetrieveLocationUID";
+        dict[0x0040E020UL] =  "CSTypeOfInstances";
+        dict[0x0040E021UL] =  "SQDICOMRetrievalSequence";
+        dict[0x0040E022UL] =  "SQDICOMMediaRetrievalSequence";
+        dict[0x0040E023UL] =  "SQWADORetrievalSequence";
+        dict[0x0040E024UL] =  "SQXDSRetrievalSequence";
+        dict[0x0040E030UL] =  "UIRepositoryUniqueID";
+        dict[0x0040E031UL] =  "UIHomeCommunityID";
+        dict[0x00420010UL] =  "STDocumentTitle";
+        dict[0x00420011UL] =  "OBEncapsulatedDocument";
+        dict[0x00420012UL] =  "LOMIMETypeOfEncapsulatedDocument";
+        dict[0x00420013UL] =  "SQSourceInstanceSequence";
+        dict[0x00420014UL] =  "LOListOfMIMETypes";
+        dict[0x00440001UL] =  "STProductPackageIdentifier";
+        dict[0x00440002UL] =  "CSSubstanceAdministrationApproval";
+        dict[0x00440003UL] =  "LTApprovalStatusFurtherDescription";
+        dict[0x00440004UL] =  "DTApprovalStatusDateTime";
+        dict[0x00440007UL] =  "SQProductTypeCodeSequence";
+        dict[0x00440008UL] =  "LOProductName";
+        dict[0x00440009UL] =  "LTProductDescription";
+        dict[0x0044000AUL] =  "LOProductLotIdentifier";
+        dict[0x0044000BUL] =  "DTProductExpirationDateTime";
+        dict[0x00440010UL] =  "DTSubstanceAdministrationDateTime";
+        dict[0x00440011UL] =  "LOSubstanceAdministrationNotes";
+        dict[0x00440012UL] =  "LOSubstanceAdministrationDeviceID";
+        dict[0x00440013UL] =  "SQProductParameterSequence";
+        dict[0x00440019UL] =  "SQSubstanceAdministrationParameterSequence";
+        dict[0x00460012UL] =  "LOLensDescription";
+        dict[0x00460014UL] =  "SQRightLensSequence";
+        dict[0x00460015UL] =  "SQLeftLensSequence";
+        dict[0x00460016UL] =  "SQUnspecifiedLateralityLensSequence";
+        dict[0x00460018UL] =  "SQCylinderSequence";
+        dict[0x00460028UL] =  "SQPrismSequence";
+        dict[0x00460030UL] =  "FDHorizontalPrismPower";
+        dict[0x00460032UL] =  "CSHorizontalPrismBase";
+        dict[0x00460034UL] =  "FDVerticalPrismPower";
+        dict[0x00460036UL] =  "CSVerticalPrismBase";
+        dict[0x00460038UL] =  "CSLensSegmentType";
+        dict[0x00460040UL] =  "FDOpticalTransmittance";
+        dict[0x00460042UL] =  "FDChannelWidth";
+        dict[0x00460044UL] =  "FDPupilSize";
+        dict[0x00460046UL] =  "FDCornealSize";
+        dict[0x00460050UL] =  "SQAutorefractionRightEyeSequence";
+        dict[0x00460052UL] =  "SQAutorefractionLeftEyeSequence";
+        dict[0x00460060UL] =  "FDDistancePupillaryDistance";
+        dict[0x00460062UL] =  "FDNearPupillaryDistance";
+        dict[0x00460063UL] =  "FDIntermediatePupillaryDistance";
+        dict[0x00460064UL] =  "FDOtherPupillaryDistance";
+        dict[0x00460070UL] =  "SQKeratometryRightEyeSequence";
+        dict[0x00460071UL] =  "SQKeratometryLeftEyeSequence";
+        dict[0x00460074UL] =  "SQSteepKeratometricAxisSequence";
+        dict[0x00460075UL] =  "FDRadiusOfCurvature";
+        dict[0x00460076UL] =  "FDKeratometricPower";
+        dict[0x00460077UL] =  "FDKeratometricAxis";
+        dict[0x00460080UL] =  "SQFlatKeratometricAxisSequence";
+        dict[0x00460092UL] =  "CSBackgroundColor";
+        dict[0x00460094UL] =  "CSOptotype";
+        dict[0x00460095UL] =  "CSOptotypePresentation";
+        dict[0x00460097UL] =  "SQSubjectiveRefractionRightEyeSequence";
+        dict[0x00460098UL] =  "SQSubjectiveRefractionLeftEyeSequence";
+        dict[0x00460100UL] =  "SQAddNearSequence";
+        dict[0x00460101UL] =  "SQAddIntermediateSequence";
+        dict[0x00460102UL] =  "SQAddOtherSequence";
+        dict[0x00460104UL] =  "FDAddPower";
+        dict[0x00460106UL] =  "FDViewingDistance";
+        dict[0x00460121UL] =  "SQVisualAcuityTypeCodeSequence";
+        dict[0x00460122UL] =  "SQVisualAcuityRightEyeSequence";
+        dict[0x00460123UL] =  "SQVisualAcuityLeftEyeSequence";
+        dict[0x00460124UL] =  "SQVisualAcuityBothEyesOpenSequence";
+        dict[0x00460125UL] =  "CSViewingDistanceType";
+        dict[0x00460135UL] =  "SSVisualAcuityModifiers";
+        dict[0x00460137UL] =  "FDDecimalVisualAcuity";
+        dict[0x00460139UL] =  "LOOptotypeDetailedDefinition";
+        dict[0x00460145UL] =  "SQReferencedRefractiveMeasurementsSequence";
+        dict[0x00460146UL] =  "FDSpherePower";
+        dict[0x00460147UL] =  "FDCylinderPower";
+        dict[0x00480001UL] =  "FLImagedVolumeWidth";
+        dict[0x00480002UL] =  "FLImagedVolumeHeight";
+        dict[0x00480003UL] =  "FLImagedVolumeDepth";
+        dict[0x00480006UL] =  "ULTotalPixelMatrixColumns";
+        dict[0x00480007UL] =  "ULTotalPixelMatrixRows";
+        dict[0x00480008UL] =  "SQTotalPixelMatrixOriginSequence";
+        dict[0x00480010UL] =  "CSSpecimenLabelInImage";
+        dict[0x00480011UL] =  "CSFocusMethod";
+        dict[0x00480012UL] =  "CSExtendedDepthOfField";
+        dict[0x00480013UL] =  "USNumberOfFocalPlanes";
+        dict[0x00480014UL] =  "FLDistanceBetweenFocalPlanes";
+        dict[0x00480015UL] =  "USRecommendedAbsentPixelCIELabValue";
+        dict[0x00480100UL] =  "SQIlluminatorTypeCodeSequence";
+        dict[0x00480102UL] =  "DSImageOrientationSlide";
+        dict[0x00480105UL] =  "SQOpticalPathSequence";
+        dict[0x00480106UL] =  "SHOpticalPathIdentifier";
+        dict[0x00480107UL] =  "STOpticalPathDescription";
+        dict[0x00480108UL] =  "SQIlluminationColorCodeSequence";
+        dict[0x00480110UL] =  "SQSpecimenReferenceSequence";
+        dict[0x00480111UL] =  "DSCondenserLensPower";
+        dict[0x00480112UL] =  "DSObjectiveLensPower";
+        dict[0x00480113UL] =  "DSObjectiveLensNumericalAperture";
+        dict[0x00480120UL] =  "SQPaletteColorLookupTableSequence";
+        dict[0x00480200UL] =  "SQReferencedImageNavigationSequence";
+        dict[0x00480201UL] =  "USTopLeftHandCornerOfLocalizerArea";
+        dict[0x00480202UL] =  "USBottomRightHandCornerOfLocalizerArea";
+        dict[0x00480207UL] =  "SQOpticalPathIdentificationSequence";
+        dict[0x0048021AUL] =  "SQPlanePositionSlideSequence";
+        dict[0x0048021EUL] =  "SLRowPositionInTotalImagePixelMatrix";
+        dict[0x0048021FUL] =  "SLColumnPositionInTotalImagePixelMatrix";
+        dict[0x00480301UL] =  "CSPixelOriginInterpretation";
         dict[0x00500004UL] =  "CSCalibrationImage";
         dict[0x00500010UL] =  "SQDeviceSequence";
+        dict[0x00500012UL] =  "SQContainerComponentTypeCodeSequence";
+        dict[0x00500013UL] =  "FDContainerComponentThickness";
         dict[0x00500014UL] =  "DSDeviceLength";
+        dict[0x00500015UL] =  "FDContainerComponentWidth";
         dict[0x00500016UL] =  "DSDeviceDiameter";
         dict[0x00500017UL] =  "CSDeviceDiameterUnits";
         dict[0x00500018UL] =  "DSDeviceVolume";
-        dict[0x00500019UL] =  "DSIntermarkerDistance";
+        dict[0x00500019UL] =  "DSInterMarkerDistance";
+        dict[0x0050001AUL] =  "CSContainerComponentMaterial";
+        dict[0x0050001BUL] =  "LOContainerComponentID";
+        dict[0x0050001CUL] =  "FDContainerComponentLength";
+        dict[0x0050001DUL] =  "FDContainerComponentDiameter";
+        dict[0x0050001EUL] =  "LOContainerComponentDescription";
         dict[0x00500020UL] =  "LODeviceDescription";
+        dict[0x00520001UL] =  "FLContrastBolusIngredientPercentByVolume";
+        dict[0x00520002UL] =  "FDOCTFocalDistance";
+        dict[0x00520003UL] =  "FDBeamSpotSize";
+        dict[0x00520004UL] =  "FDEffectiveRefractiveIndex";
+        dict[0x00520006UL] =  "CSOCTAcquisitionDomain";
+        dict[0x00520007UL] =  "FDOCTOpticalCenterWavelength";
+        dict[0x00520008UL] =  "FDAxialResolution";
+        dict[0x00520009UL] =  "FDRangingDepth";
+        dict[0x00520011UL] =  "FDALineRate";
+        dict[0x00520012UL] =  "USALinesPerFrame";
+        dict[0x00520013UL] =  "FDCatheterRotationalRate";
+        dict[0x00520014UL] =  "FDALinePixelSpacing";
+        dict[0x00520016UL] =  "SQModeOfPercutaneousAccessSequence";
+        dict[0x00520025UL] =  "SQIntravascularOCTFrameTypeSequence";
+        dict[0x00520026UL] =  "CSOCTZOffsetApplied";
+        dict[0x00520027UL] =  "SQIntravascularFrameContentSequence";
+        dict[0x00520028UL] =  "FDIntravascularLongitudinalDistance";
+        dict[0x00520029UL] =  "SQIntravascularOCTFrameContentSequence";
+        dict[0x00520030UL] =  "SSOCTZOffsetCorrection";
+        dict[0x00520031UL] =  "CSCatheterDirectionOfRotation";
+        dict[0x00520033UL] =  "FDSeamLineLocation";
+        dict[0x00520034UL] =  "FDFirstALineLocation";
+        dict[0x00520036UL] =  "USSeamLineIndex";
+        dict[0x00520038UL] =  "USNumberOfPaddedAlines";
+        dict[0x00520039UL] =  "CSInterpolationType";
+        dict[0x0052003AUL] =  "CSRefractiveIndexApplied";
         dict[0x00540010UL] =  "USEnergyWindowVector";
-        dict[0x00540011UL] =  "USNumberofEnergyWindows";
+        dict[0x00540011UL] =  "USNumberOfEnergyWindows";
         dict[0x00540012UL] =  "SQEnergyWindowInformationSequence";
         dict[0x00540013UL] =  "SQEnergyWindowRangeSequence";
         dict[0x00540014UL] =  "DSEnergyWindowLowerLimit";
@@ -885,35 +1939,36 @@ namespace MR {
         dict[0x00540017UL] =  "ISResidualSyringeCounts";
         dict[0x00540018UL] =  "SHEnergyWindowName";
         dict[0x00540020UL] =  "USDetectorVector";
-        dict[0x00540021UL] =  "USNumberofDetectors";
+        dict[0x00540021UL] =  "USNumberOfDetectors";
         dict[0x00540022UL] =  "SQDetectorInformationSequence";
         dict[0x00540030UL] =  "USPhaseVector";
-        dict[0x00540031UL] =  "USNumberofPhases";
+        dict[0x00540031UL] =  "USNumberOfPhases";
         dict[0x00540032UL] =  "SQPhaseInformationSequence";
-        dict[0x00540033UL] =  "USNumberofFramesinPhase";
+        dict[0x00540033UL] =  "USNumberOfFramesInPhase";
         dict[0x00540036UL] =  "ISPhaseDelay";
         dict[0x00540038UL] =  "ISPauseBetweenFrames";
+        dict[0x00540039UL] =  "CSPhaseDescription";
         dict[0x00540050UL] =  "USRotationVector";
-        dict[0x00540051UL] =  "USNumberofRotations";
+        dict[0x00540051UL] =  "USNumberOfRotations";
         dict[0x00540052UL] =  "SQRotationInformationSequence";
-        dict[0x00540053UL] =  "USNumberofFramesinRotation";
+        dict[0x00540053UL] =  "USNumberOfFramesInRotation";
         dict[0x00540060UL] =  "USRRIntervalVector";
-        dict[0x00540061UL] =  "USNumberofRRIntervals";
+        dict[0x00540061UL] =  "USNumberOfRRIntervals";
         dict[0x00540062UL] =  "SQGatedInformationSequence";
         dict[0x00540063UL] =  "SQDataInformationSequence";
         dict[0x00540070UL] =  "USTimeSlotVector";
-        dict[0x00540071UL] =  "USNumberofTimeSlots";
+        dict[0x00540071UL] =  "USNumberOfTimeSlots";
         dict[0x00540072UL] =  "SQTimeSlotInformationSequence";
         dict[0x00540073UL] =  "DSTimeSlotTime";
         dict[0x00540080UL] =  "USSliceVector";
-        dict[0x00540081UL] =  "USNumberofSlices";
+        dict[0x00540081UL] =  "USNumberOfSlices";
         dict[0x00540090UL] =  "USAngularViewVector";
         dict[0x00540100UL] =  "USTimeSliceVector";
-        dict[0x00540101UL] =  "USNumberofTimeSlices";
+        dict[0x00540101UL] =  "USNumberOfTimeSlices";
         dict[0x00540200UL] =  "DSStartAngle";
-        dict[0x00540202UL] =  "CSTypeofDetectorMotion";
+        dict[0x00540202UL] =  "CSTypeOfDetectorMotion";
         dict[0x00540210UL] =  "ISTriggerVector";
-        dict[0x00540211UL] =  "USNumberofTriggersinPhase";
+        dict[0x00540211UL] =  "USNumberOfTriggersInPhase";
         dict[0x00540220UL] =  "SQViewCodeSequence";
         dict[0x00540222UL] =  "SQViewModifierCodeSequence";
         dict[0x00540300UL] =  "SQRadionuclideCodeSequence";
@@ -925,15 +1980,17 @@ namespace MR {
         dict[0x00540410UL] =  "SQPatientOrientationCodeSequence";
         dict[0x00540412UL] =  "SQPatientOrientationModifierCodeSequence";
         dict[0x00540414UL] =  "SQPatientGantryRelationshipCodeSequence";
+        dict[0x00540500UL] =  "CSSliceProgressionDirection";
         dict[0x00541000UL] =  "CSSeriesType";
         dict[0x00541001UL] =  "CSUnits";
         dict[0x00541002UL] =  "CSCountsSource";
         dict[0x00541004UL] =  "CSReprojectionMethod";
+        dict[0x00541006UL] =  "CSSUVType";
         dict[0x00541100UL] =  "CSRandomsCorrectionMethod";
         dict[0x00541101UL] =  "LOAttenuationCorrectionMethod";
         dict[0x00541102UL] =  "CSDecayCorrection";
         dict[0x00541103UL] =  "LOReconstructionMethod";
-        dict[0x00541104UL] =  "LODetectorLinesofResponseUsed";
+        dict[0x00541104UL] =  "LODetectorLinesOfResponseUsed";
         dict[0x00541105UL] =  "LOScatterCorrectionMethod";
         dict[0x00541200UL] =  "DSAxialAcceptance";
         dict[0x00541201UL] =  "ISAxialMash";
@@ -950,15 +2007,151 @@ namespace MR {
         dict[0x00541323UL] =  "DSScatterFractionFactor";
         dict[0x00541324UL] =  "DSDeadTimeFactor";
         dict[0x00541330UL] =  "USImageIndex";
-        dict[0x00541400UL] =  "CSCountsIncluded";
-        dict[0x00541401UL] =  "CSDeadTimeCorrectionFlag";
         dict[0x00603000UL] =  "SQHistogramSequence";
-        dict[0x00603002UL] =  "USHistogramNumberofBins";
-        dict[0x00603004UL] =  "USSSHistogramFirstBinValue";
-        dict[0x00603006UL] =  "USSSHistogramLastBinValue";
+        dict[0x00603002UL] =  "USHistogramNumberOfBins";
+        dict[0x00603004UL] =  "USHistogramFirstBinValue";
+        dict[0x00603006UL] =  "USHistogramLastBinValue";
         dict[0x00603008UL] =  "USHistogramBinWidth";
         dict[0x00603010UL] =  "LOHistogramExplanation";
         dict[0x00603020UL] =  "ULHistogramData";
+        dict[0x00620001UL] =  "CSSegmentationType";
+        dict[0x00620002UL] =  "SQSegmentSequence";
+        dict[0x00620003UL] =  "SQSegmentedPropertyCategoryCodeSequence";
+        dict[0x00620004UL] =  "USSegmentNumber";
+        dict[0x00620005UL] =  "LOSegmentLabel";
+        dict[0x00620006UL] =  "STSegmentDescription";
+        dict[0x00620008UL] =  "CSSegmentAlgorithmType";
+        dict[0x00620009UL] =  "LOSegmentAlgorithmName";
+        dict[0x0062000AUL] =  "SQSegmentIdentificationSequence";
+        dict[0x0062000BUL] =  "USReferencedSegmentNumber";
+        dict[0x0062000CUL] =  "USRecommendedDisplayGrayscaleValue";
+        dict[0x0062000DUL] =  "USRecommendedDisplayCIELabValue";
+        dict[0x0062000EUL] =  "USMaximumFractionalValue";
+        dict[0x0062000FUL] =  "SQSegmentedPropertyTypeCodeSequence";
+        dict[0x00620010UL] =  "CSSegmentationFractionalType";
+        dict[0x00640002UL] =  "SQDeformableRegistrationSequence";
+        dict[0x00640003UL] =  "UISourceFrameOfReferenceUID";
+        dict[0x00640005UL] =  "SQDeformableRegistrationGridSequence";
+        dict[0x00640007UL] =  "ULGridDimensions";
+        dict[0x00640008UL] =  "FDGridResolution";
+        dict[0x00640009UL] =  "OFVectorGridData";
+        dict[0x0064000FUL] =  "SQPreDeformationMatrixRegistrationSequence";
+        dict[0x00640010UL] =  "SQPostDeformationMatrixRegistrationSequence";
+        dict[0x00660001UL] =  "ULNumberOfSurfaces";
+        dict[0x00660002UL] =  "SQSurfaceSequence";
+        dict[0x00660003UL] =  "ULSurfaceNumber";
+        dict[0x00660004UL] =  "LTSurfaceComments";
+        dict[0x00660009UL] =  "CSSurfaceProcessing";
+        dict[0x0066000AUL] =  "FLSurfaceProcessingRatio";
+        dict[0x0066000BUL] =  "LOSurfaceProcessingDescription";
+        dict[0x0066000CUL] =  "FLRecommendedPresentationOpacity";
+        dict[0x0066000DUL] =  "CSRecommendedPresentationType";
+        dict[0x0066000EUL] =  "CSFiniteVolume";
+        dict[0x00660010UL] =  "CSManifold";
+        dict[0x00660011UL] =  "SQSurfacePointsSequence";
+        dict[0x00660012UL] =  "SQSurfacePointsNormalsSequence";
+        dict[0x00660013UL] =  "SQSurfaceMeshPrimitivesSequence";
+        dict[0x00660015UL] =  "ULNumberOfSurfacePoints";
+        dict[0x00660016UL] =  "OFPointCoordinatesData";
+        dict[0x00660017UL] =  "FLPointPositionAccuracy";
+        dict[0x00660018UL] =  "FLMeanPointDistance";
+        dict[0x00660019UL] =  "FLMaximumPointDistance";
+        dict[0x0066001AUL] =  "FLPointsBoundingBoxCoordinates";
+        dict[0x0066001BUL] =  "FLAxisOfRotation";
+        dict[0x0066001CUL] =  "FLCenterOfRotation";
+        dict[0x0066001EUL] =  "ULNumberOfVectors";
+        dict[0x0066001FUL] =  "USVectorDimensionality";
+        dict[0x00660020UL] =  "FLVectorAccuracy";
+        dict[0x00660021UL] =  "OFVectorCoordinateData";
+        dict[0x00660023UL] =  "OWTrianglePointIndexList";
+        dict[0x00660024UL] =  "OWEdgePointIndexList";
+        dict[0x00660025UL] =  "OWVertexPointIndexList";
+        dict[0x00660026UL] =  "SQTriangleStripSequence";
+        dict[0x00660027UL] =  "SQTriangleFanSequence";
+        dict[0x00660028UL] =  "SQLineSequence";
+        dict[0x00660029UL] =  "OWPrimitivePointIndexList";
+        dict[0x0066002AUL] =  "ULSurfaceCount";
+        dict[0x0066002BUL] =  "SQReferencedSurfaceSequence";
+        dict[0x0066002CUL] =  "ULReferencedSurfaceNumber";
+        dict[0x0066002DUL] =  "SQSegmentSurfaceGenerationAlgorithmIdentificationSequence";
+        dict[0x0066002EUL] =  "SQSegmentSurfaceSourceInstanceSequence";
+        dict[0x0066002FUL] =  "SQAlgorithmFamilyCodeSequence";
+        dict[0x00660030UL] =  "SQAlgorithmNameCodeSequence";
+        dict[0x00660031UL] =  "LOAlgorithmVersion";
+        dict[0x00660032UL] =  "LTAlgorithmParameters";
+        dict[0x00660034UL] =  "SQFacetSequence";
+        dict[0x00660035UL] =  "SQSurfaceProcessingAlgorithmIdentificationSequence";
+        dict[0x00660036UL] =  "LOAlgorithmName";
+        dict[0x00686210UL] =  "LOImplantSize";
+        dict[0x00686221UL] =  "LOImplantTemplateVersion";
+        dict[0x00686222UL] =  "SQReplacedImplantTemplateSequence";
+        dict[0x00686223UL] =  "CSImplantType";
+        dict[0x00686224UL] =  "SQDerivationImplantTemplateSequence";
+        dict[0x00686225UL] =  "SQOriginalImplantTemplateSequence";
+        dict[0x00686226UL] =  "DTEffectiveDateTime";
+        dict[0x00686230UL] =  "SQImplantTargetAnatomySequence";
+        dict[0x00686260UL] =  "SQInformationFromManufacturerSequence";
+        dict[0x00686265UL] =  "SQNotificationFromManufacturerSequencerSequence";
+        dict[0x00686270UL] =  "DTInformationIssueDateTime";
+        dict[0x00686280UL] =  "STInformationSummary";
+        dict[0x006862A0UL] =  "SQImplantRegulatoryDisapprovalCodeSequence";
+        dict[0x006862A5UL] =  "FDOverallTemplateSpatialTolerance";
+        dict[0x006862C0UL] =  "SQHPGLDocumentSequence";
+        dict[0x006862D0UL] =  "USHPGLDocumentID";
+        dict[0x006862D5UL] =  "LOHPGLDocumentLabel";
+        dict[0x006862E0UL] =  "SQViewOrientationCodeSequence";
+        dict[0x006862F0UL] =  "FDViewOrientationModifier";
+        dict[0x006862F2UL] =  "FDHPGLDocumentScaling";
+        dict[0x00686300UL] =  "OBHPGLDocument";
+        dict[0x00686310UL] =  "USHPGLContourPenNumber";
+        dict[0x00686320UL] =  "SQHPGLPenSequence";
+        dict[0x00686330UL] =  "USHPGLPenNumber";
+        dict[0x00686340UL] =  "LOHPGLPenLabel";
+        dict[0x00686345UL] =  "STHPGLPenDescription";
+        dict[0x00686346UL] =  "FDRecommendedRotationPoint";
+        dict[0x00686347UL] =  "FDBoundingRectangle";
+        dict[0x00686350UL] =  "USImplantTemplate3DModelSurfaceNumber";
+        dict[0x00686360UL] =  "SQSurfaceModelDescriptionSequence";
+        dict[0x00686380UL] =  "LOSurfaceModelLabel";
+        dict[0x00686390UL] =  "FDSurfaceModelScalingFactor";
+        dict[0x006863A0UL] =  "SQMaterialsCodeSequence";
+        dict[0x006863A4UL] =  "SQCoatingMaterialsCodeSequence";
+        dict[0x006863A8UL] =  "SQImplantTypeCodeSequence";
+        dict[0x006863ACUL] =  "SQFixationMethodCodeSequence";
+        dict[0x006863B0UL] =  "SQMatingFeatureSetsSequence";
+        dict[0x006863C0UL] =  "USMatingFeatureSetID";
+        dict[0x006863D0UL] =  "LOMatingFeatureSetLabel";
+        dict[0x006863E0UL] =  "SQMatingFeatureSequence";
+        dict[0x006863F0UL] =  "USMatingFeatureID";
+        dict[0x00686400UL] =  "SQMatingFeatureDegreeOfFreedomSequence";
+        dict[0x00686410UL] =  "USDegreeOfFreedomID";
+        dict[0x00686420UL] =  "CSDegreeOfFreedomType";
+        dict[0x00686430UL] =  "SQTwoDMatingFeatureCoordinatesSequence";
+        dict[0x00686440UL] =  "USReferencedHPGLDocumentID";
+        dict[0x00686450UL] =  "FDTwoDMatingPoint";
+        dict[0x00686460UL] =  "FDTwoDMatingAxes";
+        dict[0x00686470UL] =  "SQTwoDDegreeOfFreedomSequence";
+        dict[0x00686490UL] =  "FDThreeDDegreeOfFreedomAxis";
+        dict[0x006864A0UL] =  "FDRangeOfFreedom";
+        dict[0x006864C0UL] =  "FDThreeDMatingPoint";
+        dict[0x006864D0UL] =  "FDThreeDMatingAxes";
+        dict[0x006864F0UL] =  "FDTwoDDegreeOfFreedomAxis";
+        dict[0x00686500UL] =  "SQPlanningLandmarkPointSequence";
+        dict[0x00686510UL] =  "SQPlanningLandmarkLineSequence";
+        dict[0x00686520UL] =  "SQPlanningLandmarkPlaneSequence";
+        dict[0x00686530UL] =  "USPlanningLandmarkID";
+        dict[0x00686540UL] =  "LOPlanningLandmarkDescription";
+        dict[0x00686545UL] =  "SQPlanningLandmarkIdentificationCodeSequence";
+        dict[0x00686550UL] =  "SQTwoDPointCoordinatesSequence";
+        dict[0x00686560UL] =  "FDTwoDPointCoordinates";
+        dict[0x00686590UL] =  "FDThreeDPointCoordinates";
+        dict[0x006865A0UL] =  "SQTwoDLineCoordinatesSequence";
+        dict[0x006865B0UL] =  "FDTwoDLineCoordinates";
+        dict[0x006865D0UL] =  "FDThreeDLineCoordinates";
+        dict[0x006865E0UL] =  "SQTwoDPlaneCoordinatesSequence";
+        dict[0x006865F0UL] =  "FDTwoDPlaneIntersection";
+        dict[0x00686610UL] =  "FDThreeDPlaneOrigin";
+        dict[0x00686620UL] =  "FDThreeDPlaneNormal";
         dict[0x00700001UL] =  "SQGraphicAnnotationSequence";
         dict[0x00700002UL] =  "CSGraphicLayer";
         dict[0x00700003UL] =  "CSBoundingBoxAnnotationUnits";
@@ -973,72 +2166,340 @@ namespace MR {
         dict[0x00700014UL] =  "FLAnchorPoint";
         dict[0x00700015UL] =  "CSAnchorPointVisibility";
         dict[0x00700020UL] =  "USGraphicDimensions";
-        dict[0x00700021UL] =  "USNumberofGraphicPoints";
+        dict[0x00700021UL] =  "USNumberOfGraphicPoints";
         dict[0x00700022UL] =  "FLGraphicData";
         dict[0x00700023UL] =  "CSGraphicType";
         dict[0x00700024UL] =  "CSGraphicFilled";
         dict[0x00700041UL] =  "CSImageHorizontalFlip";
-        dict[0x00700042UL] =  "USImageRotation";
+        dict[0x00700042UL] =  "USImageRotationCornerTrialandCornerTrial";
         dict[0x00700052UL] =  "SLDisplayedAreaTopLeftHandCorner";
         dict[0x00700053UL] =  "SLDisplayedAreaBottomRightHandCorner";
         dict[0x0070005AUL] =  "SQDisplayedAreaSelectionSequence";
         dict[0x00700060UL] =  "SQGraphicLayerSequence";
         dict[0x00700062UL] =  "ISGraphicLayerOrder";
-        dict[0x00700066UL] =  "USGraphicLayerRecommendedDisplayGrayscaleValue";
-        dict[0x00700067UL] =  "USGraphicLayerRecommendedDisplayRGBValue";
+        dict[0x00700066UL] =  "USGraphicLayerRecommendedDisplayGrayscaleValueDisplayRGBValue";
         dict[0x00700068UL] =  "LOGraphicLayerDescription";
-        dict[0x00700080UL] =  "CSPresentationLabel";
-        dict[0x00700081UL] =  "LOPresentationDescription";
+        dict[0x00700080UL] =  "CSContentLabel";
+        dict[0x00700081UL] =  "LOContentDescription";
         dict[0x00700082UL] =  "DAPresentationCreationDate";
         dict[0x00700083UL] =  "TMPresentationCreationTime";
-        dict[0x00700084UL] =  "PNPresentationCreatorsName";
+        dict[0x00700084UL] =  "PNContentCreatorName";
+        dict[0x00700086UL] =  "SQContentCreatorIdentificationCodeSequence";
+        dict[0x00700087UL] =  "SQAlternateContentDescriptionSequence";
         dict[0x00700100UL] =  "CSPresentationSizeMode";
         dict[0x00700101UL] =  "DSPresentationPixelSpacing";
         dict[0x00700102UL] =  "ISPresentationPixelAspectRatio";
         dict[0x00700103UL] =  "FLPresentationPixelMagnificationRatio";
-        dict[0x00880130UL] =  "SHStorageMediaFilesetID";
-        dict[0x00880140UL] =  "UIStorageMediaFilesetUID";
+        dict[0x00700207UL] =  "LOGraphicGroupLabel";
+        dict[0x00700208UL] =  "STGraphicGroupDescription";
+        dict[0x00700209UL] =  "SQCompoundGraphicSequence";
+        dict[0x00700226UL] =  "ULCompoundGraphicInstanceID";
+        dict[0x00700227UL] =  "LOFontName";
+        dict[0x00700228UL] =  "CSFontNameType";
+        dict[0x00700229UL] =  "LOCSSFontName";
+        dict[0x00700230UL] =  "FDRotationAngle";
+        dict[0x00700231UL] =  "SQTextStyleSequence";
+        dict[0x00700232UL] =  "SQLineStyleSequence";
+        dict[0x00700233UL] =  "SQFillStyleSequence";
+        dict[0x00700234UL] =  "SQGraphicGroupSequence";
+        dict[0x00700241UL] =  "USTextColorCIELabValue";
+        dict[0x00700242UL] =  "CSHorizontalAlignment";
+        dict[0x00700243UL] =  "CSVerticalAlignment";
+        dict[0x00700244UL] =  "CSShadowStyle";
+        dict[0x00700245UL] =  "FLShadowOffsetX";
+        dict[0x00700246UL] =  "FLShadowOffsetY";
+        dict[0x00700247UL] =  "USShadowColorCIELabValue";
+        dict[0x00700248UL] =  "CSUnderlined";
+        dict[0x00700249UL] =  "CSBold";
+        dict[0x00700250UL] =  "CSItalic";
+        dict[0x00700251UL] =  "USPatternOnColorCIELabValue";
+        dict[0x00700252UL] =  "USPatternOffColorCIELabValue";
+        dict[0x00700253UL] =  "FLLineThickness";
+        dict[0x00700254UL] =  "CSLineDashingStyle";
+        dict[0x00700255UL] =  "ULLinePattern";
+        dict[0x00700256UL] =  "OBFillPattern";
+        dict[0x00700257UL] =  "CSFillMode";
+        dict[0x00700258UL] =  "FLShadowOpacity";
+        dict[0x00700261UL] =  "FLGapLength";
+        dict[0x00700262UL] =  "FLDiameterOfVisibility";
+        dict[0x00700273UL] =  "FLRotationPoint";
+        dict[0x00700274UL] =  "CSTickAlignment";
+        dict[0x00700278UL] =  "CSShowTickLabel";
+        dict[0x00700279UL] =  "CSTickLabelAlignment";
+        dict[0x00700282UL] =  "CSCompoundGraphicUnits";
+        dict[0x00700284UL] =  "FLPatternOnOpacity";
+        dict[0x00700285UL] =  "FLPatternOffOpacity";
+        dict[0x00700287UL] =  "SQMajorTicksSequence";
+        dict[0x00700288UL] =  "FLTickPosition";
+        dict[0x00700289UL] =  "SHTickLabel";
+        dict[0x00700294UL] =  "CSCompoundGraphicType";
+        dict[0x00700295UL] =  "ULGraphicGroupID";
+        dict[0x00700306UL] =  "CSShapeType";
+        dict[0x00700308UL] =  "SQRegistrationSequence";
+        dict[0x00700309UL] =  "SQMatrixRegistrationSequence";
+        dict[0x0070030AUL] =  "SQMatrixSequence";
+        dict[0x0070030CUL] =  "CSFrameOfReferenceTransformationMatrixType";
+        dict[0x0070030DUL] =  "SQRegistrationTypeCodeSequence";
+        dict[0x0070030FUL] =  "STFiducialDescription";
+        dict[0x00700310UL] =  "SHFiducialIdentifier";
+        dict[0x00700311UL] =  "SQFiducialIdentifierCodeSequence";
+        dict[0x00700312UL] =  "FDContourUncertaintyRadius";
+        dict[0x00700314UL] =  "SQUsedFiducialsSequence";
+        dict[0x00700318UL] =  "SQGraphicCoordinatesDataSequence";
+        dict[0x0070031AUL] =  "UIFiducialUID";
+        dict[0x0070031CUL] =  "SQFiducialSetSequence";
+        dict[0x0070031EUL] =  "SQFiducialSequence";
+        dict[0x00700401UL] =  "USGraphicLayerRecommendedDisplayCIELabValue";
+        dict[0x00700402UL] =  "SQBlendingSequence";
+        dict[0x00700403UL] =  "FLRelativeOpacity";
+        dict[0x00700404UL] =  "SQReferencedSpatialRegistrationSequence";
+        dict[0x00700405UL] =  "CSBlendingPosition";
+        dict[0x00720002UL] =  "SHHangingProtocolName";
+        dict[0x00720004UL] =  "LOHangingProtocolDescription";
+        dict[0x00720006UL] =  "CSHangingProtocolLevel";
+        dict[0x00720008UL] =  "LOHangingProtocolCreator";
+        dict[0x0072000AUL] =  "DTHangingProtocolCreationDateTime";
+        dict[0x0072000CUL] =  "SQHangingProtocolDefinitionSequence";
+        dict[0x0072000EUL] =  "SQHangingProtocolUserIdentificationCodeSequence";
+        dict[0x00720010UL] =  "LOHangingProtocolUserGroupName";
+        dict[0x00720012UL] =  "SQSourceHangingProtocolSequence";
+        dict[0x00720014UL] =  "USNumberOfPriorsReferenced";
+        dict[0x00720020UL] =  "SQImageSetsSequence";
+        dict[0x00720022UL] =  "SQImageSetSelectorSequence";
+        dict[0x00720024UL] =  "CSImageSetSelectorUsageFlag";
+        dict[0x00720026UL] =  "ATSelectorAttribute";
+        dict[0x00720028UL] =  "USSelectorValueNumber";
+        dict[0x00720030UL] =  "SQTimeBasedImageSetsSequence";
+        dict[0x00720032UL] =  "USImageSetNumber";
+        dict[0x00720034UL] =  "CSImageSetSelectorCategory";
+        dict[0x00720038UL] =  "USRelativeTime";
+        dict[0x0072003AUL] =  "CSRelativeTimeUnits";
+        dict[0x0072003CUL] =  "SSAbstractPriorValue";
+        dict[0x0072003EUL] =  "SQAbstractPriorCodeSequence";
+        dict[0x00720040UL] =  "LOImageSetLabel";
+        dict[0x00720050UL] =  "CSSelectorAttributeVR";
+        dict[0x00720052UL] =  "ATSelectorSequencePointer";
+        dict[0x00720054UL] =  "LOSelectorSequencePointerPrivateCreator";
+        dict[0x00720056UL] =  "LOSelectorAttributePrivateCreator";
+        dict[0x00720060UL] =  "ATSelectorATValue";
+        dict[0x00720062UL] =  "CSSelectorCSValue";
+        dict[0x00720064UL] =  "ISSelectorISValue";
+        dict[0x00720066UL] =  "LOSelectorLOValue";
+        dict[0x00720068UL] =  "LTSelectorLTValue";
+        dict[0x0072006AUL] =  "PNSelectorPNValue";
+        dict[0x0072006CUL] =  "SHSelectorSHValue";
+        dict[0x0072006EUL] =  "STSelectorSTValue";
+        dict[0x00720070UL] =  "UTSelectorUTValue";
+        dict[0x00720072UL] =  "DSSelectorDSValue";
+        dict[0x00720074UL] =  "FDSelectorFDValue";
+        dict[0x00720076UL] =  "FLSelectorFLValue";
+        dict[0x00720078UL] =  "ULSelectorULValue";
+        dict[0x0072007AUL] =  "USSelectorUSValue";
+        dict[0x0072007CUL] =  "SLSelectorSLValue";
+        dict[0x0072007EUL] =  "SSSelectorSSValue";
+        dict[0x00720080UL] =  "SQSelectorCodeSequenceValue";
+        dict[0x00720100UL] =  "USNumberOfScreens";
+        dict[0x00720102UL] =  "SQNominalScreenDefinitionSequence";
+        dict[0x00720104UL] =  "USNumberOfVerticalPixels";
+        dict[0x00720106UL] =  "USNumberOfHorizontalPixels";
+        dict[0x00720108UL] =  "FDDisplayEnvironmentSpatialPosition";
+        dict[0x0072010AUL] =  "USScreenMinimumGrayscaleBitDepth";
+        dict[0x0072010CUL] =  "USScreenMinimumColorBitDepth";
+        dict[0x0072010EUL] =  "USApplicationMaximumRepaintTime";
+        dict[0x00720200UL] =  "SQDisplaySetsSequence";
+        dict[0x00720202UL] =  "USDisplaySetNumber";
+        dict[0x00720203UL] =  "LODisplaySetLabel";
+        dict[0x00720204UL] =  "USDisplaySetPresentationGroup";
+        dict[0x00720206UL] =  "LODisplaySetPresentationGroupDescription";
+        dict[0x00720208UL] =  "CSPartialDataDisplayHandling";
+        dict[0x00720210UL] =  "SQSynchronizedScrollingSequence";
+        dict[0x00720212UL] =  "USDisplaySetScrollingGroup";
+        dict[0x00720214UL] =  "SQNavigationIndicatorSequence";
+        dict[0x00720216UL] =  "USNavigationDisplaySet";
+        dict[0x00720218UL] =  "USReferenceDisplaySets";
+        dict[0x00720300UL] =  "SQImageBoxesSequence";
+        dict[0x00720302UL] =  "USImageBoxNumber";
+        dict[0x00720304UL] =  "CSImageBoxLayoutType";
+        dict[0x00720306UL] =  "USImageBoxTileHorizontalDimension";
+        dict[0x00720308UL] =  "USImageBoxTileVerticalDimension";
+        dict[0x00720310UL] =  "CSImageBoxScrollDirection";
+        dict[0x00720312UL] =  "CSImageBoxSmallScrollType";
+        dict[0x00720314UL] =  "USImageBoxSmallScrollAmount";
+        dict[0x00720316UL] =  "CSImageBoxLargeScrollType";
+        dict[0x00720318UL] =  "USImageBoxLargeScrollAmount";
+        dict[0x00720320UL] =  "USImageBoxOverlapPriority";
+        dict[0x00720330UL] =  "FDCineRelativeToRealTime";
+        dict[0x00720400UL] =  "SQFilterOperationsSequence";
+        dict[0x00720402UL] =  "CSFilterByCategory";
+        dict[0x00720404UL] =  "CSFilterByAttributePresence";
+        dict[0x00720406UL] =  "CSFilterByOperator";
+        dict[0x00720420UL] =  "USStructuredDisplayBackgroundCIELabValue";
+        dict[0x00720421UL] =  "USEmptyImageBoxCIELabValue";
+        dict[0x00720422UL] =  "SQStructuredDisplayImageBoxSequence";
+        dict[0x00720424UL] =  "SQStructuredDisplayTextBoxSequence";
+        dict[0x00720427UL] =  "SQReferencedFirstFrameSequence";
+        dict[0x00720430UL] =  "SQImageBoxSynchronizationSequence";
+        dict[0x00720432UL] =  "USSynchronizedImageBoxList";
+        dict[0x00720434UL] =  "CSTypeOfSynchronization";
+        dict[0x00720500UL] =  "CSBlendingOperationType";
+        dict[0x00720510UL] =  "CSReformattingOperationType";
+        dict[0x00720512UL] =  "FDReformattingThickness";
+        dict[0x00720514UL] =  "FDReformattingInterval";
+        dict[0x00720516UL] =  "CSReformattingOperationInitialViewDirection";
+        dict[0x00720520UL] =  "CSThreeDRenderingType";
+        dict[0x00720600UL] =  "SQSortingOperationsSequence";
+        dict[0x00720602UL] =  "CSSortByCategory";
+        dict[0x00720604UL] =  "CSSortingDirection";
+        dict[0x00720700UL] =  "CSDisplaySetPatientOrientation";
+        dict[0x00720702UL] =  "CSVOIType";
+        dict[0x00720704UL] =  "CSPseudoColorType";
+        dict[0x00720705UL] =  "SQPseudoColorPaletteInstanceReferenceSequence";
+        dict[0x00720706UL] =  "CSShowGrayscaleInverted";
+        dict[0x00720710UL] =  "CSShowImageTrueSizeFlag";
+        dict[0x00720712UL] =  "CSShowGraphicAnnotationFlag";
+        dict[0x00720714UL] =  "CSShowPatientDemographicsFlag";
+        dict[0x00720716UL] =  "CSShowAcquisitionTechniquesFlag";
+        dict[0x00720717UL] =  "CSDisplaySetHorizontalJustification";
+        dict[0x00720718UL] =  "CSDisplaySetVerticalJustification";
+        dict[0x00740120UL] =  "FDContinuationStartMeterset";
+        dict[0x00740121UL] =  "FDContinuationEndMeterset";
+        dict[0x00741000UL] =  "CSProcedureStepState";
+        dict[0x00741002UL] =  "SQProcedureStepProgressInformationSequence";
+        dict[0x00741004UL] =  "DSProcedureStepProgress";
+        dict[0x00741006UL] =  "STProcedureStepProgressDescription";
+        dict[0x00741008UL] =  "SQProcedureStepCommunicationsURISequence";
+        dict[0x0074100aUL] =  "STContactURI";
+        dict[0x0074100cUL] =  "LOContactDisplayName";
+        dict[0x0074100eUL] =  "SQProcedureStepDiscontinuationReasonCodeSequence";
+        dict[0x00741020UL] =  "SQBeamTaskSequence";
+        dict[0x00741022UL] =  "CSBeamTaskType";
+        dict[0x00741026UL] =  "FDTableTopVerticalAdjustedPosition";
+        dict[0x00741027UL] =  "FDTableTopLongitudinalAdjustedPosition";
+        dict[0x00741028UL] =  "FDTableTopLateralAdjustedPosition";
+        dict[0x0074102AUL] =  "FDPatientSupportAdjustedAngle";
+        dict[0x0074102BUL] =  "FDTableTopEccentricAdjustedAngle";
+        dict[0x0074102CUL] =  "FDTableTopPitchAdjustedAngle";
+        dict[0x0074102DUL] =  "FDTableTopRollAdjustedAngle";
+        dict[0x00741030UL] =  "SQDeliveryVerificationImageSequence";
+        dict[0x00741032UL] =  "CSVerificationImageTiming";
+        dict[0x00741034UL] =  "CSDoubleExposureFlag";
+        dict[0x00741036UL] =  "CSDoubleExposureOrdering";
+        dict[0x00741040UL] =  "RelatedReferenceRTImageSequenc";
+        dict[0x00741042UL] =  "SQGeneralMachineVerificationSequence";
+        dict[0x00741044UL] =  "SQConventionalMachineVerificationSequence";
+        dict[0x00741046UL] =  "SQIonMachineVerificationSequence";
+        dict[0x00741048UL] =  "SQFailedAttributesSequence";
+        dict[0x0074104AUL] =  "SQOverriddenAttributesSequence";
+        dict[0x0074104CUL] =  "SQConventionalControlPointVerificationSequence";
+        dict[0x0074104EUL] =  "SQIonControlPointVerificationSequence";
+        dict[0x00741050UL] =  "SQAttributeOccurrenceSequence";
+        dict[0x00741052UL] =  "ATAttributeOccurrencePointer";
+        dict[0x00741054UL] =  "ULAttributeItemSelector";
+        dict[0x00741056UL] =  "LOAttributeOccurrencePrivateCreator";
+        dict[0x00741057UL] =  "ISSelectorSequencePointerItems";
+        dict[0x00741200UL] =  "CSScheduledProcedureStepPriority";
+        dict[0x00741202UL] =  "LOWorklistLabel";
+        dict[0x00741204UL] =  "LOProcedureStepLabel";
+        dict[0x00741210UL] =  "SQScheduledProcessingParametersSequence";
+        dict[0x00741212UL] =  "SQPerformedProcessingParametersSequence";
+        dict[0x00741216UL] =  "SQUnifiedProcedureStepPerformedProcedureSequence";
+        dict[0x00741224UL] =  "SQReplacedProcedureStepSequence";
+        dict[0x00741230UL] =  "LODeletionLock";
+        dict[0x00741234UL] =  "AEReceivingAE";
+        dict[0x00741236UL] =  "AERequestingAE";
+        dict[0x00741238UL] =  "LTReasonForCancellation";
+        dict[0x00741242UL] =  "CSSCPStatus";
+        dict[0x00741244UL] =  "CSSubscriptionListStatus";
+        dict[0x00741246UL] =  "CSUnifiedProcedureStepListStatus";
+        dict[0x00741324UL] =  "ULBeamOrderIndex";
+        dict[0x00741338UL] =  "FDDoubleExposureMeterset";
+        dict[0x0074133AUL] =  "FDDoubleExposureFieldDelta";
+        dict[0x00760001UL] =  "LOImplantAssemblyTemplateName";
+        dict[0x00760003UL] =  "LOImplantAssemblyTemplateIssuer";
+        dict[0x00760006UL] =  "LOImplantAssemblyTemplateVersion";
+        dict[0x00760008UL] =  "SQReplacedImplantAssemblyTemplateSequence";
+        dict[0x0076000AUL] =  "CSImplantAssemblyTemplateType";
+        dict[0x0076000CUL] =  "SQOriginalImplantAssemblyTemplateSequence";
+        dict[0x0076000EUL] =  "SQDerivationImplantAssemblyTemplateSequence";
+        dict[0x00760010UL] =  "SQImplantAssemblyTemplateTargetAnatomySequence";
+        dict[0x00760020UL] =  "SQProcedureTypeCodeSequence";
+        dict[0x00760030UL] =  "LOSurgicalTechnique";
+        dict[0x00760032UL] =  "SQComponentTypesSequence";
+        dict[0x00760034UL] =  "CSComponentTypeCodeSequence";
+        dict[0x00760036UL] =  "CSExclusiveComponentType";
+        dict[0x00760038UL] =  "CSMandatoryComponentType";
+        dict[0x00760040UL] =  "SQComponentSequence";
+        dict[0x00760055UL] =  "USComponentID";
+        dict[0x00760060UL] =  "SQComponentAssemblySequence";
+        dict[0x00760070UL] =  "USComponent1ReferencedID";
+        dict[0x00760080UL] =  "USComponent1ReferencedMatingFeatureSetID";
+        dict[0x00760090UL] =  "USComponent1ReferencedMatingFeatureID";
+        dict[0x007600A0UL] =  "USComponent2ReferencedID";
+        dict[0x007600B0UL] =  "USComponent2ReferencedMatingFeatureSetID";
+        dict[0x007600C0UL] =  "USComponent2ReferencedMatingFeatureID";
+        dict[0x00780001UL] =  "LOImplantTemplateGroupName";
+        dict[0x00780010UL] =  "STImplantTemplateGroupDescription";
+        dict[0x00780020UL] =  "LOImplantTemplateGroupIssuer";
+        dict[0x00780024UL] =  "LOImplantTemplateGroupVersion";
+        dict[0x00780026UL] =  "SQReplacedImplantTemplateGroupSequence";
+        dict[0x00780028UL] =  "SQImplantTemplateGroupTargetAnatomySequence";
+        dict[0x0078002AUL] =  "SQImplantTemplateGroupMembersSequence";
+        dict[0x0078002EUL] =  "USImplantTemplateGroupMemberID";
+        dict[0x00780050UL] =  "FDThreeDImplantTemplateGroupMemberMatchingPoint";
+        dict[0x00780060UL] =  "FDThreeDImplantTemplateGroupMemberMatchingAxes";
+        dict[0x00780070UL] =  "SQImplantTemplateGroupMemberMatching2DCoordinatesSequence";
+        dict[0x00780090UL] =  "FDTwoDImplantTemplateGroupMemberMatchingPoint";
+        dict[0x007800A0UL] =  "FDTwoDImplantTemplateGroupMemberMatchingAxes";
+        dict[0x007800B0UL] =  "SQImplantTemplateGroupVariationDimensionSequence";
+        dict[0x007800B2UL] =  "LOImplantTemplateGroupVariationDimensionName";
+        dict[0x007800B4UL] =  "SQImplantTemplateGroupVariationDimensionRankSequence";
+        dict[0x007800B6UL] =  "USReferencedImplantTemplateGroupMemberID";
+        dict[0x007800B8UL] =  "USImplantTemplateGroupVariationDimensionRank";
+        dict[0x00880130UL] =  "SHStorageMediaFileSetID";
+        dict[0x00880140UL] =  "UIStorageMediaFileSetUID";
         dict[0x00880200UL] =  "SQIconImageSequence";
-        dict[0x00880904UL] =  "LOTopicTitle";
-        dict[0x00880906UL] =  "STTopicSubject";
-        dict[0x00880910UL] =  "LOTopicAuthor";
-        dict[0x00880912UL] =  "LOTopicKeyWords";
         dict[0x01000410UL] =  "CSSOPInstanceStatus";
-        dict[0x01000420UL] =  "DTSOPAuthorizationDateandTime";
+        dict[0x01000420UL] =  "DTSOPAuthorizationDateTime";
         dict[0x01000424UL] =  "LTSOPAuthorizationComment";
         dict[0x01000426UL] =  "LOAuthorizationEquipmentCertificationNumber";
-        dict[0x04000005UL] =  "USMACIDnumber";
+        dict[0x04000005UL] =  "USMACIDNumber";
         dict[0x04000010UL] =  "UIMACCalculationTransferSyntaxUID";
         dict[0x04000015UL] =  "CSMACAlgorithm";
         dict[0x04000020UL] =  "ATDataElementsSigned";
         dict[0x04000100UL] =  "UIDigitalSignatureUID";
         dict[0x04000105UL] =  "DTDigitalSignatureDateTime";
         dict[0x04000110UL] =  "CSCertificateType";
-        dict[0x04000115UL] =  "OBCertificateofSigner";
+        dict[0x04000115UL] =  "OBCertificateOfSigner";
         dict[0x04000120UL] =  "OBSignature";
         dict[0x04000305UL] =  "CSCertifiedTimestampType";
         dict[0x04000310UL] =  "OBCertifiedTimestamp";
-        dict[0x20000010UL] =  "ISNumberofCopies";
+        dict[0x04000401UL] =  "SQDigitalSignaturePurposeCodeSequence";
+        dict[0x04000402UL] =  "SQReferencedDigitalSignatureSequence";
+        dict[0x04000403UL] =  "SQReferencedSOPInstanceMACSequence";
+        dict[0x04000404UL] =  "OBMAC";
+        dict[0x04000500UL] =  "SQEncryptedAttributesSequence";
+        dict[0x04000510UL] =  "UIEncryptedContentTransferSyntaxUID";
+        dict[0x04000520UL] =  "OBEncryptedContent";
+        dict[0x04000550UL] =  "SQModifiedAttributesSequence";
+        dict[0x04000561UL] =  "SQOriginalAttributesSequence";
+        dict[0x04000562UL] =  "DTAttributeModificationDateTime";
+        dict[0x04000563UL] =  "LOModifyingSystem";
+        dict[0x04000564UL] =  "LOSourceOfPreviousValuesReasonForTheAttributeModif";
+        dict[0x04000565UL] =  "icationCS";
+        dict[0x20000010UL] =  "ISNumberOfCopies";
         dict[0x2000001EUL] =  "SQPrinterConfigurationSequence";
         dict[0x20000020UL] =  "CSPrintPriority";
         dict[0x20000030UL] =  "CSMediumType";
         dict[0x20000040UL] =  "CSFilmDestination";
         dict[0x20000050UL] =  "LOFilmSessionLabel";
         dict[0x20000060UL] =  "ISMemoryAllocation";
-        dict[0x20000061UL] =  "ISMaximumMemoryAllocation";
-        dict[0x20000062UL] =  "CSColorImagePrintingFlag";
-        dict[0x20000063UL] =  "CSCollationFlag";
-        dict[0x20000065UL] =  "CSAnnotationFlag";
-        dict[0x20000067UL] =  "CSImageOverlayFlag";
-        dict[0x20000069UL] =  "CSPresentationLUTFlag";
-        dict[0x2000006AUL] =  "CSImageBoxPresentationLUTFlag";
+        dict[0x20000061UL] =  "ISMaximumMemoryAllocationag";
         dict[0x200000A0UL] =  "USMemoryBitDepth";
         dict[0x200000A1UL] =  "USPrintingBitDepth";
         dict[0x200000A2UL] =  "SQMediaInstalledSequence";
         dict[0x200000A4UL] =  "SQOtherMediaAvailableSequence";
         dict[0x200000A8UL] =  "SQSupportedImageDisplayFormatsSequence";
-        dict[0x20000500UL] =  "SQReferencedFilmBoxSequence";
-        dict[0x20000510UL] =  "SQReferencedStoredPrintSequence";
+        dict[0x20000500UL] =  "SQReferencedFilmBoxSequenceence";
         dict[0x20100010UL] =  "STImageDisplayFormat";
         dict[0x20100030UL] =  "CSAnnotationDisplayFormatID";
         dict[0x20100040UL] =  "CSFilmOrientation";
@@ -1065,7 +2526,7 @@ namespace MR {
         dict[0x20100500UL] =  "SQReferencedFilmSessionSequence";
         dict[0x20100510UL] =  "SQReferencedImageBoxSequence";
         dict[0x20100520UL] =  "SQReferencedBasicAnnotationBoxSequence";
-        dict[0x20200010UL] =  "USImagePosition";
+        dict[0x20200010UL] =  "USImageBoxPosition";
         dict[0x20200020UL] =  "CSPolarity";
         dict[0x20200030UL] =  "DSRequestedImageSize";
         dict[0x20200040UL] =  "CSRequestedDecimateCropBehavior";
@@ -1073,47 +2534,38 @@ namespace MR {
         dict[0x202000A0UL] =  "CSRequestedImageSizeFlag";
         dict[0x202000A2UL] =  "CSDecimateCropResult";
         dict[0x20200110UL] =  "SQBasicGrayscaleImageSequence";
-        dict[0x20200111UL] =  "SQBasicColorImageSequence";
+        dict[0x20200111UL] =  "SQBasicColorImageSequencexSequenceence";
         dict[0x20300010UL] =  "USAnnotationPosition";
         dict[0x20300020UL] =  "LOTextString";
-        dict[0x20400010UL] =  "SQReferencedOverlayPlaneSequence";
-        dict[0x20400011UL] =  "USReferencedOverlayPlaneGroups";
-        dict[0x20400020UL] =  "SQOverlayPixelDataSequence";
-        dict[0x20400060UL] =  "CSOverlayMagnificationType";
-        dict[0x20400070UL] =  "CSOverlaySmoothingType";
-        dict[0x20400072UL] =  "CSOverlayorImageMagnification";
-        dict[0x20400074UL] =  "USMagnifytoNumberofColumns";
-        dict[0x20400080UL] =  "CSOverlayForegroundDensity";
-        dict[0x20400082UL] =  "CSOverlayBackgroundDensity";
         dict[0x20500010UL] =  "SQPresentationLUTSequence";
         dict[0x20500020UL] =  "CSPresentationLUTShape";
         dict[0x20500500UL] =  "SQReferencedPresentationLUTSequence";
-        dict[0x21000010UL] =  "SHPrintJobID";
         dict[0x21000020UL] =  "CSExecutionStatus";
         dict[0x21000030UL] =  "CSExecutionStatusInfo";
         dict[0x21000040UL] =  "DACreationDate";
         dict[0x21000050UL] =  "TMCreationTime";
         dict[0x21000070UL] =  "AEOriginator";
-        dict[0x21000140UL] =  "AEDestinationAE";
         dict[0x21000160UL] =  "SHOwnerID";
-        dict[0x21000170UL] =  "ISNumberofFilms";
-        dict[0x21000500UL] =  "SQReferencedPrintJobSequence";
+        dict[0x21000170UL] =  "ISNumberOfFilmsePullStoredPrint";
         dict[0x21100010UL] =  "CSPrinterStatus";
         dict[0x21100020UL] =  "CSPrinterStatusInfo";
-        dict[0x21100030UL] =  "LOPrinterName";
-        dict[0x21100099UL] =  "SHPrintQueueID";
-        dict[0x21200010UL] =  "CSQueueStatus";
-        dict[0x21200050UL] =  "SQPrintJobDescriptionSequence";
-        dict[0x21200070UL] =  "SQReferencedPrintJobSequence";
-        dict[0x21300010UL] =  "SQPrintManagementCapabilitiesSequence";
-        dict[0x21300015UL] =  "SQPrinterCharacteristicsSequence";
-        dict[0x21300030UL] =  "SQFilmBoxContentSequence";
-        dict[0x21300040UL] =  "SQImageBoxContentSequence";
-        dict[0x21300050UL] =  "SQAnnotationContentSequence";
-        dict[0x21300060UL] =  "SQImageOverlayBoxContentSequence";
-        dict[0x21300080UL] =  "SQPresentationLUTContentSequence";
-        dict[0x213000A0UL] =  "SQProposedStudySequence";
-        dict[0x213000C0UL] =  "SQOriginalImageSequence";
+        dict[0x21100030UL] =  "LOPrinterNamesSequence";
+        dict[0x22000001UL] =  "CSLabelUsingInformationExtractedFromInstances";
+        dict[0x22000002UL] =  "UTLabelText";
+        dict[0x22000003UL] =  "CSLabelStyleSelection";
+        dict[0x22000004UL] =  "LTMediaDisposition";
+        dict[0x22000005UL] =  "LTBarcodeValue";
+        dict[0x22000006UL] =  "CSBarcodeSymbology";
+        dict[0x22000007UL] =  "CSAllowMediaSplitting";
+        dict[0x22000008UL] =  "CSIncludeNonDICOMObjects";
+        dict[0x22000009UL] =  "CSIncludeDisplayApplication";
+        dict[0x2200000AUL] =  "CSPreserveCompositeInstancesAfterMediaCreation";
+        dict[0x2200000BUL] =  "USTotalNumberOfPiecesOfMediaCreated";
+        dict[0x2200000CUL] =  "LORequestedMediaApplicationProfile";
+        dict[0x2200000DUL] =  "SQReferencedStorageMediaSequence";
+        dict[0x2200000EUL] =  "ATFailureAttributes";
+        dict[0x2200000FUL] =  "CSAllowLossyCompression";
+        dict[0x22000020UL] =  "CSRequestPriority";
         dict[0x30020002UL] =  "SHRTImageLabel";
         dict[0x30020003UL] =  "LORTImageName";
         dict[0x30020004UL] =  "STRTImageDescription";
@@ -1128,11 +2580,17 @@ namespace MR {
         dict[0x30020022UL] =  "DSRadiationMachineSAD";
         dict[0x30020024UL] =  "DSRadiationMachineSSD";
         dict[0x30020026UL] =  "DSRTImageSID";
-        dict[0x30020028UL] =  "DSSourcetoReferenceObjectDistance";
+        dict[0x30020028UL] =  "DSSourceToReferenceObjectDistance";
         dict[0x30020029UL] =  "ISFractionNumber";
         dict[0x30020030UL] =  "SQExposureSequence";
         dict[0x30020032UL] =  "DSMetersetExposure";
         dict[0x30020034UL] =  "DSDiaphragmPosition";
+        dict[0x30020040UL] =  "SQFluenceMapSequence";
+        dict[0x30020041UL] =  "CSFluenceDataSource";
+        dict[0x30020042UL] =  "DSFluenceDataScalePrimaryFluenceModeSeque";
+        dict[0x30020050UL] =  "nceSQ";
+        dict[0x30020051UL] =  "CSFluenceMode";
+        dict[0x30020052UL] =  "SHFluenceModeID";
         dict[0x30040001UL] =  "CSDVHType";
         dict[0x30040002UL] =  "CSDoseUnits";
         dict[0x30040004UL] =  "CSDoseType";
@@ -1143,12 +2601,13 @@ namespace MR {
         dict[0x3004000EUL] =  "DSDoseGridScaling";
         dict[0x30040010UL] =  "SQRTDoseROISequence";
         dict[0x30040012UL] =  "DSDoseValue";
+        dict[0x30040014UL] =  "CSTissueHeterogeneityCorrection";
         dict[0x30040040UL] =  "DSDVHNormalizationPoint";
         dict[0x30040042UL] =  "DSDVHNormalizationDoseValue";
         dict[0x30040050UL] =  "SQDVHSequence";
         dict[0x30040052UL] =  "DSDVHDoseScaling";
         dict[0x30040054UL] =  "CSDVHVolumeUnits";
-        dict[0x30040056UL] =  "ISDVHNumberofBins";
+        dict[0x30040056UL] =  "ISDVHNumberOfBins";
         dict[0x30040058UL] =  "DSDVHData";
         dict[0x30040060UL] =  "SQDVHReferencedROISequence";
         dict[0x30040062UL] =  "CSDVHROIContributionType";
@@ -1160,13 +2619,13 @@ namespace MR {
         dict[0x30060006UL] =  "STStructureSetDescription";
         dict[0x30060008UL] =  "DAStructureSetDate";
         dict[0x30060009UL] =  "TMStructureSetTime";
-        dict[0x30060010UL] =  "SQReferencedFrameofReferenceSequence";
+        dict[0x30060010UL] =  "SQReferencedFrameOfReferenceSequence";
         dict[0x30060012UL] =  "SQRTReferencedStudySequence";
         dict[0x30060014UL] =  "SQRTReferencedSeriesSequence";
         dict[0x30060016UL] =  "SQContourImageSequence";
         dict[0x30060020UL] =  "SQStructureSetROISequence";
         dict[0x30060022UL] =  "ISROINumber";
-        dict[0x30060024UL] =  "UIReferencedFrameofReferenceUID";
+        dict[0x30060024UL] =  "UIReferencedFrameOfReferenceUID";
         dict[0x30060026UL] =  "LOROIName";
         dict[0x30060028UL] =  "STROIDescription";
         dict[0x3006002AUL] =  "ISROIDisplayColor";
@@ -1180,7 +2639,7 @@ namespace MR {
         dict[0x30060042UL] =  "CSContourGeometricType";
         dict[0x30060044UL] =  "DSContourSlabThickness";
         dict[0x30060045UL] =  "DSContourOffsetVector";
-        dict[0x30060046UL] =  "ISNumberofContourPoints";
+        dict[0x30060046UL] =  "ISNumberOfContourPoints";
         dict[0x30060048UL] =  "ISContourNumber";
         dict[0x30060049UL] =  "ISAttachedContours";
         dict[0x30060050UL] =  "DSContourData";
@@ -1196,11 +2655,14 @@ namespace MR {
         dict[0x300600B0UL] =  "SQROIPhysicalPropertiesSequence";
         dict[0x300600B2UL] =  "CSROIPhysicalProperty";
         dict[0x300600B4UL] =  "DSROIPhysicalPropertyValue";
-        dict[0x300600C0UL] =  "SQFrameofReferenceRelationshipSequence";
-        dict[0x300600C2UL] =  "UIRelatedFrameofReferenceUID";
-        dict[0x300600C4UL] =  "CSFrameofReferenceTransformationType";
-        dict[0x300600C6UL] =  "DSFrameofReferenceTransformationMatrix";
-        dict[0x300600C8UL] =  "LOFrameofReferenceTransformationComment";
+        dict[0x300600B6UL] =  "SQROIElementalCompositionSequence";
+        dict[0x300600B7UL] =  "USROIElementalCompositionAtomicNumber";
+        dict[0x300600B8UL] =  "FLROIElementalCompositionAtomicMassFraction";
+        dict[0x300600C0UL] =  "SQFrameOfReferenceRelationshipSequence";
+        dict[0x300600C2UL] =  "UIRelatedFrameOfReferenceUID";
+        dict[0x300600C4UL] =  "CSFrameOfReferenceTransformationType";
+        dict[0x300600C6UL] =  "DSFrameOfReferenceTransformationMatrix";
+        dict[0x300600C8UL] =  "LOFrameOfReferenceTransformationComment";
         dict[0x30080010UL] =  "SQMeasuredDoseReferenceSequence";
         dict[0x30080012UL] =  "STMeasuredDoseDescription";
         dict[0x30080014UL] =  "CSMeasuredDoseType";
@@ -1284,12 +2746,13 @@ namespace MR {
         dict[0x300A0006UL] =  "DARTPlanDate";
         dict[0x300A0007UL] =  "TMRTPlanTime";
         dict[0x300A0009UL] =  "LOTreatmentProtocols";
-        dict[0x300A000AUL] =  "CSTreatmentIntent";
+        dict[0x300A000AUL] =  "CSPlanIntent";
         dict[0x300A000BUL] =  "LOTreatmentSites";
         dict[0x300A000CUL] =  "CSRTPlanGeometry";
         dict[0x300A000EUL] =  "STPrescriptionDescription";
         dict[0x300A0010UL] =  "SQDoseReferenceSequence";
         dict[0x300A0012UL] =  "ISDoseReferenceNumber";
+        dict[0x300A0013UL] =  "UIDoseReferenceUID";
         dict[0x300A0014UL] =  "CSDoseReferenceStructureType";
         dict[0x300A0015UL] =  "CSNominalBeamEnergyUnit";
         dict[0x300A0016UL] =  "LODoseReferenceDescription";
@@ -1303,10 +2766,10 @@ namespace MR {
         dict[0x300A0026UL] =  "DSTargetPrescriptionDose";
         dict[0x300A0027UL] =  "DSTargetMaximumDose";
         dict[0x300A0028UL] =  "DSTargetUnderdoseVolumeFraction";
-        dict[0x300A002AUL] =  "DSOrganatRiskFullvolumeDose";
-        dict[0x300A002BUL] =  "DSOrganatRiskLimitDose";
-        dict[0x300A002CUL] =  "DSOrganatRiskMaximumDose";
-        dict[0x300A002DUL] =  "DSOrganatRiskOverdoseVolumeFraction";
+        dict[0x300A002AUL] =  "DSOrganAtRiskFullVolumeDose";
+        dict[0x300A002BUL] =  "DSOrganAtRiskLimitDose";
+        dict[0x300A002CUL] =  "DSOrganAtRiskMaximumDose";
+        dict[0x300A002DUL] =  "DSOrganAtRiskOverdoseVolumeFraction";
         dict[0x300A0040UL] =  "SQToleranceTableSequence";
         dict[0x300A0042UL] =  "ISToleranceTableNumber";
         dict[0x300A0043UL] =  "SHToleranceTableLabel";
@@ -1314,23 +2777,30 @@ namespace MR {
         dict[0x300A0046UL] =  "DSBeamLimitingDeviceAngleTolerance";
         dict[0x300A0048UL] =  "SQBeamLimitingDeviceToleranceSequence";
         dict[0x300A004AUL] =  "DSBeamLimitingDevicePositionTolerance";
+        dict[0x300A004BUL] =  "FLSnoutPositionTolerance";
         dict[0x300A004CUL] =  "DSPatientSupportAngleTolerance";
         dict[0x300A004EUL] =  "DSTableTopEccentricAngleTolerance";
+        dict[0x300A004FUL] =  "FLTableTopPitchAngleTolerance";
+        dict[0x300A0050UL] =  "FLTableTopRollAngleTolerance";
         dict[0x300A0051UL] =  "DSTableTopVerticalPositionTolerance";
         dict[0x300A0052UL] =  "DSTableTopLongitudinalPositionTolerance";
         dict[0x300A0053UL] =  "DSTableTopLateralPositionTolerance";
         dict[0x300A0055UL] =  "CSRTPlanRelationship";
         dict[0x300A0070UL] =  "SQFractionGroupSequence";
         dict[0x300A0071UL] =  "ISFractionGroupNumber";
-        dict[0x300A0078UL] =  "ISNumberofFractionsPlanned";
-        dict[0x300A0079UL] =  "ISNumberofFractionPatternDigitsPerDay";
+        dict[0x300A0072UL] =  "LOFractionGroupDescription";
+        dict[0x300A0078UL] =  "ISNumberOfFractionsPlanned";
+        dict[0x300A0079UL] =  "ISNumberOfFractionPatternDigitsPerDay";
         dict[0x300A007AUL] =  "ISRepeatFractionCycleLength";
         dict[0x300A007BUL] =  "LTFractionPattern";
-        dict[0x300A0080UL] =  "ISNumberofBeams";
+        dict[0x300A0080UL] =  "ISNumberOfBeams";
         dict[0x300A0082UL] =  "DSBeamDoseSpecificationPoint";
         dict[0x300A0084UL] =  "DSBeamDose";
         dict[0x300A0086UL] =  "DSBeamMeterset";
-        dict[0x300A00A0UL] =  "ISNumberofBrachyApplicationSetups";
+        dict[0x300A0088UL] =  "FLBeamDosePointDepth";
+        dict[0x300A0089UL] =  "FLBeamDosePointEquivalentDepth";
+        dict[0x300A008AUL] =  "FLBeamDosePointSSD";
+        dict[0x300A00A0UL] =  "ISNumberOfBrachyApplicationSetups";
         dict[0x300A00A2UL] =  "DSBrachyApplicationSetupDoseSpecificationPoint";
         dict[0x300A00A4UL] =  "DSBrachyApplicationSetupDose";
         dict[0x300A00B0UL] =  "SQBeamSequence";
@@ -1339,8 +2809,9 @@ namespace MR {
         dict[0x300A00B4UL] =  "DSSourceAxisDistance";
         dict[0x300A00B6UL] =  "SQBeamLimitingDeviceSequence";
         dict[0x300A00B8UL] =  "CSRTBeamLimitingDeviceType";
-        dict[0x300A00BAUL] =  "DSSourcetoBeamLimitingDeviceDistance";
-        dict[0x300A00BCUL] =  "ISNumberofLeafJawPairs";
+        dict[0x300A00BAUL] =  "DSSourceToBeamLimitingDeviceDistance";
+        dict[0x300A00BBUL] =  "FLIsocenterToBeamLimitingDeviceDistance";
+        dict[0x300A00BCUL] =  "ISNumberOfLeafJawPairs";
         dict[0x300A00BEUL] =  "DSLeafPositionBoundaries";
         dict[0x300A00C0UL] =  "ISBeamNumber";
         dict[0x300A00C2UL] =  "LOBeamName";
@@ -1352,42 +2823,51 @@ namespace MR {
         dict[0x300A00CAUL] =  "SQPlannedVerificationImageSequence";
         dict[0x300A00CCUL] =  "LOImagingDeviceSpecificAcquisitionParameters";
         dict[0x300A00CEUL] =  "CSTreatmentDeliveryType";
-        dict[0x300A00D0UL] =  "ISNumberofWedges";
+        dict[0x300A00D0UL] =  "ISNumberOfWedges";
         dict[0x300A00D1UL] =  "SQWedgeSequence";
         dict[0x300A00D2UL] =  "ISWedgeNumber";
         dict[0x300A00D3UL] =  "CSWedgeType";
         dict[0x300A00D4UL] =  "SHWedgeID";
         dict[0x300A00D5UL] =  "ISWedgeAngle";
         dict[0x300A00D6UL] =  "DSWedgeFactor";
+        dict[0x300A00D7UL] =  "FLTotalWedgeTrayWaterEquivalentThickness";
         dict[0x300A00D8UL] =  "DSWedgeOrientation";
-        dict[0x300A00DAUL] =  "DSSourcetoWedgeTrayDistance";
-        dict[0x300A00E0UL] =  "ISNumberofCompensators";
+        dict[0x300A00D9UL] =  "FLIsocenterToWedgeTrayDistance";
+        dict[0x300A00DAUL] =  "DSSourceToWedgeTrayDistance";
+        dict[0x300A00DBUL] =  "FLWedgeThinEdgePosition";
+        dict[0x300A00DCUL] =  "SHBolusID";
+        dict[0x300A00DDUL] =  "STBolusDescription";
+        dict[0x300A00E0UL] =  "ISNumberOfCompensators";
         dict[0x300A00E1UL] =  "SHMaterialID";
         dict[0x300A00E2UL] =  "DSTotalCompensatorTrayFactor";
         dict[0x300A00E3UL] =  "SQCompensatorSequence";
         dict[0x300A00E4UL] =  "ISCompensatorNumber";
         dict[0x300A00E5UL] =  "SHCompensatorID";
-        dict[0x300A00E6UL] =  "DSSourcetoCompensatorTrayDistance";
+        dict[0x300A00E6UL] =  "DSSourceToCompensatorTrayDistance";
         dict[0x300A00E7UL] =  "ISCompensatorRows";
         dict[0x300A00E8UL] =  "ISCompensatorColumns";
         dict[0x300A00E9UL] =  "DSCompensatorPixelSpacing";
         dict[0x300A00EAUL] =  "DSCompensatorPosition";
         dict[0x300A00EBUL] =  "DSCompensatorTransmissionData";
         dict[0x300A00ECUL] =  "DSCompensatorThicknessData";
-        dict[0x300A00EDUL] =  "ISNumberofBoli";
+        dict[0x300A00EDUL] =  "ISNumberOfBoli";
         dict[0x300A00EEUL] =  "CSCompensatorType";
-        dict[0x300A00F0UL] =  "ISNumberofBlocks";
+        dict[0x300A00F0UL] =  "ISNumberOfBlocks";
         dict[0x300A00F2UL] =  "DSTotalBlockTrayFactor";
+        dict[0x300A00F3UL] =  "FLTotalBlockTrayWaterEquivalentThickness";
         dict[0x300A00F4UL] =  "SQBlockSequence";
         dict[0x300A00F5UL] =  "SHBlockTrayID";
-        dict[0x300A00F6UL] =  "DSSourcetoBlockTrayDistance";
+        dict[0x300A00F6UL] =  "DSSourceToBlockTrayDistance";
+        dict[0x300A00F7UL] =  "FLIsocenterToBlockTrayDistance";
         dict[0x300A00F8UL] =  "CSBlockType";
+        dict[0x300A00F9UL] =  "LOAccessoryCode";
         dict[0x300A00FAUL] =  "CSBlockDivergence";
+        dict[0x300A00FBUL] =  "CSBlockMountingPosition";
         dict[0x300A00FCUL] =  "ISBlockNumber";
         dict[0x300A00FEUL] =  "LOBlockName";
         dict[0x300A0100UL] =  "DSBlockThickness";
         dict[0x300A0102UL] =  "DSBlockTransmission";
-        dict[0x300A0104UL] =  "ISBlockNumberofPoints";
+        dict[0x300A0104UL] =  "ISBlockNumberOfPoints";
         dict[0x300A0106UL] =  "DSBlockData";
         dict[0x300A0107UL] =  "SQApplicatorSequence";
         dict[0x300A0108UL] =  "SHApplicatorID";
@@ -1395,7 +2875,7 @@ namespace MR {
         dict[0x300A010AUL] =  "LOApplicatorDescription";
         dict[0x300A010CUL] =  "DSCumulativeDoseReferenceCoefficient";
         dict[0x300A010EUL] =  "DSFinalCumulativeMetersetWeight";
-        dict[0x300A0110UL] =  "ISNumberofControlPoints";
+        dict[0x300A0110UL] =  "ISNumberOfControlPoints";
         dict[0x300A0111UL] =  "SQControlPointSequence";
         dict[0x300A0112UL] =  "ISControlPointIndex";
         dict[0x300A0114UL] =  "DSNominalBeamEnergy";
@@ -1418,16 +2898,27 @@ namespace MR {
         dict[0x300A012AUL] =  "DSTableTopLateralPosition";
         dict[0x300A012CUL] =  "DSIsocenterPosition";
         dict[0x300A012EUL] =  "DSSurfaceEntryPoint";
-        dict[0x300A0130UL] =  "DSSourcetoSurfaceDistance";
+        dict[0x300A0130UL] =  "DSSourceToSurfaceDistance";
         dict[0x300A0134UL] =  "DSCumulativeMetersetWeight";
+        dict[0x300A0140UL] =  "FLTableTopPitchAngle";
+        dict[0x300A0142UL] =  "CSTableTopPitchRotationDirection";
+        dict[0x300A0144UL] =  "FLTableTopRollAngle";
+        dict[0x300A0146UL] =  "CSTableTopRollRotationDirection";
+        dict[0x300A0148UL] =  "FLHeadFixationAngle";
+        dict[0x300A014AUL] =  "FLGantryPitchAngle";
+        dict[0x300A014CUL] =  "CSGantryPitchRotationDirection";
+        dict[0x300A014EUL] =  "FLGantryPitchAngleTolerance";
         dict[0x300A0180UL] =  "SQPatientSetupSequence";
         dict[0x300A0182UL] =  "ISPatientSetupNumber";
+        dict[0x300A0183UL] =  "LOPatientSetupLabel";
         dict[0x300A0184UL] =  "LOPatientAdditionalPosition";
         dict[0x300A0190UL] =  "SQFixationDeviceSequence";
         dict[0x300A0192UL] =  "CSFixationDeviceType";
         dict[0x300A0194UL] =  "SHFixationDeviceLabel";
         dict[0x300A0196UL] =  "STFixationDeviceDescription";
         dict[0x300A0198UL] =  "SHFixationDevicePosition";
+        dict[0x300A0199UL] =  "FLFixationDevicePitchAngle";
+        dict[0x300A019AUL] =  "FLFixationDeviceRollAngle";
         dict[0x300A01A0UL] =  "SQShieldingDeviceSequence";
         dict[0x300A01A2UL] =  "CSShieldingDeviceType";
         dict[0x300A01A4UL] =  "SHShieldingDeviceLabel";
@@ -1457,9 +2948,11 @@ namespace MR {
         dict[0x300A0224UL] =  "DSSourceEncapsulationNominalTransmission";
         dict[0x300A0226UL] =  "LOSourceIsotopeName";
         dict[0x300A0228UL] =  "DSSourceIsotopeHalfLife";
+        dict[0x300A0229UL] =  "CSSourceStrengthUnits";
         dict[0x300A022AUL] =  "DSReferenceAirKermaRate";
-        dict[0x300A022CUL] =  "DAAirKermaRateReferenceDate";
-        dict[0x300A022EUL] =  "TMAirKermaRateReferenceTime";
+        dict[0x300A022BUL] =  "DSSourceStrength";
+        dict[0x300A022CUL] =  "DASourceStrengthReferenceDate";
+        dict[0x300A022EUL] =  "TMSourceStrengthReferenceTime";
         dict[0x300A0230UL] =  "SQApplicationSetupSequence";
         dict[0x300A0232UL] =  "CSApplicationSetupType";
         dict[0x300A0234UL] =  "ISApplicationSetupNumber";
@@ -1481,7 +2974,7 @@ namespace MR {
         dict[0x300A0284UL] =  "DSChannelLength";
         dict[0x300A0286UL] =  "DSChannelTotalTime";
         dict[0x300A0288UL] =  "CSSourceMovementType";
-        dict[0x300A028AUL] =  "ISNumberofPulses";
+        dict[0x300A028AUL] =  "ISNumberOfPulses";
         dict[0x300A028CUL] =  "DSPulseRepetitionInterval";
         dict[0x300A0290UL] =  "ISSourceApplicatorNumber";
         dict[0x300A0291UL] =  "SHSourceApplicatorID";
@@ -1505,6 +2998,92 @@ namespace MR {
         dict[0x300A02D2UL] =  "DSControlPointRelativePosition";
         dict[0x300A02D4UL] =  "DSControlPoint3DPosition";
         dict[0x300A02D6UL] =  "DSCumulativeTimeWeight";
+        dict[0x300A02E0UL] =  "CSCompensatorDivergence";
+        dict[0x300A02E1UL] =  "CSCompensatorMountingPosition";
+        dict[0x300A02E2UL] =  "DSSourceToCompensatorDistance";
+        dict[0x300A02E3UL] =  "FLTotalCompensatorTrayWaterEquivalentThicknessrEquivalentThickness";
+        dict[0x300A02E4UL] =  "FLIsocenterToCompensatorTrayDistance";
+        dict[0x300A02E5UL] =  "FLCompensatorColumnOffset";
+        dict[0x300A02E6UL] =  "FLIsocenterToCompensatorDistances";
+        dict[0x300A02E7UL] =  "FLCompensatorRelativeStoppingPowerRatio";
+        dict[0x300A02E8UL] =  "FLCompensatorMillingToolDiameter";
+        dict[0x300A02EAUL] =  "SQIonRangeCompensatorSequence";
+        dict[0x300A02EBUL] =  "LTCompensatorDescription";
+        dict[0x300A0302UL] =  "ISRadiationMassNumber";
+        dict[0x300A0304UL] =  "ISRadiationAtomicNumber";
+        dict[0x300A0306UL] =  "SSRadiationChargeState";
+        dict[0x300A0308UL] =  "CSScanMode";
+        dict[0x300A030AUL] =  "FLVirtualSourceAxisDistances";
+        dict[0x300A030CUL] =  "SQSnoutSequence";
+        dict[0x300A030DUL] =  "FLSnoutPosition";
+        dict[0x300A030FUL] =  "SHSnoutID";
+        dict[0x300A0312UL] =  "ISNumberOfRangeShifters";
+        dict[0x300A0314UL] =  "SQRangeShifterSequence";
+        dict[0x300A0316UL] =  "ISRangeShifterNumber";
+        dict[0x300A0318UL] =  "SHRangeShifterID";
+        dict[0x300A0320UL] =  "CSRangeShifterType";
+        dict[0x300A0322UL] =  "LORangeShifterDescription";
+        dict[0x300A0330UL] =  "ISNumberOfLateralSpreadingDevices";
+        dict[0x300A0332UL] =  "SQLateralSpreadingDeviceSequence";
+        dict[0x300A0334UL] =  "ISLateralSpreadingDeviceNumber";
+        dict[0x300A0336UL] =  "SHLateralSpreadingDeviceID";
+        dict[0x300A0338UL] =  "CSLateralSpreadingDeviceType";
+        dict[0x300A033AUL] =  "LOLateralSpreadingDeviceDescription";
+        dict[0x300A033CUL] =  "FLLateralSpreadingDeviceWaterEquivalentThickness";
+        dict[0x300A0340UL] =  "ISNumberOfRangeModulators";
+        dict[0x300A0342UL] =  "SQRangeModulatorSequence";
+        dict[0x300A0344UL] =  "ISRangeModulatorNumber";
+        dict[0x300A0346UL] =  "SHRangeModulatorID";
+        dict[0x300A0348UL] =  "CSRangeModulatorType";
+        dict[0x300A034AUL] =  "LORangeModulatorDescription";
+        dict[0x300A034CUL] =  "SHBeamCurrentModulationID";
+        dict[0x300A0350UL] =  "CSPatientSupportType";
+        dict[0x300A0352UL] =  "SHPatientSupportID";
+        dict[0x300A0354UL] =  "LOPatientSupportAccessoryCode";
+        dict[0x300A0356UL] =  "FLFixationLightAzimuthalAngle";
+        dict[0x300A0358UL] =  "FLFixationLightPolarAngle";
+        dict[0x300A035AUL] =  "FLMetersetRate";
+        dict[0x300A0360UL] =  "SQRangeShifterSettingsSequence";
+        dict[0x300A0362UL] =  "LORangeShifterSetting";
+        dict[0x300A0364UL] =  "FLIsocenterToRangeShifterDistance";
+        dict[0x300A0366UL] =  "FLRangeShifterWaterEquivalentThickness";
+        dict[0x300A0370UL] =  "SQLateralSpreadingDeviceSettingsSequence";
+        dict[0x300A0372UL] =  "LOLateralSpreadingDeviceSetting";
+        dict[0x300A0374UL] =  "FLIsocenterToLateralSpreadingDeviceDistance";
+        dict[0x300A0380UL] =  "SQRangeModulatorSettingsSequence";
+        dict[0x300A0382UL] =  "FLRangeModulatorGatingStartValue";
+        dict[0x300A0384UL] =  "FLRangeModulatorGatingStopValue";
+        dict[0x300A0386UL] =  "FLRangeModulatorGatingStartWaterEquivalentThickness";
+        dict[0x300A0388UL] =  "FLRangeModulatorGatingStopWaterEquivalentThickness";
+        dict[0x300A038AUL] =  "FLIsocenterToRangeModulatorDistance";
+        dict[0x300A0390UL] =  "SHScanSpotTuneID";
+        dict[0x300A0392UL] =  "ISNumberOfScanSpotPositions";
+        dict[0x300A0394UL] =  "FLScanSpotPositionMap";
+        dict[0x300A0396UL] =  "FLScanSpotMetersetWeights";
+        dict[0x300A0398UL] =  "FLScanningSpotSize";
+        dict[0x300A039AUL] =  "ISNumberOfPaintings";
+        dict[0x300A03A0UL] =  "SQIonToleranceTableSequence";
+        dict[0x300A03A2UL] =  "SQIonBeamSequence";
+        dict[0x300A03A4UL] =  "SQIonBeamLimitingDeviceSequence";
+        dict[0x300A03A6UL] =  "SQIonBlockSequence";
+        dict[0x300A03A8UL] =  "SQIonControlPointSequence";
+        dict[0x300A03AAUL] =  "SQIonWedgeSequence";
+        dict[0x300A03ACUL] =  "SQIonWedgePositionSequence";
+        dict[0x300A0401UL] =  "SQReferencedSetupImageSequence";
+        dict[0x300A0402UL] =  "STSetupImageComment";
+        dict[0x300A0410UL] =  "SQMotionSynchronizationSequence";
+        dict[0x300A0412UL] =  "FLControlPointOrientation";
+        dict[0x300A0420UL] =  "SQGeneralAccessorySequence";
+        dict[0x300A0421UL] =  "SHGeneralAccessoryID";
+        dict[0x300A0422UL] =  "STGeneralAccessoryDescription";
+        dict[0x300A0423UL] =  "CSGeneralAccessoryType";
+        dict[0x300A0424UL] =  "ISGeneralAccessoryNumber";
+        dict[0x300A0431UL] =  "SQApplicatorGeometrySequence";
+        dict[0x300A0432UL] =  "CSApplicatorApertureShape";
+        dict[0x300A0433UL] =  "FLApplicatorOpening";
+        dict[0x300A0434UL] =  "FLApplicatorOpeningX";
+        dict[0x300A0435UL] =  "FLApplicatorOpeningY";
+        dict[0x300A0436UL] =  "FLSourceToApplicatorMountingPositionDistance";
         dict[0x300C0002UL] =  "SQReferencedRTPlanSequence";
         dict[0x300C0004UL] =  "SQReferencedBeamSequence";
         dict[0x300C0006UL] =  "ISReferencedBeamNumber";
@@ -1530,110 +3109,105 @@ namespace MR {
         dict[0x300C00D0UL] =  "ISReferencedCompensatorNumber";
         dict[0x300C00E0UL] =  "ISReferencedBlockNumber";
         dict[0x300C00F0UL] =  "ISReferencedControlPointIndex";
+        dict[0x300C00F2UL] =  "SQReferencedControlPointSequence";
+        dict[0x300C00F4UL] =  "ISReferencedStartControlPointIndex";
+        dict[0x300C00F6UL] =  "ISReferencedStopControlPointIndex";
+        dict[0x300C0100UL] =  "ISReferencedRangeShifterNumber";
+        dict[0x300C0102UL] =  "ISReferencedLateralSpreadingDeviceNumber";
+        dict[0x300C0104UL] =  "ISReferencedRangeModulatorNumber";
         dict[0x300E0002UL] =  "CSApprovalStatus";
         dict[0x300E0004UL] =  "DAReviewDate";
         dict[0x300E0005UL] =  "TMReviewTime";
         dict[0x300E0008UL] =  "PNReviewerName";
-        dict[0x40080040UL] =  "SHResultsID";
-        dict[0x40080042UL] =  "LOResultsIDIssuer";
-        dict[0x40080050UL] =  "SQReferencedInterpretationSequence";
-        dict[0x40080100UL] =  "DAInterpretationRecordedDate";
-        dict[0x40080101UL] =  "TMInterpretationRecordedTime";
-        dict[0x40080102UL] =  "PNInterpretationRecorder";
-        dict[0x40080103UL] =  "LOReferencetoRecordedSound";
-        dict[0x40080108UL] =  "DAInterpretationTranscriptionDate";
-        dict[0x40080109UL] =  "TMInterpretationTranscriptionTime";
-        dict[0x4008010AUL] =  "PNInterpretationTranscriber";
-        dict[0x4008010BUL] =  "STInterpretationText";
-        dict[0x4008010CUL] =  "PNInterpretationAuthor";
-        dict[0x40080111UL] =  "SQInterpretationApproverSequence";
-        dict[0x40080112UL] =  "DAInterpretationApprovalDate";
-        dict[0x40080113UL] =  "TMInterpretationApprovalTime";
-        dict[0x40080114UL] =  "PNPhysicianApprovingInterpretation";
-        dict[0x40080115UL] =  "LTInterpretationDiagnosisDescription";
-        dict[0x40080117UL] =  "SQInterpretationDiagnosisCodeSequence";
-        dict[0x40080118UL] =  "SQResultsDistributionListSequence";
-        dict[0x40080119UL] =  "PNDistributionName";
-        dict[0x4008011AUL] =  "LODistributionAddress";
-        dict[0x40080200UL] =  "SHInterpretationID";
-        dict[0x40080202UL] =  "LOInterpretationIDIssuer";
-        dict[0x40080210UL] =  "CSInterpretationTypeID";
-        dict[0x40080212UL] =  "CSInterpretationStatusID";
-        dict[0x40080300UL] =  "STImpressions";
-        dict[0x40084000UL] =  "STResultsComments";
+        dict[0x40100001UL] =  "CSLowEnergyDetectors";
+        dict[0x40100002UL] =  "CSHighEnergyDetectors";
+        dict[0x40100004UL] =  "SQDetectorGeometrySequence";
+        dict[0x40101001UL] =  "SQThreatROIVoxelSequence";
+        dict[0x40101004UL] =  "FLThreatROIBase";
+        dict[0x40101005UL] =  "FLThreatROIExtents";
+        dict[0x40101006UL] =  "OBThreatROIBitmap";
+        dict[0x40101007UL] =  "SHRouteSegmentID";
+        dict[0x40101008UL] =  "CSGantryType";
+        dict[0x40101009UL] =  "CSOOIOwnerType";
+        dict[0x4010100AUL] =  "SQRouteSegmentSequence";
+        dict[0x40101010UL] =  "USPotentialThreatObjectID";
+        dict[0x40101011UL] =  "SQThreatSequence";
+        dict[0x40101012UL] =  "CSThreatCategory";
+        dict[0x40101013UL] =  "LTThreatCategoryDescription";
+        dict[0x40101014UL] =  "CSATDAbilityAssessment";
+        dict[0x40101015UL] =  "CSATDAssessmentFlag";
+        dict[0x40101016UL] =  "FLATDAssessmentProbability";
+        dict[0x40101017UL] =  "FLMass";
+        dict[0x40101018UL] =  "FLDensity";
+        dict[0x40101019UL] =  "FLZEffective";
+        dict[0x4010101AUL] =  "SHBoardingPassID";
+        dict[0x4010101BUL] =  "FLCenterOfMass";
+        dict[0x4010101CUL] =  "FLCenterOfPTO";
+        dict[0x4010101DUL] =  "FLBoundingPolygon";
+        dict[0x4010101EUL] =  "SHRouteSegmentStartLocationID";
+        dict[0x4010101FUL] =  "SHRouteSegmentEndLocationID";
+        dict[0x40101020UL] =  "CSRouteSegmentLocationIDType";
+        dict[0x40101021UL] =  "CSAbortReason";
+        dict[0x40101023UL] =  "FLVolumeOfPTO";
+        dict[0x40101024UL] =  "CSAbortFlag";
+        dict[0x40101025UL] =  "DTRouteSegmentStartTime";
+        dict[0x40101026UL] =  "DTRouteSegmentEndTime";
+        dict[0x40101027UL] =  "CSTDRType";
+        dict[0x40101028UL] =  "CSInternationalRouteSegment";
+        dict[0x40101029UL] =  "LOThreatDetectionAlgorithmandVersion";
+        dict[0x4010102AUL] =  "SHAssignedLocation";
+        dict[0x4010102BUL] =  "DTAlarmDecisionTime";
+        dict[0x40101031UL] =  "CSAlarmDecision";
+        dict[0x40101033UL] =  "USNumberOfTotalObjects";
+        dict[0x40101034UL] =  "USNumberOfAlarmObjects";
+        dict[0x40101037UL] =  "SQPTORepresentationSequence";
+        dict[0x40101038UL] =  "SQATDAssessmentSequence";
+        dict[0x40101039UL] =  "CSTIPType";
+        dict[0x4010103AUL] =  "CSDICOSVersion";
+        dict[0x40101041UL] =  "DTOOIOwnerCreationTime";
+        dict[0x40101042UL] =  "CSOOIType";
+        dict[0x40101043UL] =  "FLOOISize";
+        dict[0x40101044UL] =  "CSAcquisitionStatus";
+        dict[0x40101045UL] =  "SQBasisMaterialsCodeSequence";
+        dict[0x40101046UL] =  "CSPhantomType";
+        dict[0x40101047UL] =  "SQOOIOwnerSequence";
+        dict[0x40101048UL] =  "CSScanType";
+        dict[0x40101051UL] =  "LOItineraryID";
+        dict[0x40101052UL] =  "SHItineraryIDType";
+        dict[0x40101053UL] =  "LOItineraryIDAssigningAuthority";
+        dict[0x40101054UL] =  "SHRouteID";
+        dict[0x40101055UL] =  "SHRouteIDAssigningAuthority";
+        dict[0x40101056UL] =  "CSInboundArrivalType";
+        dict[0x40101058UL] =  "SHCarrierID";
+        dict[0x40101059UL] =  "CSCarrierIDAssigningAuthority";
+        dict[0x40101060UL] =  "FLSourceOrientation";
+        dict[0x40101061UL] =  "FLSourcePosition";
+        dict[0x40101062UL] =  "FLBeltHeight";
+        dict[0x40101064UL] =  "SQAlgorithmRoutingCodeSequence";
+        dict[0x40101067UL] =  "CSTransportClassification";
+        dict[0x40101068UL] =  "LTOOITypeDescriptor";
+        dict[0x40101069UL] =  "FLTotalProcessingTime";
+        dict[0x4010106CUL] =  "OBDetectorCalibrationData";
         dict[0x4FFE0001UL] =  "SQMACParametersSequence";
-        /*  dict[0x50xx0005UL] =  "USCurveDimensions";
-            dict[0x50xx0010UL] =  "USNumberofPoints";
-            dict[0x50xx0020UL] =  "CSTypeofData";
-            dict[0x50xx0022UL] =  "LOCurveDescription";
-            dict[0x50xx0030UL] =  "SHAxisUnits";
-            dict[0x50xx0040UL] =  "SHAxisLabels";
-            dict[0x50xx0103UL] =  "USDataValueRepresentation";
-            dict[0x50xx0104UL] =  "USMinimumCoordinateValue";
-            dict[0x50xx0105UL] =  "USMaximumCoordinateValue";
-            dict[0x50xx0106UL] =  "SHCurveRange";
-            dict[0x50xx0110UL] =  "USCurveDataDescriptor";
-            dict[0x50xx0112UL] =  "USCoordinateStartValue";
-            dict[0x50xx0114UL] =  "USCoordinateStepValue";
-            dict[0x50xx1001UL] =  "CSCurveActivationLayer";
-            dict[0x50xx2000UL] =  "USAudioType";
-            dict[0x50xx2002UL] =  "USAudioSampleFormat";
-            dict[0x50xx2004UL] =  "USNumberofChannels";
-            dict[0x50xx2006UL] =  "ULNumberofSamples";
-            dict[0x50xx2008UL] =  "ULSampleRate";
-            dict[0x50xx200AUL] =  "ULTotalTime";
-            dict[0x50xx200CUL] =  "OWOBAudioSampleData";
-            dict[0x50xx200EUL] =  "LTAudioComments";
-            dict[0x50xx2500UL] =  "LOCurveLabel";
-            dict[0x50xx2600UL] =  "SQReferencedOverlaySequence";
-            dict[0x50xx2610UL] =  "USReferencedOverlayGroup";
-            dict[0x50xx3000UL] =  "OWOBCurveData"; */
+        dict[0x52009229UL] =  "SQSharedFunctionalGroupsSequence";
+        dict[0x52009230UL] =  "SQPerFrameFunctionalGroupsSequence";
         dict[0x54000100UL] =  "SQWaveformSequence";
-        dict[0x54000110UL] =  "OBOWChannelMinimumValue";
-        dict[0x54000112UL] =  "OBOWChannelMaximumValue";
+        dict[0x54000110UL] =  "OBChannelMinimumValue";
+        dict[0x54000112UL] =  "OBChannelMaximumValue";
         dict[0x54001004UL] =  "USWaveformBitsAllocated";
         dict[0x54001006UL] =  "CSWaveformSampleInterpretation";
-        dict[0x5400100AUL] =  "OBOWWaveformPaddingValue";
-        dict[0x54001010UL] =  "OBOWWaveformData";
-        /*  dict[0x60xx0010UL] =  "USOverlayRows";
-            dict[0x60xx0011UL] =  "USOverlayColumns";
-            dict[0x60xx0012UL] =  "USOverlayPlanes";
-            dict[0x60xx0015UL] =  "ISNumberofFramesinOverlay";
-            dict[0x60xx0022UL] =  "LOOverlayDescription";
-            dict[0x60xx0040UL] =  "CSOverlayType";
-            dict[0x60xx0045UL] =  "LOOverlaySubtype";
-            dict[0x60xx0050UL] =  "SSOverlayOrigin";
-            dict[0x60xx0051UL] =  "USImageFrameOrigin";
-            dict[0x60xx0052UL] =  "USOverlayPlaneOrigin";
-            dict[0x60xx0100UL] =  "USOverlayBitsAllocated";
-            dict[0x60xx0102UL] =  "USOverlayBitPosition";
-            dict[0x60xx1001UL] =  "CSOverlayActivationLayer";
-            dict[0x60xx1301UL] =  "ISROIArea";
-            dict[0x60xx1302UL] =  "DSROIMean";
-            dict[0x60xx1303UL] =  "DSROIStandardDeviation";
-            dict[0x60xx1500UL] =  "LOOverlayLabel";
-            dict[0x60xx3000UL] =  "OBOWOverlayData"; */
-        dict[0x7FE00010UL] =  "OWOBPixelData";
+        dict[0x5400100AUL] =  "OBWaveformPaddingValue";
+        dict[0x54001010UL] =  "OBWaveformData";
+        dict[0x56000010UL] =  "OFFirstOrderPhaseCorrectionAngle";
+        dict[0x56000020UL] =  "OFSpectroscopyData";
+        dict[0x7FE00010UL] =  "OWPixelData";
         dict[0xFFFAFFFAUL] =  "SQDigitalSignaturesSequence";
         dict[0xFFFCFFFCUL] =  "OBDataSetTrailingPadding";
         dict[0xFFFEE000UL] =  "UNItem";
         dict[0xFFFEE00DUL] =  "UNItemDelimitationItem";
         dict[0xFFFEE0DDUL] =  "UNSequenceDelimitationItem";
-        dict[0x00290010UL] =  "LOPrivateCreatorCode";
-        dict[0x00290011UL] =  "LOAnotherPrivateCreatorCode";
-        dict[0x00291008UL] =  "CSCSAImageHeaderType";
-        dict[0x00291009UL] =  "LOCSAImageHeaderVersion";
-        dict[0x00291010UL] =  "OBCSAImageHeaderInfo";
-        dict[0x00291018UL] =  "CSCSASeriesHeaderType";
-        dict[0x00291019UL] =  "LOCSASeriesHeaderVersion";
-        dict[0x00291020UL] =  "OBCSASeriesHeaderInfo";
-        dict[0x00291131UL] =  "LOPMTFInformation1";
-        dict[0x00291132UL] =  "ULPMTFInformation2";
-        dict[0x00291133UL] =  "ULPMTFInformation3";
-        dict[0x00291134UL] =  "CSPMTFInformation4";
-        dict[0x7fe11010UL] =  "OBCSAData";
-      }
 
+      }
     }
   }
 }
diff --git a/lib/file/dicom/element.cpp b/lib/file/dicom/element.cpp
index b883fb4..cbd3d1b 100644
--- a/lib/file/dicom/element.cpp
+++ b/lib/file/dicom/element.cpp
@@ -58,11 +58,12 @@ namespace MR {
         size = 0;
         start = data = next = NULL;
         is_BE = previous_BO_was_BE = false;
-        end_seq.clear();
-        item_number.clear();
+        sequence.clear();
 
         fmap.init (filename);
-        if (fmap.size() < 256) throw Exception ("\"" + fmap.name() + "\" is too small to be a valid DICOM file", 3);
+
+        if (fmap.size() < 256) 
+          throw Exception ("\"" + fmap.name() + "\" is too small to be a valid DICOM file", 3);
         fmap.map();
 
         next = (guint8*) fmap.address();
@@ -181,27 +182,28 @@ namespace MR {
                 + " (" + str (group) + ", " + str (element) 
                 + ") in file \"" + fmap.name() + "\"", 3);
         }
-        else if (next+size > (guint8*) fmap.address() + fmap.size()) throw Exception ("file \"" + fmap.name() + "\" is too small to contain DICOM elements specified", 3);
-        else if (size%2) throw Exception ("odd length (" + str (size) + ") used for DICOM tag " + ( tag_name().size() ? tag_name().substr (2) : "" ) 
+        else if (next+size > (guint8*) fmap.address() + fmap.size()) 
+          throw Exception ("file \"" + fmap.name() + "\" is too small to contain DICOM elements specified", 3);
+        else if (size%2) 
+          throw Exception ("odd length (" + str (size) + ") used for DICOM tag " + ( tag_name().size() ? tag_name().substr (2) : "" ) 
               + " (" + str (group) + ", " + str (element) + ") in file \"" + fmap.name() + "", 3);
-        else if (VR != VR_SQ && ( group != GROUP_SEQUENCE || element != ELEMENT_SEQUENCE_ITEM ) ) next += size;
+        else if (VR != VR_SQ && ( group != GROUP_SEQUENCE || element != ELEMENT_SEQUENCE_ITEM ) ) 
+          next += size;
 
 
 
-        if (VR == VR_SQ) {
-          if (size == LENGTH_UNDEFINED) end_seq.push_back (NULL); 
-          else end_seq.push_back (data + size);
-          item_number.push_back (0);
-        }
+        if (sequence.size()) 
+          if ((sequence.back().end && data > sequence.back().end) || 
+              (group == GROUP_SEQUENCE && element == ELEMENT_SEQUENCE_DELIMITATION_ITEM)) 
+            sequence.pop_back();
 
-        if (end_seq.size()) {
-          if ((end_seq.back() && data > end_seq.back()) || (group == GROUP_SEQUENCE && element == ELEMENT_SEQUENCE_DELIMITATION_ITEM)) {
-            end_seq.pop_back();
-            item_number.pop_back();
-          }
+        if (VR == VR_SQ) {
+          if (size == LENGTH_UNDEFINED) 
+            sequence.push_back (Sequence (group, element, NULL)); 
+          else 
+            sequence.push_back (Sequence (group, element, data + size));
         }
 
-        if (group == GROUP_SEQUENCE && element == ELEMENT_SEQUENCE_ITEM) item_number.back()++;
 
 
 
@@ -256,7 +258,7 @@ namespace MR {
         if (VR == VR_AE || VR == VR_AS || VR == VR_CS || VR == VR_DA ||
             VR == VR_DS || VR == VR_DT || VR == VR_IS || VR == VR_LO ||
             VR == VR_LT || VR == VR_PN || VR == VR_SH || VR == VR_ST ||
-            VR == VR_TM || VR == VR_UI || VR == VR_UT) return (STRING);
+            VR == VR_TM || VR == VR_UI || VR == VR_UT || VR == VR_AT) return (STRING);
         return (OTHER);
       }
 
@@ -324,6 +326,12 @@ namespace MR {
 
       std::vector<String> Element::get_string () const
       { 
+        if (VR == VR_AT) {
+          std::vector<String> strings;
+          strings.push_back (printf ("%02X %02X", get<guint16> (data, is_BE), get<guint16> (data+2, is_BE)));
+          return strings;
+        }
+
         std::vector<String> strings (split (String ((const gchar*) data, size), "\\", false)); 
         for (std::vector<String>::iterator i = strings.begin(); i != strings.end(); ++i) {
           *i = strip (*i);
@@ -347,7 +355,7 @@ namespace MR {
       void Element::print() const
       {
         String name = tag_name();
-        fprintf (stdout, "  [DCM] %*s : ", int(2*end_seq.size()), ( name.size() ? name.substr(2).c_str() : "unknown" ));
+        fprintf (stdout, "  [DCM] %*s : ", int(2*level()), ( name.size() ? name.substr(2).c_str() : "unknown" ));
         switch (type()) {
           case INT: print_vec (get_int()); break;
           case UINT: print_vec (get_int()); break;
@@ -374,11 +382,19 @@ namespace MR {
         const String& name (item.tag_name());
 
         stream << "[DCM] ";
-        for (guint i = 0; i < item.end_seq.size(); i++) stream << "  ";
+        guint indent = item.level() + ( item.VR == VR_SQ ? 0 : 1 );
+        for (guint i = 0; i < indent; i++) 
+          stream << "  ";
+        if (item.VR == VR_SQ) 
+          stream << "+ ";
+        else if (item.group == GROUP_SEQUENCE && item.element == ELEMENT_SEQUENCE_ITEM) 
+          stream << "- ";
+        else 
+          stream << "  ";
         stream << printf ("%02X %02X ", item.group, item.element)  
             + ((const gchar*) &item.VR)[1] + ((const gchar*) &item.VR)[0] + " " 
             + str ( item.size == LENGTH_UNDEFINED ? 0 : item.size ) + " " 
-            + str (item.offset (item.start)) + " " + ( name.size() ? name.substr (2) : "unknown" ) + " : ";
+            + str (item.offset (item.start)) + " " + ( name.size() ? name.substr (2) : "unknown" ) + " ";
 
 
         switch (item.type()) {
@@ -390,19 +406,13 @@ namespace MR {
             else stream << item.get_string(); 
             break;
           case SEQ:
-            stream << "(sequence)";
             break;
           default:
-            stream << "unknown data type";
+            if (item.group != GROUP_SEQUENCE || item.element != ELEMENT_SEQUENCE_ITEM)
+              stream << "unknown data type";
         }
         if (item.group%2) stream << " [ PRIVATE ]";
 
-        if (item.item_number.size()) {
-          stream << " [ ";
-          for (guint n = 0; n < item.item_number.size(); n++) stream << item.item_number[n] << " ";
-          stream << "] ";
-        }
-
         return (stream);
       }
 
diff --git a/lib/file/dicom/element.h b/lib/file/dicom/element.h
index 90539c6..5bf4c54 100644
--- a/lib/file/dicom/element.h
+++ b/lib/file/dicom/element.h
@@ -46,6 +46,12 @@ namespace MR {
       } ElementType;
 
 
+      class Sequence {
+        public:
+          Sequence (guint16 group, guint16 element, guint8* end) : group (group), element (element), end (end) { }
+          guint16 group, element;
+          guint8* end;
+      };
 
 
 
@@ -64,15 +70,13 @@ namespace MR {
           bool                  is_BE;
           bool                  previous_BO_was_BE;
 
-          std::vector<guint8*>  end_seq;
 
         public:
 
           guint16               group, element, VR;
           guint32               size;
           guint8*               data;
-
-          std::vector<guint>    item_number;
+          std::vector<Sequence>  sequence;
 
           void                  set (const String& filename);
           bool                  read ();
@@ -89,6 +93,8 @@ namespace MR {
           std::vector<String>   get_string () const;
           guint                 offset (guint8* address) const;
 
+          guint                 level () const { return sequence.size(); }
+
           void                  print () const;
 
           friend std::ostream& operator<< (std::ostream& stream, const Element& item);
diff --git a/lib/file/dicom/image.cpp b/lib/file/dicom/image.cpp
index 408fb7e..553c2ae 100644
--- a/lib/file/dicom/image.cpp
+++ b/lib/file/dicom/image.cpp
@@ -57,90 +57,153 @@ namespace MR {
 
 
 
-      void Image::parse_item (Element& item, const String& dirname)
+      void Image::parse_item (Element& item, bool print_DICOM_fields, bool print_CSA_fields)
       {
-        switch (item.group) {
-          case 0x0004U: 
-            if (item.element == 0x1500U) {
-              assert (dirname.size());
-              filename = dirname;
-              std::vector<String> V (item.get_string());
-              for (guint n = 0; n < V.size(); n++) 
-                filename = Glib::build_filename (filename, V[n]);
-            }
+        if (print_DICOM_fields) 
+          print (str(item) + "\n");
+
+        // is this tag top-level or per-frame:
+        bool is_toplevel = (item.level() == 0);
+        for (guint n = 0; n < item.level(); ++n) {
+          if (item.sequence[n].group == 0x5200U && (
+                item.sequence[n].element == 0x9230U ||  // per-frame tag
+                item.sequence[n].element == 0x9229U)) { // shared across frames tag
+            is_toplevel = true; 
             break;
+          }
+        }
+
+
+
+        // process image-specific or per-frame items here:
+        if (is_toplevel) {
+          switch (item.group) {
+            case 0x0018U: 
+              switch (item.element) {
+                case 0x0050U: slice_thickness = item.get_float()[0]; return;
+                case 0x1310U: acq_dim[0] = MAX (item.get_uint()[0], item.get_uint()[1]);
+                              acq_dim[1] = MAX (item.get_uint()[2], item.get_uint()[3]);
+                              return;
+                case 0x0024U: sequence_name = item.get_string()[0];
+                              if (!sequence_name.size()) return;
+                              { 
+                                int c = sequence_name.size()-1;
+                                while (c >= 0 && isdigit (sequence_name[c])) c--;
+                                c++;
+                                sequence = to<guint> (sequence_name.substr (c));
+                              }
+                              return;
+                case 0x9087U: bvalue = item.get_float()[0]; return;
+                case 0x9089U: G[0] = item.get_float()[0];
+                              G[1] = item.get_float()[1];
+                              G[2] = item.get_float()[2];
+                              return;
+              }
+              return;
+            case 0x0020U: 
+              switch (item.element) {
+                case 0x0011U: series_num = item.get_uint()[0]; return;
+                case 0x0012U: acq = item.get_uint()[0]; return;
+                case 0x0013U: instance = item.get_uint()[0]; return;
+                case 0x0032U: position_vector[0] = item.get_float()[0];
+                              position_vector[1] = item.get_float()[1];
+                              position_vector[2] = item.get_float()[2];
+                              return;
+                case 0x0037U: orientation_x[0] = item.get_float()[0];
+                              orientation_x[1] = item.get_float()[1];
+                              orientation_x[2] = item.get_float()[2];
+                              orientation_y[0] = item.get_float()[3];
+                              orientation_y[1] = item.get_float()[4];
+                              orientation_y[2] = item.get_float()[5];
+                              Math::normalise (orientation_x);
+                              Math::normalise (orientation_y);
+                              return;
+                case 0x9157U: index = item.get_uint();
+                              if (frame_dim.size() < index.size())
+                                frame_dim.resize (index.size());
+                              for (guint n = 0; n < index.size(); ++n)
+                                if (frame_dim[n] < index[n])
+                                  frame_dim[n] = index[n];
+                              return;
+              }
+              return;
+            case 0x0028U:
+              switch (item.element) {
+                case 0x0010U: dim[1] = item.get_uint()[0]; return;
+                case 0x0011U: dim[0] = item.get_uint()[0]; return;
+                case 0x0030U: pixel_size[0] = item.get_float()[0];
+                              pixel_size[1] = item.get_float()[1]; 
+                              return;
+                case 0x0100U: bits_alloc = item.get_uint()[0]; return;
+                case 0x1052U: scale_intercept = item.get_float()[0]; return;
+                case 0x1053U: scale_slope = item.get_float()[0]; return;
+              }
+              return;
+            case 0xFFFEU: 
+              switch (item.element) {
+                case 0xE000U:
+                  if (item.sequence.back().group ==  0x5200U &&
+                      item.sequence.back().element == 0x9230U) { // multi-frame item
+                    if (in_frames) {
+                      calc_distance();
+                      frames.push_back (RefPtr<Frame> (new Frame (*this)));
+                      frame_offset += dim[0] * dim[1] * (bits_alloc/8);
+                    }
+                    else 
+                      in_frames = true;
+                  }
+                  return;
+              }
+              return;
+            case 0x7FE0U: 
+              if (item.element == 0x0010U) {
+                data = item.offset (item.data);
+                data_size = item.size;
+                is_BE = item.is_big_endian();
+                return;
+              }
+              return;
+
+          }
+
+        }
+
+
+
+
+        // process more non-specific stuff here:
+
+        switch (item.group) {
           case 0x0008U: 
             if (item.element == 0x0070U) manufacturer = item.get_string()[0];
             return;
-          case 0x0018U: 
-            switch (item.element) {
-              case 0x0050U: slice_thickness = item.get_float()[0]; return;
-              case 0x1310U: acq_dim[0] = MAX (item.get_uint()[0], item.get_uint()[1]);
-                            acq_dim[1] = MAX (item.get_uint()[2], item.get_uint()[3]);
-                            return;
-              case 0x0024U: sequence_name = item.get_string()[0];
-                            if (!sequence_name.size()) return;
-                            { 
-                              int c = sequence_name.size()-1;
-                              while (c >= 0 && isdigit (sequence_name[c])) c--;
-                              c++;
-                              sequence = to<guint> (sequence_name.substr (c));
-                            }
-                            return;
-              case 0x9087U: bvalue = item.get_float()[0]; return;
-              case 0x9089U: G[0] = item.get_float()[0];
-                            G[1] = item.get_float()[1];
-                            G[2] = item.get_float()[2];
-                            return;
-            }
-            return;
           case 0x0019U: 
             switch (item.element) { // GE DW encoding info:
               case 0x10BBU: if (item.get_float().size()) G[0] = item.get_float()[0]; return;
               case 0x10BCU: if (item.get_float().size()) G[1] = item.get_float()[0]; return;
               case 0x10BDU: if (item.get_float().size()) G[2] = item.get_float()[0]; return;
-            }
-            return;
-          case 0x0020U: 
-            switch (item.element) {
-              case 0x0012U: acq = item.get_uint()[0]; return;
-              case 0x0013U: instance = item.get_uint()[0]; return;
-              case 0x0032U: position_vector[0] = item.get_float()[0];
-                            position_vector[1] = item.get_float()[1];
-                            position_vector[2] = item.get_float()[2];
-                            return;
-              case 0x0037U: orientation_x[0] = item.get_float()[0];
-                            orientation_x[1] = item.get_float()[1];
-                            orientation_x[2] = item.get_float()[2];
-                            orientation_y[0] = item.get_float()[3];
-                            orientation_y[1] = item.get_float()[4];
-                            orientation_y[2] = item.get_float()[5];
-                            Math::normalise (orientation_x);
-                            Math::normalise (orientation_y);
-                            return;
-            }
-            return;
-          case 0x0028U:
-            switch (item.element) {
-              case 0x0010U: dim[1] = item.get_uint()[0]; return;
-              case 0x0011U: dim[0] = item.get_uint()[0]; return;
-              case 0x0030U: pixel_size[0] = item.get_float()[0];
-                            pixel_size[1] = item.get_float()[1]; 
+                              //Siemens private DW encoding tags:
+              case 0x100CU: if (item.get_int().size()) bvalue = item.get_int()[0]; return;
+              case 0x100EU: if (item.get_float().size() == 3) {
+                              G[0] = item.get_float()[0];
+                              G[1] = item.get_float()[1];
+                              G[2] = item.get_float()[2];
+                            }
                             return;
-              case 0x0100U: bits_alloc = item.get_uint()[0]; return;
-              case 0x1052U: scale_intercept = item.get_float()[0]; return;
-              case 0x1053U: scale_slope = item.get_float()[0]; return;
             }
             return;
           case 0x0029U: // Siemens CSA entry
             if (item.element == 0x1010U || item.element == 0x1020U) {
-              decode_csa (item.data, item.data + item.size);
+              decode_csa (item.data, item.data + item.size, print_CSA_fields);
               return;
             }
             else return;
           case 0x0043U: // GEMS_PARMS_01 block
-              if (item.element == 0x1039U) if (item.get_int().size()) bvalue = item.get_int()[0];
-              return;
+            if (item.element == 0x1039U) {
+              if (item.get_int().size()) bvalue = item.get_int()[0];
+              DW_scheme_wrt_image = true;
+            }
+            return;
           case 0x2001U: // Philips DW encoding info: 
             if (item.element == 0x1003) bvalue = item.get_float()[0];
             return;
@@ -151,17 +214,9 @@ namespace MR {
               case 0x10B2U: G[2] = item.get_float()[0]; return;
             }
             return;
-          case 0x7FE0U: 
-            if (item.element == 0x0010U) {
-              data = item.offset (item.data);
-              data_size = item.size;
-              is_BE = item.is_big_endian();
-              return;
-            }
-            return;
         }
 
-        return;
+
       }
 
 
@@ -169,31 +224,55 @@ namespace MR {
 
 
 
-      void Image::read ()
+      void Image::read (bool print_DICOM_fields, bool print_CSA_fields)
       {
         Element item;
         item.set (filename);
 
         while (item.read()) 
-          if (item.item_number.size() == 0)
-            parse_item (item);
+          parse_item (item, print_DICOM_fields, print_CSA_fields);
 
         calc_distance();
-      }
-
 
+        if (frame_offset > 0)
+          frames.push_back (RefPtr<Frame> (new Frame (*this)));
 
+        else if (images_in_mosaic > 0) {
+          if (dim[0] % acq_dim[0] || dim[1] % acq_dim[1]) {
+            error ("WARNING: acquisition matrix [ " + str (acq_dim[0]) + " " + str (acq_dim[1]) 
+                + " ] does not fit into DICOM mosaic [ " + str (dim[0]) + " " + str (dim[1]) 
+                + " ] in image \"" + filename + "\" - adjusting matrix size to suit");
+            acq_dim[0] = dim[0] / guint (float(dim[0]) / float(acq_dim[0]));
+            acq_dim[1] = dim[1] / guint (float(dim[1]) / float(acq_dim[1]));
+          }
 
+          gfloat xinc = pixel_size[0] * (dim[0] - acq_dim[0]) / 2.0;
+          gfloat yinc = pixel_size[1] * (dim[1] - acq_dim[1]) / 2.0;
+          for (guint i = 0; i < 3; i++) 
+            position_vector[i] += xinc * orientation_x[i] + yinc * orientation_y[i];
+
+          row_stride = dim[0];
+          dim[0] = acq_dim[0];
+          dim[1] = acq_dim[1];
+
+          guint row_size = dim[0] * (bits_alloc/8);
+          guint nframes_per_row = row_stride / dim[0];
+          guint nx = 0, ny = 0;
+          for (guint z = 0; z < images_in_mosaic; z++) {
+            Frame* frame = new Frame (*this);
+            frame->frame_offset = row_size * (nx + ny * nframes_per_row * dim[1]); 
+            for (guint n = 0; n < 3; ++n) 
+              frame->position_vector[n] = position_vector[n] + z * slice_thickness * orientation_z[n];
+            frame->distance = Math::dot_product (orientation_z, frame->position_vector);
+            frames.push_back (RefPtr<Frame> (frame));
+
+            ++nx;
+            if (nx >= nframes_per_row) { nx = 0; ++ny; }
+          }
+        }
 
-      bool Image::operator< (const Image& ima) const
-      {
-        if (acq != ima.acq) return (acq < ima.acq);
-        assert (!gsl_isnan(distance));
-        assert (!gsl_isnan(ima.distance));
-        if (distance != ima.distance) return (distance < ima.distance);
-        if (sequence != ima.sequence) return (sequence < ima.sequence);
-        if (instance != ima.instance) return (instance < ima.instance);
-        return (false);
+        for (guint n = 0; n < frames.size(); ++n) 
+          frames[n]->data = data + frames[n]->frame_offset;
       }
 
 
@@ -201,40 +280,21 @@ namespace MR {
 
 
 
-      void Image::print_fields (bool dcm, bool csa) const
-      {
-        if (!filename.size()) return;
-
-        Element item;
-        item.set (filename);
-
-        fprintf (stdout, 
-            "**********************************************************\n"\
-            "  %s\n" \
-            "**********************************************************\n", 
-            filename.c_str());
 
-        while (item.read()) {
-          if (dcm) item.print();
-          if (csa && item.group == 0x0029U) {
-            if (item.element == 0x1010U || item.element == 0x1020U) {
-              CSAEntry entry (item.data, item.data + item.size, true);
-              while (entry.parse() == 0);
-            }
-          }
-        }
-      }
 
 
 
 
 
 
-      void Image::decode_csa (const guint8* start, const guint8* end)
+      void Image::decode_csa (const guint8* start, const guint8* end, bool print_fields)
       {
         CSAEntry entry (start, end);
 
         while (entry.parse()) {
+          if (print_fields)
+            print (str(entry) + "\n");
+
           if (strcmp ("B_value", entry.key()) == 0) bvalue = entry.get_float();
           else if (strcmp ("DiffusionGradientDirection", entry.key()) == 0) entry.get_float (G);
           else if (strcmp ("NumberOfImagesInMosaic", entry.key()) == 0) images_in_mosaic = entry.get_int();
@@ -244,33 +304,183 @@ namespace MR {
         if (G[0] && bvalue)
           if (fabs(G[0]) > 1.0 && fabs(G[1]) > 1.0 && fabs(G[2]) > 1.0)
             bvalue = G[0] = G[1] = G[2] = 0.0;
-      }
-
-
 
+      }
 
 
 
-      std::ostream& operator<< (std::ostream& stream, const Image& item)
+      std::ostream& operator<< (std::ostream& stream, const Frame& item)
       {
-        stream << "            " << ( item.instance == UINT_MAX ? 0 : item.instance ) << "#" 
+        stream << ( item.instance == UINT_MAX ? 0 : item.instance ) << "#" 
           << ( item.acq == UINT_MAX ? 0 : item.acq) << ":"
-          << ( item.sequence == UINT_MAX ? 0 : item.sequence ) << " (" 
-          << ( item.sequence_name.size() ? item.sequence_name : "?" ) << "), "
+          << ( item.sequence == UINT_MAX ? 0 : item.sequence ) << " " 
           << item.dim[0] << "x" << item.dim[1] << ", "
           << item.pixel_size[0] << "x" << item.pixel_size[1] << " x " 
-          << item.slice_thickness << " mm, [ "
+          << item.slice_thickness << " mm, z = " << item.distance 
+          << ( item.index.size() ? ", index = " + str(item.index) : String() ) << ", [ "
           << item.position_vector[0] << " " << item.position_vector[1] << " " << item.position_vector[2] << " ] [ "
           << item.orientation_x[0] << " " << item.orientation_x[1] << " " << item.orientation_x[2] << " ] [ "
-          << item.orientation_y[0] << " " << item.orientation_y[1] << " " << item.orientation_y[2] << " ] "
-          << ( item.filename.size() ? item.filename : "" ) << "\n";
-             
-        return (stream);
+          << item.orientation_y[0] << " " << item.orientation_y[1] << " " << item.orientation_y[2] << " ]";
+        if (gsl_finite (item.bvalue)) {
+          stream << ", b = " << item.bvalue;
+          if (item.bvalue > 0.0)
+            stream << ", G = [ " << item.G[0] << " " << item.G[1] << " " << item.G[2] << " ]";
+        }
+
+
+        return stream;
+      }
+
+
+
+      std::ostream& operator<< (std::ostream& stream, const Image& item)
+      {
+        stream << ( item.filename.size() ? item.filename : "file not set" ) << ":\n" 
+          << ( item.sequence_name.size() ? item.sequence_name : "sequence not set" ) << " [" 
+          << (item.manufacturer.size() ? item.manufacturer : String("unknown manufacturer")) << "] "
+          << (item.frames.size() > 0 ? str(item.frames.size()) + " frames with dim " + str(item.frame_dim) : String());
+        if (item.frames.size()) {
+          for (guint n = 0; n < item.frames.size(); ++n)
+            stream << "  " << static_cast<Frame>(*item.frames[n]) << "\n";
+        }
+        else 
+          stream << "  " << static_cast<Frame>(item) << "\n";
+
+        return stream;
+      }
+
+
+
+
+
+
+      namespace {
+
+        inline void update_count (guint num, std::vector<guint>& dim, std::vector<guint>& index)
+        {
+          for (guint n = 0; n < num; ++n) {
+            if (dim[n] && index[n] != dim[n])
+              throw Exception ("dimensions mismatch in DICOM series");
+            index[n] = 1;
+          }
+          ++index[num];
+          dim[num] = index[num];
+        }
+
+      }
+
+
+      std::vector<guint> Frame::count (const std::vector<Frame*>& frames) 
+      {
+        std::vector<guint> dim (3, 0);
+        std::vector<guint> index (3, 1);
+        const Frame* previous = frames[0];
+
+        for (std::vector<Frame*>::const_iterator frame_it = frames.begin()+1; frame_it != frames.end(); ++frame_it) {
+          const Frame& frame (**frame_it);
+
+          if (frame.series_num != previous->series_num ||
+              frame.acq != previous->acq) 
+            update_count (2, dim, index);
+          else if (frame.distance != previous->distance) 
+            update_count (1, dim, index);
+          else 
+            update_count (0, dim, index);
+
+          previous = &frame;
+
+        }
+
+        if (!dim[0]) dim[0] = 1;
+        if (!dim[1]) dim[1] = 1;
+        if (!dim[2]) dim[2] = 1;
+
+        return dim;
+      }
+
+
+
+
+
+      gfloat Frame::get_slice_separation (const std::vector<Frame*>& frames, guint nslices)
+      {
+        bool slicesep_warning_issued = false;
+        bool slicegap_warning_issued = false;
+
+        float slice_separation = frames[0]->slice_thickness;
+        for (guint n = 0; n < nslices-1; ++n) {
+          float current_slice_separation = frames[n+1]->distance - frames[n]->distance;
+          if (!gsl_finite (slice_separation)) {
+            slice_separation = current_slice_separation;
+            continue;
+          }
+
+          if (!slicegap_warning_issued) {
+            if (fabs (current_slice_separation - frames[n]->slice_thickness) > 1e-4) {
+              error ("WARNING: slice gap detected");
+              slicegap_warning_issued = true;
+              slice_separation = current_slice_separation;
+            }
+          }
+
+          if (!slicesep_warning_issued) {
+            if (fabs (current_slice_separation - slice_separation) > 1e-4) {
+              slicesep_warning_issued = true;
+              error ("WARNING: slice separation is not constant");
+            }
+          }
+        }
+
+        return slice_separation;
       }
 
 
 
 
+
+      Math::Matrix Frame::get_DW_scheme (const std::vector<Frame*>& frames, guint nslices, const Math::Matrix& image_transform)
+      {
+        Math::Matrix G;
+
+        if (gsl_isnan (frames[0]->bvalue)) {
+          debug ("no DW encoding information found in DICOM frames");
+          return G;
+        }
+
+        const guint nDW = frames.size() / nslices;
+
+        G.allocate (nDW, 4);
+        const bool rotate_DW_scheme = frames[0]->DW_scheme_wrt_image;
+        for (guint n = 0; n < nDW; ++n) {
+          const Frame& frame (*frames[n*nslices]);
+
+          G(n,3) = frame.bvalue;
+          G(n,0) = G(n,1) = G(n,2) = 0.0;
+
+          if (G(n,3)) {
+            float norm = Math::magnitude (frame.G);
+            G(n,3) *= norm;
+            if (norm) {
+              float d[] = { frame.G[0]/norm, frame.G[1]/norm, frame.G[2]/norm };
+              if (rotate_DW_scheme) {
+                G(n,0) = image_transform(0,0)*d[0] + image_transform(0,1)*d[1] - image_transform(0,2)*d[2];
+                G(n,1) = image_transform(1,0)*d[0] + image_transform(1,1)*d[1] - image_transform(1,2)*d[2];
+                G(n,2) = image_transform(2,0)*d[0] + image_transform(2,1)*d[1] - image_transform(2,2)*d[2];
+              }
+              else { 
+                G(n,0) = -d[0];
+                G(n,1) = -d[1];
+                G(n,2) =  d[2];
+              }
+            }
+          }
+
+        }
+
+        return G;
+      }
+
+
     }
   }
 }
diff --git a/lib/file/dicom/image.h b/lib/file/dicom/image.h
index d60f9f6..af7da7e 100644
--- a/lib/file/dicom/image.h
+++ b/lib/file/dicom/image.h
@@ -31,7 +31,6 @@
 #define __file_dicom_image_h__
 
 #include "ptr.h"
-#include "data_type.h"
 #include "math/vector.h"
 #include "file/dicom/element.h"
 
@@ -42,40 +41,79 @@ namespace MR {
       class Series;
       class Element;
 
-      class Image {
-
+      class Frame { 
         public:
-          Image (Series* parent = NULL);
-
-          String            filename;
-          String            sequence_name;
-          String            manufacturer;
-          Series*           series;
+          Frame () { 
+            acq_dim[0] = acq_dim[1] = dim[0] = dim[1] = row_stride = instance = series_num = acq = sequence = UINT_MAX;
+            position_vector[0] = position_vector[1] = position_vector[2] = GSL_NAN;
+            orientation_x[0] = orientation_x[1] = orientation_x[2] = GSL_NAN;
+            orientation_y[0] = orientation_y[1] = orientation_y[2] = GSL_NAN;
+            orientation_z[0] = orientation_z[1] = orientation_z[2] = GSL_NAN;
+            distance = GSL_NAN;
+            pixel_size[0] = pixel_size[1] = slice_thickness = GSL_NAN; 
+            scale_intercept = 0.0;
+            scale_slope = 1.0;
+            bvalue = G[0] = G[1] = G[2] = GSL_NAN;
+            data = bits_alloc = data_size = frame_offset = 0;
+            DW_scheme_wrt_image = false;
+          }
 
-          guint             acq_dim[2], dim[2], instance, acq, sequence;
-          gfloat            position_vector[3], orientation_x[3], orientation_y[3], orientation_z[3], distance;
-          gfloat            pixel_size[2], slice_thickness, scale_slope, scale_intercept;
-          gfloat            bvalue, G[3];
-          guint             data, bits_alloc, images_in_mosaic, data_size;
-          DataType          data_type;
-          bool              is_BE;
+          guint  acq_dim[2], dim[2], row_stride, series_num, instance, acq, sequence;
+          gfloat position_vector[3], orientation_x[3], orientation_y[3], orientation_z[3], distance;
+          gfloat pixel_size[2], slice_thickness, scale_slope, scale_intercept;
+          gfloat bvalue, G[3];
+          guint  data, bits_alloc, data_size, frame_offset;
+          String filename;
+          bool DW_scheme_wrt_image;
+          std::vector<guint32> index;
+
+
+          bool operator< (const Frame& frame) const {
+            if (series_num != frame.series_num) return series_num < frame.series_num;
+            if (acq != frame.acq) return acq < frame.acq;
+            assert (!gsl_isnan(distance));
+            assert (!gsl_isnan(frame.distance));
+            if (distance != frame.distance) return distance < frame.distance;
+            for (guint n = index.size(); n--;)
+              if (index[n] != frame.index[n])
+                return index[n] < frame.index[n];
+            if (sequence != frame.sequence) return sequence < frame.sequence;
+            if (instance != frame.instance) return instance < frame.instance;
+            return false;
+          }
 
-          void              read ();
-          void              parse_item (Element& item, const String& dirname = "");
-          void              decode_csa (const guint8* start, const guint8* end);
 
-          void              calc_distance ();
+          void calc_distance ()
+          {
+            if (gsl_isnan (orientation_z[0])) 
+              Math::cross_product (orientation_z, orientation_x, orientation_y);
+            else {
+              float normal[3];
+              Math::cross_product (normal, orientation_x, orientation_y);
+              if (Math::dot_product (normal, orientation_z) < 0.0) {
+                orientation_z[0] = -normal[0];
+                orientation_z[1] = -normal[1];
+                orientation_z[2] = -normal[2];
+              }
+              else {
+                orientation_z[0] = normal[0];
+                orientation_z[1] = normal[1];
+                orientation_z[2] = normal[2];
+              }
+            }
+            row_stride = dim[0];
+
+            Math::normalise (orientation_z);
+            distance = Math::dot_product (orientation_z, position_vector);
+          }
 
-          bool              operator< (const Image& ima) const;
+          static std::vector<guint> count (const std::vector<Frame*>& frames);
+          static gfloat get_slice_separation (const std::vector<Frame*>& frames, guint nslices);
+          static Math::Matrix get_DW_scheme (const std::vector<Frame*>& frames, guint nslices, const Math::Matrix& image_transform);
 
-          void              print_fields (bool dcm, bool csa) const;
+          friend std::ostream& operator<< (std::ostream& stream, const Frame& item);
       };
 
-      std::ostream& operator<< (std::ostream& stream, const Image& item);
-
-
-
-
 
 
 
@@ -86,56 +124,37 @@ namespace MR {
 
 
 
-      inline Image::Image (Series* parent) :
-        series (parent)
-      { 
-        acq_dim[0] = acq_dim[1] = dim[0] = dim[1] = instance = acq = sequence = UINT_MAX;
-        position_vector[0] = position_vector[1] = position_vector[2] = GSL_NAN;
-        orientation_x[0] = orientation_x[1] = orientation_x[2] = GSL_NAN;
-        orientation_y[0] = orientation_y[1] = orientation_y[2] = GSL_NAN;
-        orientation_z[0] = orientation_z[1] = orientation_z[2] = GSL_NAN;
-        distance = GSL_NAN;
-        pixel_size[0] = pixel_size[1] = slice_thickness = GSL_NAN; 
-        scale_intercept = 0.0;
-        scale_slope = 1.0;
-        bvalue = G[0] = G[1] = G[2] = GSL_NAN;
-        data = bits_alloc = images_in_mosaic = data_size = 0;
-        is_BE = false;
-      }
-
-
-
-
+      class Image : public Frame {
 
+        public:
+          Image (Series* parent = NULL) : 
+            series (parent), 
+            images_in_mosaic (0),
+            is_BE (false),
+            in_frames (false) { }
+
+          Series* series;
+          guint images_in_mosaic;
+          String  sequence_name, manufacturer;
+          bool   is_BE, in_frames;
+
+          std::vector<guint32> frame_dim;
+          std::vector< RefPtr<Frame> > frames;
+
+          void read (bool print_DICOM_fields = false, bool print_CSA_fields = false);
+          void parse_item (Element& item, bool print_DICOM_fields = false, bool print_CSA_fields = false);
+          void decode_csa (const guint8* start, const guint8* end, bool print_fields = false);
+
+          bool operator< (const Image& ima) const {
+            return Frame::operator< (ima);
+          }
 
+          friend std::ostream& operator<< (std::ostream& stream, const Image& item);
+      };
 
-      inline void Image::calc_distance ()
-      {
-        if (images_in_mosaic) {
-          gfloat xinc = pixel_size[0] * (dim[0] - acq_dim[0]) / 2.0;
-          gfloat yinc = pixel_size[1] * (dim[1] - acq_dim[1]) / 2.0;
-          for (guint i = 0; i < 3; i++) 
-            position_vector[i] += xinc * orientation_x[i] + yinc * orientation_y[i];
 
-          float normal[3];
-          Math::cross_product (normal, orientation_x, orientation_y);
-          if (Math::dot_product (normal, orientation_z) < 0.0) {
-            orientation_z[0] = -normal[0];
-            orientation_z[1] = -normal[1];
-            orientation_z[2] = -normal[2];
-          }
-          else {
-            orientation_z[0] = normal[0];
-            orientation_z[1] = normal[1];
-            orientation_z[2] = normal[2];
-          }
 
-        }
-        else Math::cross_product (orientation_z, orientation_x, orientation_y);
 
-        Math::normalise (orientation_z);
-        distance = Math::dot_product (orientation_z, position_vector);
-      }
 
 
     }
diff --git a/lib/file/dicom/mapper.cpp b/lib/file/dicom/mapper.cpp
index e25f504..6ee57a8 100644
--- a/lib/file/dicom/mapper.cpp
+++ b/lib/file/dicom/mapper.cpp
@@ -51,80 +51,84 @@ namespace MR {
 
       namespace {
         const gchar* FormatDICOM = "DICOM";
+
+        inline void add_axis (const char* label, MR::Image::Axes& axes, guint& current_axis, guint& current_stride, guint size) 
+        {
+          if (size > 1) {
+            axes.axis[current_axis] = current_stride++;
+            axes.dim[current_axis] = size;
+            axes.desc[current_axis] = label;
+            ++current_axis;
+          }
+        }
       }
 
 
       void dicom_to_mapper (
           MR::Image::Mapper& dmap, 
           MR::Image::Header& H, 
-          std::vector< RefPtr<Series> >& series)
+          std::vector< RefPtr<Series> >& series_list)
       {
-        assert (series.size() > 0);
+        assert (series_list.size() > 0);
         H.format = FormatDICOM;
 
-        Patient* patient (series[0]->study->patient);
+        Patient* patient (series_list[0]->study->patient);
         String sbuf = ( patient->name.size() ? patient->name : "unnamed" );
         sbuf += " " + format_ID (patient->ID);
-        if (series[0]->modality.size()) sbuf += String (" [") + series[0]->modality + "]";
-        if (series[0]->name.size()) sbuf += String (" ") + series[0]->name;
+        if (series_list[0]->modality.size()) sbuf += String (" [") + series_list[0]->modality + "]";
+        if (series_list[0]->name.size()) sbuf += String (" ") + series_list[0]->name;
         H.comments.push_back (sbuf);
         H.name = sbuf;
 
-        for (guint s = 0; s < series.size(); s++) {
-          try { series[s]->read(); }
+        // build up sorted list of frames:
+        std::vector<Frame*> frames;
+
+        // loop over series list:
+        for (std::vector< RefPtr<Series> >::const_iterator series_it = series_list.begin(); series_it != series_list.end(); ++series_it) {
+          Series& series (**series_it);
+
+          try {
+            series.read();
+          }
           catch (Exception) { 
-            throw Exception ("error reading series " + str (series[s]->number) + " of DICOM image \"" + H.name + "\""); 
+            throw Exception ("error reading series " + str (series.number) + " of DICOM image \"" + H.name + "\""); 
           }
-        }
 
+          std::sort (series.begin(), series.end());
 
-        guint series_count = series[0]->size();
-        sort (series[0]->begin(), series[0]->end());
-        std::vector<int> dim = series[0]->count ();
+          // loop over images in each series:
+          for (Series::const_iterator image_it = series.begin(); image_it != series.end(); ++image_it) {
+            Image& image (**image_it);
 
-        for (guint s = 1; s < series.size(); s++) {
-          if (series[s]->size() != series_count) 
-            throw Exception ("DICOM series selected do not have the same number of images");
+            // if multi-frame, loop over frames in image:
+            if (image.frames.size()) {
+              std::sort (image.frames.begin(), image.frames.end());
+              for (std::vector< RefPtr<Frame> >::const_iterator frame_it = image.frames.begin(); frame_it != image.frames.end(); ++frame_it) 
+                frames.push_back (&**frame_it);
+            }
+            // otherwise add image frame:
+            else 
+              frames.push_back (&image);
 
-          sort (series[s]->begin(), series[s]->end());
-          std::vector<int> dim_tmp = series[s]->count();
-          if (dim[0] != dim_tmp[0] || dim[1] != dim_tmp[1] || dim[2] != dim_tmp[2]) 
-            error ("WARNING: DICOM series selected do not have the same dimensions");
+          }
         }
 
+        std::vector<guint> dim = Frame::count (frames);
 
-
-        bool slicesep_warning = false;
-        bool slicegap_warning = false;
-
-
-        float slice_separation = (*series[0])[0]->slice_thickness;
-        for (guint s = 0; s < series.size(); s++) {
-          float previous_distance = (*series[s])[0]->distance;
-          for (int i = 1; i < dim[1]; i++) {
-            const Image& image (*(*series[s])[i*dim[0]]);
-            if (!slicegap_warning) {
-              if (fabs (image.distance - previous_distance - image.slice_thickness) > 1e-4) {
-                error ("WARNING: slice gap detected");
-                slicegap_warning = true;
-                slice_separation = image.distance - previous_distance;
-              }
-            }
-
-            if (!slicesep_warning) {
-              if (fabs(image.distance - previous_distance - slice_separation) > 1e-4) {
-                slicesep_warning = true;
-                error ("WARNING: slice separation is not constant");
-              }
-            }
-            previous_distance = image.distance;
-          }
+        if (dim[0] > 1) { // switch axes so slice dim is inner-most:
+          std::vector<Frame*> list (frames);
+          std::vector<Frame*>::iterator it = frames.begin();
+          for (guint k = 0; k < dim[2]; ++k) 
+            for (guint i = 0; i < dim[0]; ++i) 
+              for (guint j = 0; j < dim[1]; ++j) 
+                *(it++) = list[i+dim[0]*(j+dim[1]*k)];
         }
 
+        gfloat slice_separation = Frame::get_slice_separation (frames, dim[1]);
 
 
-        if (series[0]->study->name.size()) {
-          sbuf = "study: " + series[0]->study->name;
+        if (series_list[0]->study->name.size()) {
+          sbuf = "study: " + series_list[0]->study->name;
           H.comments.push_back (sbuf);
         }
 
@@ -133,77 +137,50 @@ namespace MR {
           H.comments.push_back (sbuf);
         }
 
-        if (series[0]->date.size()) {
-          sbuf = "DOS: " + format_date (series[0]->date);
-          if (series[0]->time.size()) 
-            sbuf += " " + format_time (series[0]->time);
+        if (series_list[0]->date.size()) {
+          sbuf = "DOS: " + format_date (series_list[0]->date);
+          if (series_list[0]->time.size()) 
+            sbuf += " " + format_time (series_list[0]->time);
           H.comments.push_back (sbuf);
         }
 
+
+
+
+
         MR::Image::Axes& axes (H.axes);
-        const Image& image (*(*series[0])[0]);
+        const Image& image (*(*series_list[0])[0]);
 
-        series_count = 3;
-        guint expected_data_size = image.dim[0] * image.dim[1] * (image.bits_alloc/8);
-        if (image.data_size > expected_data_size) {
+        guint nchannels = image.frames.size() ? 1 : image.data_size / (image.dim[0] * image.dim[1] * (image.bits_alloc/8));
+        if (nchannels > 1) 
           info ("data segment is larger than expected from image dimensions - interpreting as multi-channel data");
-          series_count++;
-        }
-        if (dim[0] > 1) series_count++;
-        if (dim[2] > 1) series_count++;
-        if (series.size() > 1) series_count++;
-        axes.set_ndim (series_count);
-
-        int current_axis = 0;
-        if (image.data_size > expected_data_size) {
-          axes.axis[3] = 0;
-          axes.dim[3] = image.data_size / expected_data_size;
-          axes.vox[3] = GSL_NAN;
-          axes.desc[3].clear();
-          axes.units[3].clear();
-          current_axis = 1;
-        }
 
-        axes.axis[0] = current_axis;
+        axes.set_ndim (3 + (dim[0]*dim[2]>1) + (nchannels>1));
+
+        guint current_axis = 3;
+        guint current_stride = 0;
+
+        add_axis ("channel", axes, current_axis, current_stride, nchannels);
+
+        axes.axis[0] = current_stride++;
         axes.dim[0] = image.dim[0];
         axes.vox[0] = image.pixel_size[0];
         axes.desc[0] = MR::Image::Axis::left_to_right;
         axes.units[0] = MR::Image::Axis::millimeters;
-        current_axis++;
 
-        axes.axis[1] = current_axis;
+        axes.axis[1] = current_stride++;
         axes.dim[1] = image.dim[1];
         axes.vox[1] = image.pixel_size[1];
         axes.desc[1] = MR::Image::Axis::posterior_to_anterior;
         axes.units[1] = MR::Image::Axis::millimeters;
-        current_axis++;
 
-        axes.axis[2] = current_axis;
+        axes.axis[2] = current_stride++;
         axes.dim[2] = dim[1];
         axes.vox[2] = slice_separation;
         axes.desc[2] = MR::Image::Axis::inferior_to_superior;
         axes.units[2] = MR::Image::Axis::millimeters;
-        current_axis++;
-
-        if (dim[0] > 1) {
-          axes.axis[current_axis] = current_axis;
-          axes.dim[current_axis] = dim[0];
-          axes.desc[current_axis] = "sequence";
-          current_axis++;
-        }
 
-        if (dim[2] > 1) {
-          axes.axis[current_axis] = current_axis;
-          axes.dim[current_axis] = dim[2];
-          axes.desc[current_axis] = "acquisition";
-          current_axis++;
-        }
-
-        if (series.size() > 1) {
-          axes.axis[current_axis] = current_axis;
-          axes.dim[current_axis] = series.size();
-          axes.desc[current_axis] = "series";
-        }
+        add_axis ("volume", axes, current_axis, current_stride, dim[0]*dim[2]);
 
         if (image.bits_alloc == 8) H.data_type = DataType::UInt8;
         else if (image.bits_alloc == 16) {
@@ -239,111 +216,62 @@ namespace MR {
         M(2,3) = image.position_vector[2];
         M(3,3) = 1.0;
 
-        guint8* mem = NULL;
-        guint8* data = NULL;
+        H.set_transform (M);
 
-        guint acq_dim[2] = { image.acq_dim[0], image.acq_dim[1] };
 
-        if (image.images_in_mosaic) {
-          if (axes.dim[2] != 1) 
-            throw Exception ("DICOM mosaic contains multiple slices in image \"" + H.name + "\"");
+        H.DW_scheme = Frame::get_DW_scheme (frames, dim[1], M);
 
-          if (image.dim[0] % acq_dim[0] || image.dim[1] % acq_dim[1]) {
-            error ("WARNING: acquisition matrix [ " + str (acq_dim[0]) + " " + str (acq_dim[1]) 
-                + " ] does not fit into DICOM mosaic [ " + str (image.dim[0]) + " " + str (image.dim[1]) 
-                + " ] in image \"" + H.name + "\" - adjusting matrix size to suit");
-            acq_dim[0] = image.dim[0] / guint (float(image.dim[0]) / float(acq_dim[0]));
-            acq_dim[1] = image.dim[1] / guint (float(image.dim[1]) / float(acq_dim[1]));
-          }
 
-          ProgressBar::init (dim[0]*dim[2]*series.size(), "DICOM image contains mosaic files - reformating..."); 
 
-          axes.dim[0] = acq_dim[0];
-          axes.dim[1] = acq_dim[1];
-          axes.dim[2] = image.images_in_mosaic;
-          guint msize = H.data_type.bytes();
-          for (int i = 0; i < axes.ndim(); i++) 
-            msize *= axes.dim[i];
+        for (guint n = 1; n < frames.size(); ++n) // check consistency of data scaling:
+          if (frames[n]->scale_intercept != frames[n-1]->scale_intercept ||
+              frames[n]->scale_slope != frames[n-1]->scale_slope)
+            throw Exception ("unable to load series due to inconsistent data scaling between DICOM images");
 
-          try { mem = new guint8 [msize]; }
-          catch (...) { throw Exception ("failed to allocate memory for image data!"); }
 
-          data = mem;
-        }
+        if (image.frames.size()) { // need to preload and re-arrange:
+          ProgressBar::init (frames.size(), "DICOM image contains multiple frames - reformating..."); 
 
-        std::vector<const Image*> DW_scheme;
-
-        for (guint s = 0; s < series.size(); s++) {
-          int index[3], n;
-          for (index[2] = 0; index[2] < dim[2]; index[2]++) {
-            for (index[0] = 0; index[0] < dim[0]; index[0]++) {
-              n = index[0] + dim[0]*dim[1]*index[2];
-              if (!gsl_isnan((*series[s])[n]->bvalue)) DW_scheme.push_back ((*series[s])[n].get());
-              for (index[1] = 0; index[1] < dim[1]; index[1]++) {
-                n = index[0] + dim[0]*(index[1] + dim[1]*index[2]);
-
-                if (image.images_in_mosaic) {
-                  File::MMap fmap;
-                  fmap.init ((*series[s])[n]->filename);
-                  fmap.map();
-                  guint nbytes = H.data_type.bytes();
-                  guint nbytes_row = nbytes * acq_dim[0];
-                  guint8* mosaic_data = (guint8*) fmap.address() + (*series[s])[n]->data;
-                  guint nx = 0, ny = 0;
-                  for (guint z = 0; z < image.images_in_mosaic; z++) {
-                    guint ox = nx*acq_dim[0];
-                    guint oy = ny*acq_dim[1];
-                    for (guint y = 0; y < acq_dim[1]; y++) {
-                      memcpy (data, mosaic_data + nbytes*(ox+image.dim[0]*(y+oy)), nbytes_row);
-                      data += nbytes_row;
-                    }
-
-                    nx++;
-                    if (nx >= image.dim[0]/acq_dim[0]) { nx = 0; ny++; }
-                  }
-
-                  ProgressBar::inc();
-                }
-                else dmap.add ((*series[s])[n]->filename, (*series[s])[n]->data);
-              }
-            }
+          guint8* mem = NULL;
+          try { 
+            mem = new guint8 [H.memory_footprint()]; 
+            if (!mem) throw;
+          }
+          catch (...) { 
+            throw Exception ("failed to allocate memory for image data!"); 
           }
-        }
-
-        H.set_transform (M);
-
 
-        if (DW_scheme.size()) {
-          H.DW_scheme.allocate (DW_scheme.size(), 4);
-          bool is_not_GE = image.manufacturer.compare (0, 2, "GE");
-          for (guint s = 0; s < DW_scheme.size(); s++) {
-            if ((H.DW_scheme(s, 3) = DW_scheme[s]->bvalue) != 0.0) {
-              float norm = Math::magnitude (DW_scheme[s]->G);
-              H.DW_scheme(s, 3) *= norm;
-              if (norm) {
-                float d[] = { DW_scheme[s]->G[0]/norm, DW_scheme[s]->G[1]/norm, DW_scheme[s]->G[2]/norm };
-                if (is_not_GE) {
-                  H.DW_scheme(s, 0) = - d[0];
-                  H.DW_scheme(s, 1) = - d[1];
-                  H.DW_scheme(s, 2) = d[2];
-                }
-                else {
-                  H.DW_scheme(s, 0) = M(0,0)*d[0] + M(0,1)*d[1] - M(0,2)*d[2];
-                  H.DW_scheme(s, 1) = M(1,0)*d[0] + M(1,1)*d[1] - M(1,2)*d[2];
-                  H.DW_scheme(s, 2) = M(2,0)*d[0] + M(2,1)*d[1] - M(2,2)*d[2];
-                }
-              }
-              else H.DW_scheme(s, 0) = H.DW_scheme(s, 1) = H.DW_scheme(s, 2) = 0.0;
+          guint8* dest = mem;
+          const guint row_stride = nchannels * frames[0]->row_stride * (frames[0]->bits_alloc/8);
+          const guint row_size = nchannels * frames[0]->dim[0] * (frames[0]->bits_alloc/8);
+          File::MMap mmap;
+          for (guint n = 0; n < frames.size(); ++n) {
+            mmap.init (frames[n]->filename);
+            mmap.map();
+            const guint8* src = (guint8*) mmap.address() + frames[n]->data;
+            for (guint row = 0; row < frames[n]->dim[1]; ++row) {
+              memcpy (dest, src, row_size);
+              dest += row_size;
+              src += row_stride;
             }
-            else H.DW_scheme(s, 0) = H.DW_scheme(s, 1) = H.DW_scheme(s, 2) = 0.0;
+            ProgressBar::inc();
           }
-        }
+          ProgressBar::done();
 
-        if (image.images_in_mosaic) {
           dmap.add (mem);
-          ProgressBar::done();
+
         }
+        else { // use standard backend:
+          
+          for (guint n = 0; n < frames.size(); ++n) {
+            const Image* image = static_cast<const Image*> (frames[n]);
+            dmap.add (image->filename, image->data);
+          }
+
+        }
+
 
+      
       }
 
 
diff --git a/lib/file/dicom/select_cmdline.cpp b/lib/file/dicom/select_cmdline.cpp
index c1ef248..1aac4c3 100644
--- a/lib/file/dicom/select_cmdline.cpp
+++ b/lib/file/dicom/select_cmdline.cpp
@@ -24,7 +24,6 @@
 
 */
 
-#include <glib/gstrfuncs.h>
 #include "file/dicom/image.h"
 #include "file/dicom/series.h"
 #include "file/dicom/study.h"
diff --git a/lib/file/dicom/series.cpp b/lib/file/dicom/series.cpp
index a94528f..3798c07 100644
--- a/lib/file/dicom/series.cpp
+++ b/lib/file/dicom/series.cpp
@@ -40,7 +40,8 @@ namespace MR {
         dim[0] = dim[1] = dim[2] = 0;
         current_dim[0] = current_dim[1] = 1;
 
-        if (size() == 0) return (dim);
+        if (size() == 0) 
+          return dim;
 
         const Image* first[] = { (*this)[0].get(), (*this)[0].get() };
 
diff --git a/lib/file/dicom/series.h b/lib/file/dicom/series.h
index d2a9012..b1837f0 100644
--- a/lib/file/dicom/series.h
+++ b/lib/file/dicom/series.h
@@ -52,8 +52,6 @@ namespace MR {
 
           void               read ();
           std::vector<int>   count () const;
-          void               print_fields (bool dcm, bool csa) const;
-
           bool               operator< (const Series& s) const;
 
           friend std::ostream& operator<< (std::ostream& stream, const Series& item);
@@ -103,12 +101,6 @@ namespace MR {
 
 
 
-      inline void Series::print_fields (bool dcm, bool csa) const 
-      {
-        for (guint i = 0; i < size(); i++) 
-          (*this)[i]->print_fields (dcm, csa);
-      }
-
 
     }
   }
diff --git a/lib/file/dicom/tree.cpp b/lib/file/dicom/tree.cpp
index 4bf53af..fccd67a 100644
--- a/lib/file/dicom/tree.cpp
+++ b/lib/file/dicom/tree.cpp
@@ -124,8 +124,12 @@ namespace MR {
 
       void Tree::read (const String& filename)
       {
-        ProgressBar::init (0, "scanning DICOM folder \"" + shorten (filename) + "\"");
-        read_dir (filename);
+        ProgressBar::init (0, "scanning DICOM set \"" + shorten (filename) + "\"");
+        if (Glib::file_test (filename, Glib::FILE_TEST_IS_DIR)) read_dir (filename);
+        else {
+          try { read_file (filename); }
+          catch (Exception) { }
+        }
         ProgressBar::done();
 
         if (size() > 0) return;
diff --git a/lib/file/mmap.cpp b/lib/file/mmap.cpp
index abe8296..688b014 100644
--- a/lib/file/mmap.cpp
+++ b/lib/file/mmap.cpp
@@ -72,7 +72,7 @@ namespace MR {
       if (msize == 0) throw Exception ("attempt to map file \"" + filename + "\" using invalid mmap!");
       if (addr) return;
 
-      if ((fd = g_open (filename.c_str(), (read_only ? O_RDONLY : O_RDWR), 0755)) < 0) 
+      if ((fd = g_open (filename.c_str(), (read_only ? O_RDONLY : O_RDWR), 0644)) < 0) 
         throw Exception ("error opening file \"" + filename + "\": " + Glib::strerror(errno));
 
       try {
@@ -94,7 +94,13 @@ namespace MR {
       catch (...) {
         close (fd);
         addr = NULL;
-        throw Exception ("memory-mapping failed for file \"" + filename + "\": " + Glib::strerror(errno));
+        throw Exception ("memory-mapping failed for file \"" + filename + "\": " + Glib::strerror(
+#ifdef G_OS_WIN32
+              GetLastError()
+#else
+              errno
+#endif
+              ));
       }
     }
 
@@ -113,7 +119,13 @@ namespace MR {
 #else 
         if (munmap (addr, msize))
 #endif
-          error ("error unmapping file \"" + filename + "\": " + Glib::strerror(errno));
+          error ("error unmapping file \"" + filename + "\": " + Glib::strerror(
+#ifdef G_OS_WIN32
+              GetLastError()
+#else
+              errno
+#endif
+              ));
 
       close (fd);
       fd = -1;
@@ -135,7 +147,7 @@ namespace MR {
       if (read_only) throw Exception ("attempting to resize read-only file \"" + filename + "\"");
       unmap();
 
-      if ((fd = g_open (filename.c_str(), O_RDWR, 0755)) < 0) 
+      if ((fd = g_open (filename.c_str(), O_RDWR, 0644)) < 0) 
         throw Exception ("error opening file \"" + filename + "\" for resizing: " + Glib::strerror(errno));
 
       int status = ftruncate (fd, new_size);
@@ -173,7 +185,7 @@ namespace MR {
             if (desired_size_if_inexistant == 0) 
               throw Exception ("cannot access file \"" + base->filename + "\": " + Glib::strerror(errno));
 
-            int fid = g_open (base->filename.c_str(), O_CREAT | O_RDWR | O_EXCL, 0755);
+            int fid = g_open (base->filename.c_str(), O_CREAT | O_RDWR | O_EXCL, 0644);
             if (fid < 0) throw Exception ("error creating file \"" + base->filename + "\": " + Glib::strerror(errno));
 
             int status = ftruncate (fid, desired_size_if_inexistant);
@@ -215,7 +227,11 @@ namespace MR {
       do {
         for (int n = 0; n < 6; n++) 
           base->filename[TMPFILE_ROOT_LEN+n] = random_char();
-      } while ((fid = g_open (base->filename.c_str(), O_CREAT | O_RDWR | O_EXCL, 0755)) < 0);
+          fid = g_open (base->filename.c_str(), O_CREAT | O_RDWR | O_EXCL, 0644);
+      } while (fid < 0 && errno == EEXIST);
+
+      if (fid < 0) 
+        throw Exception ("error creating temporary file in current working directory: " + Glib::strerror(errno));
 
 
       int status = ftruncate (fid, desired_size_if_inexistant);
diff --git a/lib/file/mmap.h b/lib/file/mmap.h
index 61c1dac..628ce8a 100644
--- a/lib/file/mmap.h
+++ b/lib/file/mmap.h
@@ -51,7 +51,7 @@ namespace MR {
         void              mark_for_deletion ()           { if (base) base->delete_after = true; }
 
         bool              is_ready () const                  { return (base ? base->msize : false); }
-        bool              is_mapped () const                 { return (base ? base->addr : false); }
+        bool              is_mapped () const                 { return (base ? ( base->addr != NULL ) : false); }
         bool              is_read_only () const              { return (base ? base->read_only : true); }
         bool              is_marked_for_deletion () const    { return (base ? base->delete_after : false); }
 
diff --git a/lib/image/format/dicom.cpp b/lib/image/format/dicom.cpp
index 9741ef8..b6b2f07 100644
--- a/lib/image/format/dicom.cpp
+++ b/lib/image/format/dicom.cpp
@@ -44,33 +44,21 @@ namespace MR {
   namespace Image {
     namespace Format {
 
-      bool print_DICOM_fields = false;
-      bool print_CSA_fields = false;
-
-
-
-
 
 
       bool DICOM::read (Mapper& dmap, Header& H) const
       {
-        if (!Glib::file_test (H.name, Glib::FILE_TEST_IS_DIR)) return (false);
-
         File::Dicom::Tree dicom;
         
         dicom.read (H.name);
         dicom.sort();
 
         std::vector< RefPtr<File::Dicom::Series> > series = File::Dicom::select_func (dicom);
-        if (series.empty()) throw Exception ("no DICOM series selected");
+        if (series.empty()) 
+          return (false); 
 
         dicom_to_mapper (dmap, H, series);
 
-        if (print_DICOM_fields || print_CSA_fields) {
-          for (guint s = 0; s < series.size(); s++) 
-            series[s]->print_fields (print_DICOM_fields, print_CSA_fields);
-        }
-
         return (true);
       }
 
diff --git a/lib/image/format/list.cpp b/lib/image/format/list.cpp
index 961fbee..06ea1e2 100644
--- a/lib/image/format/list.cpp
+++ b/lib/image/format/list.cpp
@@ -41,8 +41,10 @@ namespace MR {
     const gchar* Format::known_extensions[] = {
       ".mih",
       ".mif",
+      ".mif.gz",
       ".img",
       ".nii",
+      ".nii.gz",
       ".bfloat",
       ".bshort",
       ".mri",
diff --git a/lib/image/format/list.h b/lib/image/format/list.h
index a2066fc..947fe24 100644
--- a/lib/image/format/list.h
+++ b/lib/image/format/list.h
@@ -43,9 +43,9 @@ namespace MR {
       DECLARE_IMAGEFORMAT (Analyse);
       DECLARE_IMAGEFORMAT (NIfTI);
       DECLARE_IMAGEFORMAT (MRI);
-      DECLARE_IMAGEFORMAT (DICOM);
       DECLARE_IMAGEFORMAT (XDS);
       DECLARE_IMAGEFORMAT (MRtrix);
+      DECLARE_IMAGEFORMAT (DICOM);
 
     }
   }
diff --git a/lib/image/format/mrtrix.cpp b/lib/image/format/mrtrix.cpp
index 61ffa8e..caa5510 100644
--- a/lib/image/format/mrtrix.cpp
+++ b/lib/image/format/mrtrix.cpp
@@ -25,6 +25,7 @@
 */
 
 #include <unistd.h>
+#include <zlib.h>
 #include <fcntl.h>
 #include <glib/gstdio.h>
 #include <glibmm/stringutils.h>
@@ -54,9 +55,16 @@ namespace MR {
 
       bool MRtrix::read (Mapper& dmap, Header& H) const
       { 
-        if (!Glib::str_has_suffix (H.name, ".mih") && !Glib::str_has_suffix (H.name, ".mif")) return (false);
+        if (!Glib::str_has_suffix (H.name, ".mih") && !Glib::str_has_suffix (H.name, ".mif") && !Glib::str_has_suffix (H.name, ".mif.gz")) return (false);
 
-        File::KeyValue kv (H.name, "mrtrix image");
+        File::KeyValue kv;
+        String gzfilename;
+	if (Glib::str_has_suffix (H.name, ".gz")) {
+          gzfilename = H.name;
+          kv.open (Mapper::gunzip (H.name, "mif"), "mrtrix image");
+        }
+        else 
+          kv.open (H.name, "mrtrix image");
 
         H.format = FormatMRtrix;
 
@@ -78,7 +86,7 @@ namespace MR {
           else if (key == "labels") labels = split (kv.value(), "\\");
           else if (key == "transform") { std::vector<float> V (parse_floats (kv.value())); transform.insert (transform.end(), V.begin(), V.end()); }
           else if (key == "dw_scheme") { std::vector<float> V (parse_floats (kv.value())); dw_scheme.insert (dw_scheme.end(), V.begin(), V.end()); }
-          else error ("WARNING: invalid key \"" + kv.key() + " in generic image header \"" + H.name + "\" - ignored");
+          else debug ("unknown key \"" + kv.key() + " in generic image header \"" + H.name + "\" - ignored");
         }
 
         if (dim.empty()) throw Exception ("missing \"dim\" specification for generic image \"" + H.name + "\"");
@@ -155,15 +163,17 @@ namespace MR {
 
         if (fname == ".") {
           if (offset == 0) throw Exception ("invalid offset specified for embedded generic image \"" + H.name + "\""); 
-          fname = H.name;
+          dmap.add_gz (kv.name(), gzfilename, offset);
         }
-        else fname = Glib::build_filename (Glib::path_get_dirname (H.name), fname);
+        else {
+          fname = Glib::build_filename (Glib::path_get_dirname (H.name), fname);
 
-        ParsedNameList list;
-        std::vector<int> num = list.parse_scan_check (fname);
+          ParsedNameList list;
+          std::vector<int> num = list.parse_scan_check (fname);
 
-        for (guint n = 0; n < list.size(); n++) 
-          dmap.add (list[n]->name(), offset);
+          for (guint n = 0; n < list.size(); n++) 
+            dmap.add (list[n]->name(), offset);
+        }
 
         return (true);
       }
@@ -174,7 +184,7 @@ namespace MR {
 
       bool MRtrix::check (Header& H, int num_axes) const
       {
-        if (H.name.size() && !Glib::str_has_suffix (H.name, ".mih") && !Glib::str_has_suffix (H.name, ".mif")) return (false);
+        if (H.name.size() && !Glib::str_has_suffix (H.name, ".mih") && !Glib::str_has_suffix (H.name, ".mif") && !Glib::str_has_suffix (H.name, ".mif.gz")) return (false);
 
         H.format = FormatMRtrix;
 
@@ -193,7 +203,14 @@ namespace MR {
         if (!is_temporary (H.name) && Glib::file_test (H.name, Glib::FILE_TEST_IS_REGULAR)) 
           throw Exception ("cannot create generic image file \"" + H.name + "\": file exists");
 
-        std::ofstream out (H.name.c_str(), std::ios::out | std::ios::binary);
+        String gzfilename, filename (H.name);
+        if (Glib::str_has_suffix (H.name, ".gz")) {
+          gzfilename = H.name;
+          File::MMap fmap ("", 1024, "mif");
+          filename = fmap.name();
+        }
+
+        std::ofstream out (filename.c_str(), std::ios::out | std::ios::binary);
         if (!out) throw Exception ("error creating file \"" + H.name + "\":" + Glib::strerror(errno));
 
         out << "mrtrix image\n";
@@ -232,7 +249,7 @@ namespace MR {
             out << "\ndw_scheme: " << H.DW_scheme (i,0) << "," << H.DW_scheme (i,1) << "," << H.DW_scheme (i,2) << "," << H.DW_scheme (i,3);
         }
 
-        bool single_file = Glib::str_has_suffix (H.name, ".mif");
+        bool single_file = !Glib::str_has_suffix (H.name, ".mih");
 
         size_t offset = 0;
         out << "\nfile: ";
@@ -246,12 +263,12 @@ namespace MR {
         out.close();
 
         if (single_file) {
-          int fd = g_open (H.name.c_str(), O_RDWR, 0755);
-          if (fd < 0) throw Exception ("error opening file \"" + H.name + "\" for resizing: " + Glib::strerror(errno));
+          int fd = g_open (filename.c_str(), O_RDWR, 0755);
+          if (fd < 0) throw Exception ("error opening file \"" + filename + "\" for resizing: " + Glib::strerror(errno));
           int status = ftruncate (fd, offset + H.memory_footprint());
           close (fd);
-          if (status) throw Exception ("cannot resize file \"" + H.name + "\": " + Glib::strerror(errno));
-          dmap.add (H.name, offset);
+          if (status) throw Exception ("cannot resize file \"" + filename + "\": " + Glib::strerror(errno));
+          dmap.add_gz (filename, gzfilename, offset);
         }
         else dmap.add (H.name.substr (0, H.name.size()-4) + ".dat", 0, H.memory_footprint());
       }
diff --git a/lib/image/format/nifti1.cpp b/lib/image/format/nifti1.cpp
index b391499..55fbbd1 100644
--- a/lib/image/format/nifti1.cpp
+++ b/lib/image/format/nifti1.cpp
@@ -20,6 +20,7 @@
 
 */
 
+#include <zlib.h>
 #include <glibmm/stringutils.h>
 
 #include "file/nifti1.h"
@@ -28,6 +29,7 @@
 #include "image/format/list.h"
 #include "math/quaternion.h"
 
+
 namespace MR {
   namespace Image {
     namespace Format {
@@ -35,19 +37,22 @@ namespace MR {
 
       const gchar* FormatNIfTI = "NIfTI-1.1";
 
-
-
-
-
-
-
       bool NIfTI::read (Mapper& dmap, Header& H) const
       {
-        if (!Glib::str_has_suffix (H.name, ".nii")) return (false);
+        if (!(Glib::str_has_suffix (H.name, ".nii") || Glib::str_has_suffix (H.name, ".nii.gz"))) 
+          return (false);
+
+        File::MMap fmap;
+        String gzfilename;
+        if (Glib::str_has_suffix (H.name, ".gz")) {
+          gzfilename = H.name;
+          fmap.init (Mapper::gunzip (H.name, "nii"));
+        }
+        else 
+          fmap.init (H.name);
 
-        H.format = FormatNIfTI;
-        File::MMap fmap (H.name);
         fmap.map();
+        H.format = FormatNIfTI;
 
         const nifti_1_header* NH = (const nifti_1_header*) fmap.address();
 
@@ -174,7 +179,7 @@ namespace MR {
           M(0,1) /= H.axes.vox[1];
           M(1,1) /= H.axes.vox[1];
           M(2,1) /= H.axes.vox[1];
-          
+
           M(0,2) /= H.axes.vox[2];
           M(1,2) /= H.axes.vox[2];
           M(2,2) /= H.axes.vox[2];
@@ -197,15 +202,15 @@ namespace MR {
           M(1,0) = transform[3];
           M(1,1) = transform[4];
           M(1,2) = transform[5];
-          
+
           M(2,0) = transform[6];
           M(2,1) = transform[7];
           M(2,2) = transform[8];
-          
+
           M(0,3) = get<float32> (&NH->qoffset_x, is_BE);
           M(1,3) = get<float32> (&NH->qoffset_y, is_BE);
           M(2,3) = get<float32> (&NH->qoffset_z, is_BE);
-          
+
           M(3,0) = M(3,1) = M(3,2) = 0.0;
           M(3,3) = 1.0;
 
@@ -233,7 +238,7 @@ namespace MR {
         }
 
         fmap.unmap();
-        dmap.add (fmap, data_offset);
+        dmap.add_gz (fmap, gzfilename, data_offset);
 
         return (true);
       }
@@ -244,7 +249,7 @@ namespace MR {
 
       bool NIfTI::check (Header& H, int num_axes) const
       {
-        if (!Glib::str_has_suffix (H.name, ".nii")) return (false);
+        if (!(Glib::str_has_suffix (H.name, ".nii") || Glib::str_has_suffix (H.name, ".nii.gz"))) return (false);
         if (num_axes < 3) throw Exception ("cannot create NIfTI-1.1 image with less than 3 dimensions");
         if (num_axes > 8) throw Exception ("cannot create NIfTI-1.1 image with more than 8 dimensions");
 
@@ -280,7 +285,15 @@ namespace MR {
 
         guint msize = H.memory_footprint (H.ndim());
 
-        File::MMap fmap (H.name, 352 + msize);
+        File::MMap fmap;
+        String gzfilename;
+        if (Glib::str_has_suffix (H.name, ".gz")) {
+          gzfilename = H.name;
+          fmap.init (String(), 352 + msize, "nii");
+        }
+        else 
+          fmap.init (H.name, 352 + msize);
+
         fmap.map();
 
         nifti_1_header* NH = (nifti_1_header*) fmap.address();
@@ -301,6 +314,11 @@ namespace MR {
         for (gint i = 0; i < H.ndim(); i++) 
           put<gint16> (H.dim(i), &NH->dim[i+1], is_BE);
 
+        // pad out the other dimensions with 1, fix for fslview
+        for (gint i = H.ndim() + 1; i < 8; i++) 
+          put<gint16> (1, &NH->dim[i], is_BE);
+
+
         // data type:
         gint16 dt = 0;
         switch (H.data_type()) {
@@ -365,9 +383,9 @@ namespace MR {
 
         // qform:
         const float R [] = { 
-          M(0,0), M(0,1), M(0,2), 
-          M(1,0), M(1,1), M(1,2), 
-          M(2,0), M(2,1), M(2,2) };
+          float(M(0,0)), float(M(0,1)), float(M(0,2)), 
+          float(M(1,0)), float(M(1,1)), float(M(1,2)), 
+          float(M(2,0)), float(M(2,1)), float(M(2,2)) };
         const Math::Quaternion Q (R);
 
         put<float32> (Q[1], &NH->quatern_b, is_BE);
@@ -398,7 +416,7 @@ namespace MR {
         strncpy ((gchar*) &NH->magic, "n+1\0", 4);
         fmap.unmap();
 
-        dmap.add (fmap, 352);
+        dmap.add_gz (fmap, gzfilename, 352);
       }
 
     }
diff --git a/lib/image/header.cpp b/lib/image/header.cpp
index 31f03b5..811f5bf 100644
--- a/lib/image/header.cpp
+++ b/lib/image/header.cpp
@@ -197,8 +197,8 @@ namespace MR {
           axes.set_ndim (3);
         
         bool forward[] = { axes.forward [permutation[0]], axes.forward [permutation[1]], axes.forward [permutation[2]] };
-        guint newdim[] = { dim [permutation[0]], dim [permutation[1]], dim [permutation[2]] };
-        guint axis[] = { axes.axis [permutation[0]], axes.axis [permutation[1]], axes.axis [permutation[2]] };
+        int newdim[] = { dim [permutation[0]], dim [permutation[1]], dim [permutation[2]] };
+        int axis[] = { axes.axis [permutation[0]], axes.axis [permutation[1]], axes.axis [permutation[2]] };
         float newvox[] = { vox [permutation[0]], vox [permutation[1]], vox [permutation[2]] };
         String desc[] = { axes.desc [permutation[0]], axes.desc [permutation[1]], axes.desc [permutation[2]] };
         String units[] = { axes.units [permutation[0]], axes.units [permutation[1]], axes.units [permutation[2]] };
diff --git a/lib/image/mapper.cpp b/lib/image/mapper.cpp
index 777b963..ef72ed4 100644
--- a/lib/image/mapper.cpp
+++ b/lib/image/mapper.cpp
@@ -23,6 +23,11 @@
     * use template get<T>() & put<T>() methods from lib/get_set.h
 */
 
+#include <zlib.h>
+#include <fcntl.h>
+
+#include <glib/gstdio.h>
+
 #include "image/mapper.h"
 #include "app.h"
 #include "get_set.h"
@@ -49,6 +54,28 @@ namespace MR {
 
 
 
+    Mapper::~Mapper () 
+    { 
+      if (mem && list.size()) 
+        throw Exception ("Mapper destroyed before committing data to file!"); 
+
+      for (guint n = 0; n < list.size(); ++n) {
+        if (list[n].gzfilename.size()) {
+          if (!list[n].fmap.is_read_only()) 
+            gzip (list[n].fmap.name(), list[n].gzfilename);
+          debug ("deleting temporary file \"" + list[n].fmap.name() + "\"...");
+          unlink (list[n].fmap.name().c_str());
+        }
+      }
+
+      if (output_name.size()) 
+        std::cout << output_name << "\n";
+    }
+
+
+
+
+
 
 
     void Mapper::map (const Header& H)
@@ -124,10 +151,8 @@ namespace MR {
 
         info ("writing back data for image \"" + H.name + "\"...");
         for (guint n = 0; n < list.size(); n++) {
-          bool err = false;
-          try { list[n].fmap.map (); }
-          catch (...) { err = true; error ("error writing data to file \"" + list[n].fmap.name() + "\""); }
-          if (!err) {
+          try { 
+            list[n].fmap.map (); 
             if (optimised) {
               const float32* data = (const float32*) mem + n*segsize;
               for (gsize i = 0; i < segsize; i++) 
@@ -136,6 +161,9 @@ namespace MR {
             else memcpy (list[n].start(), mem + n*segsize, segsize);
             list[n].fmap.unmap();
           }
+          catch (...) {
+            error ("error writing data to file \"" + list[n].fmap.name() + "\""); 
+          }
         }
       }
 
@@ -174,6 +202,78 @@ namespace MR {
 
 
 
+    void Mapper::gzip (const String& original, const String& gzfile)
+    {
+      FILE* infile = fopen (original.c_str(), "rb");
+      if (!infile) 
+        throw Exception ("error opening temporary file \"" + original + "\": " + strerror(errno));
+
+      info ("writing compressed data to \"" +  gzfile + "\"...");
+
+      int fid = g_open (gzfile.c_str(), O_CREAT | O_RDWR | O_EXCL, 0755);
+      if (fid < 0) {
+        fclose (infile);
+        throw Exception ("error creating file \"" + gzfile + "\": " + Glib::strerror(errno));
+      }
+
+      gzFile outfile = gzdopen (fid, "wb6");
+      if (!outfile) {
+        fclose (infile);
+        close (fid);
+        throw Exception ("error opening GZIP file \"" + gzfile + "\" for writing");
+      }
+
+      char buf[BUFSIZ];
+      int numBytesRead;
+      while ((numBytesRead = fread(buf, 1, BUFSIZ, infile)) > 0) {
+        int numBytesWritten = gzwrite (outfile, buf, numBytesRead);
+        if (numBytesWritten == 0) {
+          fclose (infile);
+          gzclose (outfile);
+          throw Exception ("error writing to GZIP file \"" + gzfile + "\"");
+        }
+      }
+      fclose (infile);
+      gzclose (outfile);
+    }	
+
+
+
+    String Mapper::gunzip (const String& gzfile, const char* suffix)
+    {
+      info ("uncompressing file \""  + gzfile +  "\"...");
+
+      String uncompressed;
+      {
+        File::MMap fmap ("", 1024, suffix);
+        uncompressed = fmap.name();
+      }
+
+      debug ("gunzip file \"" + gzfile +  " to \""  +  uncompressed + "\"...");
+
+      gzFile infile = gzopen (gzfile.c_str(), "rb");
+      if (!infile) {
+        unlink (uncompressed.c_str());
+        throw Exception ("error opening GZIP file \"" + gzfile + "\": " + strerror (errno));
+      }
+
+      FILE* outfile = fopen (uncompressed.c_str(), "wb");
+      char buf[BUFSIZ];
+      int numBytesRead;
+      while ((numBytesRead = gzread (infile, buf, BUFSIZ)) > 0) {
+        int numBytesWritten = fwrite (buf, 1, numBytesRead, outfile);
+        if (numBytesWritten == 0) {
+          fclose (outfile);
+          gzclose (infile);
+          throw Exception ("error uncompressing file \"" + gzfile + "\"");
+        }
+      }
+
+      fclose (outfile);
+      gzclose (infile);
+
+      return uncompressed;
+    }
 
 
 
@@ -189,49 +289,49 @@ namespace MR {
       else if (dmap.mem) stream << "in memory at " << (void*) dmap.mem << "\n";
       stream << "files:\n";
       for (guint i = 0; i < dmap.list.size(); i++) {
-        stream << "    " << dmap.list[i].fmap.name() << ", offset " << dmap.list[i].offset << " (";
-        if (dmap.list[i].fmap.is_mapped()) stream << "mapped at " << dmap.list[i].fmap.address();
-        else stream << "unmapped";
-        stream << ( dmap.list[i].fmap.is_read_only() ? ", read-only)\n" : ", read-write)\n" );
-      }
-      return (stream);
+      stream << "    " << dmap.list[i].fmap.name() << ", offset " << dmap.list[i].offset << " (";
+      if (dmap.list[i].fmap.is_mapped()) stream << "mapped at " << dmap.list[i].fmap.address();
+      else stream << "unmapped";
+      stream << ( dmap.list[i].fmap.is_read_only() ? ", read-only)\n" : ", read-write)\n" );
     }
+    return (stream);
+  }
 
 
 
-    float32 Mapper::getBit       (const void* data, gsize i)  { return (get<bool>      (data, i)); }
-    float32 Mapper::getInt8      (const void* data, gsize i)  { return (get<gint8>     (data, i)); }
-    float32 Mapper::getUInt8     (const void* data, gsize i)  { return (get<guint8>    (data, i)); }
-    float32 Mapper::getInt16LE   (const void* data, gsize i)  { return (getLE<gint16>  (data, i)); }
-    float32 Mapper::getUInt16LE  (const void* data, gsize i)  { return (getLE<guint16> (data, i)); }
-    float32 Mapper::getInt16BE   (const void* data, gsize i)  { return (getBE<gint16>  (data, i)); }
-    float32 Mapper::getUInt16BE  (const void* data, gsize i)  { return (getBE<guint16> (data, i)); }
-    float32 Mapper::getInt32LE   (const void* data, gsize i)  { return (getLE<gint32>  (data, i)); }
-    float32 Mapper::getUInt32LE  (const void* data, gsize i)  { return (getLE<guint32> (data, i)); }
-    float32 Mapper::getInt32BE   (const void* data, gsize i)  { return (getBE<gint32>  (data, i)); }
-    float32 Mapper::getUInt32BE  (const void* data, gsize i)  { return (getBE<guint32> (data, i)); }
-    float32 Mapper::getFloat32LE (const void* data, gsize i)  { return (getLE<float32> (data, i)); }
-    float32 Mapper::getFloat32BE (const void* data, gsize i)  { return (getBE<float32> (data, i)); }
-    float32 Mapper::getFloat64LE (const void* data, gsize i)  { return (getLE<float64> (data, i)); }
-    float32 Mapper::getFloat64BE (const void* data, gsize i)  { return (getBE<float64> (data, i)); }
-
-    void Mapper::putBit       (float32 val, void* data, gsize i) { put<bool>      (bool(val), data, i); }
-    void Mapper::putInt8      (float32 val, void* data, gsize i) { put<gint8>     (gint8(val), data, i); }
-    void Mapper::putUInt8     (float32 val, void* data, gsize i) { put<guint8>    (guint8(val), data, i); }
-    void Mapper::putInt16LE   (float32 val, void* data, gsize i) { putLE<gint16>  (gint16(val), data, i); }
-    void Mapper::putUInt16LE  (float32 val, void* data, gsize i) { putLE<guint16> (guint16(val), data, i); }
-    void Mapper::putInt16BE   (float32 val, void* data, gsize i) { putBE<gint16>  (gint16(val), data, i); }
-    void Mapper::putUInt16BE  (float32 val, void* data, gsize i) { putBE<guint16> (guint16(val), data, i); }
-    void Mapper::putInt32LE   (float32 val, void* data, gsize i) { putLE<gint32>  (gint32(val), data, i); }
-    void Mapper::putUInt32LE  (float32 val, void* data, gsize i) { putLE<guint32> (guint32(val), data, i); }
-    void Mapper::putInt32BE   (float32 val, void* data, gsize i) { putBE<gint32>  (gint32(val), data, i); }
-    void Mapper::putUInt32BE  (float32 val, void* data, gsize i) { putBE<guint32> (guint32(val), data, i); }
-    void Mapper::putFloat32LE (float32 val, void* data, gsize i) { putLE<float32> (float32(val), data, i); }
-    void Mapper::putFloat32BE (float32 val, void* data, gsize i) { putBE<float32> (float32(val), data, i); }
-    void Mapper::putFloat64LE (float32 val, void* data, gsize i) { putLE<float64> (float64(val), data, i); }
-    void Mapper::putFloat64BE (float32 val, void* data, gsize i) { putBE<float64> (float64(val), data, i); }
+  float32 Mapper::getBit       (const void* data, gsize i)  { return (get<bool>      (data, i)); }
+  float32 Mapper::getInt8      (const void* data, gsize i)  { return (get<gint8>     (data, i)); }
+  float32 Mapper::getUInt8     (const void* data, gsize i)  { return (get<guint8>    (data, i)); }
+  float32 Mapper::getInt16LE   (const void* data, gsize i)  { return (getLE<gint16>  (data, i)); }
+  float32 Mapper::getUInt16LE  (const void* data, gsize i)  { return (getLE<guint16> (data, i)); }
+  float32 Mapper::getInt16BE   (const void* data, gsize i)  { return (getBE<gint16>  (data, i)); }
+  float32 Mapper::getUInt16BE  (const void* data, gsize i)  { return (getBE<guint16> (data, i)); }
+  float32 Mapper::getInt32LE   (const void* data, gsize i)  { return (getLE<gint32>  (data, i)); }
+  float32 Mapper::getUInt32LE  (const void* data, gsize i)  { return (getLE<guint32> (data, i)); }
+  float32 Mapper::getInt32BE   (const void* data, gsize i)  { return (getBE<gint32>  (data, i)); }
+  float32 Mapper::getUInt32BE  (const void* data, gsize i)  { return (getBE<guint32> (data, i)); }
+  float32 Mapper::getFloat32LE (const void* data, gsize i)  { return (getLE<float32> (data, i)); }
+  float32 Mapper::getFloat32BE (const void* data, gsize i)  { return (getBE<float32> (data, i)); }
+  float32 Mapper::getFloat64LE (const void* data, gsize i)  { return (getLE<float64> (data, i)); }
+  float32 Mapper::getFloat64BE (const void* data, gsize i)  { return (getBE<float64> (data, i)); }
+
+  void Mapper::putBit       (float32 val, void* data, gsize i) { put<bool>      (bool(val), data, i); }
+  void Mapper::putInt8      (float32 val, void* data, gsize i) { put<gint8>     (gint8(val), data, i); }
+  void Mapper::putUInt8     (float32 val, void* data, gsize i) { put<guint8>    (guint8(val), data, i); }
+  void Mapper::putInt16LE   (float32 val, void* data, gsize i) { putLE<gint16>  (gint16(val), data, i); }
+  void Mapper::putUInt16LE  (float32 val, void* data, gsize i) { putLE<guint16> (guint16(val), data, i); }
+  void Mapper::putInt16BE   (float32 val, void* data, gsize i) { putBE<gint16>  (gint16(val), data, i); }
+  void Mapper::putUInt16BE  (float32 val, void* data, gsize i) { putBE<guint16> (guint16(val), data, i); }
+  void Mapper::putInt32LE   (float32 val, void* data, gsize i) { putLE<gint32>  (gint32(val), data, i); }
+  void Mapper::putUInt32LE  (float32 val, void* data, gsize i) { putLE<guint32> (guint32(val), data, i); }
+  void Mapper::putInt32BE   (float32 val, void* data, gsize i) { putBE<gint32>  (gint32(val), data, i); }
+  void Mapper::putUInt32BE  (float32 val, void* data, gsize i) { putBE<guint32> (guint32(val), data, i); }
+  void Mapper::putFloat32LE (float32 val, void* data, gsize i) { putLE<float32> (float32(val), data, i); }
+  void Mapper::putFloat32BE (float32 val, void* data, gsize i) { putBE<float32> (float32(val), data, i); }
+  void Mapper::putFloat64LE (float32 val, void* data, gsize i) { putLE<float64> (float64(val), data, i); }
+  void Mapper::putFloat64BE (float32 val, void* data, gsize i) { putBE<float64> (float64(val), data, i); }
 
-  }
+}
 }
 
 
diff --git a/lib/image/mapper.h b/lib/image/mapper.h
index 8297e71..851d269 100644
--- a/lib/image/mapper.h
+++ b/lib/image/mapper.h
@@ -41,6 +41,8 @@ namespace MR {
         void                   reset ();
         void                   add (const String& filename, gsize offset = 0, gsize desired_size_if_inexistant = 0);
         void                   add (const File::MMap& fmap, gsize offset = 0);
+        void                   add_gz (const String& filename, const String& gz_filename, gsize offset = 0, gsize desired_size_if_inexistant = 0);
+        void                   add_gz (const File::MMap& fmap, const String& gz_filename, gsize offset = 0);
         void                   add (guint8* memory_buffer);
 
 
@@ -52,6 +54,11 @@ namespace MR {
         void                   set_temporary (bool temp);
         String                 output_name;
 
+
+
+        static void gzip (const String& original, const String& gzfile);
+        static String gunzip (const String& gzfile, const char* suffix);
+
       protected:
         Mapper ();
         ~Mapper ();
@@ -61,6 +68,7 @@ namespace MR {
             File::MMap fmap;
             gsize    offset;
             guint8*    start () const;
+            String gzfilename;
             friend std::ostream& operator<< (std::ostream& stream, const Entry& m)
             {
               stream << "Mapper::Entry: offset = " << m.offset << ", " << m.fmap;
@@ -158,16 +166,6 @@ namespace MR {
 
 
 
-    inline Mapper::~Mapper () 
-    { 
-      if (mem && list.size()) throw Exception ("Mapper destroyed before committing data to file!"); 
-      if (output_name.size()) std::cout << output_name << "\n";
-    }
-
-
-
-
-
     inline void Mapper::reset ()
     {
       list.clear();
@@ -177,8 +175,8 @@ namespace MR {
       optimised = temporary = false;
       files_new = true;
       output_name.clear();
-      if (mem) delete [] mem;
-      if (segment) delete [] segment;
+      delete [] mem;
+      delete [] segment;
       mem = NULL;
       segment = NULL;
     }
@@ -191,7 +189,8 @@ namespace MR {
     {
       Entry entry;
       entry.fmap.init (filename, desired_size_if_inexistant, "tmp"); 
-      if (entry.fmap.is_read_only()) files_new = false;
+      if (entry.fmap.is_read_only()) 
+        files_new = false;
       entry.offset = offset;
       list.push_back (entry);
     }
@@ -201,12 +200,16 @@ namespace MR {
 
 
 
+
+
+
     inline void Mapper::add (const File::MMap& fmap, gsize offset)
     {
       assert (!fmap.is_mapped());
       Entry entry;
       entry.fmap = fmap;
-      if (entry.fmap.is_read_only()) files_new = false;
+      if (entry.fmap.is_read_only()) 
+        files_new = false;
       entry.offset = offset;
       list.push_back (entry);
     }
@@ -214,6 +217,20 @@ namespace MR {
 
 
 
+    inline void Mapper::add_gz (const String& filename, const String& gz_filename, gsize offset, gsize desired_size_if_inexistant)
+    {
+      add (filename, offset, desired_size_if_inexistant);
+      list.back().gzfilename = gz_filename;
+    }
+
+
+
+    inline void Mapper::add_gz (const File::MMap& fmap, const String& gz_filename, gsize offset)
+    {
+      add (fmap, offset);
+      list.back().gzfilename = gz_filename;
+    }
+
 
 
     inline void Mapper::add (guint8* memory_buffer)
diff --git a/lib/image/object.cpp b/lib/image/object.cpp
index a870d3f..f587fc0 100644
--- a/lib/image/object.cpp
+++ b/lib/image/object.cpp
@@ -36,6 +36,10 @@
 #include "image/object.h"
 #include "image/format/list.h"
 #include "image/name_parser.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
 
 namespace MR {
   namespace Image {
@@ -66,6 +70,7 @@ namespace MR {
         if (!*handler) throw Exception ("unknown format for image \"" + header.name + "\"");
 
         String old_name (H.name);
+
         H = header;
         if (header.name == (*item)->name()) H.name = old_name;
 
diff --git a/lib/image/object.h b/lib/image/object.h
index 0c907cd..e0906aa 100644
--- a/lib/image/object.h
+++ b/lib/image/object.h
@@ -28,6 +28,7 @@
 #include "image/mapper.h"
 #include "image/format/base.h"
 #include "math/complex_number.h"
+#include <glibmm/stringutils.h>
 
 namespace MR {
   namespace Dialog { class File; }
@@ -45,11 +46,7 @@ namespace MR {
     class Object {
       public:
         Object () : start (0) { memset (stride, 0, MRTRIX_MAX_NDIMS*sizeof(gssize)); }
-        ~Object ()
-        { 
-          info ("closing image \"" + H.name + "\"...");
-          M.unmap (H); 
-        }
+        ~Object () { info ("closing image \"" + H.name + "\"..."); M.unmap (H); }
 
         const Header&        header () const         { return (H); }
 
@@ -78,7 +75,10 @@ namespace MR {
 
         void                 set_temporary (bool yesno = true) {
           M.temporary = yesno; 
-          if (M.temporary) { for (guint n = 0; n < M.list.size(); n++) M.list[n].fmap.mark_for_deletion(); }
+          if (M.temporary) {
+            for (guint n = 0; n < M.list.size(); n++) 
+            M.list[n].fmap.mark_for_deletion(); 
+          }
         }
 
         bool                 read_only () const   { return (H.read_only); }
@@ -113,7 +113,7 @@ namespace MR {
 
       protected:
         static const Format::Base* handlers[];
-
+		
         Header               H;
         Mapper               M;
         gsize                start;
diff --git a/lib/math/matrix.cpp b/lib/math/matrix.cpp
index 03a6176..760b8d8 100644
--- a/lib/math/matrix.cpp
+++ b/lib/math/matrix.cpp
@@ -41,7 +41,6 @@ namespace MR {
         String sbuf;
         getline (in, sbuf);
         if (in.bad()) throw Exception ("error reading matrix file \"" + filename + "\": " + Glib::strerror (errno));
-        if (in.eof()) break;
 
         sbuf = strip (sbuf.substr (0, sbuf.find_first_of ('#')));
         if (sbuf.size()) {
diff --git a/lib/mrtrix.cpp b/lib/mrtrix.cpp
index 76a8703..5672051 100644
--- a/lib/mrtrix.cpp
+++ b/lib/mrtrix.cpp
@@ -143,7 +143,8 @@ namespace MR {
         }
         else num[i] = to<gint> (spec.substr (start, end-start));
 
-        if (spec[end] == ':') { i++; if (i > 2) throw (0); }
+        char c = end < spec.size() ? spec[end] : '\0';
+        if (c == ':') { i++; if (i > 2) throw (0); }
         else {
           if (i) {
             gint inc, last;
diff --git a/lib/mrtrix.h b/lib/mrtrix.h
index 423f76a..d5447d8 100644
--- a/lib/mrtrix.h
+++ b/lib/mrtrix.h
@@ -62,8 +62,7 @@
 #include <cstdlib>
 #include <cmath>
 
-#include <glib/gtypes.h>
-#include <glib/gutils.h>
+#include <glib.h>
 #include <glibmm/timer.h>
 #include <glibmm/miscutils.h>
 
@@ -74,7 +73,7 @@
 
 #define MRTRIX_MAJOR_VERSION 0
 #define MRTRIX_MINOR_VERSION 2
-#define MRTRIX_MICRO_VERSION 10
+#define MRTRIX_MICRO_VERSION 11
 
 
 /** Prints the file and line number. Useful for debugging purposes. */
@@ -124,8 +123,8 @@
 
 
 #ifdef G_OS_WIN32
-typedef struct __stat64 struct_stat64;
-# define STAT64 _stat64
+typedef struct _stati64 struct_stat64;
+# define STAT64 _stati64
 #else
 # ifdef __APPLE__
 typedef struct stat struct_stat64;
diff --git a/lib/svn_revision.h b/lib/svn_revision.h
index 6f0e278..a99ddf1 100644
--- a/lib/svn_revision.h
+++ b/lib/svn_revision.h
@@ -1 +1 @@
-#define SVN_REVISION 327
+#define SVN_REVISION 373
diff --git a/matlab/write_mrtrix.m b/matlab/write_mrtrix.m
index 6c49d4a..32a6af2 100644
--- a/matlab/write_mrtrix.m
+++ b/matlab/write_mrtrix.m
@@ -79,39 +79,38 @@ if isstruct (image) && isfield (image, 'comments')
 end
 
 if isstruct (image) && isfield (image, 'transform')
-  fprintf (fid, '\ntransform: %d', image.transform(1,1))
-  fprintf (fid, ',%d', image.transform(1,2:4))
-  fprintf (fid, '\ntransform: %d', image.transform(2,1))
-  fprintf (fid, ',%d', image.transform(2,2:4))
-  fprintf (fid, '\ntransform: %d', image.transform(3,1))
-  fprintf (fid, ',%d', image.transform(3,2:4))
+  fprintf (fid, '\ntransform: %d', image.transform(1,1));
+  fprintf (fid, ',%d', image.transform(1,2:4));
+  fprintf (fid, '\ntransform: %d', image.transform(2,1));
+  fprintf (fid, ',%d', image.transform(2,2:4));
+  fprintf (fid, '\ntransform: %d', image.transform(3,1));
+  fprintf (fid, ',%d', image.transform(3,2:4));
 end
 
 if isstruct (image) && isfield (image, 'DW_scheme')
   for i=1:size(image.DW_scheme,1)
-    fprintf (fid, '\nDW_scheme: %d', image.DW_scheme(i,1))
-    fprintf (fid, ',%d', image.DW_scheme(i,2:4))
+    fprintf (fid, '\nDW_scheme: %d', image.DW_scheme(i,1));
+    fprintf (fid, ',%d', image.DW_scheme(i,2:4));
   end
 end
 
 if filename(end-3:end) == '.mif'
   datafile = filename;
-  dataoffset = ftell (fid) + 16;
-  fprintf (fid, '\nfile: . %d\nEND\n', dataoffset);
+  dataoffset = ftell (fid) + 24;
+  fprintf (fid, '\nfile: . %d\nEND\n                         ', dataoffset);
 elseif filename(end-3:end) == '.mih'
   datafile = [ filename(end-3:end) '.dat' ];
   dataoffset = 0;
   fprintf (fid, '\nfile: %s %d\nEND\n', datafile, dataoffset);
 else 
-  disp ('unknown file suffix - aborting')
+  disp ('unknown file suffix - aborting');
   return
 end
 
 fclose(fid);
 
-fid = fopen (datafile, 'a', byteorder);
+fid = fopen (datafile, 'r+', byteorder);
 fseek (fid, dataoffset, -1);
-ftell (fid);
 
 if isstruct(image)
   fwrite (fid, image.data, precision);
diff --git a/matlab/write_mrtrix_tracks.m b/matlab/write_mrtrix_tracks.m
index 37bc574..b5afc4e 100644
--- a/matlab/write_mrtrix_tracks.m
+++ b/matlab/write_mrtrix_tracks.m
@@ -40,4 +40,5 @@ for i = 1:prod(size(tracks.data))
   fwrite (f, [ nan nan nan ], 'float32');
 end
 
+fwrite (f, [ inf inf inf ], 'float32');
 fclose (f);
diff --git a/mrtrix-mime.xml b/mrtrix-mime.xml
new file mode 100644
index 0000000..fa50c2f
--- /dev/null
+++ b/mrtrix-mime.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+ <mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
+
+   <mime-type type="application/x-mrtrix">  
+     <comment>MRtrix image</comment>
+     <magic>
+       <match type="string" offset="0" value="mrtrix image"/>
+     </magic>
+     <glob pattern="*.mif"/>
+     <glob pattern="*.mih"/>
+   </mime-type>
+
+   <mime-type type="application/x-mrtrix-gz">  
+     <comment>MRtrix image (compressed)</comment>
+     <glob pattern="*.mif.gz"/>
+   </mime-type>
+
+   <mime-type type="application/x-nifti">  
+     <comment>NIfTI image</comment>
+     <glob pattern="*.nii"/>
+   </mime-type>
+
+   <mime-type type="application/x-nifti-gz">  
+     <comment>NIfTI image (compressed)</comment>
+     <glob pattern="*.nii.gz"/>
+   </mime-type>
+
+   <mime-type type="application/x-image-mgh">  
+     <comment>MGH image</comment>
+     <glob pattern="*.mgh"/>
+   </mime-type>
+
+   <mime-type type="application/x-image-mgz">  
+     <comment>MGH image (compressed)</comment>
+     <glob pattern="*.mgz"/>
+   </mime-type>
+
+   <mime-type type="application/x-image-analyze">  
+     <comment>Analyze image</comment>
+     <glob pattern="*.img"/>
+   </mime-type>
+
+   <mime-type type="application/x-mrtrix-tracks">  
+     <comment>MRtrix streamlines file</comment>
+     <glob pattern="*.tck"/>
+   </mime-type>
+
+ </mime-info>
+
diff --git a/mrtrix-mrview.desktop b/mrtrix-mrview.desktop
new file mode 100644
index 0000000..1e1951f
--- /dev/null
+++ b/mrtrix-mrview.desktop
@@ -0,0 +1,12 @@
+#!/usr/bin/env xdg-open
+[Desktop Entry]
+Value=1.0
+Type=Application
+Terminal=false
+Name=MRView
+GenericName=Medical image viewer
+Comment=The MRtrix image viewer
+Icon=application-x-mrtrix
+Exec=mrview %F
+Categories=Science;Development;Education;MedicalSoftware
+MimeType=application/x-mrtrix;application/x-mrtrix-gz;application/x-nifti;application/x-nifti-gz;application/x-image-mgh;application/x-image-mgz;application/x-image-analyze;
diff --git a/src/doc/appendix/config.html b/src/doc/appendix/config.html
deleted file mode 100644
index 331171f..0000000
--- a/src/doc/appendix/config.html
+++ /dev/null
@@ -1,98 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="../left.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>The MRtrix configuration file</th>
-    <td><a href="mrtrix.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<h2><a name="location">Location</a></h2>
-<p>
-MRtrix applications will attempt to read configuration information 
-from a number of possible locations, if they exist. 
-There will in general be a system-wide configuration file, 
-and a user specific configuration file.
-Their exact location is platform-dependent, as detailed below:
-</p>
-<table class=desc>
-  <tr><th>platform</th><th>location</th></tr>
-  <tr><td>Unix</td><td>system: <kbd>/etc/mrtrix.conf</kbd><br>user: <kbd>$HOME/.mrtrix.conf</kbd></td></tr>
-  <tr><td>Windows</td><td>system: <kbd>C:\mrtrix.conf</kbd><br>user: <kbd>$HOME\mrtrix.conf</kbd> (e.g. <kbd>C:\Documents and Settings\username\mrtrix.conf</kbd>)</td></tr>
-</table>
-
-<p>
-The system-wide configuration file will be read first (if found),
-followed by the user configuration file (if found).
-In case of conflict between the system-wide and user configuration,
-the user settings will be used.
-If a particular configuration parameter is not defined, 
-MRtrix will use hard-coded defaults.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name="format">Format</a></h2>
-<p>
-The configuration files are text files, with each line containing a key: value pair.
-For example:
-</p>
-<pre>
-Analyse.LeftToRight: false
-NumberOfThreads: 2
-</pre>
-<p>
-<strong>Note:</strong> key names are case-sensitive.
-</p>
-<p>
-The value entry may be interpreted by MRtrix applications as either:
-<ul>
-  <li>Boolean: allowed values here are <kbd>true</kbd> or <kbd>false</kbd></li>
-  <li>Integer: any integer value</li>
-  <li>Floating-point: any floating-point value</li>
-  <li>Text: any text string, without any further interpretation</li>
-</ul>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name="list">List of parameters</a></h2>
-<p>
-These parameters are currently interpreted by MRtrix:
-</p>
-<table class=args>
-  <tr><td>Analyse.LeftToRight</td><td>bool</td><td>specifies the order in which voxels are stored in Analyse format image data files.</td></tr>
-  <tr><td>NumberOfThreads</td><td>integer</td><td>number of threads to lauch in multi-threaded applications (e.g. <a href='../commands/csdeconv.html'>csdeconv</a>)</td></tr>
-</table>
-
-
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="mrtrix.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/appendix/gpl-3.0.html b/src/doc/appendix/gpl-3.0.html
deleted file mode 100644
index 37dd762..0000000
--- a/src/doc/appendix/gpl-3.0.html
+++ /dev/null
@@ -1,690 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html><head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>GNU General Public License - GNU Project - Free Software Foundation (FSF)</title>
-</head>
-<body>
-<h3 style="text-align: center;">GNU GENERAL PUBLIC LICENSE</h3>
-<p style="text-align: center;">Version 3, 29 June 2007</p>
-
-<p>Copyright © 2007 Free Software Foundation, Inc. <http://fsf.org/></p><p>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.</p>
-
-<h3><a name="preamble"></a>Preamble</h3>
-
-<p>The GNU General Public License is a free, copyleft license for
-software and other kinds of works.</p>
-
-<p>The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.</p>
-
-<p>When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.</p>
-
-<p>To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.</p>
-
-<p>For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.</p>
-
-<p>Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.</p>
-
-<p>For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.</p>
-
-<p>Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.</p>
-
-<p>Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.</p>
-
-<p>The precise terms and conditions for copying, distribution and
-modification follow.</p>
-
-<h3><a name="terms"></a>TERMS AND CONDITIONS</h3>
-
-<h4><a name="section0"></a>0. Definitions.</h4>
-
-<p>“This License” refers to version 3 of the GNU General Public License.</p>
-
-<p>“Copyright” also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.</p>
- 
-<p>“The Program” refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as “you”.  “Licensees” and
-“recipients” may be individuals or organizations.</p>
-
-<p>To “modify” a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a “modified version” of the
-earlier work or a work “based on” the earlier work.</p>
-
-<p>A “covered work” means either the unmodified Program or a work based
-on the Program.</p>
-
-<p>To “propagate” a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.</p>
-
-<p>To “convey” a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.</p>
-
-<p>An interactive user interface displays “Appropriate Legal Notices”
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.</p>
-
-<h4><a name="section1"></a>1. Source Code.</h4>
-
-<p>The “source code” for a work means the preferred form of the work
-for making modifications to it.  “Object code” means any non-source
-form of a work.</p>
-
-<p>A “Standard Interface” means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.</p>
-
-<p>The “System Libraries” of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-“Major Component”, in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.</p>
-
-<p>The “Corresponding Source” for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.</p>
-
-<p>The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.</p>
-
-<p>The Corresponding Source for a work in source code form is that
-same work.</p>
-
-<h4><a name="section2"></a>2. Basic Permissions.</h4>
-
-<p>All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.</p>
-
-<p>You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.</p>
-
-<p>Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.</p>
-
-<h4><a name="section3"></a>3. Protecting Users' Legal Rights From Anti-Circumvention Law.</h4>
-
-<p>No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.</p>
-
-<p>When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.</p>
-
-<h4><a name="section4"></a>4. Conveying Verbatim Copies.</h4>
-
-<p>You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.</p>
-
-<p>You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.</p>
-
-<h4><a name="section5"></a>5. Conveying Modified Source Versions.</h4>
-
-<p>You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:</p>
-
-<ul>
-<li>a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.</li>
-
-<li>b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    “keep intact all notices”.</li>
-
-<li>c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.</li>
-
-<li>d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.</li>
-</ul>
-
-<p>A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-“aggregate” if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.</p>
-
-<h4><a name="section6"></a>6. Conveying Non-Source Forms.</h4>
-
-<p>You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:</p>
-
-<ul>
-<li>a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.</li>
-
-<li>b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.</li>
-
-<li>c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.</li>
-
-<li>d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.</li>
-
-<li>e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.</li>
-</ul>
-
-<p>A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.</p>
-
-<p>A “User Product” is either (1) a “consumer product”, which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, “normally used” refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.</p>
-
-<p>“Installation Information” for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.</p>
-
-<p>If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).</p>
-
-<p>The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.</p>
-
-<p>Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.</p>
-
-<h4><a name="section7"></a>7. Additional Terms.</h4>
-
-<p>“Additional permissions” are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.</p>
-
-<p>When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.</p>
-
-<p>Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:</p>
-
-<ul>
-<li>a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or</li>
-
-<li>b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or</li>
-
-<li>c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or</li>
-
-<li>d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or</li>
-
-<li>e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or</li>
-
-<li>f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.</li>
-</ul>
-
-<p>All other non-permissive additional terms are considered “further
-restrictions” within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.</p>
-
-<p>If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.</p>
-
-<p>Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.</p>
-
-<h4><a name="section8"></a>8. Termination.</h4>
-
-<p>You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).</p>
-
-<p>However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.</p>
-
-<p>Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.</p>
-
-<p>Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.</p>
-
-<h4><a name="section9"></a>9. Acceptance Not Required for Having Copies.</h4>
-
-<p>You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.</p>
-
-<h4><a name="section10"></a>10. Automatic Licensing of Downstream Recipients.</h4>
-
-<p>Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.</p>
-
-<p>An “entity transaction” is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.</p>
-
-<p>You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.</p>
-
-<h4><a name="section11"></a>11. Patents.</h4>
-
-<p>A “contributor” is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's “contributor version”.</p>
-
-<p>A contributor's “essential patent claims” are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, “control” includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.</p>
-
-<p>Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.</p>
-
-<p>In the following three paragraphs, a “patent license” is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To “grant” such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.</p>
-
-<p>If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  “Knowingly relying” means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.</p>
-  
-<p>If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.</p>
-
-<p>A patent license is “discriminatory” if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.</p>
-
-<p>Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.</p>
-
-<h4><a name="section12"></a>12. No Surrender of Others' Freedom.</h4>
-
-<p>If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.</p>
-
-<h4><a name="section13"></a>13. Use with the GNU Affero General Public License.</h4>
-
-<p>Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.</p>
-
-<h4><a name="section14"></a>14. Revised Versions of this License.</h4>
-
-<p>The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.</p>
-
-<p>Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License “or any later version” applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.</p>
-
-<p>If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.</p>
-
-<p>Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.</p>
-
-<h4><a name="section15"></a>15. Disclaimer of Warranty.</h4>
-
-<p>THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
-
-<h4><a name="section16"></a>16. Limitation of Liability.</h4>
-
-<p>IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.</p>
-
-<h4><a name="section17"></a>17. Interpretation of Sections 15 and 16.</h4>
-
-<p>If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.</p>
-
-<p>END OF TERMS AND CONDITIONS</p>
-
-<h3><a name="howto"></a>How to Apply These Terms to Your New Programs</h3>
-
-<p>If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.</p>
-
-<p>To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the “copyright” line and a pointer to where the full notice is found.</p>
-
-<pre>    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation, either version 3 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-</pre>
-
-<p>Also add information on how to contact you by electronic and paper mail.</p>
-
-<p>If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:</p>
-
-<pre>    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-</pre>
-
-<p>The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an “about box”.</p>
-
-<p>You should also get your employer (if you work as a programmer) or school,
-if any, to sign a “copyright disclaimer” for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.</p>
-
-<p>The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.</p>
-
diff --git a/src/doc/appendix/index.html b/src/doc/appendix/index.html
deleted file mode 100644
index 8c3c8c8..0000000
--- a/src/doc/appendix/index.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-  <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix #VERSION# documentation</title>
-  <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="../commands/index.html"><img src="../left.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Appendix</th>
-    <td><a href="config.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-
-<ul class=toc>
-  <li><a href='config.html'>The MRtrix configuration file</a></li>
-  <li><a href='mrtrix.html'>The MRtrix file format</a></li>
-  <li><a href='refs.html'>References</a></li>
-  <li><a href='gpl-3.0.html'>The GNU General Public License</a></li>
-</ul>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/appendix/mrtrix.html b/src/doc/appendix/mrtrix.html
deleted file mode 100644
index b72ce6a..0000000
--- a/src/doc/appendix/mrtrix.html
+++ /dev/null
@@ -1,178 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="config.html"><img src="../left.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>The MRtrix file formats</th>
-    <td><a href="refs.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<h2><a name='images'>Image formats (.mif / .mih)</a></h2>
-<p>
-These MRtrix-specific image formats are closely related. They consist of a
-text header, with data stored in binary format, either within the same file
-(.mif) or as one or more separate files (.mih). In both cases, the header
-structure is the same, as detailed below. These file formats were devised to
-address a number of limitations inherent in currently available formats. In
-particular:
-<ul>
-<li><b>simplicity:</b> as detailed below, the header format is deliberately kept very
-simple and human-readable, making it easy to debug and edit manually if needed.</li>
-<li><b>extendability:</b> any information can be stored in the header, and will simply
-be ignored by the application if not recognised.</li>
-<li><b>arbitrary data organisation:</b> voxel values can be stored in any
-order, making it simple to ensure for example that all FOD coefficients for a
-given voxel are stored contiguously on file.</li>
-</ul>
-</p>
-<p>
-Note that MRtrix now includes MatLab<sup>®</sup> functions to read and write MRtrix image
-files, and to load MRtrix tracks files. These are located in the
-<kbd>matlab</kbd> subfolder.
-</p>
-
-<h3>Header structure</h3>
-<p>
-The header is the first (and possibly only) data stored in the file, as
-ASCII-encoded text (although other encodings such as UTF8 may work equally
-well). Lines should be separated by unix-style newlines (line-feed, '\n', ASCII
-0x0A), although MRtrix will also accept DOS-type newlines. 
-</p>
-<p>
-The first line should read only 'mrtrix image' to indicate that this is an
-image in MRtrix format. The last line of the header should read only 'END' to
-signal the end of the header, after which all data will be considered as
-binary.
-</p>
-<p>
-All following lines are in the format 'key: value', with the value entry extending
-up to the end of the line. All whitespace characters before and after the value
-entry are ignored. Some keys are required to read the images, others are
-optional, and any key not recognised by MRtrix will simply be ignored.
-Recognised keys are listed below, along with the expected format of the
-corresponding values.
-<dl>
-<dt>dim</dt>
-<dd><strong>[required]</strong> the image dimensions, supplied as a
-comma-separated list of integers. The number of entries in the specifies the
-dimensionality of the image (currently limited to 16 dimensions). For example:
-<kbd>dim: 192,256,256</kbd> specifies a 192×256×256 image.</dd>
-
-<dt>vox</dt>
-<dd><strong>[required]</strong> the voxel size along each dimension, as a
-comma-separated list of floating-point values. The number of entries should
-match that given in the <kbd>dim</kbd> entry. For example: <kbd>vox:
-0.9,0.898438,0.898438</kbd>.</dd>
-
-<dt>layout</dt>
-<dd><strong>[required]</strong> specifies the organisation of the data
-on file. In simplest terms, it provides a way of specifying the strides
-required to navigate the data file, in combination with the <kbd>dim</kbd>
-entry. It is given as a comma-separated list of signed integers, with the sign
-providing the direction of data traversal with respect to voxel coordinates,
-and the value providing a way of specifying the order of increasing stride.<br>
-For example, assuming an image with <kbd>dim: 192,256,256</kbd>, the entry
-<kbd>layout: +2,-0,-1</kbd> is interpreted as: the shortest stride is along the
-y-axis (second entry), then the z-axis (third entry), and then along the
-x-axis. Voxels are stored in the order left to right (positive stride) along
-the x-axis; anterior to posterior along the y-axis (negative stride); and
-superior to inferior (negative stride) along the z-axis. Given the image
-dimensions, the final strides are therefore 256×256=65536 for adjacent
-voxels along the x-axis, -1 for the y-axis, and -256 for the z-axis.  This also
-implies that the voxel at coordinate [ 0 0 0 ] is located 65536 voxel values
-into the data portion of the file.</dd>
-
-<dt>datatype</dt>
-<dd><strong>[required]</strong> the datatype used to store individual
-voxel values. Valid data types are listed in <a
-href=../general/formats.html#datatypes>this section</a>. For example:
-<kbd>datatype:  UInt16LE</kbd></dd>
-
-<dt>file</dt>
-<dd><strong>[required]</strong> speficies where the binary image
-data are stored, in the format <em>file: filename offset</em>, with the offset
-provided in bytes from the beginning of the file. For example: <kbd>file:
-image.dat 0</kbd>.<br>
-For the single-file format (.mif), the filename should consists of a single
-full-stop ('.') to indicate the current file, and the offset should correspond
-to a point in the file after the END statement of the header.<br>
-For the separate header/data format (.mih), the filename should refer to an
-existing file in the same folder as the header (.mih) file.  Multiple such
-entries can be supplied if the data are stored across several files. </dd>
-
-<dt>transform</dt>
-<dd><em>[optional]</em> used to supply the 4×4 transformation matrix specifying the orientation of the axes with respect to real space. This is supplied as a comma-separated list of floating-point values, and only the first 12 such values will be used to fill the first 3 rows of the transform matrix. Multiple such entries can be provided to fill the matrix; for example, MRtrix will normally produce 3 lines for the transform, with one row of 4 values per entry:<br>
-<pre>
-transform: 0.997986,-0.0541156,-0.033109,-74.0329
-transform: 0.0540858,0.998535,-0.00179436,-100.645
-transform: 0.0331575,2.34007e-08,0.99945,-125.84
-</pre>
-
-<dt>labels</dt>
-<dd><em>[optional]</em> used to specify the meaning of the axes, provided as a
-list of descriptions separated by backslashes. For example:
-<kbd>left->right\posterior->anterior\inferior->superior</kbd></dd>
-
-<dt>units</dt>
-<dd><em>[optional]</em> used to specify the units for each axis, provided as a
-list of descriptions separated by backslashes. For example: <kbd>units:
-mm\mm\mm</kbd></dd>
-
-<dt>comments</dt>
-<dd><em>[optional]</em> used to add generic comments to the header. Multiple
-such entries can be provided. For example: <kbd>comment: some
-information</kbd></dd>
-</dl>
-
-
-<h2><a name='tracks'>Tracks file format (.tck)</a></h2>
-<p>
-The format for track files is similar to that for MRtrix-format images. It
-consists of a text header in the same key: value format, ending with a single
-'END' statement, and followed by binary data. 
-</p>
-<p>
-The first line of the header should read "mrtrix tracks" to indicate that the
-file contains tracks in MRtrix format. Further key: value pairs typically
-provide information about the parameters used to produce the tracks, and for
-the most part are not required to read the data. 
-The only required keys are the following:
-<dl>
-<dt>file</dt>
-<dd> a <em>file: . offset</em> entry is required to specify the byte offset
-from the beginning of the file to the start of the binary track data. At this
-stage, only the single-file format is supported - in other words the filename
-part must be specified as '.' (see <a href=#images'>above</a> for
-details).</dd>
-
-<dt>datatype</dt>
-<dd>specifies the datatype (and byte order). At this points only the Float32
-data type is supported, either as little-endian (LE) or big-endian (BE).</dd>
-</dl>
-
-<p>
-The binary track data themselves are stored as triplets of floating-point
-values (at this stage in 32 bit floating-point format), one per vertex along
-the track. Tracks are separated using a triplet of NaN values. Finally, a
-triplet of Inf values is used to indicate the end of the file. 
-</p>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/appendix/refs.html b/src/doc/appendix/refs.html
deleted file mode 100644
index cca1358..0000000
--- a/src/doc/appendix/refs.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-  <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix #VERSION# documentation</title>
-  <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="mrtrix.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>References</th>
-    <td><a href="gpl-3.0.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<dl>
-  <dt><a name='basser'>Basser PJ, Jones DK</a></dt>
-  <dd>Diffusion-tensor MRI: theory, experimental design and data analysis - a technical review<br>
-  NMR Biomed 2002; 15 (7-8): 456-467</dd>
-  <dt><a name='behrens'>Behrens TE, Woolrich MW, Jenkinson M, Johansen-Berg H, Nunes RG, Clare S, Matthews PM, Brady JM, Smith SM</a></dt>
-  <dd>Characterization and propagation of uncertainty in diffusion-weighted MR imaging<br>
-  Magn Reson Med 2003; 50 (5): 1077-108</dd>
-  <dt><a name=calamante>Calamante F, Tournier JD, Jackson GD, Connelly A</a></dt>
-  <dd>Track-density imaging (TDI): super-resolution white matter imaging using whole-brain track-density mapping<br>
-  Neuroimage 2010; 53 (4): 1233-1243</dd>
-  <dt><a name='conturo'>Conturo TE, Lori NF, Cull TS, Akbudak E, Snyder AZ, Shimony JS, McKinstry RC, Burton H, Raichle ME</a></dt>
-  <dd>Tracking neuronal fiber pathways in the living human brain<br>
-  Proc Natl Acad Sci USA 1999; 96 (18): 10422-10427</dd>
-  <dt><a name='mori'>Mori S, van Zijl PC</a></dt>
-  <dd>Fiber tracking: principles and strategies - a technical review<br>
-  NMR Biomed 2002; 15 (7-8): 468-480</dd>
-  <dt><a name='parker'>Parker GJ, Haroon HA, Wheeler-Kingshott CA</a></dt>
-  <dd>A framework for a streamline-based probabilistic index of connectivity (PICo) using a structural interpretation of MRI diffusion measurements<br>
-  J Magn Reson Imaging 2003; 18 (2): 242-254</dd>
-  <dt><a name='tournier1'>Tournier JD, Calamante F, Gadian DG, Connelly A</a></dt>
-  <dd>Direct estimation of the fiber orientation density function from diffusion-weighted MRI data using spherical deconvolution<br>
-  Neuroimage 2004; 23 (3): 1176-1185</dd>
-  <dt><a name='tournier2'>Tournier JD, Calamante F, Connelly A</a></dt>
-  <dd>Robust determination of the fibre orientation distribution in diffusion MRI: non-negativity constrained super-resolved spherical deconvolution<br>
-  Neuroimage 2007; 35 (4): 1459-1472</dd>
-  <dt><a name='tournier3'>Tournier JD, Calamante F, Connelly A</a></dt>
-  <dd>MRtrix: diffusion tractography in crossing fibre regions</br>
-  International Journal of Imaging Systems and Technology 2012; <em>in press</em>, DOI: 10.1002/ima.22005</dd>
-</dl>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/faq.html b/src/doc/faq.html
deleted file mode 100644
index a52ecc4..0000000
--- a/src/doc/faq.html
+++ /dev/null
@@ -1,386 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="stylesheet.css" type="text/css" media=screen>
-</head>
-
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="tractography/index.html"><img src="left.png"></a></td>
-    <td><a href="index.html"><img src="up.png"></a></td>
-    <td><a href="index.html"><img src="home.png"></a></td>
-    <th>Frequently Asked Questions</th>
-    <td><a href="commands/index.html"><img src="right.png"></a></td>
-  </tr>
-</table>
-
-
-<ul>
-  <li><a href='#help'>I want to get help or discuss issues about MRtrix</a></li>
-  <li><a href='#acquisition'>What data do I need to perform constrained spherical deconvolution?</a></li>
-  <li><a href='#super'>How do I perform the super-resolved version of CSD?</a></li>
-  <li><a href='#converge'>I keep getting 'failed to converge' messages with csdeconv</a></li>
-  <li><a href='#coreg'>I want to coregister my anatomical images with the DWI/tracks</a></li>
-  <li><a href='#probmap'>How do I produce an image of the track count through each voxel?</a></li>
-  <li><a href='#temp'>What are these 'mrtrix-azdj28.mif' files that keep appearing in my folder?</a></li>
-  <li><a href='#analyse'>Why am I getting strange alignment issues with my Analyse format data?</a></li>
-  <li><a href='#FSLencoding'>Can I use the same gradient direction tables with MRtrix as I use with FSL?</a></li>
-  <li><a href='#NIFTI_and_FSL'>Why do are my MRtrix-generated NIfTI images displayed in a different orientation to my original images in FSLview?</a></li>
-  <li><a href='#normalise_tracks'>How do I spatially normalise my tracks into template space?</a></li>
-</ul>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='help'>I want to get help or discuss issues about MRtrix</a></h3>
-<p>
-Please subscribe to the <a href='http://www.nitrc.org/mailman/listinfo/mrtrix-discussion'>MRtrix mailing list</a> and post your questions there.
-You can also browse through the <a href='http://www.nitrc.org/pipermail/mrtrix-discussion/'>archives</a> to see if your question has already been addressed.
-Another advantage of joining the mailing list is that you get notified of any new releases.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='acquisition'>What data do I need to perform constrained spherical deconvolution?</a></h3>
-<p>
-The input data for CSD is a high angular resolution diffusion-weighted imaging (HARDI) data set. 
-There are three main aspects of the acquisition that impact on the quality of the CSD results.
-In general, there will be trade-offs between the parameters concerned, meaning that there is no simple answer to this question.
-However, we do provide our own recommendations as part of this discussion.
-</p>
-<dl>
-  <dt><i>b</i>-value:</dt>
-  <dd>higher <i>b</i>-values produce stronger angular contrast in the DW signal, 
-  providing improved discrimination between the different fibre orientations.
-  Note that although the raw DW images will look much noisier at higher <i>b</i>-values, 
-  it is the vastly improved <em>constrast to noise</em> ratio in the angular domain that is critical for CSD.<br> 
-  We would recommend a <i>b</i>-value of approximately 3000s/mm&sup2;.</dd>
-  <dt>number of DW directions:</dt>
-  <dd>a larger number of DW directions will produce a better characterisation of the DW signal.
-  In addition to an overall increase in SNR, it provides a more precise definition of the features of the DW signal in the angular domain, 
-  which is critical for CSD. In addition, since the DW signal increases in angular constrast with higher <i>b</i>-values, 
-  a larger number of DW directions becomes even more important then. 
-  Please note that in the context of this discussion, it is the number of <em>unique</em> directions that is important: 
-  a 3 × 12 directions acquisition still only contains 12 directions (although with improved SNR).<br>
-  We would recommend a minimum of 60 DW directions.</dd>
-  <dt>SNR:</dt>
-  <dd>higher SNR obviously produces better results. 
-  Larger voxels will provide higher SNR, but at the expense of spatial localisation. 
-  However, CSD will produce poor quality results if the SNR in the <i>b</i>=0 image is too low.
-  We would recommend adjusting the voxel size until the SNR exceeds 20. 
-  This should not require a huge sacrifice in terms of imaging resolution:
-  for example, using 2.5mm rather than 2mm isotropic voxels effectively doubles the SNR, 
-  at the expense of a relatively small reduction in spatial resolution.</dd>
-</dl>
-<p>
-In the same way, there is also no simple answer to what the minimum requirements are.
-It is possible to get reasonable-looking results using <i>b</i>=1000s/mm&sup2; and 30 DW directions, 
-but the quality may then be questionable.
-In general, we would urge you to follow the recommendations given here if you intend to use CSD.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='super'>How do I perform the super-resolved version of CSD?</a></h3>
-<p>
-Super-CSD is actually performed in the same way as 'normal' CSD, 
-but using a higher harmonic order (lmax) than would otherwise be possible given the data.
-For example, 60 directions provides enough data to perform a spherical harmonic fit up to harmonic order 8 
-(which requires 45 parameters), but not enough for harmonic order 10 (which requires 66 parameters) 
-– see the table in the <a href='tractography/preprocess.html#response'>response function coefficient</a> section.
-This means that a 60 direction data set will be analysed using straight CSD if 
-<kbd><a href='commands/csdeconv.html'>csdeconv</a></kbd> is performed with lmax=8 or lower, 
-and super-resolved CSD if <kbd><a href='commands/csdeconv.html'>csdeconv</a></kbd> is performed with lmax=10 or higher.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='converge'>I keep getting 'failed to converge' messages with csdeconv</a></h3>
-<p>
-<kbd><a href='commands/csdeconv.html'>csdeconv</a></kbd> will produce one such message per voxel
-where the CSD fails to converge. It is not unusual to get a dozen or so such messages per data set 
-when performing a super-resolved reconstruction (see above). 
-The voxels affected are typically not in white matter, so these failures usually won't affect any 
-subsequent tractography. 
-</p>
-<p>
-However, if you are getting a lot of these messages, you may need to check that the CSD images are suitable.
-They can be loaded directly into <a href='general/mrview.html'>MRview</a>: the voxels that failed to converge will appear black.
-If these messages do signal a real problem, you should try to perform the CSD using a lower value of lmax.
-In particular, you will usually not get any such messages when performing non-super-resolved CSD (see above).
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='coreg'>I want to coregister my anatomical images with the DWI/tracks</a></h3>
-<p>
-MRtrix now includes support for the <a href='general/formats.html#NIfTI'>NIfTI</a> image format, allowing straightforward interaction with 
-<a href='http://www.fil.ion.ucl.ac.uk/spm/'>SPM</a> and <a href='http://www.fmrib.ox.ac.uk/fsl/'>FSL</a> (amongst others). 
-Both of these packages provide robust functionality for coregistration. 
-Some simple instructions for coregistration using these packages are given below.
-<p>
-</p>
-An important point to bear in mind is that the orientation of the DWI data and any images derived from them (including the CSD results)
-should not be modified, since this may affect the orientation of the DW gradients with respect to the data, 
-and hence also affect the orientation of the fibres relative to the data, 
-which would obviously invalidate any subsequent tractography results.
-In practice, this means that the anatomical images should be coregistered to the DWI data, 
-leaving the DWI data unmodified.
-</p>
-<p>
-The first step in the coregistration procedure is to convert the images of interest to <a href='general/formats.html#NIfTI'>NIfTI</a> format. 
-The FA map appears to provide adequate contrast for coregistration with the anatomical images, so we will convert these data:
-</p>
-<pre>
-> <b><a href='commands/mrconvert.html'>mrconvert</a> anat.mif anat_coreg.nii</b>
-<a href='commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-> <b><a href='commands/mrconvert.html'>mrconvert</a> fa.mif fa_coreg.nii</b>
-<a href='commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-</pre>
-<p>
-The subsequent steps depend on the software package to be used.
-</p>
-<h4>SPM</h4>
-<p>
-The procedure with <a href='http://www.fil.ion.ucl.ac.uk/spm/'>SPM</a> is straightforward: 
-set the FA map as the reference image, the anatomical as the source image, 
-and coregister (estimate only) with the normalised mutual information cost function. 
-Once the processing is done, the <kbd>anat_coreg.nii</kbd> image will have been re-oriented 
-to match that of the FA map (only the header's orientation field will have been modified).
-The <kbd>anat_coreg.nii</kbd> can then be loaded into <a href='general/mrview.html'>MRview</a> instead of the original <kbd>anat.mif</kbd>.
-<p>
-<ul>
-  <li>open SPM, and click on 'coregister' in the <em>spatial pre-processing</em> box</li>
-  <li>select <em>New "Coreg: Estimate"</em></li>
-  <li>double-click on <em>+Coreg: Estimate <- X</em> to expand the parameter list</li>
-  <li>click on <em>Reference Image <- X</em> to highlight it</li>
-  <li>click on <em>Specify Files</em> to open the file dialog</li>
-  <li>select the <kbd>fa_coreg.nii</kbd> file and press <em>Done</em></li>
-  <li>click on <em>Source Image <- X</em> to highlight it</li>
-  <li>click on <em>Specify Files</em> to open the file dialog</li>
-  <li>select the <kbd>anat_coreg.nii</kbd> file and press <em>Done</em></li> 
-  <li>double-click on <em>+Estimation options</em> to expand the list</li>
-  <li>click on <em>Objective Function</em> to select it</li> 
-  <li>make sure it is set to <em>Normalised Mutual Information</em></li> 
-  <li>press <em>Run</em> to start the coregistration</li> 
-</ul>
-<p>
-<kbd>anat_coreg.nii</kbd> should now be coregistered with the DWI data and any tracks generated from them.
-</p>
-
-<h4>FSL</h4>
-<p>
-The procedure to use with <a href='http://www.fmrib.ox.ac.uk/fsl/'>FSL</a> is slightly more complex.
-The <a href='http://www.fmrib.ox.ac.uk/fsl/flirt/'>FLIRT</a> command does not produce good results
-if the FA map is specified as the reference. The steps required are therefore to coregister the
-anatomical images to the FA map, producing a 4×4 affine transform matrix.
-As with <a href='http://www.fil.ion.ucl.ac.uk/spm/'>SPM</a>, the normalised mutual information cost function produces the best results.
-The inverse of this transform can then be applied to the anatomical images 
-using the <a href='commands/mrtransform.html'>mrtransform</a> command included as part of MRtrix.
-<pre>
-> <b><a href='http://www.fmrib.ox.ac.uk/fsl/flirt/overview.html'>flirt</a> -ref anat_coreg.nii -in fa_coreg.nii -cost normmi -searchcost normmi -dof 6 -omat transform.txt</b>
-> <b><a href='commands/mrtransform.html'>mrtransform</a> anat_coreg.nii -transform transform.txt -reference fa_coreg.nii -inverse -flipx anat_coreg.mif</b>
-mrtransform: copying image data... 100%
-</pre>
-<p>
-<kbd>anat_coreg.mif</kbd> should now be coregistered with the DWI data and any tracks generated from them.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='probmap'>How do I produce an image of the track count through each voxel?</a></h3>
-<p>
-The <a href='commands/tracks2prob.html'>tracks2prob</a> command can be used to generate an image 
-where each voxel contains the number of tracks that pass through that voxel.
-For example:
-</p>
-<pre>
-> <b><a href='commands/tracks2prob.html'>tracks2prob</a> tracks.tck -template anat.mif track_image.mif</b>
-tracks2prob: generating track count image...  - ok
-</pre>
-<p>
-This will produce an image of the number of tracks through each voxel based on the <kbd>anat.mif</kbd> template image.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='temp'>What are these 'mrtrix-azdj28.mif' files that keep appearing in my folder?</a></h3>
-<p>
-MRtrix will produce temporary files when <a href='general/cmdline.html#pipes'>data pipes</a> are used.
-If one of the programs in the pipeline crashes, these files will not be deleted (see <a href='general/cmdline.html#pipes'>here</a> for details).
-If you find one or more of these files amongst your data, you can safely delete them – 
-assuming of course that there are no currently running MRtrix programs that may be accessing the file!
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='analyse'>Why am I getting strange alignment issues with my Analyse format data?</a></h3>
-<p>
-If you use the Analyse image format to store your data, you may find that your
-FOD orientations or tractography results are not correctly aligned with the
-image. This is due to a limitation of the Analyse image format: it is not
-capable of storing the image transformation matrix. If the data were acquired
-in a non-axial orientation, and the DW gradient orientations were not
-reoriented to match the image axes, this will cause an orientation mismatch.
-This problem can also occur if the processing is performed in a different
-format that does support storing of the transform (e.g. MRtrix or NIfTI), and
-the results subsequently converted to Analyse format. 
-</p>
-<p>
-Another issue with the Analyse image format is the lack of a clear convention
-for left-right ordering. In particular, certain versions of SPM used the
-convention that the data were stored left to right, which is the opposite of
-the official Analyse application. In other versions of SPM, the convention to
-use for this ordering can be set by editing a configuration file. An image
-generated using one convention will be flipped if read assuming the opposite
-convention.  Consequently, it is impossible to guarantee that images stored in
-Analyse format are correctly oriented.
-</p>
-<p>
-For these reasons, the use of Analyse images is <b>strongly discouraged</b>.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='FSLencoding'>Can I use the same gradient direction tables with MRtrix as I use with FSL?</a></h3>
-<p>
-In general, no. With MRtrix, the gradient directions need to be specified with
-respect to real (scanner) coordinates. This is different from FSL, which
-expects the gradient directions to be specified with respect to the image axes.
-Therefore, if there is any difference between these two coordinate systems, the
-gradient directions will be wrong, and so will the orientations inferred by
-<a href='commands/dwi2tensor.html'>dwi2tensor</a> and 
-<a href='commands/csdeconv.html'>csdeconv</a>. 
-<p>
-The only exception to this rule is when the images were acquired in a pure
-axial orientation: in this case the two coordinate systems will be equivalent.
-You can check this using <a href='commands/mrinfo.html'>mrinfo</a>, by looking
-at the 'transform' entry.  For example:
-<pre>
-> <b><a href='commands/mrinfo.html'>mrinfo</a> dwi.mif</b>
-************************************************
-Image:               "dwi.mif"
-************************************************
-  Format:            MRTrix
-  Dimensions:        112 x 112 x 37 x 68
-  Voxel size:        2.09821 x 2.09821 x 3 x ?
-  Dimension labels:  0. left->right (mm)
-                     1. posterior->anterior (mm)
-                     2. inferior->superior (mm)
-                     3. undefined (?)
-  Data type:         unsigned 16 bit integer (little endian)
-  Data layout:       [ -0 -1 +2 +3 ]
-  Data scaling:      offset = 0, multiplier = 1
-  Comments:          anonymous
-  Transform:                    <b>1           0          -0</b>      -115.4
-                                <b>0           1          -0</b>      -106.6
-                               <b>-0          -0           1</b>      -7.898
-                                0           0           0           1
-</pre>
-The 3×3 top-left part of the transform matrix (highlighted in bold)
-specifies the rotation component of the transform. If this part is the identity
-(as it is above), then the acquisition is pure axial, and FSL gradient tables
-can be used with MRtrix.
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='NIFTI_and_FSL'>Why do are my MRtrix-generated NIfTI images displayed in a different orientation to my original images in FSLview?</a></h3>
-<p>
-When accessing any image, MRtrix will always ensure that the image axes
-correspond as closely as possible with the <a
-href="general/overview.html#axes">MRtrix convention</a>. To do this, it will
-often be necessary to modify the transformation matrix and the associated data
-layout. When writing out NIfTI format images, MRtrix always uses this new
-transformation matrix, and writes out the data in a near-axial orientation. For
-example, images acquired in the sagittal plane and converted to NIfTI using <a
-href="http://lcni.uoregon.edu/~jolinda/MRIConvert/">mriconvert</a> are
-typically written out as a stack of sagittal slices, with the transformation
-matrix containing the appropriate rotation. When converted using MRtrix, the
-voxels for the same image will be written out as a stack of axial slices, along
-with the corresponding (but different) transformation matrix. FSLview always
-displays images assuming they are stored as a stack of axial slices, but will
-label the axes according to the transformation matrix. This causes problems
-when displaying images processed with MRtrix alongside otherwise equivalent
-images, since their data layouts are now different. Note that these will be
-displayed correctly in MRView, and interpreted correctly in any MRtrix
-application.
-</p>
-<p>
-The simplest way to get around this is to also convert your original NIfTI
-images using <a href="commands/mrconvert.html">mrconvert</a>, and write them
-out as NIfTI images again. While it may seem odd to convert NIfTI images to
-NIfTI, simply running them through <a
-href="commands/mrconvert.html">mrconvert</a> will modify the images to match.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='normalise_tracks'>How do I spatially normalise my tracks into template space?</a></h3>
-<p>
-You may want to warp tracks generated in each subject's native space into a
-common template space, using warps estimated using other applications (e.g. <a
-href="http://www.fil.ion.ucl.ac.uk/spm/">SPM</a> or <a
-href="http://picsl.upenn.edu/ANTS/">ANTS</a>). 
-Since normalisation packages store the warp information in their own format, it
-is not sensible for MRtrix to attempt to support reading the warp information
-directly. Instead, the idea is to generate a 'no-warp' image in template space,
-apply the relevant normalisation command to warp it into native space, and use
-the final warped image to warp the tracks into template space.  This is
-achieved as follows:
-</p>
-<p>
-First, a 'no-warp' image is created in template space, with each voxel containing its own real-space coordinates in template space:
-<pre>
-> <b><a href=commands/gen_unit_warp.html>gen_unit_warp</a> template_image.nii nowarp-[].nii</b>
-</pre>
-<p>
-Note the use of the square brackets to instruct the application to produce a
-set of image volumes, rather than a single 4D image (see <a
-href='general/cmdline.html#sequences'>here</a> for details). Also, the image
-format is specified as NIfTI, since this format is supported by most
-normalisation packages.
-</p>
-<p>
-The set of images produced is then warped into each subject's native space,
-using the appropriate warp field and the package originally used to estimate
-it. Details on performing this step are dependent on the exact package used,
-and will not be discussed further here. The most important consideration is to
-ensure that the target image in subject space (i.e. the image whose dimensions,
-voxel size, etc. will be used as a template when creating the warped images)
-covers the entire extent of all the tracks to be warped.
-</p>
-<p>
-Once the 'no-warp' field images have been warped into subject space, each voxel
-contains the coordinates of its equivalent location in template space. It is
-then trivial to warp the tracks into template space.  Assuming the warped
-images have been stored under the filename
-<kbd>warp-0.nii</kbd>, <kbd>warp-1.nii</kbd>, <kbd>warp-2.nii</kbd>, this is
-achieved as follows: 
-<pre>
- > <b><a href=commands/normalise_tracks.html>normalise_tracks</a> my_tracks.tck warp-[].nii my_warped_tracks.tck</b> 
-</pre>
-
-<table class=nav>
-  <tr>
-    <td><a href="tractography/index.html"><img src="left.png"></a></td>
-    <td><a href="index.html"><img src="up.png"></a></td>
-    <td><a href="index.html"><img src="home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="commands/index.html"><img src="right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/general/cmdline.html b/src/doc/general/cmdline.html
deleted file mode 100644
index 4310056..0000000
--- a/src/doc/general/cmdline.html
+++ /dev/null
@@ -1,363 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="overview.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Command-line Usage</th>
-    <td><a href="formats.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<h2><a name="basicusage">Basic usage</a></h2>
-<p>
-Commands are generally issued by typing the <em>command name</em>, followed by
-a series of <em>arguments</em> and <em>options</em> separated by white spaces.
-MRtrix applications will typically require at least one <em>argument</em>
-(usually an image specifier), and may need to be tuned in some way using
-command line options (described <a href='#options'>here</a>). The various
-arguments and options accepted by a particular command are described in the
-<a href='../commands/index.html'>list of MRtrix commands</a>, and on each command's built-in help page, which
-can be viewed by running the command with the <kbd>-help</kbd> option. For
-example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> -help</b>
-<a href='../commands/mrinfo.html'>mrinfo</a>: part of the MRtrix package
-
-PURPOSE:  display header information
-
-SYNTAX:   mrinfo [ options ] image [ image ... ]
-
-            image       the input image.
-
-OPTIONS:
-
-  -grad file    write DW gradient scheme to file
-                "file": the DW gradient scheme file.
-
-  -dicom        print all DICOM entries.
-
-  -csa          print all CSA entries (Siemens DICOM only.
-
-  -info         display information messages.
-
-  -quiet        do not display information messages or progress status.
-
-  -debug        display debugging messages.
-
-  -help         display this information page and exit.
-
-  -version      display version information and exit.
-</pre>
-
-<p>
-To understand command-line arguments and options, consider the <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd> command:
-</p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> image.img -vox 1,1,2.5 out.mif</b>
-<a href='../commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-</pre>
-<p>
-In this example, <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd> is the command name, <kbd>image.img</kbd> is the first argument, 
-<kbd>out.mif</kbd> is the second argument, <kbd>-vox</kbd> is an option, 
-and <kbd>1,1,2.5</kbd> is an additional argument required by the <kbd>-vox</kbd> option. 
-This command converts the Analyse format image <kbd>image.img</kbd> into the MRtrix format image <kbd>out.mif</kbd>,
-overriding the original voxel size to 1 × 1 × 2.5 mm.
-</p>
-<p>
-In order to find out how to use a particular program, you can use the <kbd>-help</kbd> option 
-to display that program's help page (see <a href='#stdoptions'>Standard options</a>).
-</p>
-<p>
-Note that since arguments are assumed to be separated by white space,
-filenames containing a space need to be treated with special care to avoid them being interpreted as two arguments instead of one. 
-There are several ways to avoid this problem: 
-the filename can be enclosed in inverted commas, or each white space can be <em>escaped</em> with a preceeding backslash (<kbd>'\'</kbd>). 
-For example, if there is a file named <kbd>'an example filename.img'</kbd>, 
-then the following commands are all valid and equivalent:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> 'an example filename.img'</b>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> "an example filename.img"</b>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> an\ example\ filename.img</b>
-</pre>
-<p>
-Unix only: note also that commands and filenames are case-sensitive. If a command you issued fails, check its spelling and case.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-
-
-
-<h2><a name="options">Command line options</a></h2>
-<p>
-Command line options may be supplied to modify the behaviour of a program, or to supply additional information. 
-A command-line option consists of one or more minus signs immediately followed by the option name. 
-Options will often require additional arguments to operate correctly, in which case these must be specified immediately after the option itself.
-</p>
-<p>
-The following example illustrates an option modifying the behaviour of a program:
-</p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> -info /data/DICOM_folder/ out.img</b>
-<a href='../commands/mrconvert.html'>mrconvert</a> [INFO]: opening image "/data/DICOM_folder/"...
-<a href='../commands/mrconvert.html'>mrconvert</a> [INFO]: initialising DICOM dictionary
-<a href='../commands/mrconvert.html'>mrconvert</a>: scanning DICOM folder /data/DICOM_folder/"  - ok
-<a href='../commands/mrconvert.html'>mrconvert</a>: reading DICOM series "t1_mpr_0.9 iso hres"... 100%
-<a href='../commands/mrconvert.html'>mrconvert</a> [INFO]: loading image "VOLUNTEER(000366) [MR] t1_mpr_0.9 iso hres"...
-<a href='../commands/mrconvert.html'>mrconvert</a> [INFO]: creating image "poo.mif"...
-<a href='../commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-<a href='../commands/mrconvert.html'>mrconvert</a> [INFO]: closing image "VOLUNTEER(000366) [MR] t1_mpr_0.9 iso hres"...
-<a href='../commands/mrconvert.html'>mrconvert</a> [INFO]: closing image "./poo.mif"...
-</pre>
-<p>
-In this example, the <kbd>-info</kbd> option tells the program to display additional information while processing. 
-</p>
-<p>
-The following example illustrates the case of an option requiring an additional argument to specify additional information:
-</p>
-<pre>
-> <b><a href='../commands/threshold.html'>threshold</a> image.img -percent 20 -invert mask.img</b>
-<a href='../commands/threshold.html'>threshold</a>: finding min/max... 100%
-<a href='../commands/threshold.html'>threshold</a>: thresholding at intensity 266.8... 100%
-</pre>
-<p>
-In this example, the <kbd>-percent</kbd> option tells the <kbd><a href='../commands/threshold.html'>threshold</a></kbd> program 
-to threshold at the 20% level, and the <kbd>-invert</kbd> option causes it to invert the results. 
-This will produce the binary mask image <kbd>mask.img</kbd>,
-where pixels are set to one if the original intensities were less than 20% of the maximum pixel intensity in <kbd>image.img</kbd>,
-and set to zero otherwise.
-</p>
-<p>
-MRtrix programs will accept shortened option names as long as there are no ambiguities.
-For example, the following command is equivalent to that above:
-</p>
-<pre>
-> <b><a href='../commands/threshold.html'>threshold</a> image.img --p 20 -inv mask.img</b>
-<a href='../commands/threshold.html'>threshold</a>: finding min/max... 100%
-<a href='../commands/threshold.html'>threshold</a>: thresholding at intensity 266.8... 100%
-</pre>
-<p>
-However, the following command will fail:
-</p>
-<pre>
-> <b><a href='../commands/threshold.html'>threshold</a> image.img -p 20 -i mask.img</b>
-<a href='../commands/threshold.html'>threshold</a>: several matches possible for option "i": "invert", "info"
-</pre>
-<p>
-since <kbd><a href='../commands/threshold.html'>threshold</a></kbd> accepts two different options that both start with 'i'.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-
-
-
-<h2><a name="stdoptions">Standard options</a></h2>
-<p>
-All MRtrix programs understand the following options:
-</p>
-<table width=80%>
-<tr><th>Option</th><th>Action</th></tr> 
-  <tr><td nowrap><kbd>-info</kbd></td><td>display information messages.</td></tr>
-  <tr><td nowrap><kbd>-quiet</kbd></td><td>do not display information messages or progress status.</td></tr>
-  <tr><td nowrap><kbd>-debug</kbd></td><td>display debugging messages.</td></tr>
-  <tr><td nowrap><kbd>-help</kbd></td><td>display the program's information page and exit.</td></tr>
-  <tr><td nowrap><kbd>-version</kbd></td><td>display version information and exit.</td></tr>
-</table>
-
-<p>
-To find out how to use a program, including the required number of arguments and all valid options,
-type the program name followed by the <kbd>-help</kbd> option. This will display that program's help page.
-</p>
-
-
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h2><a name="sequences">Number sequences</a></h2>
-<p>
-Many MRtrix applications understand <em>sequences</em> of numbers and can operate according to the sequence specified. 
-For example, you may only need a few series from a data set.
-In this case, you could use the <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd> command and specify the series you need as follows:
-<p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> -coord 3 0:3,8,10 dwi.mif dwi-[].img</b>
-</pre>
-<p>
-In this example, <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd> will select from the image data set <kbd>dwi.mif</kbd>
-the series specified by the number sequence <kbd>0:3,8,10</kbd>,
-corresponding to the numbers 0, 1, 2, 3, 8 & 10
-(this assumes that the series axis is axis 3).
-The output images will be stored as a set of numbered Analyse format images, named <kbd>dwi-0.img</kbd>, <kbd>dwi-1.img</kbd>, etc.
-(the 'square brackets' syntax used here is explained below).
-</p>
-<p>
-Note that a number sequence cannot contain any spaces, since it would then be interpreted as two arguments (see <a href='#basicusage'>Basic usage</a>). 
-The syntax consists of a comma-separated list of any of the following items:
-</p>
-<dl>
-<dt>a</dt>
-<dd>the integer <b>a</b>.</dd>
-
-<dt>a:b</dt>
-<dd>
-all integers from <b>a</b> to <b>b</b> inclusive.<br>
-If <b>a</b> is greater than <b>b</b>, then the sequence will run down from <b>a</b> to <b>b</b>.<br>
-The keyword <kbd>end</kbd> may be used instead of either <kbd>a</kbd> or <kbd>b</kbd> in certain cases where its meaning is unambiguous.
-</dd>
-
-<dt>a:i:b</dt>
-<dd>
-the integers <b>a</b>, <b>a+i</b>, <b>a+2i</b>, ..., <b>b</b>.<br>
-The sign of <b>i</b> will be set according to the relative magnitudes of <b>a</b> and <b>b</b> to ensure that the sequence is valid.<br>
-</dd>
-</dl>
-<p>
-The square brackets used in the example above (<kbd>dwi-[].img</kbd>) are used to indicate a numbered sequence of images
-that should be interpreted as a single data set (e.g. a fMRI time series). 
-In the previous case, the sequence was left empty, leaving the program to automatically number the filenames accordingly.
-These images can be accessed using a similar syntax. For example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> dwi-[].img</b>
-</pre>
-<p>
-will access all matching images as a 4-dimensional data set (assuming each of the individual images contains a 3D data set).
-If only one of the images is of interest, it can be accessed by specifying its filename as normal without the use of square brackets:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> dwi-1.img</b>
-</pre>
-<p>
-Finally, to access a data set formed from a subset of the images, insert the appropriate number sequence within the square brackets:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> dwi-[1,3].img</b>
-</pre>
-<p>
-Note that when using number sequences to specify a filename, any leading zeros in the number field will be ignored.
-For example, the images <kbd>dwi-1.img</kbd> and <kbd>dwi-001.img</kbd> will both be matched by the identifier <kbd>dwi-[1].img</kbd>.
-</p>
-
-
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h2><a name="pipes">Data pipes</a></h2>
-<p>
-The output of one program can be fed straight through to the input of another program via <em>pipes</em> in a single command. 
-The appropriate syntax is illustrated in this example:
-</p>
-<pre>
-> <b><a href='../commands/dwi2tensor.html'>dwi2tensor</a> /data/DICOM_folder/ - | tensor2vector - ev.mif</b>
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: scanning DICOM folder "/data/DICOM_folder/"  - ok
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: reading DICOM series "diff60_b3000_2.3_iPat2+ADC"... 100%
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: DICOM image contains mosaic files - reformating... 100%
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: converting DW images to tensor image... 100%
-<a href='../commands/tensor2vector.html'>tensor2vector</a>: generating major eigenvector map... 100%
-</pre>
-<p>
-This command will execute the following actions:
-</p>
-<ol>
-  <li><kbd><a href='../commands/dwi2tensor.html'>dwi2tensor</a></kbd> will load 
-  the input diffusion-weighted data in DICOM format from the folder <kbd>/data/DICOM_folder/</kbd>
-  and compute the corresponding tensor components. The resulting data set is then fed into the pipe.</li>
-  <li><kbd><a href='../commands/tensor2vector.html'>tensor2vector</a></kbd> will access the data set from the pipe, 
-  generate an eigenvector map and store the resulting data set as <kbd>ev.mif</kbd>.
-</ol>
-<p>
-The two stages of the pipeline are separated by the <kbd>'|'</kbd> symbol, which indicates to the system that the output of the first command
-is to be used as input for the next command. The image that is to be fed to or from the pipeline is specified for each program using a single dash <kbd>'-'</kbd>
-where the image would normally be specified as an argument.
-</p>
-<p>
-For this to work properly, it is important to know which arguments each program will interpret as <em>input</em> images,
-and which as <em>output</em> images. For example, this command will fail:
-</p>
-<pre>
-> <b><a href='../commands/dwi2tensor.html'>dwi2tensor</a> - /data/DICOM_folder/ | <a href='../commands/tensor2vector.html'>tensor2vector</a> - ev.mif</b>
-</pre>
-<p>
-In this example, <kbd><a href='../commands/dwi2tensor.html'>dwi2tensor</a></kbd> will hang waiting for input data (its first argument should be the input DWI data set).
-This will also cause <kbd><a href='../commands/tensor2vector.html'>tensor2vector</a></kbd> to hang 
-while it waits for <kbd><a href='../commands/dwi2tensor.html'>dwi2tensor</a></kbd> to provide some input.
-</p>
-<h3>Advanced</h3>
-<p>
-The procedure used in MRtrix to feed data sets down a pipeline is somewhat
-different from the more traditional use of pipes.  Given the large amounts of
-data typically contained in a data set, the 'standard' practice of feeding the
-entire data set through the pipe would be prohibitively inefficient. MRtrix
-applications access the data via <em>memory-mapping</em> (when this is
-possible), and do not need to explicitly copy the data into their own
-memory space. When using pipes, MRtrix applications will simply generate a
-temporary file and feed its <em>filename</em> through to the next stage once
-their processing is done.  The next program in the pipeline will then simply
-read this filename and access the corresponding file.  The latter program is
-then responsible for deleting the temporary file once its processing is done.
-</p>
-<p>
-This implies that any errors during processing may result in undeleted temporary files.
-These will normally be created within the current directory with a filename of the form <kbd>mrtrix-XXXXXX.xyz</kbd>.
-If a piped command has failed, and no other MRtrix programs are currently running, these can be safely deleted.
-</p>
-<p>
-Such pipelines are not limited to two programs. Complex operations can be perfomed in one command using this technique. 
-Here is a longer example:
-</p>
-<pre>
-> <b><a href='../commands/dwi2tensor.html'>dwi2tensor</a> /data/DICOM_folder/ - | <a href='../commands/tensor2vector.html'>tensor2vector</a> - - | <a href='../commands/mrmult.html'>mrmult</a> - mask.img - | <a href='../commands/mrview.html'>mrview</a> -</b>
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: scanning DICOM folder "/data/DICOM_folder/"  - ok
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: reading DICOM series "diff60_b3000_2.3_iPat2+ADC"... 100%
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: DICOM image contains mosaic files - reformating... 100%
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: converting DW images to tensor image... 100%
-<a href='../commands/tensor2vector.html'>tensor2vector</a>: generating major eigenvector map... 100%
-<a href='../commands/mrmult.html'>mrmult</a>: multiplying... 100%
-</pre>
-<p>
-This command will execute the following actions:
-</p>
-<ol>
-  <li><kbd><a href='../commands/dwi2tensor.html'>dwi2tensor</a></kbd> will load the input diffusion-weighted data in DICOM format from the folder <kbd>/data/DICOM_folder/</kbd>
-and compute the corresponding tensor components. The resulting data set is then fed into the pipe.</li>
-<li><kbd><a href='../commands/tensor2vector.html'>tensor2vector</a></kbd> will access the tensor data set from the pipe, generate an eigenvector map and feed the resulting data into the next stage of the pipeline.</li>
-<li><kbd><a href='../commands/mrmult.html'>mrmult</a></kbd> will access the eigenvector data set from the pipe, multiply it by the image <kbd>mask.img</kbd>, and feed the resulting data into the next stage of the pipeline.</li>
-<li><kbd><a href='../commands/mrview.html'>mrview</a></kbd> will access the masked eigenvector data set from the pipe and display the resulting image.</li>
-</ol>
-
-
-<table class=nav>
-  <tr>
-    <td><a href="overview.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="formats.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/general/data_order.png b/src/doc/general/data_order.png
deleted file mode 100644
index 633bbff..0000000
Binary files a/src/doc/general/data_order.png and /dev/null differ
diff --git a/src/doc/general/filemenu.png b/src/doc/general/filemenu.png
deleted file mode 100644
index 08aa24d..0000000
Binary files a/src/doc/general/filemenu.png and /dev/null differ
diff --git a/src/doc/general/fileopen.png b/src/doc/general/fileopen.png
deleted file mode 100644
index 3e8f069..0000000
Binary files a/src/doc/general/fileopen.png and /dev/null differ
diff --git a/src/doc/general/fileproperties.png b/src/doc/general/fileproperties.png
deleted file mode 100644
index 0b28850..0000000
Binary files a/src/doc/general/fileproperties.png and /dev/null differ
diff --git a/src/doc/general/focus_ax.png b/src/doc/general/focus_ax.png
deleted file mode 100644
index ead7cf9..0000000
Binary files a/src/doc/general/focus_ax.png and /dev/null differ
diff --git a/src/doc/general/focus_sag.png b/src/doc/general/focus_sag.png
deleted file mode 100644
index aed75a3..0000000
Binary files a/src/doc/general/focus_sag.png and /dev/null differ
diff --git a/src/doc/general/formats.html b/src/doc/general/formats.html
deleted file mode 100644
index 48d3b42..0000000
--- a/src/doc/general/formats.html
+++ /dev/null
@@ -1,358 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="cmdline.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Image File Formats</th>
-    <td><a href="mrview.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-
-<h2><a name='formats'>Supported image file formats</a></h2>
-<p>
-This is a list of currently supported file formats. Note that some of these formats may be supported only for reading or writing.
-</p>
-<ul>
-<li><a href='#DICOM'>DICOM</a></li>
-<li><a href='#NIfTI'>NIfTI 1.1 (*.nii)</a></li>
-<li><a href='#AVW'>Analyse/SPM (*.hdr/*.img)</a></li>
-<li><a href='#MRtrix'>MRtrix (*.mif or *.mih)</a></li>
-<li><a href='#XDS'>XDS (*.hdr/*.bfloat or *.hdr/*.bshort)</a></li>
-<!-- <li><a href='#Siemens'>Siemens Vision (*.ima)</a></li>
-<li><a href='#InterFile'>InterFile (*.HDR/*.IMG)</a></li> -->
-<li><a href='#MRTools_old'>Legacy MRTools (*.mri)</a></li>
-</ul>
-
-<p>
-MRtrix determines the image format from the identifier specified on the command-line (typically its suffix). 
-Certain image formats use multiple files per data set (e.g. the Analyse <kbd>*.hdr/*.img</kbd> pair). 
-For this reason, the image identifier may not correspond to a real file. 
-Its function is to supply the program with enough information to infer which files are to be read or created. 
-For example, the image identifier <kbd>/data/image-[1:5].img</kbd> instructs MRtrix applications 
-to access a data set consisting of five Analyse format images, stored in the <kbd>/data</kbd> folder, 
-with filenames <kbd>image-1.img</kbd> to <kbd>image-5.img</kbd>.
-</p>
-<p>
-MRtrix applications are all inherently capable of accessing binary data stored in any common format
-(i.e. precision, byte order, etc); these data types are listed <a href="#datatypes">here</a>.
-However, not all image formats support such a wide range of data types.
-With a few exceptions, most MRtrix programs will request the same data type for the output images as for the input images. 
-The program will then attempt to use the requested data type if the image format can support it,
-or will otherwise substitute a hopefully appropriate replacement.
-
-<h3><a name="multi">Combining multiple images into a single data set</a></h3>
-<p>
-For most image file formats, it is possible to combine multiple images into a single higher-dimensional data set
-on the command-line by using <a href="cmdline.html#sequences">number sequences</a>.
-If the filename contains a number sequence between square brackets, 
-the application will attempt to match the numbers specified (if any) with any existing files (when reading) 
-or will generate files with the numbers specified (when writing). 
-For example:
-</p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> in-[20:40].mif out-[].img</b>
-<a href='../commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-</pre>
-<p>
-will convert the MRtrix format images <kbd>in-20.mif</kbd> through to <kbd>in-40.mif</kbd> (interpreted as a single data set)
-into the set of Analyse images <kbd>out-00.img</kbd> through to <kbd>in-20.img</kbd>.
-</p>
-<p>
-This syntax will fail if any of the image files that match the specifier have different dimensions or data types,
-since it then becomes impossible to combine the images into a single coherent data set.
-</p>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='DICOM'>DICOM</a></h3>
-<p>
-DICOM format is only supported for reading. MRtrix applications will assume an image is in DICOM format if 
-the image specifier provided corresponds to a folder. The application will scan the entire folder and its subfolders
-for DICOM files and generate a list of DICOM patients, studies and series. If a single series is found within the
-folder, this data set will be accessed with no further interaction required. Otherwise, the user will be prompted 
-to select the series of interest. Images stored as mosaics should be correctly interpreted (at least on Siemens VB13 and above).
-</p>
-<p>
-For example, assuming the folder <kbd>/data/DICOM_folder/</kbd> contains a set of DICOM images, 
-the following command will print its corresponding header information:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> /data/DICOM_folder/</b>
-<a href='../commands/mrinfo.html'>mrinfo</a>: scanning DICOM folder "/data/DICOM_folder/"  - ok
-<a href='../commands/mrinfo.html'>mrinfo</a>: reading DICOM series "t1_mpr_0.9 iso hres"... 100%
-************************************************
-Image:               "VOLUNTEER(000366) [MR] t1_mpr_0.9 iso hres"
-************************************************
-  Format:            DICOM
-  Dimensions:        192 x 256 x 256
-  Voxel size:        0.9 x 0.898438 x 0.898438
-  Dimension labels:  0. inferior->superior (mm)
-                     1. left->right (mm)
-                     2. posterior->anterior (mm)
-  Data type:         unsigned 16 bit integer (little endian)
-  Data layout:       [ +2 -0 -1 ]
-  Data scaling:      offset = 0, multiplier = 1
-  Comments:          VOLUNTEER(000366) [MR] t1_mpr_0.9 iso hres
-  Transform:              0.998  -0.05412  -0.03311    -74.03
-                        0.05409    0.9985 -0.001794    -100.6
-                        0.03316  2.34e-08    0.9995    -125.8
-                              0         0         0         1
-</pre>
-<p>
-A separate application, <kbd><a href='../commands/read_dicom.html'>read_dicom</a></kbd>, 
-is provided to view all DICOM header elements within a particular DICOM file. 
-</p>
-<p>
-Note that no support is provided for reading the <kbd>DICOMDIR</kbd> entry due to case-sensitivity issues.
-DICOM data are typically stored on CD or DVD on a case-insensitive filesystem. 
-However, Unix systems will typically not access these filesystems in a case-insensitive manner,
-and will fail to find the appropriate files if the case of filenames supplied in the DICOMDIR file does not 
-match the case of the files found on the CD or DVD.
-</p>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='NIfTI'>NIfTI 1.1 (*.nii)</a></h3>
-<p>
-This file format is supported both for reading and writing, and allows interoperation with other packages 
-such as <a href='http://www.fil.ion.ucl.ac.uk/spm/'>SPM</a> or <a href='http://www.fmrib.ox.ac.uk/fsl/'>FSL</a>. 
-In order to specify a NIfTI format image on the command line, simply specify the name of the file.
-For example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> example.nii</b>
-</pre>
-<p>
-<strong>Notes:</strong>
-</p>
-<ul>
-  <li>the hdr/img version of the NIfTI format is only supported for reading (see <a href='#AVW'>Analyse</a> format).</li>
-  <li>MRtrix is currently only capable of handling uncompressed single-file NIfTI images (with the <kbd>*.nii</kbd>) suffix).<br>
-  If needed, you can use the <kbd>gunzip</kbd> command to decompress your images for use with MRtrix. For example:<br>
-  <pre>> <b>gunzip example.nii.gz</b></pre></li>
-  <li>if both qform and sform orientation fields are present, the qform fields are ignored. 
-  Obviously, the qform fields will be used if they are present on their own.</li>
-</ul>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='AVW'>Analyse/SPM format (*.hdr/*.img)</a></h3>
-<p>
-This file format is supported both for reading and writing. 
-In order to specify an Analyse format image on the command line, type the name of its data file (<kbd>*.img</kbd>).
-For example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> example.img</b>
-</pre>
-<p>
-will display the image header information found in the file <kbd>example.hdr</kbd> that corresponds to the data file <kbd>example.img</kbd>.
-</p>
-<p>
-<strong>Notes:</strong>
-</p>
-<ul>
-  <li> by default, image data in Analyse format files are stored in neurological convention (i.e. left to right, the SPM99 convention). 
-  If required, this can be changed by adding the line:<br><pre>Analyse.LeftToRight: false</pre> 
-  in the MRtrix config file (<kbd>/etc/mrtrix.conf</kbd> or <kbd>~/.mrtrix.conf</kbd> on Unix, 
-  <kbd>C:\mrtrix.conf</kbd> or <kbd>$HOMEDIR\mrtrix.conf</kbd> on Windows).</li>
-</p>
-  <li>Analyse format images cannot be specified using their header file (<kbd>*.hdr</kbd>) 
-  to avoid ambiguities with the XDS format, which also makes use of a header file with the same suffix.</li>
-  <li>NIfTI 1.1 images stored as hdr/img will be read correctly (in particular, any orientation information will be parsed correctly).
-  However, for simplicity and compatibility any hdr/img pairs produced by MRtrix will be in the standard Analyse format, rather than NIfTI 1.1.</li>
-</ul>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='MRtrix'>MRtrix (*.mif or *.mih)</a></h3>
-<p>
-This is the standard image file format for MRtrix. It is supported both for reading and writing.
-To use it, simply type the name of the <kbd>*.mif</kbd> or <kbd>*.mih</kbd> file where appropriate in the command, for example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> example.mif</b>
-</pre>
-<p>
-There are two versions of this format: 
-</p>
-<dl>
-  <dt>MRtrix Image Header (<kbd>*.mih</kbd>)</dt>
-  <dd>This constists of a header/data file pair. The header is a simple text file with the suffix <kbd>*.mih</kbd>, 
-  with the name of the data file given in the header itself. 
-  The text header consists of a set of key/value entries, one per line, and is described in more detail <a href="../appendix/mrtrix.html">here</a>.
-  This format is useful for importing or exporting data to or from other applications, since the header can easily be read or written using a simple text editor.</dd>
-  <dt>MRtrix Image File (<kbd>*.mif</kbd>)</dt>
-  <dd>This constists of a single file with suffix <kbd>*.mif</kbd>, which is essentially the concatenation of the text header, followed by the binary image data.</dd>
-</dl>
-
-<p>
-The MRtrix image format supports all the data types listed <a href="#datatypes">below</a>, all <a href="#dataorder">data ordering schemes</a>, 
-and any number of dimensions. In addition, the header is capable of storing any relevant information. 
-It is therefore the preferred image format to use with MRtrix applications.
-</p>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='XDS'>XDS (*.hdr/*.bfloat or *.hdr/*.bshort)</a></h3>
-<p>
-This is the format used by the XDS package, and is supported both for reading and writing. 
-Note that the XDS header only contains the data set dimensions; 
-all other header information (in particular voxel size) that may have been contained in the image header will be lost 
-when converting to this format. 
-</p>
-<p>
-In this format, image files contain a single-slice time series;
-<a href="#multi">multiple files will need to be combined</a> in order to access a full volume data set.
-The XDS format is assumed if the image specifier ends in <kbd>*.bfloat</kbd> (<a href="#datatypes">Float32 data type</a>)
-or in <kbd>*.bshort</kbd> (<a href="#datatypes">UInt16 data type</a>).
-Here is a typical example:
-</p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> original-[3,4,5].bshort converted-[].bfloat</b>
-</pre>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h3><a name='MRTools_old'>Legacy MRTools (*.mri)</a></h3>
-<p>
-This is the legacy image file format for MRtrix, and is now deprecated. 
-It consists of a single file, and supports 4-dimensional data.
-It is currently only supported for reading.
-</p>
-<p>
-To use it, simply type the name of the file where appropriate in the command, for example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> example.mri</b>
-</pre>
-
-
-
-
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h2><a name='datatypes'>Supported data types</a></h2>
-<p>
-All MRtrix applications can read or write images using any of the data types listed below. 
-Converting an existing image into one using any desired data type can be achieved 
-by supplying the <kbd>-datatype</kbd> option to <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd>.
-</p>
-<p>
-Any data type larger than 8 bits (i.e. one byte) can be stored according to different byte-ordering conventions.
-By far the most common such conventions are <em>little-endian</em> (found on Intel x86 platforms, including the new generation of Macs) 
-and <em>big-endian</em> (found on older Macs and SUN Sparc platforms, amongst others).
-The desired byte order for these data types can be specified by appending the suffix <kbd>LE</kbd> or <kbd>BE</kbd> to the data type specifier.
-If unspecified, native byte ordering will be assumed.
-</p>
-
-<table width=100%>
-<tr><th width=30%>Specifier</th><th>Description</th></tr>
-<tr><td>Bit</td><td>bitwise data</td></tr>
-<tr><td>Int8</td><td>signed 8-bit (char) integer</td></tr>
-<tr><td>UInt8</td><td>unsigned 8-bit (char) integer</td></tr>
-<tr><td>Int16</td><td>signed 16-bit (short) integer</td></tr>
-<tr><td>UInt16</td><td>unsigned 16-bit (short) integer</td></tr>
-<tr><td>Int16LE</td><td>signed 16-bit (short) integer (little-endian)</td></tr>
-<tr><td>UInt16LE</td><td>unsigned 16-bit (short) integer (little-endian)</td></tr>
-<tr><td>Int16BE</td><td>signed 16-bit (short) integer (big-endian)</td></tr>
-<tr><td>UInt16BE</td><td>unsigned 16-bit (short) integer (big-endian)</td></tr>
-<tr><td>Int32</td><td>signed 32-bit int</td></tr>
-<tr><td>UInt32</td><td>unsigned 32-bit int</td></tr>
-<tr><td>Int32LE</td><td>signed 32-bit int (little-endian)</td></tr>
-<tr><td>UInt32LE</td><td>unsigned 32-bit int (little-endian)</td></tr>
-<tr><td>Int32BE</td><td>signed 32-bit int (big-endian)</td></tr>
-<tr><td>UInt32BE</td><td>unsigned 32-bit int (big-endian)</td></tr>
-<tr><td>Float32</td><td>32-bit floating-point</td></tr>
-<tr><td>Float32LE</td><td>32-bit floating-point (little-endian)</td></tr>
-<tr><td>Float32BE</td><td>32-bit floating-point (big-endian)</td></tr>
-<tr><td>Float64</td><td>64-bit (double) floating-point</td></tr>
-<tr><td>Float64LE</td><td>64-bit (double) floating-point (little-endian)</td></tr>
-<tr><td>Float64BE</td><td>64-bit (double) floating-point (big-endian)</td></tr>
-</table>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h2><a name='dataorder'>Data Ordering</a></h2>
-<p>
-Data can be stored in the image files in different orders. 
-For example, a particular image format might specify that the bottom left posterior corner voxel is stored first in the file, 
-and that subsequent values in the file correspond to voxels immediately to the right of the previous one. 
-Other image formats might specify that the top right corner voxel is stored first.
-MRtrix applications are capable of handling all (reasonable) such data ordering schemes,
-as long as the image format has fully specified how the file is to be interpreted. 
-</p>
-<p>
-With MRtrix, data ordering is specified using a comma-separated list of axis specifiers, 
-each of which consists of a plus or minus sign to indicate polarity, followed by the axis number.
-For example, the specifier <kbd>-0,-1,+2,+3</kbd> indicates that data values are stored right to left first, 
-then anterior to posterior, then inferior to superior and finally in increasing order along the 4th dimension 
-(which might for example correspond to the time dimension). 
-This type of ordering might be used for a standard DICOM axial time-series.
-</p>
-The interpretation of the ordering specifier is often not trivial. 
-The illustration below should help to clarify its proper meaning.
-</p>
-<img src='data_order.png'>
-<p>
-This corresponds to a data order where all the consecutive time points of a given voxel are stored together in the file.
-This might be useful to optimise throughput for certain applications, for example when the time-course of each voxel is analysed independently.
-On the first line, the image space interpretation is given for each entry (suitable for time-series data).
-This data order can be interpreted as saying: 
-</p>
-<ul>
-  <li>the first real image dimension (<i>x</i> in this example) is stored second in the file.</li>
-  <li>the second real image dimension (<i>y</i> in this example) is stored third in the file.</li>
-  <li>the third real image dimension (<i>z</i> in this example) is stored fourth in the file 
-  (in reverse order relative to the <a href='overview.html#axes'>standard axes</a>).</li>
-  <li>the fourth real image dimension (<i>t</i> in this example) is stored first in the file.</li>
-</ul>
-<p>
-<strong>Note:</strong> all data ordering specifications should be made with reference to 
-the <a href='overview.html#axes'>coordinate system convention</a> used by MRtrix.
-</p>
-
-<table class=nav>
-  <tr>
-    <td><a href="cmdline.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="mrview.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/general/index.html b/src/doc/general/index.html
deleted file mode 100644
index 0ea4693..0000000
--- a/src/doc/general/index.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-  <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-  <title>MRtrix #VERSION# documentation</title>
-  <link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="../install/index.html"><img src="../left.png"></a></td>
-    <td><a href="../index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>General information</th>
-    <td><a href="overview.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-
-<ul class=toc>
-  <li><a href='overview.html'>Overview</a></li>
-  <ul>
-    <li><a href="overview.html#cmdline">Command-line example</a></li>
-    <li><a href="overview.html#mrview">MRView - the MRtrix viewer</a></li>
-    <li><a href="overview.html#axes">Coordinate system</a></li>
-    <li><a href="overview.html#features">Other features</a></li>
-  </ul>
-  <li><a href='cmdline.html'>Command line usage</a></li>
-  <ul>
-    <li><a href="cmdline.html#basicusage">Basic usage</a></li>
-    <li><a href="cmdline.html#options">Command line options</a></li>
-    <li><a href="cmdline.html#stdoptions">Standard options</a></li>
-    <li><a href="cmdline.html#sequences">Number sequences</a></li>
-    <li><a href="cmdline.html#pipes">Data pipes</a></li>
-  </ul>
-  <li><a href='formats.html'>Supported file formats and data types</a></li>
-  <ul>
-    <li><a href='formats.html#formats'>Supported image file formats</a></li>
-    <ul>
-      <li><a href='formats.html#DICOM'>DICOM</a></li>
-      <li><a href='formats.html#NIfTI'>NIfTI 1.1 (*.nii)</a></li>
-      <li><a href='formats.html#AVW'>Analyse/SPM (*.hdr/*.img)</a></li>
-      <li><a href='formats.html#MRtrix'>MRtrix (*.mif or *.mih)</a></li>
-      <li><a href='formats.html#XDS'>XDS (*.hdr/*.bfloat or *.hdr/*.bshort)</a></li>
-      <!-- <li><a href='formats.html#Siemens'>Siemens Vision (*.ima)</a></li>
-      <li><a href='#formats.htmlInterFile'>InterFile (*.HDR/*.IMG)</a></li> -->
-      <li><a href='#formats.htmlMRTools_old'>Legacy MRTools (*.mri)</a></li>
-    </ul>
-    <li><a href='formats.html#datatypes'>Supported data types</a></li>
-    <li><a href='formats.html#dataorder'>Data ordering</a></li>
-  </ul>
-  <li><a href='mrview.html'>MRView</a></li>
-    <ul>
-      <li><a href='mrview.html#ref'>Quick reference</a></li>
-      <li><a href='mrview.html#display'>Displaying images</a></li>
-      <ul>
-        <li><a href='mrview.html#access'>Accessing images</a></li>
-        <li><a href='mrview.html#navigate'>Navigating through the image</a></li>
-        <li><a href='mrview.html#window'>Windowing the image</a></li>
-      </ul>
-      <li><a href='mrview.html#multi'>Displaying multiple images</a></li>
-      <li><a href='mrview.html#dragdrop'>Copying the position of the focus into other applications</a></li>
-      <li><a href='mrview.html#sidebar'>Additional tools: the sidebar</a></li>
-      <ul>
-        <li><a href='mrview.html#tractography'>Tractography</a></li>
-        <li><a href='mrview.html#roi'>ROI analysis</a></li>
-        <li><a href='mrview.html#overlay'>Overlay</a></li>
-        <li><a href='mrview.html#orientation_plot'>Orientation plot</a></li>
-        <li><a href='mrview.html#screengrab'>Screen capture</a></li>
-      </ul>
-  </ul>
-</ul>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/general/mrview.html b/src/doc/general/mrview.html
deleted file mode 100644
index ad20180..0000000
--- a/src/doc/general/mrview.html
+++ /dev/null
@@ -1,276 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="formats.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>MRView</th>
-    <td><a href="../tractography/index.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<h2><a name='ref'>Quick reference</a></h2>
-<table class='desc'>
-  <tr><th>Action</th><th>Achieved by</th></tr>
-  <tr><td>brightness/contrast</td><td>right mouse button + move mouse</td></tr>
-  <tr><td>set projection</td><td>A - axial<br>S - sagittal<br>C - coronal</td></tr>
-  <tr><td>scroll</td><td>up/down arrows or mouse wheel</td></tr>
-  <tr><td>zoom</td><td>Home/End <em>or</em> Ctrl + mouse wheel</td></tr>
-  <tr><td>pan</td><td>middle mouse button (mouse wheel) + move mouse</td></tr>
-  <tr><td>change image volume</td><td>left/right arrows</td></tr>
-  <tr><td>cycle through images</td><td>Ctrl + PgUp/PgDown</td></tr>
-  <tr><td>copy position of focus</td><td>Drag & drop from statusbar onto destination window</td></tr>
-</table>
-
-<p>
-Most of these and other actions are available via the relevant menu entries. In
-addition, most of these have associated keyboard shortcuts, which are displayed
-alongside their entry in the menus for quick reference. Users are encouraged to
-explore the menus and familiarise themselves with these shortcuts.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='display'>Displaying images</a></h2>
-<p>
-MRview can be invoked by typing <kbd>mrview</kbd> on the command line,
-double-clicking on the executable,
-or clicking on the appropriate shortcut (if one is available).
-</p>
-
-
-<h3><a name='access'>Accessing images</a></h3>
-
-<h4><a name='open'>Opening images</a></h4>
-<p>
-An image can be opened for display in two ways:
-from the command line (by suppling the image identifier 
-as an <a href='cmdline.html#basicusage'>argument</a> to <kbd>mrview</kbd>),
-or by using the appropriate dialog, found in the 'File->Open' menu. 
-This is shown below:
-</p>
-<img src='filemenu.png'>
-<img src='fileopen.png'>
-
-<p class=sep><a href="#top">top</a></p>
-<h4><a name='save'>Saving images</a></h4>
-<p>
-Once loaded, an image can be saved using the appropriate dialog, found in the 'File->Save' menu.
-As with the command line, the file extension will determine the format of the saved image.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-<h4><a name='properties'>Image properties</a></h4>
-<p>
-The properties of the image can be displayed in the Properties dialog, found in the 'File->Properties' menu.
-</p>
-<img src='fileproperties.png'>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h3><a name='navigate'>Navigating through the image</a></h3>
-
-<p>
-<strong>Note:</strong> images displayed in MRView are displayed assuming <strong>radiological</strong> convention. 
-In other words, the right side of the subject is displayed on the left of the screen, and vice-versa.
-</p>
-
-<h4>Projection</h4>
-<p>
-The projection of the image can be changed by using the 'View->Axial', 'View->Sagittal', and 'View->Coronal' menu entries.
-The keyboard shortcuts 'A', 'S', and 'C' can also be used.
-</p>
-<p>
-Selecting a particular point on the image by left-clicking will set this point as the current focus
-(use the 'View->Show focus' menu entry to highlight the current focus using cross-hairs).
-When the projection is changed, the slice through the current focus will be shown.
-This provides a quick way to access the desired location.
-For example, to display an axial slice through the anterior commissure, 
-display the image as a sagittal projection and set the current focus at the desired location, then change the projection to axial:
-</p>
-<img src='focus_sag.png'>
-<img src='focus_ax.png'>
-
-<h4>Scrolling</h4>
-<p>
-Scrolling through the images is done using the up/down arrows, or the mouse scroll wheel.
-Pressing the Shift key while scrolling will scroll by 5 slices at a time.
-
-<h4>Zooming</h4>
-<p>
-Zooming in and out is done by holding down the Ctrl key while using the mouse scroll wheel.
-</p>
-
-<h4>Panning</h4>
-<p>
-The image can be moved side to side within the display by holding down the middle mouse button and moving the mouse.
-On a scroll mouse, the middle mouse button is the scroll wheel itself, which can be pressed down without actually turning the wheel.
-</p>
-
-<h4>Displaying 4-dimensional data</h4>
-<p>
-If the image contains more than 3 dimensions (e.g. there is a time or DW direction dimension),
-the other volumes contained in the image can be displayed using the left/right arrows.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-<h3><a name='window'>Windowing the image</a></h3>
-<p>
-The image brightness and contrast can be altered by holding the right mouse button and moving the mouse.
-Moving the mouse left to right increases the brightness of the image, and moving the mouse up increases the contrast.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='multi'>Displaying multiple images</a></h2>
-<p>
-Multiple images can be loaded into MRView simultaneously, but only one image can be displayed at any one time.
-To select which image to display, use the 'Image' menu. 
-Alternatively, you can use the Ctrl + PgUp/PgDown keyboard shortcuts to cycle through the images.
-</p>
-<p>
-MRview will preserve the position of the focus between images, based on the transform (the orientation/position matrix) contained in each image.
-If no transform is available, a default transform will be assumed.
-Images loaded or converted from <a href='formats.html#DICOM'>DICOM</a> format should contain the correct transform
-relative to the scanner axes; these data sets should then be displayed in the same stereotactic space.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='dragdrop'>Copying the position of the focus into other applications</a></h2>
-<p>
-When experimenting with tractography, it is often required to input the
-coordinates of the desired ROI on the command-line. For convenience, this can
-be done easily using drag & drop, by dragging from the statusbar (at the
-bottom of the main MRView window) and dropping directly onto the command-line
-(or any other suitable destination). This will insert the current position of
-the focus in real/scanner coordinates as text into the destination window.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='sidebar'>Additional tools: the sidebar</a></h2>
-<p>
-Additional functionality is accessed via the <em>sidebar</em>. 
-Select the 'View->Sidebar' menu entry (keyboard shortcut: F9) to display the sidebar.
-There are a number of tools available, each of which is accessed using the selector at the top of the sidebar:
-</p>
-<img src=sidebar.png>
-
-<p class=sep><a href="#top">top</a></p>
-<h3><a name='tractography'>Tractography</a></h3>
-<p>
-The tractography tool is used to display tracking results obtained using MRtrix.
-Track files are displayed by right-clicking on the 'tracks' list, and selecting 'Open' from the popup menu:
-</p>
-<img src='open_track.png'>
-<p>
-By default, tracks are coloured according to their local orientation (red: left-right; green: anterior-posterior; blue: inferior-superior).
-This can be changed by right-clicking on the track entry and setting a different colour.
-This is useful to differentiate between two different track files displayed at the same time.
-</p>
-<img src='track_colour.png'>
-
-<p>
-Once loaded, the various ROIs used to generate the tracks will be shown in the 'ROIs' list.
-Clicking on a particular ROI will place the focus on the centre of the corresponding ROI.
-</p>
-
-<p>
-By default, the tracks are cropped to a slab centered on the currently displayed slice of the image.
-In other words, if the slab thickness is set to 5 mm, 
-only the portions of the tracks that lie within 2.5mm either side of the current slice will be visible.
-This can be disabled using the appropriate tick-box.
-Alternatively, the thickness of the slab can be altered in the corresponding entry.
-</p>
-
-<p>
-The 'depth blend' tick-box activates a high-quality rendering mode with proper handling of transparency.
-However, this requires sorting all the points of the tracks by depth, and can severely affect the responsiveness of the display.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-<h3><a name='roi'>ROI analysis</a></h3>
-<p>
-The ROI analysis tool is used to generate and edit mask ROI images.
-A new mask image is created by right-clicking on the ROI list, and selecting 'New' from the popup menu. 
-It is recommended to create the ROI in MRtrix format (<kbd>*.mif</kbd> or <kbd>*.mih</kbd>).
-An existing mask image can be loaded using the 'Open' entry of the same popup menu.
-</p>
-<img src=new_roi.png>
-<p>
-<strong>Note:</strong> all changes made to the ROI image using this tool will immediately be reflected in the file
-(this is due to the use of <em>memory-mapping</em> to access the image files). 
-<strong>Do not load actual data files</strong> in this tool, as any changes you might make will irreversibly alter the file.
-
-<p>
-The newly created image mask is generated using the currently displayed image as a template.
-In other words, the new mask image will inherit its image dimensions, voxel size and transform from the image
-currently displayed. However, once created, the mask image can be displayed over a different image and edited as described below.
-</p>
-<p>
-Voxels are added to the mask by holding the Shift key and clicking the left mouse button on the desired location. 
-Voxels can be removed in a similar way by holding both Ctrl+Shift keys while left-clicking.
-There is no need to save the ROI, as all changes made will immediately be synchronised with the image file.
-</p>
-<img src=roi.png>
-
-<p class=sep><a href="#top">top</a></p>
-<h3><a name='overlay'>Overlay</a></h3>
-<p>
-The Overlay tool is used to display an additional image as a transparent
-overlay over the main image. As for the ROI Analysis tool, an image is loaded
-by right-clicking in the images list, and selecting 'Open' from the popup menu. 
-</p>
-<img src=overlay.png>
-
-<p class=sep><a href="#top">top</a></p>
-<h3><a name='orientation_plot'>Orientation plot</a></h3>
-<p>
-The Orientation Plot tool is used to display the Fibre Orientation Distributions (FOD) generated by 
-<a href='../tractography/preprocess.html#csd'>Constrained Spherical Deconvolution</a> (CSD).
-</p>
-<p>
-To use it, you first need to load the results of the CSD analysis (click on the "browse" button).
-The FOD at the current focus (crosshairs) will be displayed in the viewing pane.
-</p>
-<img src=orientation_plot.png>
-<p>
-The orientation plots can also be overlaid directly on the image in the main window using the 'overlay' tickbox:
-</p>
-<img src=orientation_overlay.png>
-
-<p class=sep><a href="#top">top</a></p>
-<h3><a name='screengrab'>Screen Capture</a></h3>
-<p>
-The Screen Capture tool is used to create simple snapshots of the contents of the main viewing pane. Images are saved in Portable Network Graphic (PNG) format, with a filename formed by concatenating the prefix with the number shown (the number is incremented after each screen capture). It can be used to create screenshots of multiple slices, by specifying the spacing between slices, and the number of slices desired. Finally, it is possible to generate very high-resolution images using t [...]
-</p>
-<img src=screenshot.png>
-
-<table class=nav>
-  <tr>
-    <td><a href="formats.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="../tractography/index.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/general/mrview.png b/src/doc/general/mrview.png
deleted file mode 100644
index 5b2c30b..0000000
Binary files a/src/doc/general/mrview.png and /dev/null differ
diff --git a/src/doc/general/new_roi.png b/src/doc/general/new_roi.png
deleted file mode 100644
index f4bf4b6..0000000
Binary files a/src/doc/general/new_roi.png and /dev/null differ
diff --git a/src/doc/general/open_track.png b/src/doc/general/open_track.png
deleted file mode 100644
index 7f9de59..0000000
Binary files a/src/doc/general/open_track.png and /dev/null differ
diff --git a/src/doc/general/orientation_overlay.png b/src/doc/general/orientation_overlay.png
deleted file mode 100644
index a364f2d..0000000
Binary files a/src/doc/general/orientation_overlay.png and /dev/null differ
diff --git a/src/doc/general/orientation_plot.png b/src/doc/general/orientation_plot.png
deleted file mode 100644
index 1ad937f..0000000
Binary files a/src/doc/general/orientation_plot.png and /dev/null differ
diff --git a/src/doc/general/overlay.png b/src/doc/general/overlay.png
deleted file mode 100644
index a600d80..0000000
Binary files a/src/doc/general/overlay.png and /dev/null differ
diff --git a/src/doc/general/overview.html b/src/doc/general/overview.html
deleted file mode 100644
index a43ea7a..0000000
--- a/src/doc/general/overview.html
+++ /dev/null
@@ -1,193 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Overview</th>
-    <td><a href="cmdline.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-
-<p>
-<strong>Note:</strong> in command examples, user input is shown using a <code><b>bold font</b></code>, 
-and command output using a <code>normal font</code>.
-</p>
-
-<h2><a name="cmdline">Command-line example</a></h2>
-<p>
-To illustrate the use of MRtrix applications from the command-line, we start with the simple program <kbd><a href='../commands/mrinfo.html'>mrinfo</a></kbd>. 
-This program simply prints out relevant header information found in the image specified.
-For example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> image.img</b>
-************************************************
-Image:               "image.img"
-************************************************
-  Format:            Analyse 7.5
-  Dimensions:        192 x 256 x 256
-  Voxel size:        0.9 x 0.898438 x 0.898438
-  Dimension labels:  0. left->right (mm)
-                     1. posterior->anterior (mm)
-                     2. inferior->superior (mm)
-  Data type:         unsigned 16 bit integer (little endian)
-  Data layout:       [ +0 +1 +2 ]
-  Data scaling:      offset = 0, multiplier = 1
-  Comments:          Example image
-  Transform:                  1         0         0     -86.4
-                              0         1         0      -115
-                              0         0         1      -115
-                              0         0         0         1
-</pre>
-<p>
-In this case, the image is in Analyse format, identified by the extension <kbd>.img</kbd>. 
-MRtrix applications support a variety of <a href=formats.html>image file formats</a>.
-</p>
-<p>
-Detailed information on a particular command can be obtained using the <kbd>-help</kbd> option.
-For example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> -help</b>
-<a href='../commands/mrinfo.html'>mrinfo</a>: part of the MRtrix package
-
-PURPOSE:  display header information
-
-SYNTAX:   mrinfo [ options ] image [ image ... ]
-
-            image       the input image.
-
-OPTIONS:
-
-  -grad file    write DW gradient scheme to file
-                "file": the DW gradient scheme file.
-
-  -dicom        print all DICOM entries.
-
-  -csa          print all CSA entries (Siemens DICOM only.
-
-  -info         display information messages.
-
-  -quiet        do not display information messages or progress status.
-
-  -debug        display debugging messages.
-
-  -help         display this information page and exit.
-
-  -version      display version information and exit.
-</pre>
-<p>
-Another useful command is <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd>.
-Here is a typical example:
-</p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> /data/DICOM_folder/ image.img</b>
-<a href='../commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-</pre>
-<p>
-This will convert the DICOM data stored in the <code>/data/DICOM_folder/</code> folder into the Analyse format image <code>image.img</code>.
-The user will be prompted to select the relevant image series if several are found.
-</p>
-<p>
-There are many useful options for <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd>. 
-For example:
-</p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> /data/DICOM_folder/ -datatype float32 -coord 2 10:30 image.img</b>
-<a href='../commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-</pre>
-<p>
-This will instruct <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd> to convert the data as before, but the intensity values in the resulting image will be stored as 32-bit floating-point values,
-and the image will only contain slices 10 through to 30 
-(more details on specifying such sequences of numbers are given <a href='cmdline.html#sequences'>here</a>)
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-
-
-<h2><a name="mrview">MRView - the MRtrix viewer</a></h2>
-<p>
-MRtrix includes a viewing tool, invoked by issuing the command <kbd><a href='../commands/mrview.html'>mrview</a></kbd>. 
-MRView can optionally take one or more image specifier as an argument.
-For example:
-</p>
-<pre>
-> <b><a href='../commands/mrview.html'>mrview</a> image.img</b>
-</pre>
-<p>
-should open a window similar to the following:
-</p>
-<img src=mrview.png>
-<p>
-Alternatively, images can be opened using the File->Open menu.
-More detailed information about MRView can be found <a href='mrview.html'>here</a>.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='axes'>Coordinate system</a></h2>
-<p>
-All MRtrix applications will consistently use the same coordinate system. 
-Note that this frame of reference differs from the DICOM standard.
-The convention followed by MRtrix applications is as follows:
-</p>
-<table cellspacing=5>
-  <tr><th align=center>dimension</th><th>description</th></tr>
-  <tr><td align=center>0 (x)</td><td>increasing from left to right</td></tr>
-  <tr><td align=center>1 (y)</td><td>increasing from posterior to anterior</td></tr>
-  <tr><td align=center>2 (z)</td><td>increasing from inferior to superior</td></tr>
-</table>
-<p>
-All coordinates or vector components supplied to MRtrix applications must be provided with reference to this coordinate system.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name="features">Other features</a></h2>
-<p>
-All MRtrix programs are based on the same underlying infrastructure for image access, 
-and should all be capable of handling all <a href='formats.html#fileformats'>supported image formats</a>.
-In addition, programs can be connected via <em>pipes</em> such that the data produced by one program can be used immediately by another. 
-In this way, a series of sequential operations can be performed by typing a single command (see <a href='cmdline.html#pipes'>Data pipes</a> for details). 
-Finally, each program supports a number of standard command-line options that are explained <a href='cmdline.html#stdoptions'>here</a>.
-</p>
-<p>
-Note that none of the MRtrix programs will overwrite any existing image files to avoid unintentional loss of data.
-If you need to overwrite a file, you will need to delete it manually before invoking the command to write the new version.
-</p>
-<p>
-Note also that pixel coordinates and study numbers start from zero. For example, the first study in a data set is labelled as <strong>study 0</strong>, the second as <strong>study 1</strong>, etc. and valid pixel coordinates for a 128x128 image range from 0 to 127.
-</p>
-
-
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="cmdline.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/general/roi.png b/src/doc/general/roi.png
deleted file mode 100644
index ae5833b..0000000
Binary files a/src/doc/general/roi.png and /dev/null differ
diff --git a/src/doc/general/screenshot.png b/src/doc/general/screenshot.png
deleted file mode 100644
index 9bc8271..0000000
Binary files a/src/doc/general/screenshot.png and /dev/null differ
diff --git a/src/doc/general/sidebar.png b/src/doc/general/sidebar.png
deleted file mode 100644
index 1d753d9..0000000
Binary files a/src/doc/general/sidebar.png and /dev/null differ
diff --git a/src/doc/general/track_colour.png b/src/doc/general/track_colour.png
deleted file mode 100644
index be08fd4..0000000
Binary files a/src/doc/general/track_colour.png and /dev/null differ
diff --git a/src/doc/home.png b/src/doc/home.png
deleted file mode 100644
index 1700361..0000000
Binary files a/src/doc/home.png and /dev/null differ
diff --git a/src/doc/index.html b/src/doc/index.html
deleted file mode 100644
index eae751c..0000000
--- a/src/doc/index.html
+++ /dev/null
@@ -1,72 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="left.png"></a></td>
-    <td><a href="index.html"><img src="up.png"></a></td>
-    <td><a href="index.html"><img src="home.png"></a></td>
-    <th>MRtrix #VERSION# - table of contents</th>
-    <td><a href="intro.html"><img src="right.png"></a></td>
-  </tr>
-</table>
-
-
-<ul class=toc>
-  <li><a href='intro.html'>Introduction</a></li>
-  <ul>
-    <li><a href='intro.html#citing'>Acknowledging this work</a></li>
-    <li><a href='intro.html#warranty'>Warranty</a></li>
-    <li><a href='intro.html#license'>License</a></li>
-    <li><a href='intro.html#support'>Support</a></li>
-    <li><a href='intro.html#platforms'>Supported platforms</a></li>
-    <li><a href='intro.html#conventions'>Conventions used in this manual</a></li>
-  </ul>
-  <li><a href='install/index.html'>Installation</a></li>
-  <ul>
-    <li><a href="install/unix.html">Unix/Linux</a></li>
-    <li><a href="install/windows.html">Microsoft Windows</a></li>
-    <li><a href="install/macosx.html">Mac Os X</a></li>
-  </ul>
-  <li><a href='general/index.html'>General Information</a></li>
-  <ul>
-    <li><a href='general/overview.html'>Overview</a></li>
-    <li><a href='general/cmdline.html'>Command line usage</a></li>
-    <li><a href='general/formats.html'>Supported file formats and data types</a></li>
-    <li><a href='general/mrview.html'>MRView</a></li>
-  </ul>
-  <li><a href='tractography/index.html'>White matter tractography</a></li>
-  <ul>
-    <li><a href='tractography/dwi.html'>Importing DW data</a></li>
-    <li><a href='tractography/preprocess.html'>Data pre-processing</a></li>
-    <li><a href='tractography/roi.html'>ROI selection</a></li>
-    <li><a href='tractography/tracking.html'>Performing fibre-tracking</a></li>
-  </ul>
-  <li><a href='faq.html'>Frequently Asked Questions</a></li>
-  <li><a href='commands/index.html'>List of MRtrix commands</a></li>
-  <li><a href='appendix/index.html'>Appendix</a></li>
-  <ul>
-    <li><a href='appendix/config.html'>The MRtrix configuration file</a></li>
-    <li><a href='appendix/mrtrix.html'>The MRtrix file format</a></li>
-    <li><a href='appendix/refs.html'>References</a></li>
-    <li><a href='appendix/gpl-3.0.html'>The GNU General Public License</a></li>
-</ul>
-
-
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/install/index.html b/src/doc/install/index.html
deleted file mode 100644
index 73ae1ac..0000000
--- a/src/doc/install/index.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-
-<table class=nav>
-  <tr>
-    <td><a href="../intro.html"><img src="../left.png"></a></td>
-    <td><a href="../index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Installation</th>
-    <td><a href="unix.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-
-<ul class=toc>
-  <li><a href="unix.html">Unix/Linux</a></li>
-  <ul>
-    <li><a href='unix.html#quickinstall'>Quick install</a></li>
-    <li><a href='unix.html#builddeps'>Required dependencies</a></li>
-    <li><a href='unix.html#compile'>The compilation step</a></li>
-    <li><a href='unix.html#install'>Installation of executables</a></li>
-    <li><a href='unix.html#config'>Final configuration</a></li>
-  </ul>
-  <li><a href="windows.html">Microsoft Windows</a></li>
-  <ul>
-    <li><a href='windows.html#windowsinstaller'>Using the Windows installer</a></li>
-    <li><a href='windows.html#fromsource'>Building from source</a></li>
-  </ul>
-  <li><a href="macosx.html">Mac Os X</a></li>
-  <ul>
-    <li><a href='macosx.html#dependencies'>Installing dependencies</a></li>
-    <li><a href='macosx.html#compile'>Compile MRtrix</a></li>
-  </ul>
-</ul>
-
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/install/macosx.html b/src/doc/install/macosx.html
deleted file mode 100644
index 0124530..0000000
--- a/src/doc/install/macosx.html
+++ /dev/null
@@ -1,133 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="windows.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Mac OS X</th>
-    <td><a href="../general/index.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p>
-The main difficulty in installing MRtrix on MacOS X is to install the 
-dependencies. There are three reported ways to do this, <a href=http://www.macports.org/>MacPorts</a>, <a 
-href="http://mxcl.github.com/homebrew/">Homebrew</a>, and <a 
-href="http://www.finkproject.org/">
-Fink</a>. At this point, it seems MacPorts is the simplest and quickest method,
-as it only requires a minimal amount of local compilation - most of the
-required packages are simply downloaded ready-compiled. 
-</p>
-<p>
-These approaches are described below, along with instructions common to all of
-them.
-</p>
-
-<h2><a name='dependencies'>Installing dependencies</a></h2>
-
-<p>
-The first step is to install Xcode and X11. These can both be found on the OS X 
-install DVD. The MRtrix-specific dependencies can then be installed using one 
-of the following three approaches:
-</p>
-
-<h3>MacPorts (recommended)</h3>
-<p>
-Thanks to Craig Stark for providing these instructions.
-</p>
-
-<dl>
-<dt>Install MacPorts</dt>
-<dd>follow instructions on <a 
-href="http://www.macports.org/install.php">
-http://www.macports.org/install.php</a>.</dd>
-<dt>Get and build the dependencies</dt>
-<dd><pre>
-$ port install glib2 glibmm libpng gtk2 gtkmm gtkglext gsl
-</pre></dd>
-</dl>
-
-<h3>Homebrew</h3>
-<p>
-Thanks to Jon Clayden for providing these instructions.
-</p>
-
-<dl>
-<dt>Install Homebrew</dt>
-<dd>follow instructions on <a 
-href="https://github.com/mxcl/homebrew/wiki/installation">
-https://github.com/mxcl/homebrew/wiki/installation</a>.</dd>
-<dt>Get and build the dependencies</dt>
-<dd><pre>
-$ brew install python glib gtk+ glibmm gtkmm gtkglext gsl
-</pre></dd>
-</dl>
-
-<h3>Fink</h3>
-<p>
-Thanks to Michael Zeineh for providing these instructions.
-</p>
-
-<dl>
-<dt>Install Fink</dt>
-<dd>follow instructions on <a href="http://www.finkproject.org/download/">
-http://www.finkproject.org/download/</a></dd>
-<dt>Install the dependencies</dt>
-<dd><pre>
-$ fink install python glib gtk+ glibmm2.4 gtkmm2.4 gtkglext1 gsl
-</pre>
-If this fails, try to repeat this last step until it works.
-</dd>
-</dl>
-
-<h2><a name='compile'>Compile MRtrix</a></h2>
-<p>
-At this point, you should be able to compile MRtrix using the following 
-commands, as per the <a href="unix.html#compile">Unix installation 
-instructions</a>:
-<pre>
-$ cd mrtrix-0.2.10
-$ ./build
-</pre>
-If this completes successfully, you can now install the executables into a more 
-easily accessible location. This can be done using the following command (as 
-    root):
-<pre>
-# ./build install
-</pre>
-
-
-<h3>Final configuration</h3>
-<p>
-Assuming you have managed to install MRtrix correctly, you should also consider 
-setting a few configurations parameters, as per the <a 
-href=unix.html#config>Unix instructions</a>.
-
-<table class=nav>
-  <tr>
-    <td><a href="windows.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="../general/index.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/install/unix.html b/src/doc/install/unix.html
deleted file mode 100644
index dfda6e0..0000000
--- a/src/doc/install/unix.html
+++ /dev/null
@@ -1,284 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Unix/Linux</th>
-    <td><a href="windows.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-
-<p>
-MRtrix is now available as a package on Debian and Ubuntu systems using the <a 
-href="http://neuro.debian.net/">NeuroDebian repository</a>. This provides a 
-simple and effective way of installing MRtrix, along with numerous other 
-related packages. For more information, refer to the instructions on the <a 
-href="http://neuro.debian.net/">NeuroDebian repository</a>. Note that there is 
-no guarantee that the version available on this repository is the most up to 
-date.
-</p>
-<p>
-The rest of this page provides instructions for installing MRtrix from source. 
-MRtrix depends on a number of other packages.  Most, if not all of these 
-packages should be available on any recent Linux distribution via the 
-appropriate package manager.  MRtrix has been written and tested on Ubuntu 
-Linux versions 7.10 (Gutsy) through to 10.10 (Maverick). On all these 
-distributions, all dependencies are available via the Synaptic Package Manager.
-</p>
-
-<h2><a name='quickinstall'>Quick install</a></h2>
-<p>
-On Ubuntu systems (and most likely Debian too), the following instructions 
-should work with no modifications:
-<h3>First-time installations: installing dependencies</h3>
-The first time you install MRtrix, you will need to also install a number of
-required packages. The following step installs these dependencies on Ubuntu
-systems - for other distributions, you'll need to use the equivalent commands
-as appropriate (see below).  You will only need to perform this step the first
-time you install MRtrix:
-<pre>
-$ sudo apt-get install g++ python libglib2.0-dev libgtk2.0-dev libglibmm-2.4-dev libgtkmm-2.4-dev libgtkglext1-dev libgsl0-dev libgl1-mesa-dev libglu1-mesa-dev
-</pre>
-<h3>Installing MRtrix</h3>
-Once the dependencies have been installed, the following steps will need to be
-performed for every install or update of MRtrix:
-<pre>
-$ tar xfj mrtrix-0.2.X.tar.bz2
-$ cd mrtrix-0.2.X
-$ ./build
-$ sudo ./build install
-</pre>
-<p>
-On other distributions, different steps may be required to install the required 
-dependencies, and/or to install the compiled executables. These steps are 
-outlined in detail below.
-
-
-<h2><a name='builddeps'>Required dependencies</a></h2>
-<p>
-Before any of the programs included in the MRtrix packages can be used, they 
-need to be <em>compiled</em> (i.e. translated into machine code suitable for 
-your specific computer platform).  This will generate the required 
-<em>executables</em> and dynamic library. Certain packages and dependencies are 
-needed for this step. A subset of these packages will also be required to run 
-the executables. These packages are:
-</p>
-<h3>Needed for the compilation step (build):</h3>
-<dl>
-  <dt>g++ - the GNU C++ compiler (version > 4.0.0 recommended)</dt>
-  <dd>available from <a href="http://gcc.gnu.org/">http://gcc.gnu.org/</a></dd>
-  <dt>python (version > 2.5 recommended)</dt>
-  <dd>available from <a href="http://www.python.org/">http://www.python.org/</a></dd>
-  <dt>development packages for the run-time dependencies</dt>
-  <dd>as listed below</dd>
-</dl>
-On Ubuntu, these packages can be installed using the Synaptic Package Manager, 
-and can be found under the names 'g++' and 'python'.
-
-<h3>Also needed at run-time:</h3>
-The developement version of these packages is required for the compilation 
-step, while the run-time versions are needed at run-time:
-<dl>
-  <dt>glib (version > 2.16)</dt>
-  <dt>gtk+ (version > 2.12)</dt>
-  <dd>both available from <a href="http://www.gtk.org/">http://www.gtk.org/</a></dd>
-  <dt>glibmm (version > 2.16)</dt>
-  <dt>gtkmm (version > 2.12)</dt>
-  <dd>both available from <a href="http://www.gtkmm.org/">http://www.gtkmm.org/</a></dd>
-  <dt>gtkglext (version > 1.0)</dt>
-  <dd>available from <a href="http://www.k-3d.org/gtkglext/Main_Page">http://www.k-3d.org/gtkglext/Main_Page</a></dd>
-  <dt>GSL (GNU Scientific Library; version > 1.8)</dt>
-  <dd>available from <a href="http://www.gnu.org/software/gsl/">http://www.gnu.org/software/gsl/</a></dd>
-  <dt>a working OpenGL implementation (version > 1.2)</dt>
-  <dd>for best results on Linux, we recommend the use of an nVidia® graphics card together with the nVidia® proprietory drivers. 
-  These drivers may be available via the distribution package manager (this is the case with Ubuntu Linux). 
-  If not, they can be downloaded from <a href="http://www.nvidia.com/">http://www.nvidia.com/</a></dd>
-</dl>
-<p>
-On Ubuntu, these packages can be installed using the Synaptic Package Manager, 
-and can be found under the names 'libglib2.0-dev', 'libgtk2.0-dev',
-'libglibmm-2.4-dev', 'libgtkmm-2.4-dev', 'libgtkglext1-dev', 'libgsl0-dev',
-  'libgl1-mesa-dev' (for a generic OpenGL implementation - the nVidia® 
-driver already includes the required development files), and
-  'libglu1-mesa-dev'.
-
-
-
-<p class=sep><a href="#top">top</a></p>
-
-<h2><a name='compile'>The compilation step</a></h2>
-<p>
-Once all dependencies are installed, MRtrix can be compiled by issuing the 
-commands (modify as appropriate):
-</p>
-<pre>
-$ <b>tar xjf mrtrix-0.2.X.tar.bz2</b>
-$ <b>cd mrtrix-0.2.X/</b>
-$ <b>./build</b>
-</pre>
-<p>
-If this completes with no errors, all executables should be located in the <kbd>bin/</kbd> folder, 
-and the <kbd>libmrtrix-0_2_X.so</kbd> dynamic library should be located in the <kbd>lib/</kbd> folder.
-</p>
-<p>
-If any errors do occur, you may need to modify the configuration file.
-The relevant file will be located in the <kbd>sysconf/</kbd> folder,
-will have a <kbd>*.py</kbd> suffix, and will be named according to the target platform.
-Unfortunately a full discussion of the various options that can be modified is beyond the scope of this document.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-
-<h2><a name='install'>Installation of executables</a></h2>
-<p>
-Once all executables and the dynamic library have been successfully created, 
-they can be made available for use.  The recommended installation procedure is 
-as follows (note that this can be tailored to your needs).  The following 
-commands will typically need to be issued from the <em>root</em> account.  If 
-you do not have root or administrative access to your system, you can simply 
-install the files to a location that you have write permissions for (i.e.  
-anywhere in your home folder), in which case the following commands can be 
-issued from your own account.
-</p>
-<p>
-<b>Note:</b> on Ubuntu and other systems without a <em>root</em> account, 
-simply type <kbd>sudo</kbd> as the first word on the command line 
-(see <a href="https://help.ubuntu.com/community/RootSudo">this page</a> for details).
-</p>
-
-<p>
-The simplest way to perform this step is to use the special <kbd>install</kbd> 
-target (as root if the destination is not user-writable):
-<pre>
-# <b>./build install</b>
-</pre>
-By default, this will copy the executables and dynamic library to the folder 
-<kbd>/opt/mrtrix</kbd>. To ensure these are in the system path, it will also
-create symbolic links to them in the folders <kbd>/usr/bin</kbd> (for the
-executables) and <kbd>/usr/lib</kbd> (for the dynamic library). Finally , it
-will also create a default system-wide configuration file in
-<kbd>/etc/mrtrix.conf</kbd>, to enable multi-threading on all cores as detected
-by the build script.
-</p>
-<p>
-If the files need to be installed to a different folder,
-a different prefix can be specified as an additional parameter:
-<pre>
-# <b>./build install=/usr/local</b>
-</pre>
-<p>
-When installing to a location that is not in the path (such as the 
-<kbd>/opt</kbd> folder), the simplest way to make the executables available is 
-to create symbolic links to the executables in a standard location such as 
-<kbd>/usr/bin</kbd> or <kbd>/usr/local/bin</kbd>.  By default, the install step 
-will create symbolic links in the <kbd>/usr/bin</kbd> and <kbd>/usr/lib</kbd> 
-for the executables and dynamic library respectively.  This can be disabled by 
-specifying an empty path to the linkto special target:
-<pre>
-# <b>./build install linkto=</b>
-</pre>
-A different location can also be specified by passing a suitable prefix as an 
-additional parameter. For example:
-<pre>
-# <b>./build install=/usr/local/mrtrix linkto=/usr/local</b>
-</pre>
-will copy the executables and dynamic library in 
-<kbd>/usr/local/mrtrix/bin</kbd> and <kbd>/usr/local/mrtrix/lib</kbd> 
-respectively, and then create symbolic links to these in the corresponding 
-<kbd>/usr/local/bin</kbd> and <kbd>/usr/local/lib</kbd> folders.
-
-
-<h3>If the executables are not in the path:</h3>
-<p>
-In some cases, it may not be possible to install the executables (or symbolic 
-links to them) into a location that is in the default path. This can happen for 
-instance if installing into a user account. In these case, the location of the 
-executables needs to be added to the PATH environment variable, and the 
-location of the dynamic library needs to be added to the LD_LIBRARY_PATH 
-environment variable (alternatively, it may also be possible to add the latter 
-to the dynamic loader's search path, although this is system-specific).
-<p>
-This can typically be done by adding a couple of lines to the relevant startup 
-script.  Unfortunately, each Unix variant may use a different procedure for 
-this. For single user accounrs, it should be sufficient to add these lines to 
-the <kbd>~/.bashrc</kbd> file:
-<pre>
-PATH=/home/user/mrtrix/bin:$PATH
-LD_LIBRARY_PATH=/home/user/mrtrix/lib
-</pre>
-For C shell users (csh or tcsh), the following lines should be added to the 
-<kbd>~/.cshrc</kbd>:
-<pre>
-setenv PATH /opt/mrtrix/bin:$PATH
-setenv LD_LIBRARY_PATH /opt/mrtrix/lib/
-</pre>
-
-<p class=sep><a href="#top">top</a></p>
-
-
-<h2><a name='config'>Final configuration</a></h2>
-<p>
-Once the software is up and running, is it worth taking the time to perform a few simple configurations steps.
-The following important application behaviours can be modified by setting the relevant variables 
-in the <a href='../appendix/config.html'>configuration file</a> (described in more detail
-in the <a href='../appendix/config.html'>Appendix</a>).
-Note that if the configuration file does not exist, or if the variables are not set, 
-default values will be used instead.
-</p>
-<dl>
-  <dt>Enable multi-threading</dt>
-  <dd>If MRtrix is installed on a multi-processor or multi-core system, some of the more CPU intensive
-  tasks can take advantage of this by performing the processing in parallel across some or all of the CPU cores.
-  Currently, the <a href='../tractography/preprocess.html#csd'>CSD computation</a> and
-  <a href='../tractography/tracking.html'>tractography</a> programs are both ready 
-  for multi-threading, and will therefore take substantially less time if multi-threading is enabled.
-  This is done by adding the following line to your <a href='../appendix/config.html'>configuration file</a>:
-  <pre>NumberOfThreads: 4</pre> with the number set appropriately for your
-  system. Note that a default configuration file with this parameter already
-  set to the appropriate value should already exist if the software
-  was installed using the <kbd>./build install</kbd> command (see above).</dd>
-
-  <dt>Left-right convention for Analyse images</dt>
-  <dd>There is some ambiguity in the Analyse format as to whether images are stored in left to right order
-  or in the reverse order. This can lead to a great deal of confusion, and for this reason, it is not recommended 
-  to use the Analyse format if it can be avoided. For those cases when you need to use this format, 
-  the left-right ordering convention can be set by adding this line to your <a href='../appendix/config.html'>configuration file</a>:
-  <pre>Analyse.LeftToRight: false</pre>
-  By default, Analyse images are assumed to be stored left to right.</dd>
-</dl>
-
-
-
-
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="windows.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/install/windows.html b/src/doc/install/windows.html
deleted file mode 100644
index 9c365a4..0000000
--- a/src/doc/install/windows.html
+++ /dev/null
@@ -1,109 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="unix.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Microsoft Windows</th>
-    <td><a href="macosx.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<h2><a name='windowsinstaller'>Using the Windows installer</a></h2>
-<p>
-A pre-compiled version of MRtrix is available for Windows, provided and 
-maintained by Ben Jeurissen. The installer can be found on the <a 
-href="http://www.nitrc.org/projects/mrtrix/">NITRC website</a>, under the name 
-<kbd>mrtrix-0.2.X-win32.exe</kbd>. Simply download and execute the file, then 
-follow the on-screen instructions.
-</p>
-<p>
-Note that this version is provided for convenience only, and there is no active 
-development of MRtrix under Microsoft Windows. If you experience problems that 
-are specific to this version, it is unlikely that we will be able to help.
-</p>
-<p>
-If you do decide to use the Windows version, you may find it helpful to use a 
-more Unix-like command interpreter than that provided by Microsoft. One decent 
-such alternative is <a href="http://www.mingw.org/wiki/msys">MSYS</a>, although 
-other good choices no doubt exist.
-
-<h2><a name='fromsource'>Building from source</a></h2>
-<p>
-MRtrix can be built from source on Microsoft Windows using the <a 
-href="http://www.mingw.org/">MinGW compiler</a>, although it is a much more
-challenging task than on Unix systems due primarily to the difficulty of
-finding appropriate versions of the dependencies. While we do not provide
-precise instructions for doing this here, the following information may prove 
-helpful for users who wish to do so.
-</p>
-<p>
-The following tools are required for the compilation process, and pre-compiled 
-Windows versions are available for download:
-
-<ul>
-<li><b>MinGW:</b>
-<a href="http://www.mingw.org/">
-http://www.mingw.org/
-</a></li>
-<li><b>Python 2.6:</b>
-<a href="http://www.python.org/getit/windows/">
-http://www.python.org/getit/windows/
-</a></li>
-</ul>
-
-<p>
-Pre-compiled versions of the dependencies are also available for download:
-
-<ul>
-<li><b>GTK:</b>
-<a href="http://www.gtk.org/download-windows.html">
-http://www.gtk.org/download-windows.html
-</a></li>
-<li><b>gtkmm:</b>
-<a href="http://www.gtkmm.org/en/download.html">
-http://www.gtkmm.org/en/download.html
-</a></li>
-<li><b>GtkGLExt:</b>
-<a href="http://sourceforge.net/projects/gtkglext/files/gtkglext/1.0.6/">
-http://sourceforge.net/projects/gtkglext/files/gtkglext/1.0.6/
-</a></li>
-<li><b>GSL:</b>
-<a href="http://gnuwin32.sourceforge.net/packages/gsl.htm">
-http://gnuwin32.sourceforge.net/packages/gsl.htm
-</a></li>
-</ul>
-
-<p>
-The compilation process involves the same steps as described in the <a 
-href="unix.html#compile">Unix installation instructions</a>.
-
-<table class=nav>
-  <tr>
-    <td><a href="unix.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="macosx.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
-
diff --git a/src/doc/intro.html b/src/doc/intro.html
deleted file mode 100644
index 81aed26..0000000
--- a/src/doc/intro.html
+++ /dev/null
@@ -1,164 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="stylesheet.css" type="text/css" media=screen>
-</head>
-
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="left.png"></a></td>
-    <td><a href="index.html"><img src="up.png"></a></td>
-    <td><a href="index.html"><img src="home.png"></a></td>
-    <th>Introduction</th>
-    <td><a href="install/index.html"><img src="right.png"></a></td>
-  </tr>
-</table>
-
-
-
-<p>
-MRtrix provides a set of tools to perform diffusion-weighted MRI white matter tractography in the presence of crossing fibres,
-using Constrained Spherical Deconvolution (<a href='appendix/refs.html#tournier1'>Tournier <i>et al.</i>. 2004</a>; 
-<a href='appendix/refs.html#tournier2'>Tournier <i>et al.</i> 2007</a>), 
-and a probabilisitic streamlines algorithm (e.g. <a href='appendix/refs.html#behrens'>Behrens <i>et al.</i>, 2003</a>; 
-<a href='appendix/refs.html#parker'>Parker <i>et al.</i>, 2003</a>).
-These applications have been written from scratch in C++, using the functionality provided
-by the <a href="http://www.gnu.org/software/gsl/">GNU Scientific Library</a>,
-and <a href="http://www.gtkmm.org/">gtkmm</a>.
-The software is currently capable of handling <a href="http://medical.nema.org/">DICOM</a>, <a
-href="http://nifti.nimh.nih.gov/">NIfTI</a> and <a href="http://www.google.com.au/url?sa=t&source=web&cd=3&ved=0CCkQFjAC&url=http%3A%2F%2Feeg.sourceforge.net%2FANALYZE75.pdf&rct=j&q=analyse%20image%20format&ei=v5TkTZrCLsyyrAeXx7W6Bg&usg=AFQjCNHirfS4ESJOcodq0PFWzfMCH3jsUw&sig2=EPoSxKEOdcHRYuSBiS88Yg">AnalyseAVW</a>
-image formats, amongst others.
-The source code is distributed under the <a href=appendix/gpl-3.0.html>GNU General Public License</a>.
-</p>
-
-
-<h2><a name='citing'>Acknowledging this work</a></h2>
-<p>
-If you wish to include results generated using the MRtrix package in a publication, 
-please include a line such as the following to acknowledge this work:
-</p>
-<blockquote> 
-Fibre-tracking was performed using the MRtrix package
-(J-D Tournier, Brain Research Institute, Melbourne, Australia, 
-<a href=http://www.brain.org.au/software/>http://www.brain.org.au/software/</a>)
-(<a href='appendix/refs.html#tournier3'>Tournier <i>et al.</i> 2012</a>)
-</blockquote>
-<p>
-Other relevant references include:
-<ul>
-<li><a href='appendix/refs.html#tournier1'>Tournier <i>et al.</i> 2004</a> for the general concept of spherical deconvolution.</li>
-<li><a href='appendix/refs.html#tournier2'>Tournier <i>et al.</i> 2007</a> for the particular implementation of <em>constrained</em>
-spherical deconvolution (as included in MRtrix and performed using <a href="commands/csdeconv.html">csdeconv</a>).</li>
-<li><a href='appendix/refs.html#calamante'>Calamante <i>et al.</i> 2010</a> for track density imaging (TDI).</li>
-</ul>
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='warranty'>Warranty</a></h2>
-<p>
-The software described in this manual has no warranty, it is provided "as is". 
-It is your responsibility to validate the behavior of the routines and their accuracy using the source code provided, 
-or to purchase support and warranties from commercial redistributors. 
-Consult the <a href=appendix/gpl-3.0.html>GNU General Public License</a> for further details.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='license'>License</a></h2>
-<p>
-MRtrix is free software: you can redistribute it and/or modify
-it under the terms of the <a href=appendix/gpl-3.0.html>GNU General Public License</a> as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-<p>
-</p>
-MRtrix is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-<p>
-</p>
-You should have received a copy of the <a href=appendix/gpl-3.0.html>GNU General Public License</a>
-along with MRtrix.  If not, see <a href="http://www.gnu.org/licenses/"><http://www.gnu.org/licenses/></a>.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='support'>Support</a></h2>
-<p>
-For support, please subscribe to the <a href='http://www.nitrc.org/mailman/listinfo/mrtrix-discussion'>MRtrix mailing list</a> and post your questions there.
-You can also browse through the <a href='http://www.nitrc.org/pipermail/mrtrix-discussion/'>archives</a> to see if your question has already been addressed.
-Notifications of new releases will also be publicised on that list.
-</p>
-<p>
-You may also find that your questions have already been answered in the <a href='faq.html'>Frequently Asked Questions</a>.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='platforms'>Supported platforms</a></h2>
-<p>
-MRtrix should compile and run on any Unix-like system, provided 
-the <a href="http://www.gnu.org/software/gsl/">GNU Scientific Library</a>,
-<a href="http://www.gtkmm.org/">gtkmm</a> and a working implementation of OpenGL (version > 1.2) are available on that system.
-</p>
-<table class=args>
-  <tr><th>Platform</th><th>Notes</th></tr>
-  <tr><td><a href="install/unix.html">Linux (x86)</a></td><td>should install on any recent distribution.<br>Tested under Ubuntu 7.10 (Gutsy) through to 10.10 (Maverick), 32 & 64 bit versions.</td></tr>
-  <tr><td><a href="install/windows.html">Windows XP and above</a></td><td>known to compile and run (using <a href="http://www.mingw.org/">MinGW</a>).<br>Pre-compiled binaries have now been released.</td></tr>
-  <tr><td><a href="install/macosx.html">MacOS X</a></td><td>known to compile and run (using dependencies provided by <a href=http://www.macports.org/>MacPorts</a>, <a href="http://mxcl.github.com/homebrew/">Homebrew</a>, or <a href="http://www.finkproject.org/">Fink</a>).</td></tr>
-</table>
-
-
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='conventions'>Conventions used in this manual</a></h2>
-<p>
-This manual contains many examples which can be typed at the keyboard. A command entered at the terminal is shown like this:
-</p>
-<pre>
-$ <b>command</b>
-</pre>
-<p>
-The first character on the line is the terminal prompt, and should not be 
-typed.  The dollar sign '$' is used as the standard prompt in this manual, 
-although some systems may use a different character.
-</p>
-<p>
-The text that is actually typed at the keyboard is shown in <code><b>bold</b></code>.
-Any output produced by the program will be displayed in a <code>standard font</code>.
-<p>
-In certain cases (e.g. at installation), the number sign '#' is shown as the terminal prompt. 
-In such cases, the command is expected to be executed with administrative (root) privileges.
-</p>
-<p>
-These examples are for demonstation purposes only: depending on your specific aims and applications,
-you may want to omit some of the steps shown, or you may need to perform additional steps.
-</p>
-<p>
-This manual assumes a GNU/Unix environment. There may be minor differences in the input or output on other systems,
-and you may need to edit the commands to suit your working environment. 
-For example, in Microsoft Windows, you may need to use the backslash <kbd>'\'</kbd> as the directory separator.
-</p>
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="left.png"></a></td>
-    <td><a href="index.html"><img src="up.png"></a></td>
-    <td><a href="index.html"><img src="home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="install/index.html"><img src="right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-
-</body>
-</html>
diff --git a/src/doc/left.png b/src/doc/left.png
deleted file mode 100644
index 2d05b3d..0000000
Binary files a/src/doc/left.png and /dev/null differ
diff --git a/src/doc/right.png b/src/doc/right.png
deleted file mode 100644
index 92832e3..0000000
Binary files a/src/doc/right.png and /dev/null differ
diff --git a/src/doc/stylesheet.css b/src/doc/stylesheet.css
deleted file mode 100644
index 2ca8ff8..0000000
--- a/src/doc/stylesheet.css
+++ /dev/null
@@ -1,63 +0,0 @@
-body { margin-left: 1em; margin-right: 1em; }
-h1 { color: #008080; margin-top: 1em; }
-h2 { color: #008080; margin-top: 1em; }
-h3 { font-style: oblique }
-p.sep, p.footer { text-align: right; font-style: oblique; clear: both }
-p.sep { margin-top: 1em; margin-bottom: 2em; padding-bottom: 0.3em; border-bottom: 1px solid black }
-p.footer { margin-top: 2em; padding-top: 0.3em; border-top: 1px solid black; color: #008080 }
-p.cmdinfo { font-style: oblique; font-weight: bold }
-p.indented { padding-left: 5em; }
-pre { padding-left: 1em; padding-top: 0.5em; padding-bottom: 0.5em; background: #E0E0E0; border: 1px solid black; color: black; }
-kbd { color: black; font-weight: bold; }
-kbd.arg { color: black }
-kbd.opt { color: maroon }
-kbd.oparg { color: olive }
-kbd.prompt { color: gray }
-ul.toc { margin-top: 1em; }
-ul.toc > li { font-size: 150%; padding-top: 1em; }
-ul.toc > li > ul > li { font-size: normal }
-img { vertical-align: top; }
-th { text-align: left; padding-bottom: 0.5em }
-td.arg { padding-left: 2em; padding-right: 2em }
-td.opt { padding-right: 2em }
-table.cmd td { vertical-align: top; padding-bottom: 0.5em }
-dl { margin-left: 2em }
-dl dt { font-weight: bold }
-dl dd { padding-bottom: 1em }
-ol li { padding-bottom: 5pt; }
-
-a { text-decoration: none; color: teal; }
-a[href]:hover { text-decoration: underline; color: teal; }
-
-pre a { text-decoration: none; color: black; }
-pre a[href]:hover { text-decoration: underline; color: black; }
-
-
-table.nav { background: #ffffc0; border: solid 1px #aaaa00; margin-top: 1em; margin-bottom: 1em; height: 2em; width: 100%; }
-table.nav tr { vertical-align; middle; }
-table.nav td { color: #770000; font-size: 80%; padding: 2px; }
-table.nav th { text-align: center; color: #000000; font-size: 150%; padding: 2px; width: 100%; }
-table.nav img { width: 24px; height: 24px; border=0px; border: 0px; }
-table.nav a { font-size: 70%; font-style: oblique }
-
-table.desc { border-collapse: collapse; margin-left: auto; margin-right: auto; } 
-table.desc th { border-top: 1px solid black; border-bottom: 1px solid black; background: #ffffc0; padding-left: 2em; padding-right: 2em; }
-table.desc td { border-bottom: 1px solid black; padding-left: 2em; padding-right: 2em; }
-
-table.centered { border-collapse: collapse; margin-left: auto; margin-right: auto; } 
-table.centered th { border-top: 1px solid black; border-bottom: 1px solid black; background: #ffffc0; padding-left: 2em; padding-right: 2em; text-align: center; }
-table.centered td { border-bottom: 1px solid black; padding-left: 2em; padding-right: 2em; text-align: center; }
-
-table.args { border-collapse: collapse; } 
-table.args th { padding-left: 2em; padding-right: 2em; }
-table.args td { vertical-align: top; padding-left: 2em; padding-right: 2em; padding-top: 10pt; padding-bottom: 10pt; }
-table.args td[nowrap] { white-space: nowrap; }
-
-table.opts { border-collapse: collapse; } 
-table.opts td { vertical-align: top; padding-left: 1em; padding-right: 1em; padding-top: 5pt; padding-bottom: 5pt; }
-
-table.cmdindex { border-collapse: collapse; } 
-table.cmdindex th { padding-left: 2em; padding-right: 2em; }
-table.cmdindex td { vertical-align: top; padding-left: 2em; padding-right: 2em; padding-top: 5pt; padding-bottom: 5pt; }
-
-
diff --git a/src/doc/tractography/anat.png b/src/doc/tractography/anat.png
deleted file mode 100644
index 394a4fd..0000000
Binary files a/src/doc/tractography/anat.png and /dev/null differ
diff --git a/src/doc/tractography/cst_csd.png b/src/doc/tractography/cst_csd.png
deleted file mode 100644
index 54d7abf..0000000
Binary files a/src/doc/tractography/cst_csd.png and /dev/null differ
diff --git a/src/doc/tractography/cst_dt.png b/src/doc/tractography/cst_dt.png
deleted file mode 100644
index 213a126..0000000
Binary files a/src/doc/tractography/cst_dt.png and /dev/null differ
diff --git a/src/doc/tractography/cst_dt_exclude.png b/src/doc/tractography/cst_dt_exclude.png
deleted file mode 100644
index 932d242..0000000
Binary files a/src/doc/tractography/cst_dt_exclude.png and /dev/null differ
diff --git a/src/doc/tractography/cst_dt_include.png b/src/doc/tractography/cst_dt_include.png
deleted file mode 100644
index 0b6c87f..0000000
Binary files a/src/doc/tractography/cst_dt_include.png and /dev/null differ
diff --git a/src/doc/tractography/cst_dt_mask.png b/src/doc/tractography/cst_dt_mask.png
deleted file mode 100644
index 094dd07..0000000
Binary files a/src/doc/tractography/cst_dt_mask.png and /dev/null differ
diff --git a/src/doc/tractography/cst_seed.png b/src/doc/tractography/cst_seed.png
deleted file mode 100644
index d1e5960..0000000
Binary files a/src/doc/tractography/cst_seed.png and /dev/null differ
diff --git a/src/doc/tractography/dwi.html b/src/doc/tractography/dwi.html
deleted file mode 100644
index 22dfc2f..0000000
--- a/src/doc/tractography/dwi.html
+++ /dev/null
@@ -1,226 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Importing DWI data</th>
-    <td><a href="preprocess.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<h2><a name='dwi'>The diffusion-weighted images</a></h2>
-<p>
-White matter tractography relies on the appropriate diffusion-weighted data to infer fibre orientations 
-(see e.g. <a href='../appendix/refs.html#mori'>Mori & van Zijl, 2002</a> for a review).
-Diffusion tensor imaging requires a minimum of 7 images (1 <i>b</i>=0 & 6 DWI) per imaging slice,
-which are typically acquired using a <i>b</i>-value of approximately 1000 s/mm&sup2; 
-(see e.g. <a href='../appendix/refs.html#basser'>Basser & Jones, 2002</a> for a review).
-For spherical deconvolution, it is recommended to use 60 DW images or more and a <i>b</i>-value around 3000 s/mm&sup2;
-(<a href='../appendix/refs.html#tournier1'>Tournier <i>et al.</i>. 2004</a>; 
-<a href='../appendix/refs.html#tournier2'>Tournier <i>et al.</i> 2007</a>). 
-</p>
-<p>
-The data can be supplied to MRtrix in any <a href='../general/formats.html'>supported image format</a>. 
-Note that different image formats vary in their ability to carry additional information about the images.
-In particular, DWI analysis will typically require the <em>DW scheme</em>, which contains the information
-about the orientations of the various DW gradients used for the different images in the acquisition.
-The only <a href='../general/formats.html'>supported image formats</a> that can carry this information 
-are the <a href='../general/formats.html#DICOM'>DICOM</a> (tested with the Siemens diffusion package, on VB13 and above) 
-and <a href='../general/formats.html#MRtrix'>MRtrix</a> formats.
-It is however possible to use other image formats, in which case the DW scheme can be provided as a separate file (see <a href='#dwscheme'>below</a>).
-</p>
-<p>
-If the DWI data are stored in <a href='../general/formats.html#DICOM'>DICOM</a> format, it is recommended to convert them
-to <a href='../general/formats.html#MRtrix'>MRtrix</a> format, as this will speed up subsequent access.
-</p>
-<h3>Example:</h3>
-<p>
-Assuming the data are stored on CD (in the <kbd>/media/cdrom/4356307/</kbd> folder) in DICOM format, 
-the <kbd><a href='../commands/mrconvert.html'>mrconvert</a></kbd> command can be used:
-</p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> /media/cdrom/4356307/ dwi.mif</b>
-<a href='../commands/mrconvert.html'>mrconvert</a>: scanning DICOM folder "/media/cdrom/4356307/"  - ok
-Select series ('q' to abort):
-   1 -    9 MR images 14:34:56 localiser (*fl2d1)
-   2 -  192 MR images 14:46:55 t1_mpr_0.9 iso hres (*tfl3d1_ns)
-   3 -   68 MR images 14:49:07 diff60_b3000_2.3_iPat2+ADC (*ep_b3000#5)
-   4 -   54 MR images 14:56:45 diff60_b3000_2.3_iPat2+ADC_ADC (*ep_b0_3000)
-   5 -  108 MR images 14:56:46 diff60_b3000_2.3_iPat2+ADC_TRACEW (*ep_b2950t)
-   6 -   54 MR images 14:56:47 diff60_b3000_2.3_iPat2+ADC_FA (*ep_b0_3000)
-   7 -   54 MR images 14:56:47 diff60_b3000_2.3_iPat2+ADC_ColFA (?)
-? <b>3</b>
-<a href='../commands/mrconvert.html'>mrconvert</a>: reading DICOM series "diff60_b3000_2.3_iPat2+ADC"... 100%
-<a href='../commands/mrconvert.html'>mrconvert</a>: DICOM image contains mosaic files - reformating... 100%
-<a href='../commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-</pre>
-<p>
-You can check that the data have been correctly converted using <kbd><a href='../commands/mrinfo.html'>mrinfo</a></kbd>:
-</p>
-<pre>
-> <b>mrinfo dwi.mif</b>
-************************************************
-Image:               "dwi.mif"
-************************************************
-  Format:            MRtrix
-  Dimensions:        104 x 104 x 54 x 68
-  Voxel size:        2.30769 x 2.30769 x 2.3 x 2.3
-  Dimension labels:  0. left->right (mm)
-                     1. posterior->anterior (mm)
-                     2. inferior->superior (mm)
-                     3. acquisition (?)
-  Data type:         unsigned 16 bit integer (little endian)
-  Data layout:       [ -0 -1 +2 +3 ]
-  Data scaling:      offset = 0, multiplier = 1
-  Comments:          VOLUNTEER (000366) [MR] diff60_b3000_2.3_iPat2+ADC
-  Transform:             0.9998 5.181e-08  -0.01876    -114.8
-                      -0.000815    0.9991  -0.04347    -101.9
-                        0.01875   0.04347    0.9989    -48.98
-                              0         0         0         1
-  DW scheme:         68 x 4
-</pre>
-<p>
-Notice the <em>DW scheme</em> entry for <kbd>dwi.mif</kbd>:
-this indicates that the conversion found diffusion-encoding gradient information in the DICOM headers,
-and successfully included this information in the header for the converted image.
-This information is required for any type of DWI analysis. 
-If this information was not found in the headers, it is still possible to provide it as a separate file
-(see <a href='dwi.html#dwscheme'>here</a> for details).
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='anat'>Anatomical images</a></h2>
-<p>
-It can also be useful to use a co-registered anatomical scan for display.
-MRView can be used to identify particular anatomical landmarks, specify regions of interest more accurately, 
-or display the tractography results on these images.
-These images need to be coregistered with the DWI data set. 
-If such an image was acquired at the same time as the DWI,
-and assuming that the subject did not move between the scans, 
-The <a href='../general/formats.html#DICOM'>DICOM</a> headers will contain all the information needed to re-align the two data sets.
-</p>
-
-<h3>Example:</h3>
-<p>
-The <a href='../general/formats.html#DICOM'>DICOM</a> folder used in the previous example contained a high-resolution T1 image.
-It can be converted to <a href='../general/formats.html#MRtrix'>MRtrix</a> format using the following command:
-</p>
-<pre>
-> <b><a href='../commands/mrconvert.html'>mrconvert</a> /media/cdrom/4356307/ anat.mif</b>
-<a href='../commands/mrconvert.html'>mrconvert</a>: scanning DICOM folder "/media/cdrom/4356307/"  - ok
-Select series ('q' to abort):
-   1 -    9 MR images 14:34:56 localiser (*fl2d1)
-   2 -  192 MR images 14:46:55 t1_mpr_0.9 iso hres (*tfl3d1_ns)
-   3 -   68 MR images 14:49:07 diff60_b3000_2.3_iPat2+ADC (*ep_b3000#5)
-   4 -   54 MR images 14:56:45 diff60_b3000_2.3_iPat2+ADC_ADC (*ep_b0_3000)
-   5 -  108 MR images 14:56:46 diff60_b3000_2.3_iPat2+ADC_TRACEW (*ep_b2950t)
-   6 -   54 MR images 14:56:47 diff60_b3000_2.3_iPat2+ADC_FA (*ep_b0_3000)
-   7 -   54 MR images 14:56:47 diff60_b3000_2.3_iPat2+ADC_ColFA (?)
-? <b>2</b>
-<a href='../commands/mrconvert.html'>mrconvert</a>: reading DICOM series "t1_mpr_0.9 iso hres"... 100%
-<a href='../commands/mrconvert.html'>mrconvert</a>: copying data... 100%
-</pre>
-
-You can check that the data have been correctly converted using <kbd>mrinfo</kbd>:
-</p>
-<pre>
-> <b>mrinfo anat.mif</b>
-************************************************
-Image:               "anat.mif"
-************************************************
-  Format:            MRtrix
-  Dimensions:        192 x 256 x 256
-  Voxel size:        0.9 x 0.898438 x 0.898438
-  Dimension labels:  0. inferior->superior (mm)
-                     1. left->right (mm)
-                     2. posterior->anterior (mm)
-  Data type:         unsigned 16 bit integer (little endian)
-  Data layout:       [ +2 -0 -1 ]
-  Data scaling:      offset = 0, multiplier = 1
-  Comments:          VOLUNTEER (000366) [MR] t1_mpr_0.9 iso hres
-  Transform:              0.998  -0.05412  -0.03311    -74.03
-                        0.05409    0.9985 -0.001794    -100.6
-                        0.03316  2.34e-08    0.9995    -125.8
-                              0         0         0         1
-</pre>
-<p>
-As a final check, both sets of images can then be displayed using MRView:
-</p>
-<pre>
-> <b><a href='../commands/mrview.html'>mrview</a> dwi.mif anat.mif</b>
-</pre>
-<p>
-This should open a window with both images loaded 
-(you can swich between images using the Image menu - see <a href='../general/mrview.html'>here</a> for details):
-</p>
-<img src='dwi.png'>
-<img src='anat.png'>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='dwscheme'>The diffusion-weighted gradient scheme</a></h2>
-<p>
-The DW scheme specifies the direction and <i>b</i>-value for each volumes of the DWI data set.
-MRtrix will look for the DW scheme in the DW image header, otherwise this information will need to be supplied in a separate file.
-This simple text file should contain a 4 × <i>N</i> matrix, where <i>N</i> is the number of volumes in the DWI data set.
-Each line should consist of 4 numbers: the [ X Y Z ] components of the gradient direction, followed by the <i>b</i>-value.
-Note that the magnitude of the direction vector is ignored.
-Below is an example showing the DW scheme for a simple acquisition: 
-1 <i>b</i>=0 image followed by 6 DW images with <i>b</i> = 1000 s/mm&sup2;:
-</p>
-<pre>
-0  0  0  0
-1  1  0  1000
-1  0  1  1000
-0  1  1  1000
-1 -1  0  1000
-1  0 -1  1000
-0  1 -1  1000
-</pre>
-<p>
-These directions should be provided with reference to the <a href='../general/overview.html#axes'>coordinate system</a> used by MRtrix. 
-Note that this convention will most likely differ from the reference frame of the scanner. 
-In this case, the gradient orientations specified in the pulse sequence will need to be adjusted accordingly.
-Thankfully, in most cases it is simply a matter or inverting the components of one or more of the gradient orientation components.
-</p>
-<p>
-It is also possible to extract the DW scheme from the image header (provided one is found).
-This can be achieved by supplying the <kbd>-grad</kbd> option to <kbd><a href='../commands/mrinfo.html'>mrinfo</a></kbd>. For example:
-</p>
-<pre>
-> <b><a href='../commands/mrinfo.html'>mrinfo</a> /data/DICOM_folder/ -grad encoding.b</b>
-</pre>
-<p>
-will scan the DICOM data set specified and store the DW scheme in the file <kbd>encoding.b</kbd> in the format described above.
-</p>
-
-<table class=nav>
-  <tr>
-    <td><a href="index.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="preprocess.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-</body>
-</html>
-
-
diff --git a/src/doc/tractography/dwi.png b/src/doc/tractography/dwi.png
deleted file mode 100644
index 1e6261e..0000000
Binary files a/src/doc/tractography/dwi.png and /dev/null differ
diff --git a/src/doc/tractography/focus.png b/src/doc/tractography/focus.png
deleted file mode 100644
index ad8f10a..0000000
Binary files a/src/doc/tractography/focus.png and /dev/null differ
diff --git a/src/doc/tractography/index.html b/src/doc/tractography/index.html
deleted file mode 100644
index 3132d97..0000000
--- a/src/doc/tractography/index.html
+++ /dev/null
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="../general/index.html"><img src="../left.png"></a></td>
-    <td><a href="../index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Tractography</th>
-    <td><a href="dwi.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<ul class=toc>
-  <li><a href='dwi.html'>Importing DW data</a></li>
-  <ul>
-    <li><a href='dwi.html#dwi'>The diffusion-weighted images</a></li>
-    <li><a href='dwi.html#anat'>Anatomical images</a></li>
-    <li><a href='dwi.html#dwscheme'>The diffusion-weighted gradient scheme</a></li>
-  </ul>
-  <li><a href='preprocess.html'>Data pre-processing</a></li>
-  <ul>
-    <li><a href='preprocess.html#mask'>Brain mask</a></li>
-    <li><a href='preprocess.html#tensor'>Diffusion tensor images</a></li>
-    <li><a href='preprocess.html#csd'>Constrained spherical deconvolution</a></li>
-    <li><a href='preprocess.html#wm'>White matter mask</a></li>
-  </ul>
-  <li><a href='roi.html'>ROI selection</a></li>
-  <ul>
-    <li><a href='roi.html#types'>ROI types</a></li>
-    <li><a href='roi.html#define'>Defining ROIs</a></li>
-  </ul>
-  <li><a href='tracking.html'>Performing fibre-tracking</a></li>
-  <ul>
-    <li><a href='tracking.html#example'>A simple example using the diffusion tensor</a></li>
-    <li><a href='tracking.html#include'>Using a inclusion ROI</a></li>
-    <li><a href='tracking.html#exclude'>Using a exclusion ROI</a></li>
-    <li><a href='tracking.html#mask'>Using an image as a ROI</a></li>
-    <li><a href='tracking.html#csd'>Tracking using spherical deconvolution</a></li>
-    <li><a href='tracking.html#wholebrain'>Whole brain tracking</a></li>
-    <li><a href='tracking.html#tdi'>Track Density Imaging</a></li>
-  </ul>
-</ul>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-</body>
-</html>
-
-
diff --git a/src/doc/tractography/position.png b/src/doc/tractography/position.png
deleted file mode 100644
index f211242..0000000
Binary files a/src/doc/tractography/position.png and /dev/null differ
diff --git a/src/doc/tractography/preprocess.html b/src/doc/tractography/preprocess.html
deleted file mode 100644
index 55b08bd..0000000
--- a/src/doc/tractography/preprocess.html
+++ /dev/null
@@ -1,247 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="dwi.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Data pre-processing</th>
-    <td><a href="roi.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p>
-Here, we describe the basic pre-processing steps required for tractography using constrained spherical deconvolution.
-We will also show how to generate a number of useful additional images and maps, whose use is recommended.
-</p>
-
-<h2><a name='mask'>Brain mask</a></h2>
-<p>
-A brain mask image is useful for a number of reasons. 
-First, it can be used to clean up tensor maps by removing noisy voxels outside the brain.
-Second, it can be used to prevent tracks generated by the fibre-tracking algorithm from propagating outside the head.
-Last, and most important, it can significantly speed up the <a href='#csd'>CSD</a> computation,
-by preventing the analysis of non-brain voxels.
-</p>
-<p>
-For the purposes outlined above, the brain mask should have the same dimensions as the DWI data set.
-The simplest approach is to extract the <i>b</i>=0 image from the DWI data set (this example assumes that the first volume in the data set is a <i>b</i>=0 volume):
-</p>
-<pre>
-> <b><a href='../commands/average.html'>average</a> dwi.mif -axis 3 - | <a href='../commands/threshold.html'>threshold</a> - - | <a href='../commands/median3D.html'>median3D</a> - - | <a href='../commands/median3D.html'>median3D</a> - mask.mif</b>
-<a href='../commands/average.html'>average</a>: averaging... 100%
-<a href='../commands/threshold.html'>threshold</a>: finding min/max... 100%
-<a href='../commands/threshold.html'>threshold</a>: building histogram... 100%
-<a href='../commands/threshold.html'>threshold</a>: thresholding at intensity 25.5115... 100%
-<a href='../commands/median3D.html'>median3D</a>: median filtering... 100%
-<a href='../commands/median3D.html'>median3D</a>: median filtering... 100%
-</pre>
-<p>
-<strong>Note:</strong> this example uses <em>pipes</em> to execute a chain of commands.
-These are described in more detail <a href='../general/cmdline.html#pipes'>here</a>.
-</p>
-<p>
-The threshold value is in this case determined using simple histogram binning.
-You can specify your own threshold if you wish, by supplying the appropriate option to <kbd>threshold</kbd>.
-</p>
-<p> While this procedure should produce a reasonable mask of the brain, it is
-by no means fail-proof. <b>You are strongly encouraged to check the brain mask
-using <a href='../general/mrview.html'>MRView</a></b>.  If you need to edit the
-mask (for example, if some parts of the brain were not included), you can do so
-using the <a href='../general/mrview.html#roi'>ROI analysis</a> sidebar tool
-within <a href='../general/mrview.html'>MRView</a>.
-</p>
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='tensor'>Diffusion tensor images</a></h2>
-<p>
-This section describes the steps necessary to the diffusion tensor and associated parameters 
-(see e.g. <a href='../appendix/refs.html#basser'>Basser & Jones, 2002</a> for a review).
-The various tensor maps are generated as follows:
-</p>
-<h3>Tensor components:</h3>
-<pre>
-> <b><a href='../commands/dwi2tensor.html'>dwi2tensor</a> dwi.mif dt.mif</b>
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: converting DW images to tensor image... 100%
-</pre>
-<p>
-<strong>Note:</strong> in case the DWI data set headers do not include the DW scheme,
-you will need to supply your own encoding file (see <a href='dwi.html#dwscheme'>here</a> for details). 
-This can be done as follows (assuming <kbd>encoding.b</kbd> is the encoding file):
-<pre>
-> <b><a href='../commands/dwi2tensor.html'>dwi2tensor</a> dwi.mif -grad encoding.b dt.mif</b>
-<a href='../commands/dwi2tensor.html'>dwi2tensor</a>: converting DW images to tensor image... 100%
-</pre>
-
-<h3>Fractional anisotropy (FA) map:</h3>
-<pre> 
-> <b><a href='../commands/tensor2FA.html'>tensor2FA</a> dt.mif - | <a href='../commands/mrmult.html'>mrmult</a> - mask.mif fa.mif</b>
-<a href='../commands/tensor2FA.html'>tensor2FA</a>: generating fractional anisotropy map... 100%
-<a href='../commands/mrmult.html'>mrmult</a>: multiplying... 100%
-</pre>
-<p>
-Note that the FA map generated above has been multiplied by the brain mask image to remove the noisy background.
-</p>
-
-<h3>Eigenvector (EV) map:</h3>
-<pre> 
-> <b><a href='../commands/tensor2vector.html'>tensor2vector</a> dt.mif - | <a href='../commands/mrmult.html'>mrmult</a> - fa.mif ev.mif</b>
-<a href='../commands/tensor2vector.html'>tensor2vector</a>: generating major eigenvector map... 100%
-<a href='../commands/mrmult.html'>mrmult</a>: multiplying... 100%
-</pre>
-<p>
-Note that the EV map generated above has been scaled by the FA map.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='csd'>Constrained spherical deconvolution (CSD)</a></h2>
-<p>
-This section describes the steps necessary to perform constrained spherical deconvolution 
-(for a detailed description of the technique, please refer to <a href='../appendix/refs.html#tournier1'>Tournier <i>et al.</i>. 2004</a> and 
-<a href='../appendix/refs.html#tournier2'>Tournier <i>et al.</i> 2007</a>). 
-</p>
-
-<h3>Mask of single-fibre voxels:</h3>
-First, obtain a mask of high anisotropy voxels. 
-These are assumed to contain single fibre-voxels, and will be used to estimate the response function:
-</p>
-<pre>
-> <b><a href='../commands/erode.html'>erode</a> mask.mif -npass 3 - | <a href='../commands/mrmult.html'>mrmult</a> fa.mif - - | <a href='../commands/threshold.html'>threshold</a> - -abs 0.7 sf.mif</b>
-<a href='../commands/erode.html'>erode</a>: eroding ... 100%
-<a href='../commands/erode.html'>erode</a>: eroding ... 100%
-<a href='../commands/erode.html'>erode</a>: eroding ... 100%
-<a href='../commands/mrmult.html'>mrmult</a>: multiplying... 100%
-<a href='../commands/threshold.html'>threshold</a>: thresholding at intensity 0.7... 100%
-</pre>
-<p>
-The initial erosion step ensure that no edge voxels with artefactually high FA are included in the single-fibre mask.
-This mask is then applied to the FA map, and the resulting image is thresholded at FA = 0.7. 
-<p>
-Note that this value is a guide only - feel free to use a different value if this does not produce satisfactory results. 
-Ideally, you should now have a mask containing a few hundred voxels, all
-located within high FA white matter regions.  <b>It is very important to check
-that the single-fibre mask is suitable, as otherwise the response function
-produced in the following step may be totally inappropriate, which would
-seriously affect the quality of the CSD output</b>.
-If needed, you can edit this mask image to remove unwanted voxels 
-using the <a href='../general/mrview.html#roi'>ROI analysis</a> sidebar tool within <a href='../general/mrview.html'>MRview</a>.
-</p>
-
-<h3><a name='response'>Response function coefficient:</a></h3>
-<p>
-The response function SH coefficients can now be estimated from the DW signal in the single-fibre voxels:
-</p>
-<pre>
-> <b><a href='../commands/estimate_response.html'>estimate_response</a> dwi.mif sf.mif response.txt</b>
-<a href='../commands/estimate_response.html'>estimate_response</a>: estimating response function... 100%
-</pre>
-<p>
-This should produce the text file <kbd>response.txt</kbd>, containing a series of numbers, such as:
-<pre>
-232.781 -122.139 52.8959 -17.3446 3.53066 
-</pre>
-<p>
-<strong>Note:</strong> use the <kbd>-grad</kbd> option to supply your own DW scheme if none is to be found in the DWI data set headers.
-</p>
-
-<p>
-Normally, the values in the response file should alternate between positive and negative while decreasing in magnitude. 
-The first value should be positive, and have an amplitude similar to (but not necessarily the same as) the <i>b</i>=0 brain white matter signal 
-(you can verify this by loading the <kbd>dwi.mif</kbd> image and placing the focus within a white matter region - 
-the intensity is displaced in the bottom right of the statusbar). Note that this is only an approximate guideline: 
-it is not unusual for the first coefficient to differ from the b=0 signal quite significantly
-(on the other hand, if they differ by orders of magnitude, something has definitely gone wrong).
-</p>
-<p>
-You can also use the <kbd><a href='../commands/disp_profile.html'>disp_profile</a></kbd> command to display the response function:
-<pre>
-> <b><a href='../commands/disp_profile.html'>disp_profile</a> -response response.txt</b>
-</pre>
-<p>
-This will open a window with a 3D rendering of the response function:
-</p>
-<img src='response_function.png'>
-<p>
-The response function should be broadest in the axial plane, and have low amplitude along the <i>z</i>-axis.
-If this is not the case, it is likely that the <kbd>estimate_response</kbd> program has used a maximum harmonic order 
-that is too high given the data. You can override this value using the <kbd>-lmax</kbd> option, for example:
-</p>
-<pre>
-> <b><a href='../commands/estimate_response.html'>estimate_response</a> dwi.mif sf.mif -lmax 6 response.txt</b>
-<a href='../commands/estimate_response.html'>estimate_response</a>: estimating response function... 100%
-</pre>
-<p>
-In general, a value of 6 or 8 is adequate (the number provided <strong>must</strong> be even). 
-As a guide, this number should be chosen such that 
-the number of distinct DW directions used in the acquisition is greater than the number of parameters that need to be estimated.
-For convenience, a table of the number of parameters required for various maximum harmonic orders is provided below:
-</p>
-<table class=centered>
-  <tr><th>Maximum harmonic order (lmax)</th><th>Number of parameters required</th></tr>
-  <tr><td>2</td><td>6</td></tr>
-  <tr><td>4</td><td>15</td></tr>
-  <tr><td>6</td><td>28</td></tr>
-  <tr><td>8</td><td>45</td></tr>
-  <tr><td>10</td><td>66</td></tr>
-  <tr><td>12</td><td>91</td></tr>
-  <tr><td><i>n</i></td><td>&frac12; (<i>n</i>+1)(<i>n</i>+2)</td></tr>
-</table>
-
-
-<h3>CSD computation:</h3>
-<p>
-The CSD computation itself can now be performed:
-</p>
-<pre>
-> <b><a href='../commands/csdeconv.html'>csdeconv</a> dwi.mif response.txt -lmax 8 -mask mask.mif CSD8.mif</b>
-<a href='../commands/csdeconv.html'>csdeconv</a>: performing constrained spherical deconvolution... 100%
-</pre>
-<p>
-Here, the maximum harmonic order lmax has been set to 8, which should be 
-suitable for most DWI data sets.  You may need to alter this value for 
-different acquisition parameters.  Also, the brain mask has been used here to 
-prevent unnecessary computations in non-brain voxels; this can speed up the 
-computation time significantly.
-</p>
-<p>
-On multi-core systems, the computation time can also be reduced significantly using parallel processing.
-The <kbd><a href='../commands/csdeconv.html'>csdeconv</a></kbd> command is capable of running in multi-threaded mode.
-To use this feature, set the <kbd>NumberOfThreads</kbd> parameter in the <a href='../appendix/config.html'>MRtrix configuration file</a>.
-</p>
-<strong>Note:</strong> use the <kbd>-grad</kbd> option to supply your own DW scheme if none is to be found in the DWI data set headers.
-
-<p>
-Once the processing is done, you can display the results using the <a href='../general/mrview.html#orientation_plot'>orientation plot</a>
-sidebar tool within <a href='../general/mrview.html'>MRview</a>.
-</p>
-
-
-<p class=sep><a href="#top">top</a></p>
-<table class=nav>
-  <tr>
-    <td><a href="dwi.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="roi.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-</body>
-</html>
-
-
diff --git a/src/doc/tractography/response_function.png b/src/doc/tractography/response_function.png
deleted file mode 100644
index b5505ed..0000000
Binary files a/src/doc/tractography/response_function.png and /dev/null differ
diff --git a/src/doc/tractography/roi.html b/src/doc/tractography/roi.html
deleted file mode 100644
index 474d859..0000000
--- a/src/doc/tractography/roi.html
+++ /dev/null
@@ -1,90 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="preprocess.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>ROI selection</th>
-    <td><a href="tracking.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<h2><a name='types'>ROI types</a></h2>
-<p>
-There are four types of ROI that can be used for tracking:
-</p>
-<dl>
-  <dt>seed</dt>
-  <dd>the tracking algorithm will initiate tracks from random location within these regions.</dd>
-  <dt>include</dt>
-  <dd><em>target</em> ROIs: tracks generated by the algorithm will need to pass through these ROIs; tracks that do not enter <em>all</em> of these ROIs will be discarded.</dd>
-  <dt>exclude</dt>
-  <dd>tracks that enter any of these ROIs will immediately be discarded.</dd>
-  <dt>mask</dt>
-  <dd>tracks must be contained within these ROIs; track will be terminated (but <em>not</em> discarded) as soon as they leave the ROI.</dd>
-</dl>
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='define'>Defining ROIs</a></h2>
-<p>
-ROIs can be specified as spherical regions, or as a mask image.
-</p>
-<h3><a name='sphere'>Spherical ROIs</a></h3>
-<p>
-These are best defined using MRView. 
-For example:
-</p>
-<pre>
-> <b><a href='../commands/mrview.html'>mrview</a> anat.mif</b>
-</pre>
-<p>
-Set MRView to display cross-hairs on the current focus, using the 'View->Show Focus' menu:
-</p>
-<img src=focus.png>
-<p>
-Place the cross-hairs in the desired seed location, and read off the real-world
-position from the statusbar, as shown below:
-</p>
-<img src=position.png>
-<p>
-The ROI can then be specified using this position, along with its desired
-radius. For convenience, the position can be dropped directly onto the
-command-line using drag & drop from the statusbar.
-</p>
-
-<h3><a name='mask'>Mask ROIs</a></h3>
-<p>
-Regions of interest can also be specified in the form of mask images. 
-In this case, the set of voxels with intensities greater than 0.5 constitutes the ROI.
-The 'ROI analysis' of MRView can be used to define such ROIs (see <a href='../general/mrview.html#roi'>ROI analysis</a> for details). 
-
-
-
-<table class=nav>
-  <tr>
-    <td><a href="preprocess.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="tracking.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-</body>
-</html>
-
-
diff --git a/src/doc/tractography/tdi.png b/src/doc/tractography/tdi.png
deleted file mode 100644
index 3aef53a..0000000
Binary files a/src/doc/tractography/tdi.png and /dev/null differ
diff --git a/src/doc/tractography/tracking.html b/src/doc/tractography/tracking.html
deleted file mode 100644
index 890a787..0000000
--- a/src/doc/tractography/tracking.html
+++ /dev/null
@@ -1,164 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
-<title>MRtrix #VERSION# documentation</title>
-<link rel="stylesheet" href="../stylesheet.css" type="text/css" media=screen>
-</head>
-<body>
-
-<table class=nav>
-  <tr>
-    <td><a href="roi.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th>Performing fibre-tracking</th>
-    <td><a href="../faq.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<h2><a name='example'>A simple example using the diffusion tensor</a></h2>
-<p>
-To illustrate the command syntax, we start with a very simple example of tensor-based fibre-tracking
-(see e.g. <a href='../appendix/refs.html#mori'>Mori & van Zijl, 2002</a> for a review):
-</p>
-<pre>
-> <b><a href='../commands/streamtrack.html'>streamtrack</a> DT_STREAM dwi.mif -seed -5.3,17,-30.7,3 -mask mask.mif cst_dt.tck</b>
-     122 generated,      100 selected    [100%]
-</pre>
-This generates 100 tracks (the default) using deterministic streamlines, 
-with orientations calculated using the diffusion tensor model. 
-The tracks are seeded at random from a spherical ROI position at [ -5.3 17 -30.7 ] with a 3 mm radius.
-The mask image <kbd>mask.mif</kbd> is also specified to terminate tracks as they leave the brain.
-The results are displayed below (see <a href='../general/mrview.html#tractography'>here</a> for more information on displaying results):
-</p>
-<img src=cst_dt.png>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='include'>Using a inclusion ROI</a></h2>
-<p>
-Multiple regions of interest can additionally be specified. 
-For example, an <em>inclusion</em> region can be specified to discard tracks that do not pass through it:
-</p>
-<pre>
-> <b><a href='../commands/streamtrack.html'>streamtrack</a> DT_STREAM dwi.mif -seed -5.3,17,-30.7,4 -mask mask.mif cst_dt.tck -include -28,-14,53,30</b>
-     173 generated,      100 selected    [100%]
-</pre>
-<img src=cst_dt_include.png>
-
-
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='exclude'>Using a exclusion ROI</a></h2>
-<p>
-Alternatively, an <em>exclusion</em> region can be specified to discard tracks that <strong>do</strong> pass through it:
-</p>
-<pre>
-> <b><a href='../commands/streamtrack.html'>streamtrack</a> DT_STREAM dwi.mif -seed -5.3,17,-30.7,4 -mask mask.mif cst_dt.tck -exclude 27,16,21,20</b>
-     124 generated,      100 selected    [100%]
-</pre>
-<img src=cst_dt_exclude.png>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='mask'>Using an image as a ROI</a></h2>
-<p>
-Any of these regions can also be specified as a mask image. 
-The <a href='../general/mrview.html#roi'>ROI analysis tool</a> in <a href='../general/mrview.html'>MRView</a>
-can be used to draw a specific ROI of interest, which can then be used for tracking
-(see <a href='roi.html#mask'>here</a> for details).
-For example, we generate a mask image called <kbd>seed.mif</kbd>, corresponding to both cortico-spinal tracts
-at the level of the pons:
-</p>
-<img src='cst_seed.png'>
-<p>
-It can be used as a ROI for tracking simply by specifying this image instead of the 4-component spherical ROI specification:
-</p>
-<pre>
-> <b><a href='../commands/streamtrack.html'>streamtrack</a> DT_STREAM dwi.mif -seed seed.mif -mask mask.mif cst_dt.tck</b>
-     133 generated,      100 selected    [100%]
-</pre>
-<img src='cst_dt_mask.png'>
-
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='csd'>Tracking using spherical deconvolution</a></h2>
-<p>
-To perform fibre-tracking using the orientations provided by constrained spherical deconvolution, 
-simply change the first argument to the <kbd><a href='../commands/streamtrack.html'>streamtrack</a></kbd> command to <kbd>SD_STREAM</kbd> or <kbd>SD_PROB</kbd>,
-and supply the CSD SH coefficients file instead of the DWI image.
-</p>
-<p>
-Specifying <kbd>SD_STREAM</kbd> as the tracking method will cause the program to use a deterministic fibre-tracking algorithm
-that simply follows the peaks of the fibre orientation distribution.
-</p>
-<p>
-Specifying <kbd>SD_PROB</kbd> as the tracking method will cause the program to use a probabilistic fibre-tracking algorithm 
-that uses orientations sampled from the fibre orientation distribution at each step (similar to e.g. 
-<a href='../appendix/refs.html#behrens'>Behrens <i>et al.</i>, 2003</a> and 
-<a href='../appendix/refs.html#parker'>Parker <i>et al.</i>, 2003</a>).
-</p>
-<pre>
-> <b><a href='../commands/streamtrack.html'>streamtrack</a> SD_PROB CSD8.mif -seed seed.mif -mask mask.mif cst_csd.tck</b>
-    1121 generated,     1000 selected    [100%]
-</pre>
-<img src='cst_csd.png'>
-
-
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='wholebrain'>Whole brain tracking</a></h2>
-<p>
-Whole brain tracking can be performed for example by specifying the brain mask 
-as both the seed and mask regions:
-<pre>
-> <b><a href='../commands/streamtrack.html'>streamtrack</a> SD_PROB CSD8.mif -seed mask.mif -mask mask.mif whole_brain.tck -num 5000</b>
-7311 generated,     5000 selected    [100%]
-</pre>
-<img src='whole_brain.png'>
-
-
-<p class=sep><a href="#top">top</a></p>
-<h2><a name='tdi'>Track Density Imaging</a></h2>
-<p>
-The results of whole-brain tracking can be used to generate high-resolution track-density images (<a href='../appendix/refs.html#calamante'>Calamante et al. 2010</a>):
-<pre>
-> <b><a href='../commands/tracks2prob.html'>tracks2prob</a> whole_brain.tck -vox 0.5 tdi.mif</b>
-tracks2prob: creating new template image...   - ok
-tracks2prob: mapping tracks to image...  100%
-tracks2prob: writing image...  100%
-</pre>
-<p>
-Note that to obtain good quality TDI maps, a very large number of tracks need
-to be generated (of the order of 1 million or more). See <a
-href='../appendix/refs.html#calamante'>Calamante et al. 2010</a> for details.
-For other TDI options (e.g. DEC-TDI), see the help page for <a
-href='../commands/tracks2prob.html'>tracks2prob</a>.  </p>
-<img src=tdi.png>
-
-<table class=nav>
-  <tr>
-    <td><a href="roi.html"><img src="../left.png"></a></td>
-    <td><a href="index.html"><img src="../up.png"></a></td>
-    <td><a href="../index.html"><img src="../home.png"></a></td>
-    <th><a href='#top'>top</a></th>
-    <td><a href="../faq.html"><img src="../right.png"></a></td>
-  </tr>
-</table>
-
-<p class=footer>
-Donald Tournier<br>
-MRtrix version #VERSION#<br>
-Last updated #MTIME#
-</p>
-
-</body>
-</html>
-
-
diff --git a/src/doc/tractography/whole_brain.png b/src/doc/tractography/whole_brain.png
deleted file mode 100644
index 30c4804..0000000
Binary files a/src/doc/tractography/whole_brain.png and /dev/null differ
diff --git a/src/doc/up.png b/src/doc/up.png
deleted file mode 100644
index 85b3e2a..0000000
Binary files a/src/doc/up.png and /dev/null differ
diff --git a/src/dwi/gradient.cpp b/src/dwi/gradient.cpp
index 6692a6c..ccc0cbc 100644
--- a/src/dwi/gradient.cpp
+++ b/src/dwi/gradient.cpp
@@ -85,12 +85,13 @@ namespace MR {
       dirs.allocate (dwi.size(), 2);
       for (guint i = 0; i < dwi.size(); i++) {
         double norm = Point (grad(dwi[i],0), grad(dwi[i],1), grad(dwi[i],2)).norm();
-            /*sqrt (
-            grad(dwi[i],0) * grad(dwi[i],0) + 
-            grad(dwi[i],1) * grad(dwi[i],1) + 
-            grad(dwi[i],2) * grad(dwi[i],2) );*/
+
+        double z = grad(dwi[i],2)/norm;
+        if (z >= 1.0) z = 1.0;
+        else if (z <= -1.0) z = -1.0;
+
         dirs(i,0) = atan2 (grad(dwi[i],1), grad(dwi[i],0));
-        dirs(i,1) = acos (grad(dwi[i],2)/norm);
+        dirs(i,1) = acos (z);
       }
     }
 
diff --git a/src/dwi/render_frame.cpp b/src/dwi/render_frame.cpp
index cd6b4d3..3d1bcec 100644
--- a/src/dwi/render_frame.cpp
+++ b/src/dwi/render_frame.cpp
@@ -88,6 +88,10 @@ namespace MR {
     {
       values_changed = true;
       values = new_values;
+      l0_term = NAN;
+      if (values.size()) 
+        l0_term = values[0];
+      set_normalise (normalise);
       refresh();
     }
 
@@ -157,9 +161,7 @@ namespace MR {
         glMaterialfv (GL_BACK, GL_AMBIENT_AND_DIFFUSE, v);
 
 
-        float s (scale);
-        if (normalise) s /= values[0];
-        glScalef (s, s, s); 
+        glScalef (scale, scale, scale); 
 
         renderer.draw (use_lighting, color_by_dir ? NULL : color);
 
diff --git a/src/dwi/render_frame.h b/src/dwi/render_frame.h
index ae14e2b..1626476 100644
--- a/src/dwi/render_frame.h
+++ b/src/dwi/render_frame.h
@@ -55,7 +55,16 @@ namespace MR {
         void set_hide_neg_lobes (bool yesno = true)    { hide_neg_lobes = yesno; values_changed = true; refresh(); }
         void set_color_by_dir (bool yesno = true)      { color_by_dir = yesno; refresh(); }
         void set_use_lighting (bool yesno = true)      { use_lighting = yesno; refresh(); }
-        void set_normalise (bool yesno = true)         { normalise = yesno; refresh(); }
+        void set_normalise (bool yesno = true) { 
+          normalise = yesno; 
+          if (!values.size()) return;
+          if (!finite (values[0])) return;
+          float factor = ( normalise ? 1.0 : l0_term ) / values[0];
+          for (guint n = 0; n < values.size(); ++n)
+            values[n] *= factor;
+          values_changed = true;
+          refresh(); 
+        }
         void set_LOD (int num)                         { if (lod == num) return; lod = num; lmax_or_lod_changed = true; refresh(); } 
         void set_lmax (int num)                        { if (lmax == num) return; lmax = num; lmax_or_lod_changed = true; refresh(); } 
 
@@ -70,7 +79,7 @@ namespace MR {
 
 
       protected:
-        float view_angle, distance, elevation, azimuth, line_width, scale;
+        float view_angle, distance, elevation, azimuth, line_width, scale, l0_term;
         int   lod, lmax;
         bool  show_axes, hide_neg_lobes, color_by_dir, use_lighting, lmax_or_lod_changed, values_changed, normalise;
         double old_x, old_y;
diff --git a/src/dwi/tractography/file.cpp b/src/dwi/tractography/file.cpp
index 5153613..b36c8ae 100644
--- a/src/dwi/tractography/file.cpp
+++ b/src/dwi/tractography/file.cpp
@@ -125,7 +125,7 @@ namespace MR {
           }
           if (in.eof()) {
             in.close();
-            return (true);
+            return (false);
           }
 
           if (gsl_isnan (p[0])) return (true);
@@ -187,6 +187,10 @@ namespace MR {
       {
         out.seekp (count_offset);
         out << count << "\ntotal_count: " << total_count << "\nEND\n";
+
+        if (!out.good())
+          throw Exception ("error writing to tracks file: " + Glib::strerror(errno));
+
         out.close();
       }
 
diff --git a/src/dwi/tractography/file.h b/src/dwi/tractography/file.h
index b25d2a1..594258e 100644
--- a/src/dwi/tractography/file.h
+++ b/src/dwi/tractography/file.h
@@ -78,6 +78,9 @@ namespace MR {
             out.seekp (current);
             write_next_point (tck.size() ? tck[0] : Point (GSL_NAN, GSL_NAN, GSL_NAN));
             out.seekp (end);
+
+            if (!out.good())
+              throw Exception ("error writing to tracks file: " + Glib::strerror(errno));
             
             count++;
           }
diff --git a/src/dwi/tractography/tracker/base.cpp b/src/dwi/tractography/tracker/base.cpp
index 4ea92cc..975d92e 100644
--- a/src/dwi/tractography/tracker/base.cpp
+++ b/src/dwi/tractography/tracker/base.cpp
@@ -55,7 +55,8 @@ namespace MR {
           threshold (0.1),
           num_points (0),
           no_mask_interp (false), 
-          stop_when_included (false)
+          stop_when_included (false),
+          entered_inclusion (false)
         {
           if (props["step_size"].empty()) props["step_size"] = str (step_size); step_size = to<float> (props["step_size"]); 
           if (props["threshold"].empty()) props["threshold"] = str (threshold); else threshold = to<float> (props["threshold"]); 
@@ -140,7 +141,7 @@ set_loop:
         bool Base::next () 
         {
           if (excluded) return (false);
-          if (stop_when_included && track_included()) return (false);
+          if (stop_when_included && entered_inclusion) return (false);
           if (num_points >= num_max) return (false);
           if (next_point()) return (false);
           pos += step_size * dir; 
@@ -165,12 +166,12 @@ set_loop:
           for (std::vector<Sphere>::iterator i = spheres.include.begin(); i != spheres.include.end(); ++i) 
             if (!i->included)
               if (i->contains (pos)) 
-                i->included = true;
+                i->included = entered_inclusion = true;
 
           for (std::vector<Mask>::iterator i = masks.include.begin(); i != masks.include.end(); ++i) 
             if (!i->included) 
               if (i->contains (pos)) 
-                i->included = true;
+                i->included = entered_inclusion = true;
 
           return (true);
         }
diff --git a/src/dwi/tractography/tracker/base.h b/src/dwi/tractography/tracker/base.h
index 0c65bb8..2e96c26 100644
--- a/src/dwi/tractography/tracker/base.h
+++ b/src/dwi/tractography/tracker/base.h
@@ -61,7 +61,7 @@ namespace MR {
             Base (Image::Object& source_image, Properties& properties);
             virtual ~Base ();
 
-            bool          set (const Point& seed, const Point& seed_dir = Point::Invalid) { pos = seed; num_points = 0; return (init_direction (seed_dir)); }
+            bool          set (const Point& seed, const Point& seed_dir = Point::Invalid) { pos = seed; num_points = 0; entered_inclusion = false; return (init_direction (seed_dir)); }
             void          new_seed (const Point& seed_dir, const float init_dir_tolerance_dp);
             const Point&  position () const  { return (pos); }
             const Point&  direction () const { return (dir); }
@@ -88,13 +88,15 @@ namespace MR {
 
             class Sphere {
               public:
-                Sphere (const Point& position, float radius) : p (position), r (radius), r2 (gsl_pow_2 (r)), volume (4.0*M_PI*gsl_pow_3 (r)/3.0), included (false) { }
+                Sphere (const Point& position, float radius) : 
+                  p (position), r (radius), r2 (gsl_pow_2 (r)), volume (4.0*M_PI*gsl_pow_3 (r)/3.0), included (false) { }
                 Point p;
                 float r, r2, volume;
                 bool included;
 
                 bool contains (const Point& pt) const { return (dist2 (p, pt) < r2); }
                 Point seed (Math::RNG& rng) const {
+                  if (r == 0.0) return (p);
                   Point s;
                   do { s.set (2.0*r*(rng.uniform()-0.5), 2.0*r*(rng.uniform()-0.5), 2.0*r*(rng.uniform()-0.5)); } while (s.norm2() > r2);
                   return (p+s);
@@ -106,6 +108,8 @@ namespace MR {
                 Mask (Image::Object& image, bool no_mask_interp) :
                   i (image), lower (i.dim(0), i.dim(1), i.dim(2)), upper (0.0, 0.0, 0.0), volume (0.0), included (false), no_interp (no_mask_interp) {
                     get_bounds();
+                    if (volume == 0.0) 
+                      throw Exception ("image ROI \"" + image.name() + "\" is empty");
                   }
 
                 Image::Interp i;
@@ -181,12 +185,12 @@ namespace MR {
             Point pos, dir;
             int num_points, num_max;
 
-            bool excluded, no_mask_interp, stop_when_included;
+            bool excluded, no_mask_interp, stop_when_included, entered_inclusion;
 
 
             int get_source_data (const Point& p, float* values)
             {
-              source.R (p);
+              if (source.R (p)) return true;
               for (source.set(3,0); source[3] < source.dim(3); source.inc(3)) values[source[3]] = source.value();
               return (gsl_isnan (values[0]));
             }
diff --git a/src/mrview/mode/normal.cpp b/src/mrview/mode/normal.cpp
index 7ddbd43..7d2e8e2 100644
--- a/src/mrview/mode/normal.cpp
+++ b/src/mrview/mode/normal.cpp
@@ -192,7 +192,6 @@ namespace MR {
 
             if ((event->state & MODIFIERS) == ( GDK_BUTTON1_MASK | CTRL_CMD_MASK )) {
               v.set (M[2], M[6], M[10]);
-              Point pos = pane.model_to_screen (pane.focus);
               float dx = event->x - 0.5*pane.width();
               float dy = event->y - 0.5*pane.height();
               angle = -atan2 (dy, dx);
@@ -204,7 +203,7 @@ namespace MR {
               v = x.cross (z);
               angle = ROTATION_INC * v.norm();
             }
-            else return (true);
+            else return (false);
 
             v.normalise();
             if (angle > M_PI_2) angle = M_PI_2;
diff --git a/src/mrview/sidebar/overlay.cpp b/src/mrview/sidebar/overlay.cpp
index 60d1ab6..e0c6da7 100644
--- a/src/mrview/sidebar/overlay.cpp
+++ b/src/mrview/sidebar/overlay.cpp
@@ -132,9 +132,9 @@ namespace MR {
             else {
               const GLdouble* M (pane.get_modelview());
               float matrix[] = { 
-                M[0], M[1], M[2],
-                M[4], M[5], M[6],
-                M[8], M[9], M[10]
+                float(M[0]), float(M[1]), float(M[2]),
+                float(M[4]), float(M[5]), float(M[6]),
+                float(M[8]), float(M[9]), float(M[10])
               };
               S.orientation.from_matrix (matrix);
               S.projection = 2;
@@ -284,7 +284,6 @@ namespace MR {
 
       void Overlay::OverlayList::selected_row_callback (const Gtk::TreeModel::iterator& iter)
       {
-        Gtk::TreeModel::Row row = *iter;
         parent.set_scaling ((*iter)[columns.min], (*iter)[columns.max]);
       }
 
diff --git a/src/mrview/sidebar/roi_analysis.cpp b/src/mrview/sidebar/roi_analysis.cpp
index f9fc963..95bf9ca 100644
--- a/src/mrview/sidebar/roi_analysis.cpp
+++ b/src/mrview/sidebar/roi_analysis.cpp
@@ -32,7 +32,9 @@ namespace MR {
         show_ROIs ("show ROIs"),
         roi_frame ("ROIs"), 
         transparency_frame ("opacity"), 
+        brush_size_frame ("brush size"), 
         transparency (0.0, 256, 1.0),
+        brush_size (1.0, 20.0, 1.0),
         roi_list (*this)
       { 
         show_ROIs.set_active (true);
@@ -41,6 +43,9 @@ namespace MR {
         transparency.set_value (255.0);
         transparency.set_update_policy (Gtk::UPDATE_DELAYED);
 
+        brush_size.set_draw_value (true);
+        brush_size.set_value (1.0);
+
         roi_scrolled_window.add (roi_list);
         roi_scrolled_window.set_policy (Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC);
         roi_scrolled_window.set_shadow_type (Gtk::SHADOW_IN);
@@ -48,10 +53,12 @@ namespace MR {
         roi_frame.add (roi_scrolled_window);
 
         transparency_frame.add (transparency);
+        brush_size_frame.add (brush_size);
 
         pack_start (show_ROIs, Gtk::PACK_SHRINK);
         pack_start (roi_frame);
         pack_start (transparency_frame, Gtk::PACK_SHRINK);
+        pack_start (brush_size_frame, Gtk::PACK_SHRINK);
         show_all();
 
         Window::Main->pane().activate (this);
@@ -70,8 +77,8 @@ namespace MR {
       void ROIAnalysis::draw () { if (show_ROIs.get_active()) roi_list.draw ((int) transparency.get_value()); }
       void ROIAnalysis::on_change () { Window::Main->update (this); }
 
-      bool ROIAnalysis::on_button_press (GdkEventButton* event) { return (roi_list.on_button_press (event)); }
-      bool ROIAnalysis::on_motion (GdkEventMotion* event) { return (roi_list.on_motion (event)); }
+      bool ROIAnalysis::on_button_press (GdkEventButton* event) { return (roi_list.on_button_press (event, brush_size.get_value())); }
+      bool ROIAnalysis::on_motion (GdkEventMotion* event) { return (roi_list.on_motion (event, brush_size.get_value())); }
       bool ROIAnalysis::on_button_release (GdkEventButton* event) { return (roi_list.on_button_release (event)); }
 
 
diff --git a/src/mrview/sidebar/roi_analysis.h b/src/mrview/sidebar/roi_analysis.h
index 10318b3..4f0db7f 100644
--- a/src/mrview/sidebar/roi_analysis.h
+++ b/src/mrview/sidebar/roi_analysis.h
@@ -48,8 +48,8 @@ namespace MR {
 
         protected:
           Gtk::CheckButton     show_ROIs;
-          Gtk::Frame           roi_frame, transparency_frame;
-          Gtk::HScale          transparency;
+          Gtk::Frame           roi_frame, transparency_frame, brush_size_frame;
+          Gtk::HScale          transparency, brush_size;
           Gtk::ScrolledWindow  roi_scrolled_window;
           DP_ROIList           roi_list;
 
diff --git a/src/mrview/sidebar/roi_analysis/roi_list.cpp b/src/mrview/sidebar/roi_analysis/roi_list.cpp
index 04f7a80..960c842 100644
--- a/src/mrview/sidebar/roi_analysis/roi_list.cpp
+++ b/src/mrview/sidebar/roi_analysis/roi_list.cpp
@@ -114,9 +114,9 @@ namespace MR {
             if (transforms_differ) {
               const GLdouble* M (pane.get_modelview());
               float matrix[] = { 
-                M[0], M[1], M[2],
-                M[4], M[5], M[6],
-                M[8], M[9], M[10]
+                float(M[0]), float(M[1]), float(M[2]),
+                float(M[4]), float(M[5]), float(M[6]),
+                float(M[8]), float(M[9]), float(M[10])
               };
               S.orientation.from_matrix (matrix);
               S.projection = 2;
@@ -193,7 +193,11 @@ namespace MR {
           Gtk::TreeModel::iterator iter = get_selection()->get_selected();
           RefPtr<ROI> roi = (*iter)[columns.roi];
           Gdk::Color colour (dialog.get_colorsel()->get_current_color());
-          GLubyte C[] = { colour.get_red() >> 8, colour.get_green() >> 8, colour.get_blue() >> 8 };
+          GLubyte C[] = { 
+            GLubyte (colour.get_red() >> 8),
+            GLubyte (colour.get_green() >> 8),
+            GLubyte (colour.get_blue() >> 8)
+          };
           roi->colour = C[0] << 24 | C[1] << 16 | C[2] << 8 | 255;
           Glib::RefPtr<Gdk::Pixbuf> pix = (*iter)[columns.pix];
           pix->fill (roi->colour);
@@ -285,7 +289,7 @@ namespace MR {
 
       void DP_ROIList::on_tick (const String& path) { Window::Main->update (&parent); }
       
-      bool DP_ROIList::on_button_press (GdkEventButton* event) 
+      bool DP_ROIList::on_button_press (GdkEventButton* event, float brush) 
       {
         Gtk::TreeModel::iterator iter = get_selection()->get_selected();
         if (!iter) return (false);
@@ -300,7 +304,7 @@ namespace MR {
         set = state == GDK_SHIFT_MASK;
         editing = true;
 
-        process (event->x, event->y);
+        process (event->x, event->y, brush);
         return (true);
       }
 
@@ -310,17 +314,26 @@ namespace MR {
 
 
 
-      void DP_ROIList::process (gdouble x, gdouble y)
+      void DP_ROIList::process (gdouble x, gdouble y, float brush)
       {
         RefPtr<ROI> roi = row[columns.roi];
         Point pos (roi->mask->interp->R2P (position (x, y)));
         MR::Image::Position ima (*roi->mask->image);
-        ima.set (0, round (pos[0]));
-        ima.set (1, round (pos[1]));
-        ima.set (2, round (pos[2]));
-        if (ima[0] < 0 || ima[0] >= ima.dim(0) || ima[1] < 0 || ima[1] >= ima.dim(1) || ima[2] < 0 || ima[2] >= ima.dim(2)) return;
+        int p[] = { round (pos[0]), round(pos[1]), round(pos[2]) };
+        int e = ceil(brush/2.0);
+        float dist = (brush*brush)/4.0;
+        for (ima.set (2, p[2]-e); ima[2] <= p[2]+e; ima.inc(2)) {
+          if (ima[2] < 0 || ima[2] >= ima.dim(2)) continue;
+          for (ima.set (1, p[1]-e); ima[1] <= p[1]+e; ima.inc(1)) {
+            if (ima[1] < 0 || ima[1] >= ima.dim(1)) continue;
+            for (ima.set (0, p[0]-e); ima[0] <= p[0]+e; ima.inc(0)) {
+              if (ima[0] < 0 || ima[0] >= ima.dim(0)) continue;
+              if ((ima[0]-p[0])*(ima[0]-p[0]) + (ima[1]-p[1])*(ima[1]-p[1]) + (ima[2]-p[2])*(ima[2]-p[2]) < dist)
+                ima.value (set ? 1.0 : 0.0);
+            }
+          }
+        }
 
-        ima.value (set ? 1.0 : 0.0);
         Window::Main->update (&parent);
       }
 
diff --git a/src/mrview/sidebar/roi_analysis/roi_list.h b/src/mrview/sidebar/roi_analysis/roi_list.h
index 6f9778b..2b388fd 100644
--- a/src/mrview/sidebar/roi_analysis/roi_list.h
+++ b/src/mrview/sidebar/roi_analysis/roi_list.h
@@ -43,8 +43,8 @@ namespace MR {
           virtual ~DP_ROIList();
 
           void draw (int transparency);
-          bool on_button_press (GdkEventButton* event);
-          bool on_motion (GdkEventMotion* event) { if (editing) { process (event->x, event->y); return (true); } return (false); };
+          bool on_button_press (GdkEventButton* event, float brush);
+          bool on_motion (GdkEventMotion* event, float brush) { if (editing) { process (event->x, event->y, brush); return (true); } return (false); };
           bool on_button_release (GdkEventButton* event) { if (editing) { editing = false; return (true); } return (false); }
 
         protected:
@@ -82,7 +82,7 @@ namespace MR {
           void on_clear ();
           void on_tick (const String& path);
 
-          void process (gdouble x, gdouble y);
+          void process (gdouble x, gdouble y, float brush);
           Point position (gdouble x, gdouble y);
 
           void load (RefPtr<MR::Image::Object> image);
diff --git a/src/mrview/sidebar/tractography/track_list.cpp b/src/mrview/sidebar/tractography/track_list.cpp
index e543525..34286ba 100644
--- a/src/mrview/sidebar/tractography/track_list.cpp
+++ b/src/mrview/sidebar/tractography/track_list.cpp
@@ -398,7 +398,11 @@ namespace MR {
         Gtk::ColorSelectionDialog dialog ("Choose colour for ROI");
         if (dialog.run() == Gtk::RESPONSE_OK) {
           Gdk::Color colour (dialog.get_colorsel()->get_current_color());
-          GLubyte C[] = { colour.get_red() >> 8, colour.get_green() >> 8, colour.get_blue() >> 8 };
+          GLubyte C[] = { 
+            GLubyte(colour.get_red() >> 8),
+            GLubyte(colour.get_green() >> 8), 
+            GLubyte(colour.get_blue() >> 8)
+          };
           std::list<Gtk::TreeModel::Path> paths = get_selection()->get_selected_rows();
           for (std::list<Gtk::TreeModel::Path>::iterator i = paths.begin(); i != paths.end(); ++i) {
             Gtk::TreeModel::iterator iter = model->get_iter (*i);
diff --git a/src/mrview/slice.cpp b/src/mrview/slice.cpp
index b0c240b..39bf499 100644
--- a/src/mrview/slice.cpp
+++ b/src/mrview/slice.cpp
@@ -24,10 +24,10 @@
 
 */
 
-#include "mrview/slice.h"
 #include "mrview/pane.h"
 #include "mrview/window.h"
 #include "mrview/colourmap.h"
+#include "mrview/slice.h"
 
 namespace MR {
   namespace Viewer {
diff --git a/src/mrview/slice.h b/src/mrview/slice.h
index aead49b..8b2d576 100644
--- a/src/mrview/slice.h
+++ b/src/mrview/slice.h
@@ -30,6 +30,10 @@
 #include "mrview/image.h"
 #include "mrview/scaling.h"
 
+// required on Windows:
+#ifdef RGB
+# undef RGB
+#endif
 
 namespace MR {
   namespace Viewer {
diff --git a/src/mrview/window.cpp b/src/mrview/window.cpp
index b1d50d7..b07e0a4 100644
--- a/src/mrview/window.cpp
+++ b/src/mrview/window.cpp
@@ -510,9 +510,9 @@ namespace MR {
       else { 
         const Math::Matrix &M (S.image->image->I2R());
         float matrix[] = { 
-          -M(0,0), M(0,1), -M(0,2),
-          -M(1,0), M(1,1), -M(1,2),
-          -M(2,0), M(2,1), -M(2,2)
+          float(-M(0,0)), float(M(0,1)), float(-M(0,2)),
+          float(-M(1,0)), float(M(1,1)), float(-M(1,2)),
+          float(-M(2,0)), float(M(2,1)), float(-M(2,2))
         };
         S.orientation.from_matrix (matrix);
       }
@@ -547,9 +547,9 @@ namespace MR {
       if (S.orientation) { 
         const Math::Matrix &M (S.image->image->I2R());
         float matrix[] = { 
-          -M(0,0), M(0,1), -M(0,2),
-          -M(1,0), M(1,1), -M(1,2),
-          -M(2,0), M(2,1), -M(2,2)
+          float(-M(0,0)), float(M(0,1)), float(-M(0,2)),
+          float(-M(1,0)), float(M(1,1)), float(-M(1,2)),
+          float(-M(2,0)), float(M(2,1)), float(-M(2,2))
         };
         S.orientation.from_matrix (matrix);
       }
diff --git a/sysconf/darwin.py b/sysconf/darwin.py
index b4f153b..a675462 100644
--- a/sysconf/darwin.py
+++ b/sysconf/darwin.py
@@ -8,16 +8,16 @@ lib_suffix = '.dylib'
 cpp = [ 'g++', '-c', '$flags$', '$gtk$', '$path$', '$src$', '-o', '$obj$' ]
 cpp_flags = [ '-Wall', '-mtune=native', '-fPIC', '-fno-strict-aliasing', '-DGL_GLEXT_PROTOTYPES', '-DUSE_TR1' ]
 
-ld = [ 'g++', '$flags$', '$path$', '$obj$', '$mrtrix$', '$gsl$', '$gtk$', '-o', '$bin$' ]
+ld = [ 'g++', '$flags$', '$path$', '$obj$', '$mrtrix$', '$gsl$', '$gtk$', '$lz$', '-o', '$bin$' ]
 ld_flags = []
 ld_flags_lib_prefix = '-l'
 
 ld_lib = [ 'g++', '-shared', '$flags$', '$obj$', '-o', '$lib$' ]
 ld_lib_flags = []
 
-# look for FINK dependencies, and act accordingly if found:
-fink_dir = [ '/sw64', '/sw' ]
-for entry in fink_dir:
+# look for MacPorts or FINK dependencies, and act accordingly if found:
+dep_dir = [ '/opt/local', '/sw64', '/sw' ]
+for entry in dep_dir:
   if os.path.isdir (entry):
     cpp_flags += [ '-I' + entry + '/include' ]
     ld_flags += [ '-L' + entry + '/lib' ]
@@ -45,6 +45,8 @@ ld_flags_gl = []
 pkgconfig = [ 'pkg-config' ]
 pkgconfig_env = None
 
+ld_flags_zlib = [ '-lz' ]
+
 default_installto = '/usr/local/mrtrix'
 default_linkto = '/usr/local'
 
diff --git a/sysconf/linux.py b/sysconf/linux.py
index fdbc171..bdc3172 100644
--- a/sysconf/linux.py
+++ b/sysconf/linux.py
@@ -8,7 +8,7 @@ lib_suffix = '.so'
 cpp = [ 'g++', '-c', '$flags$', '$gtk$', '$path$', '$src$', '-o', '$obj$' ]
 cpp_flags = [ '-Wall', '-march=native', '-fPIC', '-fno-strict-aliasing', '-DGL_GLEXT_PROTOTYPES', '-DUSE_TR1' ]
 
-ld = [ 'g++', '$flags$', '$path$', '$obj$', '$mrtrix$', '$gsl$', '$gtk$', '-o', '$bin$' ]
+ld = [ 'g++', '$flags$', '$path$', '$obj$', '$mrtrix$', '$gsl$', '$gtk$', '$lz$', '-o', '$bin$' ]
 ld_flags = []
 ld_flags_lib_prefix = '-l'
 
@@ -36,6 +36,7 @@ ld_flags_gl = []
 pkgconfig = [ 'pkg-config' ]
 pkgconfig_env = None
 
+ld_flags_zlib = [ '-lz' ]
 
 default_installto = '/opt/mrtrix'
 default_linkto = '/usr'
diff --git a/sysconf/windows.py b/sysconf/windows.py
index 9f9cdcb..931ef31 100644
--- a/sysconf/windows.py
+++ b/sysconf/windows.py
@@ -6,15 +6,16 @@ lib_prefix = ''
 lib_suffix = '.dll'
 
 cpp = [ 'g++', '-c', '$flags$', '$gtk$', '$path$', '$src$', '-o', '$obj$' ]
-cpp_flags = [ '-Wall', '-march=i686', '-fno-strict-aliasing', '-DGL_GLEXT_PROTOTYPES', '-mno-cygwin', '-mms-bitfields' ]
+cpp_flags = [ '-Wall', '-march=i686', '-fno-strict-aliasing', '-DGL_GLEXT_PROTOTYPES', '-DUSE_TR1' ]
+
 windres = [ 'windres' ]
 
-ld = [ 'g++', '--no-undefined', '--enable-runtime-pseudo-reloc', '$flags$', '$obj$', '$path$', '$gsl$', '$gtk$', '$mrtrix$', '-o', '$bin$' ]
-ld_flags = [ '-mno-cygwin' ]
+ld = [ 'g++', '$flags$', '$path$', '$obj$', '$mrtrix$', '$gsl$', '$gtk$', '$lz$', '-o', '$bin$' ]
+ld_flags = []
 ld_flags_lib_prefix = '-l'
 
-ld_lib = [ 'g++', '--no-undefined', '--enable-runtime-pseudo-reloc', '-shared', '$flags$', '$obj$', '-o', '$lib$' ]
-ld_lib_flags = [ '-mno-cygwin' ]
+ld_lib = [ 'g++', '-shared', '$flags$', '$obj$', '-o', '$lib$' ]
+ld_lib_flags = []
 
 cpp_flags_debug = cpp_flags + [ '-g' ]
 ld_flags_debug = ld_flags + [ '-g' ]
@@ -28,11 +29,14 @@ cpp_flags += [ '-O2' ]
 
 cpp_flags_release = cpp_flags + [ '-DNDEBUG' ]
 
-cpp_flags_gsl = [ '-IC:\dev\include', '-DGSL_DLL' ]
+cpp_flags_gsl = [ '-IC:/MinGW/msys/1.0/local/include', '-DGSL_DLL' ] 
 ld_flags_gsl = [ '-lgsl', '-lgslcblas' ]
-ld_flags_gl = [ '-lopengl32', '-lglu32' ]
+ld_flags_gl = [ '-lglu32' ]
 pkgconfig = [ 'pkg-config' ]
 pkgconfig_env = None
 
+ld_flags_zlib = [ '-lz' ]
 
+default_installto = ''
+default_linkto = ''
 

-- 
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/mrtrix.git



More information about the Debian-med-packaging mailing list