diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000000..39a6bd9a37
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,48 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: "[command]: [bug report title]"
+labels: bug
+assignees: ''
+
+---
+
+Please use this form for *bug reports only*; for installation problems, and general questions and support, please consult the [community forum](http://community.mrtrix.org/search?expanded=true).
+
+**Describe the bug**
+
+A clear and concise description of what the bug is; including if appropriate
+how the observed behaviour differs from that expected.
+
+**To Reproduce**
+
+Steps to reproduce the behaviour.
+
+If the issue is data-dependent, please consider providing a link to
+(anonymised) data to assist developers in reproducing the bug.
+
+**Platform/Environment/Version**
+
+Please provide the following information:
+
+- OS: (ubuntu: `lsb_release -a`, macOS: `sw_vers -productVersion`) [e.g. Ubuntu 16.04]
+
+- *MRtrix3* version (example: `mrinfo -version`) [ e.g. `3.0_RC3-309-g0074bc6c` ]
+
+---
+
+**Advanced debugging information (if applicable)**
+
+- In case of a critical error such as "segmentation fault", please generate
+ and report the backtrace as described [here](https://community.mrtrix.org/t/advanced-debugging-of-mrtrix3-binaries).
+
+- For issues with `mrview`, please provide:
+
+ - Information about the Qt version; one of the following:
+
+ - `grep "Qt:" $(dirname $(which mrview))/../config`
+
+ - Open `mrview` --> `[i]` --> About Qt
+
+ - In the case of crashes or rendering issues, the information from:
+ `mrview -exit -debug`.
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 93d20c05ea..89f556ed21 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -9,6 +9,7 @@ on:
+
jobs:
linux-clang-build:
@@ -24,7 +25,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update
- sudo apt-get install clang-8 libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev
+ sudo apt-get install clang libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev
- name: configure
run: ./configure -assert || { cat configure.log; false; }
@@ -161,7 +162,7 @@ jobs:
- name: install dependencies
run: |
sudo apt-get update
- sudo apt-get install pylint3 python3-sphinx sphinx-rtd-theme-common python3-recommonmark python3-sphinx-rtd-theme python3-pip
+ sudo apt-get install pylint python3-sphinx sphinx-rtd-theme-common python3-recommonmark python3-sphinx-rtd-theme python3-pip
pip3 install sphinx-notfound-page
@@ -180,7 +181,7 @@ jobs:
run: python3 -m sphinx -n -N -W -w sphinx.log docs/ tmp/
- name: install build dependencies
- run: sudo apt-get install clang-8 libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev
+ run: sudo apt-get install python2 clang libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev
- name: check configure with Python 2
run: python2 ./configure || { cat configure.log; false; }
diff --git a/Dockerfile b/Dockerfile
index 044581b552..ca7090a27f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,7 @@ FROM buildpack-deps:buster AS base-builder
FROM base-builder AS mrtrix3-builder
# Git commitish from which to build MRtrix3.
-ARG MRTRIX3_GIT_COMMITISH="3.0.3"
+ARG MRTRIX3_GIT_COMMITISH="3.0.4"
# Command-line arguments for `./configure`
ARG MRTRIX3_CONFIGURE_FLAGS=""
# Command-line arguments for `./build`
@@ -40,10 +40,10 @@ WORKDIR /opt/art
RUN curl -fsSL https://osf.io/73h5s/download \
| tar xz --strip-components 1
-# Download minified ANTs (2.3.4).
+# Download minified ANTs (2.3.4-2).
FROM base-builder as ants-installer
WORKDIR /opt/ants
-RUN curl -fsSL https://osf.io/3ad69/download \
+RUN curl -fsSL https://osf.io/yswa4/download \
| tar xz --strip-components 1
# Download FreeSurfer files.
@@ -51,10 +51,10 @@ FROM base-builder as freesurfer-installer
WORKDIR /opt/freesurfer
RUN curl -fsSLO https://raw.githubusercontent.com/freesurfer/freesurfer/v7.1.1/distribution/FreeSurferColorLUT.txt
-# Download minified FSL (6.0.4)
+# Download minified FSL (6.0.4-2)
FROM base-builder as fsl-installer
WORKDIR /opt/fsl
-RUN curl -fsSL https://osf.io/dv258/download \
+RUN curl -fsSL https://osf.io/dtep4/download \
| tar xz --strip-components 1
# Build final image.
@@ -63,6 +63,7 @@ FROM base AS final
# Install runtime system dependencies.
RUN apt-get -qq update \
&& apt-get install -yq --no-install-recommends \
+ binutils \
dc \
less \
libfftw3-3 \
@@ -73,6 +74,7 @@ RUN apt-get -qq update \
libqt5core5a \
libqt5gui5 \
libqt5network5 \
+ libqt5svg5 \
libqt5widgets5 \
libquadmath0 \
libtiff5 \
@@ -96,5 +98,9 @@ ENV ANTSPATH="/opt/ants/bin" \
LD_LIBRARY_PATH="/opt/fsl/lib:$LD_LIBRARY_PATH" \
PATH="/opt/mrtrix3/bin:/opt/ants/bin:/opt/art/bin:/opt/fsl/bin:$PATH"
-WORKDIR /work
+# Fix "Singularity container cannot load libQt5Core.so.5" on CentOS 7
+RUN strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 \
+ && ldconfig \
+ && apt-get purge -yq binutils
+
CMD ["/bin/bash"]
diff --git a/Singularity b/Singularity
index fdf344c8f4..e7bf57d1fd 100644
--- a/Singularity
+++ b/Singularity
@@ -24,10 +24,10 @@ Include: apt
FSLTCLSH=/opt/fsl/bin/fsltclsh
FSLWISH=/opt/fsl/bin/fslwish
export FSLDIR FSLOUTPUTTYPE FSLMULTIFILEQUIT FSLTCLSH FSLWISH
-
+
# All
- LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/bin:/.singularity.d/libs:/usr/lib:/opt/fsl/lib:$LD_LIBRARY_PATH"
- PATH="/opt/mrtrix3/bin:/opt/ants/bin:/opt/art/bin:/opt/fsl/bin:/usr/local/cuda/bin:$PATH"
+ LD_LIBRARY_PATH="/.singularity.d/libs:/usr/lib:/opt/fsl/lib:$LD_LIBRARY_PATH"
+ PATH="/opt/mrtrix3/bin:/opt/ants/bin:/opt/art/bin:/opt/fsl/bin:$PATH"
export LD_LIBRARY_PATH PATH
%post
@@ -39,7 +39,7 @@ Include: apt
apt-get update && apt-get upgrade -y
# Runtime requirements
- apt-get update && apt-get install -y --no-install-recommends dc less libfftw3-bin liblapack3 libpng16-16 libqt5network5 libqt5widgets5 libtiff5 python3 python3-distutils zlib1g
+ apt-get update && apt-get install -y --no-install-recommends dbus dc less libfftw3-bin liblapack3 libpng16-16 libqt5network5 libqt5widgets5 libtiff5 python3 python3-distutils zlib1g
# Build requirements
apt-get update && apt-get install -y --no-install-recommends build-essential ca-certificates curl git libeigen3-dev libfftw3-dev libgl1-mesa-dev libpng-dev libqt5opengl5-dev libqt5svg5-dev libtiff5-dev qt5-qmake qtbase5-dev-tools wget zlib1g-dev
@@ -47,22 +47,25 @@ Include: apt
# Neuroimaging software / data dependencies
# Download minified ART ACPCdetect (V2.0).
mkdir -p /opt/art && curl -fsSL https://osf.io/73h5s/download | tar xz -C /opt/art --strip-components 1
- # Download minified ANTs (2.3.4).
- mkdir -p /opt/ants && curl -fsSL https://osf.io/3ad69/download | tar xz -C /opt/ants --strip-components 1
+ # Download minified ANTs (2.3.4-2).
+ mkdir -p /opt/ants && curl -fsSL https://osf.io/yswa4/download | tar xz -C /opt/ants --strip-components 1
# Download FreeSurfer lookup table file (v7.1.1).
mkdir -p /opt/freesurfer && curl -fsSL -o /opt/freesurfer/FreeSurferColorLUT.txt https://raw.githubusercontent.com/freesurfer/freesurfer/v7.1.1/distribution/FreeSurferColorLUT.txt
- # Download minified FSL (6.0.4).
- mkdir -p /opt/fsl && curl -fsSL https://osf.io/dv258/download | tar xz -C /opt/fsl --strip-components 1
+ # Download minified FSL (6.0.4-2).
+ mkdir -p /opt/fsl && curl -fsSL https://osf.io/dtep4/download | tar xz -C /opt/fsl --strip-components 1
# Use Python3 for anything requesting Python, since Python2 is not installed
ln -s /usr/bin/python3 /usr/bin/python
# MRtrix3 setup
- git clone -b 3.0.3 --depth 1 https://github.com/MRtrix3/mrtrix3.git /opt/mrtrix3
+ git clone -b 3.0.4 --depth 1 https://github.com/MRtrix3/mrtrix3.git /opt/mrtrix3
cd /opt/mrtrix3 && ./configure && ./build -persistent -nopaginate && rm -rf testing/ tmp/ && cd ../../
# apt cleanup to recover as much space as possible
- apt-get remove -y build-essential ca-certificates curl git libeigen3-dev libfftw3-dev libgl1-mesa-dev libpng-dev libqt5opengl5-dev libqt5svg5-dev libtiff5-dev qt5-qmake qtbase5-dev-tools wget zlib1g-dev && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+ apt-get remove -y build-essential ca-certificates curl git libeigen3-dev libfftw3-dev libgl1-mesa-dev libpng-dev libqt5opengl5-dev libqt5svg5-dev libtiff5-dev qt5-qmake qtbase5-dev-tools wget zlib1g-dev && apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/*
+
+# Configure DBus to facilitate mrview execution
+ dbus-uuidgen
%runscript
- exec /usr/bin/bash -c "$@"
+ exec "$@"
diff --git a/bin/5ttgen b/bin/5ttgen
index c92e3d71c0..1da4fe4589 100755
--- a/bin/5ttgen
+++ b/bin/5ttgen
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/bin/blend b/bin/blend
index 94f871f6d0..00b0f03db7 100755
--- a/bin/blend
+++ b/bin/blend
@@ -1,6 +1,6 @@
#!/usr/bin/env python2
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,6 +15,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=consider-using-f-string
+
import os
import sys
diff --git a/bin/convert_bruker b/bin/convert_bruker
index 1fc87d321e..1a2be6aece 100755
--- a/bin/convert_bruker
+++ b/bin/convert_bruker
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,6 +15,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
+
import sys, os.path
if len (sys.argv) != 3:
diff --git a/bin/dwi2response b/bin/dwi2response
index bb215a59a9..7a13170999 100755
--- a/bin/dwi2response
+++ b/bin/dwi2response
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -100,19 +100,20 @@ def execute(): #pylint: disable=unused-variable
app.goto_scratch_dir()
- if app.ARGS.mask:
- # Check that the brain mask is appropriate
- mask_header = image.Header('mask.mif')
- if mask_header.size()[:3] != image.Header('dwi.mif').size()[:3]:
- raise MRtrixError('Dimensions of provided mask image do not match DWI')
- if not (len(mask_header.size()) == 3 or (len(mask_header.size()) == 4 and mask_header.size()[3] == 1)):
- raise MRtrixError('Provided mask image needs to be a 3D image')
- else:
- app.console('Computing brain mask (dwi2mask)...')
- run.command('dwi2mask dwi.mif mask.mif', show=False)
-
- if not image.statistics('mask.mif', mask='mask.mif').count:
- raise MRtrixError(('Provided' if app.ARGS.mask else 'Generated') + ' mask image does not contain any voxels')
+ if alg.supports_mask():
+ if app.ARGS.mask:
+ # Check that the brain mask is appropriate
+ mask_header = image.Header('mask.mif')
+ if mask_header.size()[:3] != image.Header('dwi.mif').size()[:3]:
+ raise MRtrixError('Dimensions of provided mask image do not match DWI')
+ if not (len(mask_header.size()) == 3 or (len(mask_header.size()) == 4 and mask_header.size()[3] == 1)):
+ raise MRtrixError('Provided mask image needs to be a 3D image')
+ else:
+ app.console('Computing brain mask (dwi2mask)...')
+ run.command('dwi2mask dwi.mif mask.mif', show=False)
+
+ if not image.statistics('mask.mif', mask='mask.mif').count:
+ raise MRtrixError(('Provided' if app.ARGS.mask else 'Generated') + ' mask image does not contain any voxels')
# From here, the script splits depending on what estimation algorithm is being used
alg.execute()
diff --git a/bin/dwibiascorrect b/bin/dwibiascorrect
index c432c23acd..1e7d831de7 100755
--- a/bin/dwibiascorrect
+++ b/bin/dwibiascorrect
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/bin/dwicat b/bin/dwicat
index 305edee388..d505978203 100755
--- a/bin/dwicat
+++ b/bin/dwicat
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,9 +15,12 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
-import json
+
+import json, shutil
@@ -36,7 +39,7 @@ def usage(cmdline): #pylint: disable=unused-variable
def execute(): #pylint: disable=unused-variable
- from mrtrix3 import MRtrixError #pylint: disable=no-name-in-module, import-outside-toplevel
+ from mrtrix3 import CONFIG, MRtrixError #pylint: disable=no-name-in-module, import-outside-toplevel
from mrtrix3 import app, image, path, run #pylint: disable=no-name-in-module, import-outside-toplevel
num_inputs = len(app.ARGS.inputs)
@@ -45,13 +48,26 @@ def execute(): #pylint: disable=unused-variable
# check input data
def check_header(header):
- if len(header.size()) != 4:
- raise MRtrixError('Image "' + header.name() + '" is not a 4D image series')
+ if len(header.size()) > 4:
+ raise MRtrixError('Image "' + header.name() + '" contains more than 4 dimensions')
if not 'dw_scheme' in header.keyval():
raise MRtrixError('Image "' + header.name() + '" does not contain a gradient table')
- num_grad_lines = len(header.keyval()['dw_scheme'])
- if num_grad_lines != header.size()[3]:
- raise MRtrixError('Number of lines in gradient table for image "' + header.name() + '" (' + str(num_grad_lines) + ') does not match number of volumes (' + str(header.size()[3]) + ')')
+ dw_scheme = header.keyval()['dw_scheme']
+ try:
+ if isinstance(dw_scheme[0], list):
+ num_grad_lines = len(dw_scheme)
+ elif (isinstance(dw_scheme[0], ( int, float))) and len(dw_scheme) >= 4:
+ num_grad_lines = 1
+ else:
+ raise MRtrixError
+ except (IndexError, MRtrixError):
+ raise MRtrixError('Image "' + header.name() + '" contains gradient table of unknown format')
+ if len(header.size()) == 4:
+ num_volumes = header.size()[3]
+ if num_grad_lines != num_volumes:
+ raise MRtrixError('Number of lines in gradient table for image "' + header.name() + '" (' + str(num_grad_lines) + ') does not match number of volumes (' + str(num_volumes) + ')')
+ elif not (num_grad_lines == 1 and len(dw_scheme) >= 4 and dw_scheme[3] <= float(CONFIG.get('BZeroThreshold', 10.0))):
+ raise MRtrixError('Image "' + header.name() + '" is 3D, and cannot be validated as a b=0 volume')
first_header = image.Header(path.from_user(app.ARGS.inputs[0], False))
check_header(first_header)
@@ -87,7 +103,12 @@ def execute(): #pylint: disable=unused-variable
# extract b=0 volumes within each input series
for index in range(0, num_inputs):
- run.command('dwiextract ' + str(index) + 'in.mif ' + str(index) + 'b0.mif -bzero')
+ infile = str(index) + 'in.mif'
+ outfile = str(index) + 'b0.mif'
+ if len(image.Header(infile).size()) > 3:
+ run.command('dwiextract ' + infile + ' ' + outfile + ' -bzero')
+ else:
+ run.function(shutil.copyfile, infile, outfile)
mask_option = ' -mask_input mask.mif -mask_target mask.mif' if app.ARGS.mask else ''
diff --git a/bin/dwifslpreproc b/bin/dwifslpreproc
index bb1274ba8d..134f0492a6 100755
--- a/bin/dwifslpreproc
+++ b/bin/dwifslpreproc
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -17,6 +17,9 @@
# Script for performing DWI pre-processing using FSL 5.0 (onwards) tools eddy / topup / applytopup
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
+
import itertools, json, math, os, shutil, sys
@@ -768,7 +771,7 @@ def execute(): #pylint: disable=unused-variable
app.cleanup(se_epi_path)
se_epi_path = new_se_epi_path
new_dwi_path = os.path.splitext(dwi_path)[0] + '_pad' + str(axis) + '.mif'
- run.command('mrconvert ' + dwi_path + ' -coord ' + str(axis) + ' ' + str(axis_size-1) + ' - | mrcat ' + dwi_path + ' - ' + new_dwi_path + ' -axis ' + str(axis))
+ run.command('mrconvert ' + dwi_path + ' -coord ' + str(axis) + ' ' + str(axis_size-1) + ' -clear dw_scheme - | mrcat ' + dwi_path + ' - ' + new_dwi_path + ' -axis ' + str(axis))
app.cleanup(dwi_path)
dwi_path = new_dwi_path
dwi_post_eddy_crop_option += ' -coord ' + str(axis) + ' 0:' + str(axis_size-1)
@@ -1019,12 +1022,22 @@ def execute(): #pylint: disable=unused-variable
progress.increment()
if eddy_mporder and slice_padded:
+ app.debug('Current slice groups: ' + str(slice_groups))
+ app.debug('Slice encoding direction: ' + str(slice_encoding_direction))
# Remove padded slice from slice_groups, write new slspec
- slice_groups = [ [ index for index in group if index != dwi_num_slices-1 ] for group in slice_groups ]
- # After this removal, slspec should now be a square matrix
- assert all(len(group) == len(slice_groups[0]) for group in slice_groups[1:])
+ if sum(slice_encoding_direction) < 0:
+ slice_groups = [ [ index-1 for index in group if index ] for group in slice_groups ]
+ else:
+ slice_groups = [ [ index for index in group if index != dwi_num_slices-1 ] for group in slice_groups ]
eddyqc_slspec = 'slspec_unpad.txt'
- matrix.save_matrix(eddyqc_slspec, slice_groups, add_to_command_history=False, fmt='%d')
+ app.debug('Slice groups after removal: ' + str(slice_groups))
+ try:
+ # After this removal, slspec should now be a square matrix
+ assert all(len(group) == len(slice_groups[0]) for group in slice_groups[1:])
+ matrix.save_matrix(eddyqc_slspec, slice_groups, add_to_command_history=False, fmt='%d')
+ except AssertionError:
+ matrix.save_numeric(eddyqc_slspec, slice_groups, add_to_command_history=False, fmt='%d')
+ raise
run.command('mrconvert eddy_mask.nii eddy_mask_unpad.nii' + dwi_post_eddy_crop_option)
eddyqc_mask = 'eddy_mask_unpad.nii'
diff --git a/bin/dwigradcheck b/bin/dwigradcheck
index 47054a556f..9fea56ce30 100755
--- a/bin/dwigradcheck
+++ b/bin/dwigradcheck
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,6 +15,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-f-string
+
import copy, numbers, os, shutil, sys
diff --git a/bin/dwinormalise b/bin/dwinormalise
index 1a10301e0f..e790a6d2eb 100755
--- a/bin/dwinormalise
+++ b/bin/dwinormalise
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/bin/dwishellmath b/bin/dwishellmath
index a819b41817..974da20e5a 100755
--- a/bin/dwishellmath
+++ b/bin/dwishellmath
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,6 +15,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=consider-using-f-string
+
SUPPORTED_OPS = ['mean', 'median', 'sum', 'product', 'rms', 'norm', 'var', 'std', 'min', 'max', 'absmax', 'magmax']
diff --git a/bin/for_each b/bin/for_each
index 67f0631242..fa21080bbd 100755
--- a/bin/for_each
+++ b/bin/for_each
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -106,7 +106,6 @@ KEYLIST = [ 'IN', 'NAME', 'PRE', 'UNI' ]
def execute(): #pylint: disable=unused-variable
from mrtrix3 import ANSI, MRtrixError #pylint: disable=no-name-in-module, import-outside-toplevel
from mrtrix3 import app, run #pylint: disable=no-name-in-module, import-outside-toplevel
- global CMDSPLIT
inputs = app.ARGS.inputs
app.debug('All inputs: ' + str(inputs))
@@ -215,7 +214,6 @@ def execute(): #pylint: disable=unused-variable
progress = app.ProgressBar(progress_string(), len(jobs))
def execute_parallel():
- global shared #pylint: disable=invalid-name
while not shared.stop:
my_job = shared.next(jobs)
if not my_job:
diff --git a/bin/gen_scheme b/bin/gen_scheme
index 9a45bb4f99..ca85d4ee4d 100755
--- a/bin/gen_scheme
+++ b/bin/gen_scheme
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/bin/labelsgmfix b/bin/labelsgmfix
index 8791c8d20d..3a38ddb7b9 100755
--- a/bin/labelsgmfix
+++ b/bin/labelsgmfix
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,6 +24,9 @@
# derived from FIRST.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
+
import math, os
diff --git a/bin/mrtrix_cleanup b/bin/mrtrix_cleanup
index 7376b70d85..fcab71354d 100755
--- a/bin/mrtrix_cleanup
+++ b/bin/mrtrix_cleanup
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,6 +15,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
+
import math, os, re, shutil
diff --git a/bin/notfound b/bin/notfound
index ae1062ff69..d7e5c791b2 100755
--- a/bin/notfound
+++ b/bin/notfound
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/bin/population_template b/bin/population_template
index cf00437467..8650a1ca23 100755
--- a/bin/population_template
+++ b/bin/population_template
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -17,6 +17,9 @@
# Generates an unbiased group-average template via image registration of images to a midway space.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-f-string
+
import json, math, os, re, shutil, sys
DEFAULT_RIGID_SCALES = [0.3,0.4,0.6,0.8,1.0,1.0]
@@ -477,7 +480,7 @@ def parse_input_files(in_files, mask_files, contrasts, f_agg_weight=None, whites
inputs = []
def paths_to_file_uids(paths, prefix, postfix):
""" strip pre and postfix from filename, replace whitespace characters """
- uid_path = dict()
+ uid_path = {}
uids = []
for path in paths:
uid = re.sub(re.escape(postfix)+'$', '', re.sub('^'+re.escape(prefix), '', os.path.split(path)[1]))
@@ -1000,7 +1003,7 @@ def execute(): #pylint: disable=unused-variable
if use_masks:
progress = app.ProgressBar('Reslicing input masks to average header', len(ins))
for inp in ins:
- run.command('mrtransform ' + inp.ims_path[cid] + ' ' + inp.msk_transformed + ' ' +
+ run.command('mrtransform ' + inp.msk_path + ' ' + inp.msk_transformed + ' ' +
'-interp nearest -template ' + cns.templates[0] + ' ' +
datatype_option)
progress.increment()
diff --git a/bin/responsemean b/bin/responsemean
index 431b8eabf6..5f8d8cd80a 100755
--- a/bin/responsemean
+++ b/bin/responsemean
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/build b/build
index 0cd6c16bb5..a36441cfb6 100755
--- a/build
+++ b/build
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -17,6 +17,9 @@
# pylint: disable=redefined-outer-name,invalid-name
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-dict-items,unused-variable,consider-using-f-string
+
usage_string = '''
USAGE
@@ -146,11 +149,13 @@ targets = []
todo, headers, object_deps, file_flags = {}, {}, {}, {}
+formatstr=''
lock = threading.Lock()
print_lock = threading.Lock()
+index_lock = threading.Lock()
stop = False
error_stream = None
-main_cindex = 0
+todo_index = 0
logfile = open ('build.log', 'wb') #pylint: disable=consider-using-with
timingfile = None
@@ -195,7 +200,6 @@ def colorize(s):
def pipe_errors_to_less_handler():
- global error_stream
if error_stream:
with tempfile.NamedTemporaryFile() as tf:
tf.write (colorize(error_stream).encode (errors='ignore'))
@@ -535,7 +539,8 @@ cpp = cpp_flags = ld = ld_flags = ld_lib = ld_lib_flags = eigen_cflags = qt_cfla
try:
log ('reading configuration from "' + config_file + '"...' + os.linesep)
- exec (codecs.open (config_file, mode='r', encoding='utf-8').read()) # pylint: disable=exec-used
+ with codecs.open (config_file, mode='r', encoding='utf-8') as f:
+ exec (f.read()) # pylint: disable=exec-used
except IOError:
fail ('''no configuration file found!
please run "./configure" prior to invoking this script
@@ -685,9 +690,16 @@ for filepath in list_unexpected_bin_files(exe_suffix):
class TargetException (Exception):
pass
+
+def next_index ():
+ global todo_index
+ with index_lock:
+ todo_index+=1
+ return todo_index
+
+
class Entry(object):
def __init__ (self, name):
- global todo
name = os.path.normpath (name)
if name in todo:
return
@@ -724,7 +736,7 @@ class Entry(object):
- def execute (self, cindex, formatstr):
+ def execute (self):
folder = os.path.dirname (self.name)
try:
os.makedirs (folder)
@@ -741,7 +753,7 @@ class Entry(object):
fd.write ('' + entry + '\n')
fd.write ('\n\n')
if self.cmd:
- return execute (formatstr.format (cindex, self.action, self.name), self.cmd)
+ return execute (formatstr.format (next_index(), self.action, self.name), self.cmd)
return None
@@ -992,10 +1004,9 @@ def is_GUI_target (current_file):
def list_headers (current_file):
- global headers, file_flags
current_file = os.path.normpath (current_file)
- if current_file not in headers.keys():
+ if current_file not in headers:
headers[current_file] = set()
if current_file not in file_flags:
@@ -1041,10 +1052,9 @@ def list_headers (current_file):
def list_cmd_deps (file_cc):
- global object_deps, file_flags
file_cc = os.path.normpath (file_cc)
- if file_cc not in object_deps.keys():
+ if file_cc not in object_deps:
object_deps[file_cc] = set([ modify_path (file_cc, tmp=True, strip=cpp_suffix, add=obj_suffix) ])
for entry in list_headers (file_cc):
if os.path.abspath(entry).startswith(os.path.abspath(lib_dir)):
@@ -1080,25 +1090,21 @@ def list_lib_deps ():
def build_next ():
- global todo, lock, stop, main_cindex
- total_count = len(todo)
- cindex = 0
- formatstr = '({:>'+str(len(str(total_count)))+'}/'+str(total_count)+') [{}] {}'
+ global stop, formatstr
+ formatstr = '({:>'+str(len(str(initial_num_todo)))+'}/'+str(initial_num_todo)+') [{}] {}'
try:
while not stop:
current = None
with lock:
if todo:
- for item in todo:
- if todo[item].currently_being_processed:
+ for name,entry in todo.items():
+ if entry.currently_being_processed:
continue
- unsatisfied_deps = set(todo[item].deps).intersection (todo.keys())
+ unsatisfied_deps = set(entry.deps).intersection (todo.keys())
if not unsatisfied_deps:
- todo[item].currently_being_processed = True
- current = item
- main_cindex+=1
- cindex = main_cindex
+ entry.currently_being_processed = True
+ current = name
break
else:
stop = max (stop, 1)
@@ -1110,7 +1116,7 @@ def build_next ():
continue
target = todo[current]
- if target.execute(cindex, formatstr):
+ if target.execute():
target.currently_being_processed = False
stop = 2
return
@@ -1118,7 +1124,8 @@ def build_next ():
with lock:
del todo[current]
- except Exception:
+ except Exception as excp:
+ disp (str(excp))
stop = 2
return
@@ -1392,19 +1399,8 @@ except TargetException as excp:
# for nogui config, remove GUI elements from targets and todo list:
if nogui:
- nogui_targets = []
- for entry in targets:
- if not is_GUI_target (entry):
- nogui_targets.append (entry)
- targets = nogui_targets
-
- nogui_todo = {}
- for item in todo:
- if not is_GUI_target (todo[item].name):
- nogui_todo[item] = todo[item]
- todo = nogui_todo
-
-
+ targets = [ entry for entry in targets if not is_GUI_target (entry) ]
+ todo = { name:entry for name, entry in todo.items() if not is_GUI_target (name) }
@@ -1428,11 +1424,10 @@ Printing dependencies for all files:
todo[entry].display()
sys.exit (0)
-todo_tmp = {}
-for item in todo:
- if todo[item].action != '--' and todo[item].need_rebuild():
- todo_tmp[item] = todo[item]
-todo = todo_tmp
+
+
+# remove todo items that don't need rebuild:
+todo = { name:entry for name, entry in todo.items() if entry.action != '--' and entry.need_rebuild() }
log ('TODO list contains ' + str(len(todo)) + ''' items
@@ -1448,18 +1443,19 @@ except (KeyError, TypeError):
num_processors = os.sysconf('SC_NPROCESSORS_ONLN')
except ValueError:
num_processors = 1
+log ('''
-while todo:
+Build will use ''' + str(num_processors) + ''' threads
- stop = False
- main_cindex = 0
- num_todo_previous = len(todo)
+''')
- log ('''
- launching ''' + str(num_processors) + ''' threads
+while todo:
- ''')
+ stop = False
+ num_todo_previous = len(todo)
+ initial_num_todo = len(todo)
+ todo_index = 0
threads = []
for i in range (1, num_processors): # pylint: disable=unused-variable
diff --git a/check_syntax b/check_syntax
index 7426b944c3..55bf279749 100755
--- a/check_syntax
+++ b/check_syntax
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/5tt2gmwmi.cpp b/cmd/5tt2gmwmi.cpp
index 5db0af21d3..8011197815 100644
--- a/cmd/5tt2gmwmi.cpp
+++ b/cmd/5tt2gmwmi.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/5tt2vis.cpp b/cmd/5tt2vis.cpp
index 2ea2b38295..69be87b38a 100644
--- a/cmd/5tt2vis.cpp
+++ b/cmd/5tt2vis.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/5ttcheck.cpp b/cmd/5ttcheck.cpp
index 0641d10d78..b7a780b2e4 100644
--- a/cmd/5ttcheck.cpp
+++ b/cmd/5ttcheck.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/5ttedit.cpp b/cmd/5ttedit.cpp
index 92e4c26e36..07109d320b 100644
--- a/cmd/5ttedit.cpp
+++ b/cmd/5ttedit.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/afdconnectivity.cpp b/cmd/afdconnectivity.cpp
index 1902d7a0d9..9dd43d9daa 100644
--- a/cmd/afdconnectivity.cpp
+++ b/cmd/afdconnectivity.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/amp2response.cpp b/cmd/amp2response.cpp
index 8aca8cd8b3..7c326932d7 100644
--- a/cmd/amp2response.cpp
+++ b/cmd/amp2response.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -82,7 +82,7 @@ void usage ()
-Eigen::Matrix gen_rotation_matrix (const Eigen::Vector3& dir)
+Eigen::Matrix gen_rotation_matrix (const Eigen::Vector3d& dir)
{
static Math::RNG::Normal rng;
// Generates a matrix that will rotate a unit vector into a new frame of reference,
@@ -91,11 +91,11 @@ Eigen::Matrix gen_rotation_matrix (const Eigen::Vector3& dir
// Here the other two axes are determined at random (but both are orthogonal to the FOD peak direction)
Eigen::Matrix R;
R (2, 0) = dir[0]; R (2, 1) = dir[1]; R (2, 2) = dir[2];
- Eigen::Vector3 vec2 (rng(), rng(), rng());
+ Eigen::Vector3d vec2 (rng(), rng(), rng());
vec2 = dir.cross (vec2);
vec2.normalize();
R (0, 0) = vec2[0]; R (0, 1) = vec2[1]; R (0, 2) = vec2[2];
- Eigen::Vector3 vec3 = dir.cross (vec2);
+ Eigen::Vector3d vec3 = dir.cross (vec2);
vec3.normalize();
R (1, 0) = vec3[0]; R (1, 1) = vec3[1]; R (1, 2) = vec3[2];
return R;
@@ -155,7 +155,7 @@ class Accumulator { MEMALIGN(Accumulator)
++count;
// Grab the fibre direction
- Eigen::Vector3 fibre_dir;
+ Eigen::Vector3d fibre_dir;
for (dir_image.index(3) = 0; dir_image.index(3) != 3; ++dir_image.index(3))
fibre_dir[dir_image.index(3)] = dir_image.value();
fibre_dir.normalize();
diff --git a/cmd/amp2sh.cpp b/cmd/amp2sh.cpp
index d7bd5c0c20..f1b5aa7ef2 100644
--- a/cmd/amp2sh.cpp
+++ b/cmd/amp2sh.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/connectome2tck.cpp b/cmd/connectome2tck.cpp
index 0539f07a35..d59c069958 100644
--- a/cmd/connectome2tck.cpp
+++ b/cmd/connectome2tck.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/connectomeedit.cpp b/cmd/connectomeedit.cpp
index 87a499784d..afddebeed8 100644
--- a/cmd/connectomeedit.cpp
+++ b/cmd/connectomeedit.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/connectomestats.cpp b/cmd/connectomestats.cpp
index d74b1f9042..688bce6d84 100644
--- a/cmd/connectomestats.cpp
+++ b/cmd/connectomestats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -271,7 +271,7 @@ void run()
++progress;
}
}
- const bool nans_in_data = data.allFinite();
+ const bool nans_in_data = !data.allFinite();
// Only add contrast matrix row number to image outputs if there's more than one hypothesis
auto postfix = [&] (const size_t i) { return (num_hypotheses > 1) ? ("_" + hypotheses[i].name()) : ""; };
@@ -293,24 +293,24 @@ void run()
}
for (size_t i = 0; i != num_hypotheses; ++i) {
if (!hypotheses[i].is_F()) {
- save_matrix (mat2vec.V2M (abs_effect_size.col(i)), "abs_effect" + postfix(i) + ".csv");
+ save_matrix (mat2vec.V2M (abs_effect_size.col(i)), output_prefix + "abs_effect" + postfix(i) + ".csv");
++progress;
if (num_vgs == 1)
- save_matrix (mat2vec.V2M (std_effect_size.col(i)), "std_effect" + postfix(i) + ".csv");
+ save_matrix (mat2vec.V2M (std_effect_size.col(i)), output_prefix + "std_effect" + postfix(i) + ".csv");
} else {
++progress;
}
++progress;
}
if (nans_in_data || extra_columns.size()) {
- save_matrix (mat2vec.V2M (cond), "cond.csv");
+ save_matrix (mat2vec.V2M (cond), output_prefix + "cond.csv");
++progress;
}
if (num_vgs == 1) {
- save_matrix (mat2vec.V2M (stdev.row(0)), "std_dev.csv");
+ save_matrix (mat2vec.V2M (stdev.row(0)), output_prefix + "std_dev.csv");
} else {
for (size_t i = 0; i != num_vgs; ++i) {
- save_matrix (mat2vec.V2M (stdev.row(i)), "std_dev" + str(i) + ".csv");
+ save_matrix (mat2vec.V2M (stdev.row(i)), output_prefix + "std_dev" + str(i) + ".csv");
++progress;
}
}
@@ -369,7 +369,7 @@ void run()
const matrix_type pvalue_output = MR::Math::Stats::fwe_pvalue (null_distribution, default_enhanced);
for (size_t i = 0; i != num_hypotheses; ++i) {
save_matrix (mat2vec.V2M (pvalue_output.col(i)), output_prefix + "fwe_1mpvalue" + postfix(i) + ".csv");
- save_matrix (mat2vec.V2M (uncorrected_pvalues.col(i)), output_prefix + "uncorrected_pvalue" + postfix(i) + ".csv");
+ save_matrix (mat2vec.V2M (uncorrected_pvalues.col(i)), output_prefix + "uncorrected_1mpvalue" + postfix(i) + ".csv");
save_matrix (mat2vec.V2M (null_contributions.col(i)), output_prefix + "null_contributions" + postfix(i) + ".csv");
}
diff --git a/cmd/dcmedit.cpp b/cmd/dcmedit.cpp
index fb9d276ac3..adba9cdac8 100644
--- a/cmd/dcmedit.cpp
+++ b/cmd/dcmedit.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dcminfo.cpp b/cmd/dcminfo.cpp
index 0b35d0eb7b..3df2874667 100644
--- a/cmd/dcminfo.cpp
+++ b/cmd/dcminfo.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dirflip.cpp b/cmd/dirflip.cpp
index 810e48a5bc..a2b309fda2 100644
--- a/cmd/dirflip.cpp
+++ b/cmd/dirflip.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dirgen.cpp b/cmd/dirgen.cpp
index 49e214ed90..2a96c1bf7e 100644
--- a/cmd/dirgen.cpp
+++ b/cmd/dirgen.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dirmerge.cpp b/cmd/dirmerge.cpp
index c7451fb1c3..225c4b8aaa 100644
--- a/cmd/dirmerge.cpp
+++ b/cmd/dirmerge.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dirorder.cpp b/cmd/dirorder.cpp
index 45072745e2..3c381daa5e 100644
--- a/cmd/dirorder.cpp
+++ b/cmd/dirorder.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dirsplit.cpp b/cmd/dirsplit.cpp
index 4edd247cd6..ce5bcc64d6 100644
--- a/cmd/dirsplit.cpp
+++ b/cmd/dirsplit.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dirstat.cpp b/cmd/dirstat.cpp
index 7fd7fa5811..cff0d31a0c 100644
--- a/cmd/dirstat.cpp
+++ b/cmd/dirstat.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dwi2adc.cpp b/cmd/dwi2adc.cpp
index a6843173fa..7f3b4cc8ab 100644
--- a/cmd/dwi2adc.cpp
+++ b/cmd/dwi2adc.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dwi2fod.cpp b/cmd/dwi2fod.cpp
index 0473efd34f..91d402aa49 100644
--- a/cmd/dwi2fod.cpp
+++ b/cmd/dwi2fod.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dwi2mask.cpp b/cmd/dwi2mask.cpp
index 754b7f0821..6ed7d6e156 100644
--- a/cmd/dwi2mask.cpp
+++ b/cmd/dwi2mask.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dwi2tensor.cpp b/cmd/dwi2tensor.cpp
index f81cb61d6b..aa0b517e8f 100644
--- a/cmd/dwi2tensor.cpp
+++ b/cmd/dwi2tensor.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dwidenoise.cpp b/cmd/dwidenoise.cpp
index d7c47a8256..a8c28ac58c 100644
--- a/cmd/dwidenoise.cpp
+++ b/cmd/dwidenoise.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/dwiextract.cpp b/cmd/dwiextract.cpp
index dd47ea7b48..59b2535fed 100644
--- a/cmd/dwiextract.cpp
+++ b/cmd/dwiextract.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -67,6 +67,8 @@ void usage ()
void run()
{
auto input_image = Image::open (argument[0]);
+ if (input_image.ndim() < 4)
+ throw Exception ("Epected input image to contain more than three dimensions");
auto grad = DWI::get_DW_scheme (input_image);
// Want to support non-shell-like data if it's just a straight extraction
diff --git a/cmd/fixel2peaks.cpp b/cmd/fixel2peaks.cpp
index 0719b5aed9..11abed89a2 100644
--- a/cmd/fixel2peaks.cpp
+++ b/cmd/fixel2peaks.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fixel2sh.cpp b/cmd/fixel2sh.cpp
index 4801b1fa30..c4f9e74549 100644
--- a/cmd/fixel2sh.cpp
+++ b/cmd/fixel2sh.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fixel2tsf.cpp b/cmd/fixel2tsf.cpp
index 5ec63b8019..51524b788a 100644
--- a/cmd/fixel2tsf.cpp
+++ b/cmd/fixel2tsf.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -101,7 +101,7 @@ void run ()
DWI::Tractography::TrackScalar scalars;
const Transform transform (in_index_image);
- Eigen::Vector3 voxel_pos;
+ Eigen::Vector3d voxel_pos;
while (reader (tck)) {
SetVoxelDir dixels;
diff --git a/cmd/fixel2voxel.cpp b/cmd/fixel2voxel.cpp
index 0dd1fea85a..0d6455f12a 100644
--- a/cmd/fixel2voxel.cpp
+++ b/cmd/fixel2voxel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -398,16 +398,16 @@ class DEC_unit : protected Base
void operator() (Image& index, Image& out)
{
- Eigen::Vector3 sum_dec = {0.0, 0.0, 0.0};
+ Eigen::Vector3d sum_dec = {0.0, 0.0, 0.0};
if (vol.valid()) {
for (auto f = Base::Loop (index) (data, vol, dir); f; ++f) {
if (!f.padding())
- sum_dec += Eigen::Vector3 (abs (dir.row(1)[0]), abs (dir.row(1)[1]), abs (dir.row(1)[2])) * data.value() * vol.value();
+ sum_dec += Eigen::Vector3d (abs (dir.row(1)[0]), abs (dir.row(1)[1]), abs (dir.row(1)[2])) * data.value() * vol.value();
}
} else {
for (auto f = Base::Loop (index) (data, dir); f; ++f) {
if (!f.padding())
- sum_dec += Eigen::Vector3 (abs (dir.row(1)[0]), abs (dir.row(1)[1]), abs (dir.row(1)[2])) * data.value();
+ sum_dec += Eigen::Vector3d (abs (dir.row(1)[0]), abs (dir.row(1)[1]), abs (dir.row(1)[2])) * data.value();
}
}
if ((sum_dec.array() != 0.0).any())
@@ -430,13 +430,13 @@ class DEC_scaled : protected Base
void operator() (FixelIndexType& index, Image& out)
{
- Eigen::Vector3 sum_dec = {0.0, 0.0, 0.0};
+ Eigen::Vector3d sum_dec = {0.0, 0.0, 0.0};
default_type sum_value = 0.0;
if (vol.valid()) {
default_type sum_volume = 0.0;
for (auto f = Base::Loop (index) (data, vol, dir); f; ++f) {
if (!f.padding()) {
- sum_dec += Eigen::Vector3 (abs (dir.row(1)[0]), abs (dir.row(1)[1]), abs (dir.row(1)[2])) * data.value() * vol.value();
+ sum_dec += Eigen::Vector3d (abs (dir.row(1)[0]), abs (dir.row(1)[1]), abs (dir.row(1)[2])) * data.value() * vol.value();
sum_volume += vol.value();
sum_value += vol.value() * data.value();
}
@@ -447,7 +447,7 @@ class DEC_scaled : protected Base
} else {
for (auto f = Base::Loop (index) (data, dir); f; ++f) {
if (!f.padding()) {
- sum_dec += Eigen::Vector3 (abs (dir.row(1)[0]), abs (dir.row(1)[1]), abs (dir.row(1)[2])) * data.value();
+ sum_dec += Eigen::Vector3d (abs (dir.row(1)[0]), abs (dir.row(1)[1]), abs (dir.row(1)[2])) * data.value();
sum_value += data.value();
}
}
diff --git a/cmd/fixelcfestats.cpp b/cmd/fixelcfestats.cpp
index 180ce2e6e7..b567df9969 100644
--- a/cmd/fixelcfestats.cpp
+++ b/cmd/fixelcfestats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fixelconnectivity.cpp b/cmd/fixelconnectivity.cpp
index 0622fa32e9..f1aea9b35d 100644
--- a/cmd/fixelconnectivity.cpp
+++ b/cmd/fixelconnectivity.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fixelconvert.cpp b/cmd/fixelconvert.cpp
index e380b1bf76..0ff957693e 100644
--- a/cmd/fixelconvert.cpp
+++ b/cmd/fixelconvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fixelcorrespondence.cpp b/cmd/fixelcorrespondence.cpp
index f3e283c7b9..e1f1a84568 100644
--- a/cmd/fixelcorrespondence.cpp
+++ b/cmd/fixelcorrespondence.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fixelcrop.cpp b/cmd/fixelcrop.cpp
index 9eb1a52d7d..0b10fb1978 100644
--- a/cmd/fixelcrop.cpp
+++ b/cmd/fixelcrop.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fixelfilter.cpp b/cmd/fixelfilter.cpp
index 080afab078..2f80946290 100644
--- a/cmd/fixelfilter.cpp
+++ b/cmd/fixelfilter.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fixelreorient.cpp b/cmd/fixelreorient.cpp
index 65e97f205a..99b5e1e5fe 100644
--- a/cmd/fixelreorient.cpp
+++ b/cmd/fixelreorient.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fod2dec.cpp b/cmd/fod2dec.cpp
index 8ebed36e08..ece3770a74 100644
--- a/cmd/fod2dec.cpp
+++ b/cmd/fod2dec.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/fod2fixel.cpp b/cmd/fod2fixel.cpp
index a12b914295..2167914f0a 100644
--- a/cmd/fod2fixel.cpp
+++ b/cmd/fod2fixel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/label2colour.cpp b/cmd/label2colour.cpp
index ddb6a408bd..6b8209a079 100644
--- a/cmd/label2colour.cpp
+++ b/cmd/label2colour.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/label2mesh.cpp b/cmd/label2mesh.cpp
index 28bcef57d6..2df6ccaaa3 100644
--- a/cmd/label2mesh.cpp
+++ b/cmd/label2mesh.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/labelconvert.cpp b/cmd/labelconvert.cpp
index 81b26e88a6..f7aa52d08b 100644
--- a/cmd/labelconvert.cpp
+++ b/cmd/labelconvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -150,7 +150,7 @@ void run ()
Transform transform (out);
Interp::Nearest nearest (in_spine);
for (auto l = Loop (out) (out); l; ++l) {
- Eigen::Vector3 p (out.index (0), out.index (1), out.index (2));
+ Eigen::Vector3d p (out.index (0), out.index (1), out.index (2));
p = transform.voxel2scanner * p;
if (nearest.scanner (p) && nearest.value())
out.value() = spine_index;
diff --git a/cmd/labelstats.cpp b/cmd/labelstats.cpp
index d6706a2171..549f55169f 100644
--- a/cmd/labelstats.cpp
+++ b/cmd/labelstats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -74,7 +74,7 @@ void run ()
coms.conservativeResizeLike (matrix_type::Zero (value, 3));
masses.conservativeResizeLike (vector_type::Zero (value));
}
- coms.row(value-1) += Eigen::Vector3 (image.index(0), image.index(1), image.index(2));
+ coms.row(value-1) += Eigen::Vector3d (image.index(0), image.index(1), image.index(2));
masses[value-1]++;
}
}
diff --git a/cmd/maskdump.cpp b/cmd/maskdump.cpp
index 819720657a..b6a39915c9 100644
--- a/cmd/maskdump.cpp
+++ b/cmd/maskdump.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/maskfilter.cpp b/cmd/maskfilter.cpp
index fd81c90daf..7fb176951b 100644
--- a/cmd/maskfilter.cpp
+++ b/cmd/maskfilter.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mesh2voxel.cpp b/cmd/mesh2voxel.cpp
index f3fcf3efef..4f00c8c031 100644
--- a/cmd/mesh2voxel.cpp
+++ b/cmd/mesh2voxel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/meshconvert.cpp b/cmd/meshconvert.cpp
index 46536cbd17..88a2d7e5ee 100644
--- a/cmd/meshconvert.cpp
+++ b/cmd/meshconvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/meshfilter.cpp b/cmd/meshfilter.cpp
index 2e21febdb1..20e196c140 100644
--- a/cmd/meshfilter.cpp
+++ b/cmd/meshfilter.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mraverageheader.cpp b/cmd/mraverageheader.cpp
index 6d70644ef4..bc8b414752 100644
--- a/cmd/mraverageheader.cpp
+++ b/cmd/mraverageheader.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrcalc.cpp b/cmd/mrcalc.cpp
index 73111ba1fe..640ed6e23e 100644
--- a/cmd/mrcalc.cpp
+++ b/cmd/mrcalc.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrcat.cpp b/cmd/mrcat.cpp
index 7d314672c3..0163f60747 100644
--- a/cmd/mrcat.cpp
+++ b/cmd/mrcat.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrcentroid.cpp b/cmd/mrcentroid.cpp
index e35f22b097..752112205c 100644
--- a/cmd/mrcentroid.cpp
+++ b/cmd/mrcentroid.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -59,18 +59,18 @@ void run ()
check_dimensions (image, mask);
}
- Eigen::Vector3 com (0.0, 0.0, 0.0);
+ Eigen::Vector3d com (0.0, 0.0, 0.0);
default_type mass = 0.0;
if (mask.valid()) {
for (auto l = Loop(image) (image, mask); l; ++l) {
if (mask.value()) {
- com += Eigen::Vector3 (image.index(0), image.index(1), image.index(2)) * image.value();
+ com += Eigen::Vector3d (image.index(0), image.index(1), image.index(2)) * image.value();
mass += image.value();
}
}
} else {
for (auto l = Loop(image) (image); l; ++l) {
- com += Eigen::Vector3 (image.index(0), image.index(1), image.index(2)) * image.value();
+ com += Eigen::Vector3d (image.index(0), image.index(1), image.index(2)) * image.value();
mass += image.value();
}
}
diff --git a/cmd/mrcheckerboardmask.cpp b/cmd/mrcheckerboardmask.cpp
index 201248147d..a6f3f7d73a 100644
--- a/cmd/mrcheckerboardmask.cpp
+++ b/cmd/mrcheckerboardmask.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrclusterstats.cpp b/cmd/mrclusterstats.cpp
index c3c3141557..ccac1e48cc 100644
--- a/cmd/mrclusterstats.cpp
+++ b/cmd/mrclusterstats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -320,7 +320,7 @@ void run() {
write_output (stdev.row(0), *v2v, prefix + "std_dev.mif", output_header);
} else {
for (size_t i = 0; i != num_vgs; ++i) {
- write_output (stdev.row(i), *v2v, prefix + "std_dev.mif", output_header);
+ write_output (stdev.row(i), *v2v, prefix + "std_dev" + str(i) + ".mif", output_header);
++progress;
}
}
diff --git a/cmd/mrcolour.cpp b/cmd/mrcolour.cpp
index ecc84a9f69..5ceadf53eb 100644
--- a/cmd/mrcolour.cpp
+++ b/cmd/mrcolour.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -86,7 +86,7 @@ void run ()
{
Header H_in = Header::open (argument[0]);
const ColourMap::Entry colourmap = ColourMap::maps[argument[1]];
- Eigen::Vector3 fixed_colour (NaN, NaN, NaN);
+ Eigen::Vector3d fixed_colour (NaN, NaN, NaN);
if (colourmap.is_colour) {
if (!(H_in.ndim() == 3 || (H_in.ndim() == 4 && H_in.size(3) == 1)))
throw Exception ("For applying a fixed colour, command expects a 3D image as input");
@@ -96,7 +96,7 @@ void run ()
const auto values = parse_floats (opt[0][0]);
if (values.size() != 3)
throw Exception ("Target colour must be specified as a comma-separated list of three values");
- fixed_colour = Eigen::Vector3 (values.data());
+ fixed_colour = Eigen::Vector3d (values.data());
if (fixed_colour.minCoeff() < 0.0)
throw Exception ("Values for fixed colour provided via -colour option cannot be negative");
} else if (colourmap.is_rgb) {
diff --git a/cmd/mrconvert.cpp b/cmd/mrconvert.cpp
index 6e30571748..ceba05d7fc 100644
--- a/cmd/mrconvert.cpp
+++ b/cmd/mrconvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -281,8 +281,8 @@ void permute_slice_direction (Header& H, const vector& axes)
auto it = H.keyval().find ("SliceEncodingDirection");
if (it == H.keyval().end())
return;
- const Eigen::Vector3 orig_dir = Axes::id2dir (it->second);
- const Eigen::Vector3 new_dir (orig_dir[axes[0]], orig_dir[axes[1]], orig_dir[axes[2]]);
+ const Eigen::Vector3d orig_dir = Axes::id2dir (it->second);
+ const Eigen::Vector3d new_dir (orig_dir[axes[0]], orig_dir[axes[1]], orig_dir[axes[2]]);
it->second = Axes::dir2id (new_dir);
}
diff --git a/cmd/mrdegibbs.cpp b/cmd/mrdegibbs.cpp
index 9009251ec9..7e8c89ee82 100644
--- a/cmd/mrdegibbs.cpp
+++ b/cmd/mrdegibbs.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -122,12 +122,12 @@ class ComputeSlice
assign_pos_of (pos, outer_axes).to (in, out);
for (auto l = Loop (slice_axes) (in); l; ++l)
- im1 (in.index(X), in.index(Y)) = cdouble (in.value(), 0.0);
+ im1 (ssize_t(in.index(X)), ssize_t(in.index(Y))) = cdouble (in.value(), 0.0);
unring_2d ();
for (auto l = Loop (slice_axes) (out); l; ++l)
- out.value() = im1 (out.index(X), out.index(Y)).real();
+ out.value() = im1 (ssize_t(out.index(X)), ssize_t(out.index(Y))).real();
}
private:
@@ -331,7 +331,7 @@ void run ()
auto slice_encoding_it = header.keyval().find ("SliceEncodingDirection");
if (slice_encoding_it != header.keyval().end()) {
try {
- const Eigen::Vector3 slice_encoding_axis_onehot = Axes::id2dir (slice_encoding_it->second);
+ const Eigen::Vector3d slice_encoding_axis_onehot = Axes::id2dir (slice_encoding_it->second);
vector auto_slice_axes = { 0, 0 };
if (slice_encoding_axis_onehot[0])
auto_slice_axes = { 1, 2 };
diff --git a/cmd/mrdump.cpp b/cmd/mrdump.cpp
index 920f3dbc8f..a7661ce2a5 100644
--- a/cmd/mrdump.cpp
+++ b/cmd/mrdump.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mredit.cpp b/cmd/mredit.cpp
index f41eb4a8aa..95bbdfa2fd 100644
--- a/cmd/mredit.cpp
+++ b/cmd/mredit.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -78,7 +78,7 @@ class Vox : public Eigen::Array3i
{ MEMALIGN (Vox)
public:
using Eigen::Array3i::Array3i;
- Vox (const Eigen::Vector3& p) :
+ Vox (const Eigen::Vector3d& p) :
Eigen::Array3i { int(std::round (p[0])), int(std::round (p[1])), int(std::round (p[2])) } { }
bool operator< (const Vox& i) const {
return (i[0] == (*this)[0] ? (i[1] == (*this)[1] ? (i[2] < (*this)[2]) : (i[1] < (*this)[1])) : (i[0] < (*this)[0]));
@@ -146,12 +146,12 @@ void run ()
operation_count += opt.size();
for (auto s : opt) {
const auto position = parse_floats (s[0]);
- Eigen::Vector3 centre_scannerspace (position[0], position[1], position[2]);
+ Eigen::Vector3d centre_scannerspace (position[0], position[1], position[2]);
const default_type radius = s[1];
const float value = s[2];
if (position.size() != 3)
throw Exception ("Centre of sphere must be defined using 3 comma-separated values");
- Eigen::Vector3 centre_voxelspace (centre_scannerspace);
+ Eigen::Vector3d centre_voxelspace (centre_scannerspace);
if (scanner)
centre_voxelspace = transform.scanner2voxel * centre_scannerspace;
else
@@ -164,7 +164,7 @@ void run ()
while (to_expand.size()) {
const Vox v (to_expand.back());
to_expand.pop_back();
- const Eigen::Vector3 v_scanner = transform.voxel2scanner * v.matrix().cast();
+ const Eigen::Vector3d v_scanner = transform.voxel2scanner * v.matrix().cast();
const default_type distance = (v_scanner - centre_scannerspace).norm();
if (distance < radius) {
if (!is_out_of_bounds (H, v)) {
@@ -190,7 +190,7 @@ void run ()
if (position.size() != H.ndim())
throw Exception ("Image has " + str(H.ndim()) + " dimensions, but -voxel option position " + std::string(v[0]) + " provides only " + str(position.size()) + " coordinates");
if (scanner) {
- Eigen::Vector3 p (position[0], position[1], position[2]);
+ Eigen::Vector3d p (position[0], position[1], position[2]);
p = transform.scanner2voxel * p;
const Vox voxel (p);
assign_pos_of (voxel).to (out);
diff --git a/cmd/mrfilter.cpp b/cmd/mrfilter.cpp
index 63f66a04bc..5405d02972 100644
--- a/cmd/mrfilter.cpp
+++ b/cmd/mrfilter.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrgrid.cpp b/cmd/mrgrid.cpp
index dec79a782b..bba09e60dc 100644
--- a/cmd/mrgrid.cpp
+++ b/cmd/mrgrid.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrhistmatch.cpp b/cmd/mrhistmatch.cpp
index 03ea8af687..9bc954ba27 100644
--- a/cmd/mrhistmatch.cpp
+++ b/cmd/mrhistmatch.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrhistogram.cpp b/cmd/mrhistogram.cpp
index 618a1283ef..4c4f3f3d86 100644
--- a/cmd/mrhistogram.cpp
+++ b/cmd/mrhistogram.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrinfo.cpp b/cmd/mrinfo.cpp
index aa82ad0bc6..2cde2d5d91 100644
--- a/cmd/mrinfo.cpp
+++ b/cmd/mrinfo.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrmath.cpp b/cmd/mrmath.cpp
index 039e2652a7..e5adccb3e1 100644
--- a/cmd/mrmath.cpp
+++ b/cmd/mrmath.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrmetric.cpp b/cmd/mrmetric.cpp
index 84eba7c986..bfbe381dc8 100644
--- a/cmd/mrmetric.cpp
+++ b/cmd/mrmetric.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrregister.cpp b/cmd/mrregister.cpp
index 5983546062..9deed55744 100644
--- a/cmd/mrregister.cpp
+++ b/cmd/mrregister.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -368,7 +368,7 @@ void run () {
bool init_rigid_matrix_set = false;
if (opt.size()) {
init_rigid_matrix_set = true;
- Eigen::Vector3 centre;
+ Eigen::Vector3d centre;
transform_type rigid_transform = load_transform (opt[0][0], centre);
rigid.set_transform (rigid_transform);
if (!std::isfinite(centre(0))) {
@@ -518,7 +518,7 @@ void run () {
throw Exception ("you cannot initialise with -affine_init_matrix since a rigid registration is being performed");
init_affine_matrix_set = true;
- Eigen::Vector3 centre;
+ Eigen::Vector3d centre;
transform_type affine_transform = load_transform (opt[0][0], centre);
affine.set_transform (affine_transform);
if (!std::isfinite(centre(0))) {
diff --git a/cmd/mrstats.cpp b/cmd/mrstats.cpp
index f71e9623bb..d4d3bee0a6 100644
--- a/cmd/mrstats.cpp
+++ b/cmd/mrstats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrthreshold.cpp b/cmd/mrthreshold.cpp
index 8060f3c4ad..1e3e3ed006 100644
--- a/cmd/mrthreshold.cpp
+++ b/cmd/mrthreshold.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mrtransform.cpp b/cmd/mrtransform.cpp
index e9487d79ce..bb069d583c 100644
--- a/cmd/mrtransform.cpp
+++ b/cmd/mrtransform.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -471,7 +471,7 @@ void run ()
"therefore should not be used to reorient directions / diffusion gradients");
}
for (ssize_t n = 0; n < grad.rows(); ++n) {
- Eigen::Vector3 grad_vector = grad.block<1,3>(n,0);
+ Eigen::Vector3d grad_vector = grad.block<1,3>(n,0);
grad.block<1,3>(n,0) = rotation * grad_vector;
}
DWI::set_DW_scheme (output_header, grad);
@@ -507,13 +507,13 @@ void run ()
}
if (result.cols() == 2) {
Eigen::Matrix azel (v.data());
- Eigen::Vector3 dir;
+ Eigen::Vector3d dir;
Math::Sphere::spherical2cartesian (azel, dir);
dir = rotation * dir;
Math::Sphere::cartesian2spherical (dir, azel);
result.row (l) = azel;
} else {
- const Eigen::Vector3 dir = rotation * Eigen::Vector3 (v.data());
+ const Eigen::Vector3d dir = rotation * Eigen::Vector3d (v.data());
result.row (l) = dir;
}
std::stringstream s;
@@ -614,6 +614,8 @@ void run ()
if (modulate_jac)
apply_linear_jacobian (output, linear_transform);
+ DWI::export_grad_commandline (output);
+
} else if (warp.valid()) {
if (replace)
diff --git a/cmd/mrview.cpp b/cmd/mrview.cpp
index fe86790884..06df5254cc 100644
--- a/cmd/mrview.cpp
+++ b/cmd/mrview.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/mtnormalise.cpp b/cmd/mtnormalise.cpp
index cf793d72f6..cb951346eb 100644
--- a/cmd/mtnormalise.cpp
+++ b/cmd/mtnormalise.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -141,7 +141,7 @@ struct PolyBasisFunction { MEMALIGN (PolyBasisFunction)
const int n_basis_vecs;
- FORCE_INLINE Eigen::VectorXd operator () (const Eigen::Vector3& pos) const {
+ FORCE_INLINE Eigen::VectorXd operator () (const Eigen::Vector3d& pos) const {
double x = pos[0];
double y = pos[1];
double z = pos[2];
@@ -231,8 +231,8 @@ Eigen::MatrixXd initialise_basis (IndexType& index, size_t num_voxels, int order
const uint32_t idx = index.value();
if (idx != std::numeric_limits::max()) {
assert (idx < basis.rows());
- Eigen::Vector3 vox (index.index(0), index.index(1), index.index(2));
- Eigen::Vector3 pos = transform.voxel2scanner * vox;
+ Eigen::Vector3d vox (index.index(0), index.index(1), index.index(2));
+ Eigen::Vector3d pos = transform.voxel2scanner * vox;
basis.row(idx) = basis_function (pos);
}
}
@@ -413,8 +413,8 @@ ImageType compute_full_field (int order, const Eigen::VectorXd& field_coeffs, co
struct FieldWriter { NOMEMALIGN
void operator() (ImageType& field) const {
- Eigen::Vector3 vox (field.index(0), field.index(1), field.index(2));
- Eigen::Vector3 pos = transform.voxel2scanner * vox;
+ Eigen::Vector3d vox (field.index(0), field.index(1), field.index(2));
+ Eigen::Vector3d pos = transform.voxel2scanner * vox;
field.value() = std::exp (basis_function (pos).dot (field_coeffs));
}
diff --git a/cmd/peaks2amp.cpp b/cmd/peaks2amp.cpp
index 28c6a67255..70bed4d206 100644
--- a/cmd/peaks2amp.cpp
+++ b/cmd/peaks2amp.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/peaks2fixel.cpp b/cmd/peaks2fixel.cpp
index 3597b39081..bf8dd2f22d 100644
--- a/cmd/peaks2fixel.cpp
+++ b/cmd/peaks2fixel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -45,12 +45,12 @@ void usage ()
-vector get (Image& data)
+vector get (Image& data)
{
data.index(3) = 0;
- vector result;
+ vector result;
while (data.index(3) < data.size(3)) {
- Eigen::Vector3 direction;
+ Eigen::Vector3d direction;
for (size_t axis = 0; axis != 3; ++axis) {
direction[axis] = data.value();
data.index(3)++;
diff --git a/cmd/sh2amp.cpp b/cmd/sh2amp.cpp
index 0b25d4dd56..82dc78136e 100644
--- a/cmd/sh2amp.cpp
+++ b/cmd/sh2amp.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/sh2peaks.cpp b/cmd/sh2peaks.cpp
index 97f8aabfb2..0c2c08f5f7 100644
--- a/cmd/sh2peaks.cpp
+++ b/cmd/sh2peaks.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/sh2power.cpp b/cmd/sh2power.cpp
index 20fba9059c..b3f70f936c 100644
--- a/cmd/sh2power.cpp
+++ b/cmd/sh2power.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/sh2response.cpp b/cmd/sh2response.cpp
index 0286b5088d..4b99232972 100644
--- a/cmd/sh2response.cpp
+++ b/cmd/sh2response.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/shbasis.cpp b/cmd/shbasis.cpp
index 21203c0af1..fd71608128 100644
--- a/cmd/shbasis.cpp
+++ b/cmd/shbasis.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/shconv.cpp b/cmd/shconv.cpp
index d187ed3629..3cce83babf 100644
--- a/cmd/shconv.cpp
+++ b/cmd/shconv.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/shview.cpp b/cmd/shview.cpp
index 21328dc975..ee789643a8 100644
--- a/cmd/shview.cpp
+++ b/cmd/shview.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tck2connectome.cpp b/cmd/tck2connectome.cpp
index 2be18e7c2d..8700ed952d 100644
--- a/cmd/tck2connectome.cpp
+++ b/cmd/tck2connectome.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tck2fixel.cpp b/cmd/tck2fixel.cpp
index bdb3466ef5..7b1ff963b8 100644
--- a/cmd/tck2fixel.cpp
+++ b/cmd/tck2fixel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -44,7 +44,7 @@ class TrackProcessor { MEMALIGN (TrackProcessor)
using SetVoxelDir = DWI::Tractography::Mapping::SetVoxelDir;
TrackProcessor (Image& fixel_indexer,
- const vector& fixel_directions,
+ const vector& fixel_directions,
vector& fixel_TDI,
const float angular_threshold):
fixel_indexer (fixel_indexer) ,
@@ -66,7 +66,7 @@ class TrackProcessor { MEMALIGN (TrackProcessor)
index_type last_index = first_index + num_fibres;
index_type closest_fixel_index = 0;
float largest_dp = 0.0;
- const Eigen::Vector3 dir (i->get_dir().normalized());
+ const Eigen::Vector3d dir (i->get_dir().normalized());
for (index_type j = first_index; j < last_index; ++j) {
const float dp = abs (dir.dot (fixel_directions[j]));
if (dp > largest_dp) {
@@ -86,7 +86,7 @@ class TrackProcessor { MEMALIGN (TrackProcessor)
private:
Image fixel_indexer;
- const vector& fixel_directions;
+ const vector& fixel_directions;
vector& fixel_TDI;
const float angular_threshold_dp;
};
@@ -135,8 +135,8 @@ void run ()
const float angular_threshold = get_option_value ("angle", DEFAULT_ANGLE_THRESHOLD);
- vector positions (num_fixels);
- vector directions (num_fixels);
+ vector positions (num_fixels);
+ vector directions (num_fixels);
const std::string output_fixel_folder = argument[2];
Fixel::copy_index_and_directions_file (input_fixel_folder, output_fixel_folder);
@@ -146,7 +146,7 @@ void run ()
// Load template fixel directions
Transform image_transform (index_image);
for (auto i = Loop ("loading template fixel directions and positions", index_image, 0, 3)(index_image); i; ++i) {
- const Eigen::Vector3 vox ((default_type)index_image.index(0), (default_type)index_image.index(1), (default_type)index_image.index(2));
+ const Eigen::Vector3d vox ((default_type)index_image.index(0), (default_type)index_image.index(1), (default_type)index_image.index(2));
index_image.index(3) = 1;
index_type offset = index_image.value();
index_type fixel_index = 0;
diff --git a/cmd/tckconvert.cpp b/cmd/tckconvert.cpp
index 0b641320b4..e0aa346f0f 100644
--- a/cmd/tckconvert.cpp
+++ b/cmd/tckconvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21,76 +21,83 @@
#include "file/name_parser.h"
#include "dwi/tractography/file.h"
#include "dwi/tractography/properties.h"
-
+#include "raw.h"
using namespace MR;
using namespace App;
using namespace MR::DWI::Tractography;
+using namespace MR::Raw;
+using namespace MR::ByteOrder;
void usage ()
{
AUTHOR = "Daan Christiaens (daan.christiaens@kcl.ac.uk), "
- "J-Donald Tournier (jdtournier@gmail.com), "
- "Philip Broser (philip.broser@me.com), "
- "Daniel Blezek (daniel.blezek@gmail.com).";
+ "J-Donald Tournier (jdtournier@gmail.com), "
+ "Philip Broser (philip.broser@me.com), "
+ "Daniel Blezek (daniel.blezek@gmail.com).";
SYNOPSIS = "Convert between different track file formats";
DESCRIPTION
- + "The program currently supports MRtrix .tck files (input/output), "
+ + "The program currently supports MRtrix .tck files (input/output), "
"ascii text files (input/output), VTK polydata files (input/output), "
"and RenderMan RIB (export only)."
- + "Note that ascii files will be stored with one streamline per numbered file. "
+ + "Note that ascii files will be stored with one streamline per numbered file. "
"To support this, the command will use the multi-file numbering syntax, "
"where square brackets denote the position of the numbering for the files, "
"for example:"
- + "$ tckconvert input.tck output-'[]'.txt"
+ + "$ tckconvert input.tck output-'[]'.txt"
- + "will produce files named output-0000.txt, output-0001.txt, output-0002.txt, ...";
+ + "will produce files named output-0000.txt, output-0001.txt, output-0002.txt, ...";
ARGUMENTS
- + Argument ("input", "the input track file.").type_various ()
- + Argument ("output", "the output track file.").type_file_out ();
+ + Argument ("input", "the input track file.").type_various ()
+ + Argument ("output", "the output track file.").type_file_out ();
OPTIONS
- + Option ("scanner2voxel",
- "if specified, the properties of this image will be used to convert "
- "track point positions from real (scanner) coordinates into voxel coordinates.")
+ + Option ("scanner2voxel",
+ "if specified, the properties of this image will be used to convert "
+ "track point positions from real (scanner) coordinates into voxel coordinates.")
+ Argument ("reference").type_image_in ()
- + Option ("scanner2image",
- "if specified, the properties of this image will be used to convert "
- "track point positions from real (scanner) coordinates into image coordinates (in mm).")
- + Argument ("reference").type_image_in ()
+ + Option ("scanner2image",
+ "if specified, the properties of this image will be used to convert "
+ "track point positions from real (scanner) coordinates into image coordinates (in mm).")
+ + Argument ("reference").type_image_in ()
- + Option ("voxel2scanner",
- "if specified, the properties of this image will be used to convert "
- "track point positions from voxel coordinates into real (scanner) coordinates.")
+ + Option ("voxel2scanner",
+ "if specified, the properties of this image will be used to convert "
+ "track point positions from voxel coordinates into real (scanner) coordinates.")
+ Argument ("reference").type_image_in ()
- + Option ("image2scanner",
- "if specified, the properties of this image will be used to convert "
- "track point positions from image coordinates (in mm) into real (scanner) coordinates.")
- + Argument ("reference").type_image_in ()
+ + Option ("image2scanner",
+ "if specified, the properties of this image will be used to convert "
+ "track point positions from image coordinates (in mm) into real (scanner) coordinates.")
+ + Argument ("reference").type_image_in ()
+
+ + OptionGroup ("Options specific to PLY writer")
+
+ + Option ("sides", "number of sides for streamlines")
+ + Argument("sides").type_integer(3,15)
- + OptionGroup ("Options specific to PLY writer")
+ + Option ("increment", "generate streamline points at every (increment) points")
+ + Argument("increment").type_integer(1)
- + Option ("sides", "number of sides for streamlines")
- + Argument("sides").type_integer(3,15)
+ + OptionGroup ("Options specific to RIB writer")
- + Option ("increment", "generate streamline points at every (increment) points")
- + Argument("increment").type_integer(1)
+ + Option ("dec", "add DEC as a primvar")
- + OptionGroup ("Options specific to RIB writer")
+ + OptionGroup ("Options for both PLY and RIB writer")
- + Option ("dec", "add DEC as a primvar")
+ + Option ("radius", "radius of the streamlines")
+ + Argument("radius").type_float(0.0f)
- + OptionGroup ("Options for both PLY and RIB writer")
+ + OptionGroup ("Options specific to VTK writer")
- + Option ("radius", "radius of the streamlines")
- + Argument("radius").type_float(0.0f);
+ + Option ("ascii", "write an ASCII VTK file (this is the default)")
+ + Option ("binary", "write a binary VTK file");
}
@@ -102,27 +109,39 @@ void usage ()
class VTKWriter: public WriterInterface { MEMALIGN(VTKWriter)
public:
- VTKWriter(const std::string& file) : VTKout (file) {
- // create and write header of VTK output file:
- VTKout <<
- "# vtk DataFile Version 1.0\n"
- "Data values for Tracks\n"
- "ASCII\n"
- "DATASET POLYDATA\n"
- "POINTS ";
- // keep track of offset to write proper value later:
- offset_num_points = VTKout.tellp();
- VTKout << "XXXXXXXXXX float\n";
- }
+ VTKWriter(const std::string& file, bool write_ascii = true) :
+ VTKout (file, std::ios::binary ), write_ascii(write_ascii) {
+ // create and write header of VTK output file:
+ VTKout <<
+ "# vtk DataFile Version 3.0\n"
+ "Data values for Tracks\n";
+ if ( write_ascii ) {
+ VTKout << "ASCII\n";
+ } else {
+ VTKout << "BINARY\n";
+ }
+ VTKout << "DATASET POLYDATA\n"
+ "POINTS ";
+ // keep track of offset to write proper value later:
+ offset_num_points = VTKout.tellp();
+ VTKout << "XXXXXXXXXX float\n";
+ }
bool operator() (const Streamline& tck) {
// write out points, and build index of tracks:
size_t start_index = current_index;
current_index += tck.size();
track_list.push_back (std::pair (start_index, current_index));
-
- for (const auto& pos : tck) {
- VTKout << pos[0] << " " << pos[1] << " " << pos[2] << "\n";
+ if (write_ascii) {
+ for (const auto &pos : tck) {
+ VTKout << pos[0] << " " << pos[1] << " " << pos[2] << "\n";
+ }
+ } else {
+ float p[3];
+ for (const auto& pos : tck) {
+ for (auto i = 0; i < 3; ++i) Raw::store_BE(pos[i], p, i);
+ VTKout.write((char*)p, 3 * sizeof(float));
+ }
}
return true;
}
@@ -130,13 +149,36 @@ class VTKWriter: public WriterInterface { MEMALIGN(VTKWriter)
~VTKWriter() {
try {
// write out list of tracks:
+ if ( write_ascii == false ) {
+ // Need to include an extra new line when writing binary
+ VTKout << "\n";
+ }
VTKout << "LINES " << track_list.size() << " " << track_list.size() + current_index << "\n";
for (const auto& track : track_list) {
- VTKout << track.second - track.first << " " << track.first;
- for (size_t i = track.first + 1; i < track.second; ++i)
- VTKout << " " << i;
+ if (write_ascii) {
+ VTKout << track.second - track.first << " " << track.first;
+ for (size_t i = track.first + 1; i < track.second; ++i)
+ VTKout << " " << i;
+ VTKout << "\n";
+ }
+ else {
+ int32_t buffer;
+ buffer = ByteOrder::BE (track.second - track.first);
+ VTKout.write ((char*) &buffer, 1 * sizeof(int32_t));
+
+ buffer = ByteOrder::BE (track.first);
+ VTKout.write ((char*) &buffer, 1 * sizeof(int32_t));
+
+ for (size_t i = track.first + 1; i < track.second; ++i) {
+ buffer = ByteOrder::BE (i);
+ VTKout.write ((char*)&buffer, 1* sizeof(int32_t));
+ }
+ }
+ }
+ if (write_ascii == false) {
+ // Need to include an extra new line when writing binary
VTKout << "\n";
- };
+ }
// write back total number of points:
VTKout.seekp (offset_num_points);
@@ -145,7 +187,8 @@ class VTKWriter: public WriterInterface { MEMALIGN(VTKWriter)
VTKout.write (num_points.c_str(), 10);
VTKout.close();
- } catch (Exception& e) {
+ }
+ catch (Exception& e) {
e.display();
App::exit_error_code = 1;
}
@@ -153,6 +196,7 @@ class VTKWriter: public WriterInterface { MEMALIGN(VTKWriter)
private:
File::OFStream VTKout;
+ const bool write_ascii;
size_t offset_num_points;
vector> track_list;
size_t current_index = 0;
@@ -163,39 +207,47 @@ class VTKWriter: public WriterInterface { MEMALIGN(VTKWriter)
+template void loadLines(vector& lines, std::ifstream& input, int number_of_line_indices)
+{
+ vector buffer (number_of_line_indices);
+ input.read((char*) &buffer[0], number_of_line_indices * sizeof(T));
+ lines.resize (number_of_line_indices);
+ // swap from big endian
+ for (int i = 0; i < number_of_line_indices; i++)
+ lines[i] = int64_t (ByteOrder::BE (buffer[i]));
+}
+
class VTKReader: public ReaderInterface { MEMALIGN(VTKReader)
public:
- VTKReader(const std::string& file) {
- points = NULL;
- lines = NULL;
+ VTKReader (const std::string& file) {
std::ifstream input (file, std::ios::binary );
std::string line;
int number_of_points = 0;
number_of_lines = 0;
number_of_line_indices = 0;
- while ( std::getline(input,line) ) {
- if ( line.find ( "ASCII" ) == 0 ) {
+
+ while (std::getline(input,line)) {
+ if (line.find ("ASCII") == 0)
throw Exception("VTK Reader only supports BINARY input");
- }
- if ( sscanf ( line.c_str(), "POINTS %d float", &number_of_points ) == 1) {
- points = new float[3*number_of_points];
- input.read((char*) points, 3*number_of_points * sizeof(float) );
+
+ if (sscanf (line.c_str(), "POINTS %d float", &number_of_points) == 1) {
+ points.resize (3*number_of_points);
+ input.read ((char*) points.data(), 3*number_of_points * sizeof(float));
// swap
- for ( int i = 0; i < 3*number_of_points; i++ ) {
- points[i] = Raw::fetch_BE(points, i);
- }
+ for (int i = 0; i < 3*number_of_points; i++)
+ points[i] = ByteOrder::BE (points[i]);
continue;
- } else {
- if ( sscanf ( line.c_str(), "LINES %d %d", &number_of_lines, &number_of_line_indices ) == 2) {
- lines = new int[number_of_line_indices];
- input.read((char*) lines, number_of_line_indices * sizeof(int) );
- // swap
- for ( int i = 0; i < number_of_line_indices; i++ ) {
- lines[i] = Raw::fetch_BE(lines, i);
+ }
+ else {
+ if (sscanf (line.c_str(), "LINES %d %d", &number_of_lines, &number_of_line_indices) == 2) {
+ if (line.find ("vtktypeint64") != std::string::npos) {
+ loadLines (lines, input, number_of_line_indices);
+ } else {
+ loadLines (lines, input, number_of_line_indices);
}
// We can safely break
break;
@@ -208,12 +260,12 @@ class VTKReader: public ReaderInterface { MEMALIGN(VTKReader)
bool operator() (Streamline& tck) {
tck.clear();
- if ( lineIdx < number_of_line_indices ) {
+ if (lineIdx < number_of_line_indices) {
int count = lines[lineIdx];
lineIdx++;
for ( int i = 0; i < count; i++ ) {
int idx = lines[lineIdx];
- Eigen::Vector3f f ( points[idx*3], points[idx*3+1], points[idx*3+2] );
+ Eigen::Vector3f f (points[idx*3], points[idx*3+1], points[idx*3+2]);
tck.push_back(f);
lineIdx++;
}
@@ -222,14 +274,9 @@ class VTKReader: public ReaderInterface { MEMALIGN(VTKReader)
return false;
}
- ~VTKReader() {
- if ( points != NULL ) { delete[] points; }
- if ( lines != NULL ) { delete[] lines; }
- }
-
private:
- float *points;
- int *lines;
+ vector points;
+ vector lines;
int lineIdx;
int number_of_lines;
int number_of_line_indices;
@@ -331,7 +378,7 @@ class PLYWriter: public WriterInterface { MEMALIGN(PLYWriter)
}
// calculate centroid
- Eigen::Vector3 centroid(coord.row(0).mean(), coord.row(1).mean(), coord.row(2).mean());
+ Eigen::Vector3d centroid(coord.row(0).mean(), coord.row(1).mean(), coord.row(2).mean());
// subtract centroid
coord.row(0).array() -= centroid(0);
@@ -496,12 +543,12 @@ class PLYWriter: public WriterInterface { MEMALIGN(PLYWriter)
isFirst = false;
}
if ( isLast ) {
- // faceOF << "Writing end cap, num_vertices = " << num_vertices << "\n";
for ( auto sideIdx = 2; sideIdx <= nSides - 1; ++sideIdx ) {
faceOF << "3"
- << " " << num_vertices
+ << " " << num_vertices + sideIdx - 1
<< " " << num_vertices + sideIdx
- << " " << num_vertices + sideIdx - 1 << "\n";
+ << " " << num_vertices
+ << "\n";
}
num_faces += nSides - 2;
}
@@ -522,6 +569,7 @@ class PLYWriter: public WriterInterface { MEMALIGN(PLYWriter)
"format ascii 1.0\n"
"comment written by tckconvert v" << App::mrtrix_version << "\n"
"comment part of the mtrix3 suite of tools (http://www.mrtrix.org/)\n"
+ "comment the coordinate system and scale is taken from directly from the input and is not adjusted\n"
"element vertex " << num_vertices << "\n"
"property float32 x\n"
"property float32 y\n"
@@ -685,41 +733,42 @@ void run ()
Properties properties;
std::unique_ptr > reader;
if (Path::has_suffix(argument[0], ".tck")) {
- reader.reset( new Reader(argument[0], properties) );
+ reader.reset (new Reader(argument[0], properties));
}
else if (Path::has_suffix(argument[0], ".txt")) {
- reader.reset( new ASCIIReader(argument[0]) );
+ reader.reset (new ASCIIReader(argument[0]));
}
else if (Path::has_suffix(argument[0], ".vtk")) {
- reader.reset( new VTKReader(argument[0]) );
+ reader.reset (new VTKReader(argument[0]));
}
else {
- throw Exception("Unsupported input file type.");
+ throw Exception ("Unsupported input file type.");
}
// Writer
std::unique_ptr > writer;
if (Path::has_suffix(argument[1], ".tck")) {
- writer.reset( new Writer(argument[1], properties) );
+ writer.reset (new Writer(argument[1], properties));
}
else if (Path::has_suffix(argument[1], ".vtk")) {
- writer.reset( new VTKWriter(argument[1]) );
+ bool write_ascii = !get_options("binary").size();
+ writer.reset (new VTKWriter(argument[1], write_ascii));
}
else if (Path::has_suffix(argument[1], ".ply")) {
auto increment = get_options("increment").size() ? get_options("increment")[0][0].as_int() : 1;
auto radius = get_options("radius").size() ? get_options("radius")[0][0].as_float() : 0.1f;
auto sides = get_options("sides").size() ? get_options("sides")[0][0].as_int() : 5;
- writer.reset( new PLYWriter(argument[1], increment, radius, sides) );
+ writer.reset (new PLYWriter(argument[1], increment, radius, sides));
}
else if (Path::has_suffix(argument[1], ".rib")) {
- writer.reset( new RibWriter(argument[1]) );
+ writer.reset (new RibWriter(argument[1]));
}
else if (Path::has_suffix(argument[1], ".txt")) {
- writer.reset( new ASCIIWriter(argument[1]) );
+ writer.reset (new ASCIIWriter(argument[1]));
}
else {
- throw Exception("Unsupported output file type.");
+ throw Exception ("Unsupported output file type.");
}
@@ -758,8 +807,7 @@ void run ()
// Copy
Streamline tck;
- while ( (*reader)(tck) )
- {
+ while ((*reader)(tck)) {
for (auto& pos : tck) {
pos = T.cast() * pos;
}
diff --git a/cmd/tckdfc.cpp b/cmd/tckdfc.cpp
index 3546ed6c9c..1221529e74 100644
--- a/cmd/tckdfc.cpp
+++ b/cmd/tckdfc.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tckedit.cpp b/cmd/tckedit.cpp
index 4cbd3c024e..93d643d0be 100644
--- a/cmd/tckedit.cpp
+++ b/cmd/tckedit.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -170,13 +170,11 @@ void run ()
properties.prior_rois.insert (i);
}
- size_t this_count = 0, this_total_count = 0;
+ size_t this_count = 0;
for (const auto& i : p) {
if (i.first == "count") {
this_count = to (i.second);
- } else if (i.first == "total_count") {
- this_total_count += to (i.second);
} else {
auto existing = properties.find (i.first);
if (existing == properties.end())
@@ -192,6 +190,11 @@ void run ()
DEBUG ("estimated number of input tracks: " + str(count));
+ // Remove keyval "total_count", as there is ambiguity about what _should_ be
+ // contained in that field upon editing one or more existing tractograms
+ // (it has a specific interpretation in the context of streamline generation only)
+ erase_if_present (properties, "total_count");
+
load_rois (properties);
properties.compare_stepsize_rois();
diff --git a/cmd/tckgen.cpp b/cmd/tckgen.cpp
index 4add2a8708..2239408075 100644
--- a/cmd/tckgen.cpp
+++ b/cmd/tckgen.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tckglobal.cpp b/cmd/tckglobal.cpp
index 53f0b056a3..024ba77a47 100644
--- a/cmd/tckglobal.cpp
+++ b/cmd/tckglobal.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tckinfo.cpp b/cmd/tckinfo.cpp
index 6f7e6d62a2..67e108b459 100644
--- a/cmd/tckinfo.cpp
+++ b/cmd/tckinfo.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tckmap.cpp b/cmd/tckmap.cpp
index 69226895d3..e435b3ac44 100644
--- a/cmd/tckmap.cpp
+++ b/cmd/tckmap.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tckresample.cpp b/cmd/tckresample.cpp
index 009a1429e4..77fb0ab0c9 100644
--- a/cmd/tckresample.cpp
+++ b/cmd/tckresample.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tcksample.cpp b/cmd/tcksample.cpp
index 64c67b0f55..ba42f9256a 100644
--- a/cmd/tcksample.cpp
+++ b/cmd/tcksample.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tcksift.cpp b/cmd/tcksift.cpp
index a1483e016f..0e050b87d5 100644
--- a/cmd/tcksift.cpp
+++ b/cmd/tcksift.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tcksift2.cpp b/cmd/tcksift2.cpp
index 42df31f041..2d02873fcc 100644
--- a/cmd/tcksift2.cpp
+++ b/cmd/tcksift2.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tckstats.cpp b/cmd/tckstats.cpp
index 076896469f..944693e735 100644
--- a/cmd/tckstats.cpp
+++ b/cmd/tckstats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tcktransform.cpp b/cmd/tcktransform.cpp
index 5048547bbc..873a1f8874 100644
--- a/cmd/tcktransform.cpp
+++ b/cmd/tcktransform.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tensor2metric.cpp b/cmd/tensor2metric.cpp
index cc12d9b9ec..5f895c7144 100644
--- a/cmd/tensor2metric.cpp
+++ b/cmd/tensor2metric.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -145,7 +145,7 @@ class Processor { MEMALIGN(Processor)
/* input dt */
Eigen::Matrix dt;
- for (auto l = Loop (3) (dt_img); l; ++l)
+ for (dt_img.index(3) = 0; dt_img.index(3) < 6; ++dt_img.index(3))
dt[dt_img.index(3)] = dt_img.value();
/* output adc */
@@ -275,6 +275,9 @@ void run ()
{
auto dt_img = Image::open (argument[0]);
Header header (dt_img);
+ if (header.ndim() != 4 || header.size(3) !=6) {
+ throw Exception("input tensor image is not a valid tensor.");
+ }
auto mask_img = Image();
auto opt = get_options ("mask");
diff --git a/cmd/transformcalc.cpp b/cmd/transformcalc.cpp
index 068bd2e2b2..82c55bb228 100644
--- a/cmd/transformcalc.cpp
+++ b/cmd/transformcalc.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/transformcompose.cpp b/cmd/transformcompose.cpp
index af47358b15..4692fcd73d 100644
--- a/cmd/transformcompose.cpp
+++ b/cmd/transformcompose.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -26,7 +26,7 @@ using namespace App;
class TransformBase { MEMALIGN(TransformBase)
public:
virtual ~TransformBase(){}
- virtual Eigen::Vector3 transform_point (const Eigen::Vector3& input) = 0;
+ virtual Eigen::Vector3d transform_point (const Eigen::Vector3d& input) = 0;
};
@@ -34,8 +34,8 @@ class Warp : public TransformBase { MEMALIGN(Warp)
public:
Warp (Image& in) : interp (in) {}
- Eigen::Vector3 transform_point (const Eigen::Vector3 &input) {
- Eigen::Vector3 output;
+ Eigen::Vector3d transform_point (const Eigen::Vector3d &input) {
+ Eigen::Vector3d output;
if (interp.scanner (input))
output = interp.row(3);
else
@@ -52,8 +52,8 @@ class Linear : public TransformBase { MEMALIGN(Linear)
public:
Linear (const transform_type& transform) : transform (transform) {}
- Eigen::Vector3 transform_point (const Eigen::Vector3 &input) {
- Eigen::Vector3 output = transform * input;
+ Eigen::Vector3d transform_point (const Eigen::Vector3d &input) {
+ Eigen::Vector3d output = transform * input;
return output;
}
@@ -158,11 +158,11 @@ void run ()
Transform template_transform (output);
for (auto i = Loop ("composing transformations", output, 0, 3) (output); i ; ++i) {
- Eigen::Vector3 voxel ((default_type) output.index(0),
+ Eigen::Vector3d voxel ((default_type) output.index(0),
(default_type) output.index(1),
(default_type) output.index(2));
- Eigen::Vector3 position = template_transform.voxel2scanner * voxel;
+ Eigen::Vector3d position = template_transform.voxel2scanner * voxel;
ssize_t index = transform_list.size() - 1;
while (index >= 0) {
position = transform_list[index]->transform_point (position);
diff --git a/cmd/transformconvert.cpp b/cmd/transformconvert.cpp
index 17b39c1a22..1fa0af8305 100644
--- a/cmd/transformconvert.cpp
+++ b/cmd/transformconvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tsfdivide.cpp b/cmd/tsfdivide.cpp
index da6ded7fb9..7fa4969de2 100644
--- a/cmd/tsfdivide.cpp
+++ b/cmd/tsfdivide.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tsfinfo.cpp b/cmd/tsfinfo.cpp
index 883b881b98..669daeb61a 100644
--- a/cmd/tsfinfo.cpp
+++ b/cmd/tsfinfo.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tsfmult.cpp b/cmd/tsfmult.cpp
index c11bb3598a..439660a260 100644
--- a/cmd/tsfmult.cpp
+++ b/cmd/tsfmult.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tsfsmooth.cpp b/cmd/tsfsmooth.cpp
index f54d65357f..e15c27316d 100644
--- a/cmd/tsfsmooth.cpp
+++ b/cmd/tsfsmooth.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tsfthreshold.cpp b/cmd/tsfthreshold.cpp
index 647f9f974b..59ecb745c6 100644
--- a/cmd/tsfthreshold.cpp
+++ b/cmd/tsfthreshold.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/tsfvalidate.cpp b/cmd/tsfvalidate.cpp
index 4c85ae5daa..bf2bd792aa 100644
--- a/cmd/tsfvalidate.cpp
+++ b/cmd/tsfvalidate.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/vectorstats.cpp b/cmd/vectorstats.cpp
index cabc4c7ce0..9dab21722d 100644
--- a/cmd/vectorstats.cpp
+++ b/cmd/vectorstats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/voxel2fixel.cpp b/cmd/voxel2fixel.cpp
index 8f1a784b4c..a72c7a0281 100644
--- a/cmd/voxel2fixel.cpp
+++ b/cmd/voxel2fixel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/voxel2mesh.cpp b/cmd/voxel2mesh.cpp
index 936a55d8d1..6a54a5e1a2 100644
--- a/cmd/voxel2mesh.cpp
+++ b/cmd/voxel2mesh.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/warp2metric.cpp b/cmd/warp2metric.cpp
index 615e9e0f36..f7132e2a7a 100644
--- a/cmd/warp2metric.cpp
+++ b/cmd/warp2metric.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -87,11 +87,6 @@ void run ()
Fixel::copy_directions_file (template_fixel_directory, output_fixel_directory);
}
- uint32_t num_fixels = 0;
- fixel_template_index.index(0) = 0;
- for (auto l = Loop (fixel_template_index, 0, 3) (fixel_template_index); l; ++l)
- num_fixels += fixel_template_index.value();
-
fc_output_data = Image::create (Path::join (output_fixel_directory, opt[0][2]), Fixel::data_header_from_index (fixel_template_index));
}
diff --git a/cmd/warpconvert.cpp b/cmd/warpconvert.cpp
index 1ca0b7101a..a88264c1d5 100644
--- a/cmd/warpconvert.cpp
+++ b/cmd/warpconvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/warpcorrect.cpp b/cmd/warpcorrect.cpp
index 2b4f59ad60..ab5c11c3b4 100644
--- a/cmd/warpcorrect.cpp
+++ b/cmd/warpcorrect.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/cmd/warpinit.cpp b/cmd/warpinit.cpp
index 1f82ce65ec..a922ca836f 100644
--- a/cmd/warpinit.cpp
+++ b/cmd/warpinit.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -65,7 +65,7 @@ void run ()
Transform transform (header);
auto func = [&transform](Image& image) {
- Eigen::Vector3 voxel_pos ((float)image.index(0), (float)image.index(1), (float)image.index(2));
+ Eigen::Vector3d voxel_pos ((float)image.index(0), (float)image.index(1), (float)image.index(2));
Eigen::Vector3f scanner_pos = (transform.voxel2scanner * voxel_pos).cast();
for (auto l = Loop (3) (image); l; ++l)
image.value() = scanner_pos[image.index(3)];
diff --git a/cmd/warpinvert.cpp b/cmd/warpinvert.cpp
index b88c7e8125..88f3500efc 100644
--- a/cmd/warpinvert.cpp
+++ b/cmd/warpinvert.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/configure b/configure
index d2ccc69182..1402e0844b 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -17,6 +17,9 @@
# pylint: disable=invalid-name
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-dict-items,unused-variable,consider-iterating-dictionary
+
usage_string = '''
USAGE
@@ -235,21 +238,19 @@ config_report = ''
def log (message):
- global logfile
logfile.write (message.encode (errors='ignore'))
if verbose:
sys.stdout.write (message)
sys.stdout.flush()
def report (message):
- global config_report, logfile
+ global config_report
config_report += message
sys.stdout.write (message)
sys.stdout.flush()
logfile.write (('\nREPORT: ' + message.rstrip() + '\n').encode (errors='ignore'))
def error (message):
- global logfile
logfile.write (('\nERROR: ' + message.rstrip() + '\n\n').encode (errors='ignore'))
sys.stdout.write ('\nERROR: ' + message.rstrip() + '\n\n')
sys.stdout.flush()
@@ -335,8 +336,8 @@ class TempFile(object):
def __exit__(self, exception_type, value, traceback):
try:
os.unlink (self.name)
- except OSError as excp:
- log ('error deleting temporary file "' + self.name + '": ' + excp.strerror)
+ except OSError as excp_local:
+ log ('error deleting temporary file "' + self.name + '": ' + excp_local.strerror)
@@ -350,8 +351,8 @@ class DeleteAfter(object):
def __exit__(self, exception_type, value, traceback):
try:
os.unlink (self.name)
- except OSError as excp:
- log ('error deleting temporary file "' + self.name + '": ' + excp.strerror)
+ except OSError as excp_local:
+ log ('error deleting temporary file "' + self.name + '": ' + excp_local.strerror)
class TempDir(object):
@@ -371,8 +372,8 @@ class TempDir(object):
os.unlink (fullpath)
os.rmdir (self.name)
- except OSError as excp:
- log ('error deleting temporary folder "' + self.name + '": ' + excp.strerror)
+ except OSError as excp_local:
+ log ('error deleting temporary folder "' + self.name + '": ' + excp_local.strerror)
@@ -514,11 +515,11 @@ def execute (cmd, exception, raise_on_non_zero_exit_code = True, cwd = None):
log ('STDERR:\n' + stderr + '\n')
log ('>>\n\n')
- except OSError as e:
- log ('error invoking command "' + cmd[0] + '": ' + e.strerror + '\n>>\n\n')
+ except OSError as excp_local:
+ log ('error invoking command "' + cmd[0] + '": ' + excp_local.strerror + '\n>>\n\n')
raise exception
- except Exception as excp:
- error ('unexpected exception of type ' + type(excp).__name__ + ': ' + str(excp) + configure_log_hint)
+ except Exception as excp_local:
+ error ('unexpected exception of type ' + type(excp_local).__name__ + ': ' + str(excp_local) + configure_log_hint)
else:
if raise_on_non_zero_exit_code and process.returncode != 0:
raise exception (stderr)
@@ -529,7 +530,6 @@ def execute (cmd, exception, raise_on_non_zero_exit_code = True, cwd = None):
def compile (source, compiler_flags, linker_flags): # pylint: disable=redefined-builtin
- global cpp, ld
with TempFile ('.cpp') as srcfile:
log ('\nCOMPILE ' + srcfile.name + ':\n---\n' + source + '\n---\n')
srcfile.fid.write (source)
@@ -660,8 +660,8 @@ def compile_check (full_name, name, cflags, ldflags, code, cflags_env=None, cfla
error ('''runtime error!
Unable to configure ''' + name + configure_log_hint)
- except Exception as excp:
- error ('unexpected exception of type ' + type(excp).__name__ + ': ' + str(excp) + configure_log_hint)
+ except Exception as excp_local:
+ error ('unexpected exception of type ' + type(excp_local).__name__ + ': ' + str(excp_local) + configure_log_hint)
@@ -1291,25 +1291,20 @@ int main() { Foo f; }
for qt_makefile in [ 'Makefile', 'Makefile.Release' ]:
try:
log ("reading Qt parameters from file '" + qt_makefile + "'... ")
- for line in open (os.path.join (qt_dir.name, qt_makefile)):
- line = line.strip()
- if line.startswith ('DEFINES'):
- qt_defines = shlex.split (line[line.find('=')+1:].strip())
- elif line.startswith ('CXXFLAGS'):
- qt_cflags = shlex.split (line[line.find('=')+1:].strip())
- elif line.startswith ('INCPATH'):
- qt_includes = shlex.split (line[line.find('=')+1:].strip())
- elif line.startswith ('LIBS'):
- qt_libs = shlex.split (line[line.find('=')+1:].strip())
- elif line.startswith ('LFLAGS'):
- qt_ldflags = shlex.split (line[line.find('=')+1:].strip())
- if qt_defines or qt_cflags or qt_includes or qt_libs or qt_ldflags:
+ with open (os.path.join (qt_dir.name, qt_makefile)) as f:
+ for line in f:
+ line = line.strip()
+ if line.startswith ('DEFINES'):
+ qt_defines = shlex.split (line[line.find('=')+1:].strip())
+ elif line.startswith ('INCPATH'):
+ qt_includes = shlex.split (line[line.find('=')+1:].strip())
+ elif line.startswith ('LIBS'):
+ qt_libs = shlex.split (line[line.find('=')+1:].strip())
+ if qt_defines or qt_includes or qt_libs:
log ('ok\n')
log (' qt_defines: ' + str(qt_defines) + '\n')
- log (' qt_cflags: ' + str(qt_cflags) + '\n')
log (' qt_includes: ' + str(qt_includes) + '\n')
log (' qt_libs: ' + str(qt_libs) + '\n')
- log (' qt_ldflags: ' + str(qt_ldflags) + '\n\n')
break
except OSError:
log ('not found\n')
@@ -1322,8 +1317,7 @@ int main() { Foo f; }
if entry[2:].startswith('..'):
qt_includes[index] = '-I' + os.path.abspath(qt_dir.name + '/' + entry[2:])
- qt_cflags = [ entry for entry in qt_cflags if entry != '-O2' ]
- qt = qt_cflags + qt_defines + qt_includes
+ qt = qt_defines + qt_includes
qt_cflags = []
for entry in qt:
if entry[0] != '$' and not entry == '-I.':
@@ -1333,9 +1327,8 @@ int main() { Foo f; }
else:
qt_cflags += [ entry ]
- qt = qt_ldflags + qt_libs
qt_ldflags = []
- for entry in qt:
+ for entry in qt_libs:
if entry[0] != '$':
qt_ldflags += [ entry.replace('\"','').replace("'",'') ]
diff --git a/core/adapter/base.h b/core/adapter/base.h
index b6c12f38ce..c3fa591b34 100644
--- a/core/adapter/base.h
+++ b/core/adapter/base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/extract.h b/core/adapter/extract.h
index ccfe02a02e..d664a91f98 100644
--- a/core/adapter/extract.h
+++ b/core/adapter/extract.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/gaussian1D.h b/core/adapter/gaussian1D.h
index 301efe81be..cc199bdfce 100644
--- a/core/adapter/gaussian1D.h
+++ b/core/adapter/gaussian1D.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/gradient1D.h b/core/adapter/gradient1D.h
index 5507bcb1ff..c9b05fc175 100644
--- a/core/adapter/gradient1D.h
+++ b/core/adapter/gradient1D.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/gradient3D.h b/core/adapter/gradient3D.h
index f401654043..67d7d9ee61 100644
--- a/core/adapter/gradient3D.h
+++ b/core/adapter/gradient3D.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/jacobian.h b/core/adapter/jacobian.h
index 5a0fa840ad..a825dd155e 100644
--- a/core/adapter/jacobian.h
+++ b/core/adapter/jacobian.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/median.h b/core/adapter/median.h
index f74be45ee7..cac0f79f4c 100644
--- a/core/adapter/median.h
+++ b/core/adapter/median.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/neighbourhood3D.h b/core/adapter/neighbourhood3D.h
index dff54289ee..b56445940b 100644
--- a/core/adapter/neighbourhood3D.h
+++ b/core/adapter/neighbourhood3D.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/normalise3D.h b/core/adapter/normalise3D.h
index f11ef0788d..6531a75108 100644
--- a/core/adapter/normalise3D.h
+++ b/core/adapter/normalise3D.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/permute_axes.h b/core/adapter/permute_axes.h
index bb8ea62bfa..ca6db23ed3 100644
--- a/core/adapter/permute_axes.h
+++ b/core/adapter/permute_axes.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/regrid.h b/core/adapter/regrid.h
index 07c4f1e215..1be770bf6c 100644
--- a/core/adapter/regrid.h
+++ b/core/adapter/regrid.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/replicate.h b/core/adapter/replicate.h
index 5c1bc7fc3f..c9b8e91ca6 100644
--- a/core/adapter/replicate.h
+++ b/core/adapter/replicate.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/reslice.cpp b/core/adapter/reslice.cpp
index 1852790c66..d2b609488e 100644
--- a/core/adapter/reslice.cpp
+++ b/core/adapter/reslice.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/reslice.h b/core/adapter/reslice.h
index 48825615cf..d7865b2c63 100644
--- a/core/adapter/reslice.h
+++ b/core/adapter/reslice.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -149,12 +149,12 @@ namespace MR
OS[0] = OS[1] = OS[2] = 1;
}
else {
- Vector3 y = direct_transform * Vector3 (0.0, 0.0, 0.0);
- Vector3 x0 = direct_transform * Vector3 (1.0, 0.0, 0.0);
+ Vector3d y = direct_transform * Vector3d (0.0, 0.0, 0.0);
+ Vector3d x0 = direct_transform * Vector3d (1.0, 0.0, 0.0);
OS[0] = std::ceil ((1.0-std::numeric_limits::epsilon()) * (y-x0).norm());
- x0 = direct_transform * Vector3 (0.0, 1.0, 0.0);
+ x0 = direct_transform * Vector3d (0.0, 1.0, 0.0);
OS[1] = std::ceil ((1.0-std::numeric_limits::epsilon()) * (y-x0).norm());
- x0 = direct_transform * Vector3 (0.0, 0.0, 1.0);
+ x0 = direct_transform * Vector3d (0.0, 0.0, 1.0);
OS[2] = std::ceil ((1.0-std::numeric_limits::epsilon()) * (y-x0).norm());
}
}
@@ -194,9 +194,9 @@ namespace MR
value_type value () {
using namespace Eigen;
if (oversampling) {
- Vector3 d (x[0]+from[0], x[1]+from[1], x[2]+from[2]);
+ Vector3d d (x[0]+from[0], x[1]+from[1], x[2]+from[2]);
default_type sum (0.0);
- Vector3 s;
+ Vector3d s;
for (uint32_t z = 0; z < OS[2]; ++z) {
s[2] = d[2] + z*inc[2];
for (uint32_t y = 0; y < OS[1]; ++y) {
@@ -210,7 +210,7 @@ namespace MR
}
return normalise (sum, norm);
}
- interp.voxel (direct_transform * Vector3 (x[0], x[1], x[2]));
+ interp.voxel (direct_transform * Vector3d (x[0], x[1], x[2]));
return interp.value();
}
diff --git a/core/adapter/subset.h b/core/adapter/subset.h
index 97c32b0436..69c0833da7 100644
--- a/core/adapter/subset.h
+++ b/core/adapter/subset.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/adapter/warp.h b/core/adapter/warp.h
index e68faeca4d..8cb5cc5edb 100644
--- a/core/adapter/warp.h
+++ b/core/adapter/warp.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -90,7 +90,7 @@ namespace MR
value_type value () {
- Eigen::Vector3 pos = get_position();
+ Eigen::Vector3d pos = get_position();
if (std::isnan(pos[0]) || std::isnan(pos[1]) || std::isnan(pos[2]))
return value_when_out_of_bounds;
interp.scanner (pos);
diff --git a/core/algo/copy.h b/core/algo/copy.h
index 3ee875abf2..6364dd30e0 100644
--- a/core/algo/copy.h
+++ b/core/algo/copy.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/histogram.cpp b/core/algo/histogram.cpp
index 6a21320da0..a7f4b3ebd8 100644
--- a/core/algo/histogram.cpp
+++ b/core/algo/histogram.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/histogram.h b/core/algo/histogram.h
index 23306af9db..0a70006dd9 100644
--- a/core/algo/histogram.h
+++ b/core/algo/histogram.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/iterator.h b/core/algo/iterator.h
index e80e72ef21..0005db88ff 100644
--- a/core/algo/iterator.h
+++ b/core/algo/iterator.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/loop.h b/core/algo/loop.h
index d0aa792a57..b22f51fb86 100644
--- a/core/algo/loop.h
+++ b/core/algo/loop.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/min_max.h b/core/algo/min_max.h
index d6d69892bb..ee076b3b02 100644
--- a/core/algo/min_max.h
+++ b/core/algo/min_max.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/neighbourhooditerator.h b/core/algo/neighbourhooditerator.h
index 4012f049b1..a1fa194e87 100644
--- a/core/algo/neighbourhooditerator.h
+++ b/core/algo/neighbourhooditerator.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/random_loop.h b/core/algo/random_loop.h
index e5a6e22d00..f603525725 100644
--- a/core/algo/random_loop.h
+++ b/core/algo/random_loop.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/random_threaded_loop.h b/core/algo/random_threaded_loop.h
index a5367ca63f..ee505f0cd4 100644
--- a/core/algo/random_threaded_loop.h
+++ b/core/algo/random_threaded_loop.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/stochastic_threaded_loop.h b/core/algo/stochastic_threaded_loop.h
index b94b391f8a..428c0ec702 100644
--- a/core/algo/stochastic_threaded_loop.h
+++ b/core/algo/stochastic_threaded_loop.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/threaded_copy.h b/core/algo/threaded_copy.h
index ad0bceb1de..fb24f2c326 100644
--- a/core/algo/threaded_copy.h
+++ b/core/algo/threaded_copy.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/algo/threaded_loop.h b/core/algo/threaded_loop.h
index 323cecf638..55f54c3033 100644
--- a/core/algo/threaded_loop.h
+++ b/core/algo/threaded_loop.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/app.cpp b/core/app.cpp
index da6b906c31..eff9de14bd 100644
--- a/core/app.cpp
+++ b/core/app.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -72,7 +72,7 @@ namespace MR
const char* AUTHOR = nullptr;
const char* COPYRIGHT =
- "Copyright (c) 2008-2021 the MRtrix3 contributors.\n"
+ "Copyright (c) 2008-2022 the MRtrix3 contributors.\n"
"\n"
"This Source Code Form is subject to the terms of the Mozilla Public\n"
"License, v. 2.0. If a copy of the MPL was not distributed with this\n"
diff --git a/core/app.h b/core/app.h
index d34446c45e..49f01f33d5 100644
--- a/core/app.h
+++ b/core/app.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/apply.h b/core/apply.h
index d13be189be..e4b42ad956 100644
--- a/core/apply.h
+++ b/core/apply.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/axes.cpp b/core/axes.cpp
index 9656238311..9a1cbd762a 100644
--- a/core/axes.cpp
+++ b/core/axes.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -27,7 +27,7 @@ namespace MR
- std::string dir2id (const Eigen::Vector3& axis)
+ std::string dir2id (const Eigen::Vector3d& axis)
{
if (axis[0] == -1) {
assert (!axis[1]); assert (!axis[2]); return "i-";
@@ -48,7 +48,7 @@ namespace MR
- Eigen::Vector3 id2dir (const std::string& id)
+ Eigen::Vector3d id2dir (const std::string& id)
{
if (id == "i-")
return { -1, 0, 0 };
diff --git a/core/axes.h b/core/axes.h
index c403bc43b1..dbf0794a2d 100644
--- a/core/axes.h
+++ b/core/axes.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -36,8 +36,8 @@ namespace MR
* phase-encoding direction between a 3-vector (e.g.
* [0 1 0] ) and a NIfTI axis identifier (e.g. 'i-')
*/
- std::string dir2id (const Eigen::Vector3&);
- Eigen::Vector3 id2dir (const std::string&);
+ std::string dir2id (const Eigen::Vector3d&);
+ Eigen::Vector3d id2dir (const std::string&);
diff --git a/core/cmdline_option.h b/core/cmdline_option.h
index 75ab1748b1..03127d2fcf 100644
--- a/core/cmdline_option.h
+++ b/core/cmdline_option.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/command.h b/core/command.h
index 9fc92b12c2..54f5d111b7 100644
--- a/core/command.h
+++ b/core/command.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/datatype.cpp b/core/datatype.cpp
index b26a965ae0..de385bfd4e 100644
--- a/core/datatype.cpp
+++ b/core/datatype.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/datatype.h b/core/datatype.h
index 396d9b9533..05c1d2799c 100644
--- a/core/datatype.h
+++ b/core/datatype.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/debug.h b/core/debug.h
index 567f3d2afe..e8858c2dce 100644
--- a/core/debug.h
+++ b/core/debug.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/dwi/gradient.cpp b/core/dwi/gradient.cpp
index 655b585e67..131b751dce 100644
--- a/core/dwi/gradient.cpp
+++ b/core/dwi/gradient.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -263,7 +263,8 @@ namespace MR
}
// modulate verbosity of message & whether or not header is modified
// based on magnitude of effect of normalisation
- const default_type max_log_scaling_factor = squared_norms.log().abs().maxCoeff();
+ const default_type max_log_scaling_factor = squared_norms.unaryExpr ([](double v) {
+ return v > 0.0 ? abs(log(v)) : 0.0; }).maxCoeff();
const default_type max_scaling_factor = std::exp (max_log_scaling_factor);
const bool exceeds_single_precision = max_log_scaling_factor > 1e-5;
const bool requires_bvalue_scaling = max_log_scaling_factor > 0.01;
diff --git a/core/dwi/gradient.h b/core/dwi/gradient.h
index 333bbbeabb..e7ce27fa8d 100644
--- a/core/dwi/gradient.h
+++ b/core/dwi/gradient.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/dwi/shells.cpp b/core/dwi/shells.cpp
index e89929ce08..a42f0e1236 100644
--- a/core/dwi/shells.cpp
+++ b/core/dwi/shells.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/dwi/shells.h b/core/dwi/shells.h
index 1e9ad638f9..ea21ef2813 100644
--- a/core/dwi/shells.h
+++ b/core/dwi/shells.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/eigen_plugins/array.h b/core/eigen_plugins/array.h
index 88f46ede7c..57bd6c5642 100644
--- a/core/eigen_plugins/array.h
+++ b/core/eigen_plugins/array.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/eigen_plugins/dense_base.h b/core/eigen_plugins/dense_base.h
index 02c52b55cc..bc5c42b594 100644
--- a/core/eigen_plugins/dense_base.h
+++ b/core/eigen_plugins/dense_base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -19,7 +19,7 @@ template \
inline Derived& operator ARG (const MR::Helper::ConstRow& row) { \
this->resize (row.image.size(row.axis),1); \
for (row.image.index(row.axis) = 0; row.image.index (row.axis) < row.image.size (row.axis); ++row.image.index (row.axis)) \
- this->operator() (row.image.index (row.axis), 0) ARG row.image.value(); \
+ this->operator() (ssize_t (row.image.index (row.axis)), 0) ARG row.image.value(); \
return derived(); \
}
diff --git a/core/eigen_plugins/matrix.h b/core/eigen_plugins/matrix.h
index ae44a8abfa..7186051b19 100644
--- a/core/eigen_plugins/matrix.h
+++ b/core/eigen_plugins/matrix.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -21,7 +21,7 @@ template Matrix (const MR::Helper::Row& row) : Base
template inline Matrix& operator ARG (const MR::Helper::ConstRow& row) { \
this->resize (row.image.size(row.axis),1); \
for (row.image.index(row.axis) = 0; row.image.index (row.axis) < row.image.size (row.axis); ++row.image.index (row.axis)) \
- this->operator() (row.image.index (row.axis), 0) ARG row.image.value(); \
+ this->operator() (ssize_t (row.image.index (row.axis)), 0) ARG row.image.value(); \
return *this; \
}
diff --git a/core/exception.cpp b/core/exception.cpp
index a7f401b4dd..48198a4a94 100644
--- a/core/exception.cpp
+++ b/core/exception.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/exception.h b/core/exception.h
index df977362ec..dfe4abf707 100644
--- a/core/exception.h
+++ b/core/exception.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/config.cpp b/core/file/config.cpp
index b0f795d305..ef2e17e966 100644
--- a/core/file/config.cpp
+++ b/core/file/config.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/config.h b/core/file/config.h
index d47b5b0220..b7bb942325 100644
--- a/core/file/config.h
+++ b/core/file/config.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/copy.h b/core/file/copy.h
index 3ea5aec763..0fdde6abc5 100644
--- a/core/file/copy.h
+++ b/core/file/copy.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/dicom/csa_entry.h b/core/file/dicom/csa_entry.h
index 73ff0329c2..4512589355 100644
--- a/core/file/dicom/csa_entry.h
+++ b/core/file/dicom/csa_entry.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/dicom/definitions.h b/core/file/dicom/definitions.h
index 6990c70535..121e7c9883 100644
--- a/core/file/dicom/definitions.h
+++ b/core/file/dicom/definitions.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/dicom/dict.cpp b/core/file/dicom/dict.cpp
index 7c1778ec29..915aba82bc 100644
--- a/core/file/dicom/dict.cpp
+++ b/core/file/dicom/dict.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -161,7 +161,7 @@ namespace MR {
{ 0x00081198UL, "SQFailedSOPSequence" },
{ 0x00081199UL, "SQReferencedSOPSequence" },
{ 0x00081200UL, "SQStudiesContainingOtherReferencedInstancesSequence" },
- { 0x00081250UL, "SQRelatedSeriesSequenceired" },
+ { 0x00081250UL, "SQRelatedSeriesSequence" },
{ 0x00082111UL, "STDerivationDescription" },
{ 0x00082112UL, "SQSourceImageSequence" },
{ 0x00082120UL, "SHStageName" },
diff --git a/core/file/dicom/element.cpp b/core/file/dicom/element.cpp
index 84bc363a84..81d79f2401 100644
--- a/core/file/dicom/element.cpp
+++ b/core/file/dicom/element.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -280,10 +280,37 @@ namespace MR {
+ bool Element::ignore_when_parsing () const
+ {
+ for (const auto& seq : parents) {
+ // ignore anything within IconImageSequence:
+ if (seq.is (0x0088U, 0x0200U))
+ return true;
+ // allow Philips PrivatePerFrameSq:
+ if (seq.is (0x2005U, 0x140FU))
+ continue;
+ // ignore anything within sequences with unknown (private) group:
+ if (seq.group & 1U)
+ return true;
+ }
+
+ return false;
+ }
+
+ bool Element::is_in_series_ref_sequence () const
+ {
+ // required to group together series exported using
+ // Siemens XA10A in Interoperability mode
+ for (const auto& seq : parents)
+ if (seq.is (0x0008U, 0x1250U))
+ return true;
+ return false;
+ }
+
@@ -296,8 +323,9 @@ namespace MR {
if (VR == VR_SQ) return SEQ;
if (VR == VR_DA) return DATE;
if (VR == VR_TM) return TIME;
+ if (VR == VR_DT) return DATETIME;
if (VR == VR_AE || VR == VR_AS || VR == VR_CS ||
- VR == VR_DS || VR == VR_DT || VR == VR_IS || VR == VR_LO ||
+ VR == VR_DS || VR == VR_IS || VR == VR_LO ||
VR == VR_LT || VR == VR_PN || VR == VR_SH || VR == VR_ST ||
VR == VR_UI || VR == VR_UT || VR == VR_AT) return STRING;
return OTHER;
@@ -392,6 +420,20 @@ namespace MR {
+ std::pair Element::get_datetime () const
+ {
+ assert (type() == DATETIME);
+ if (size < 14)
+ throw Exception ("malformed DateTime entry");
+ return {
+ Date (std::string (reinterpret_cast (data), 8)),
+ Time (std::string (reinterpret_cast (data+8), std::min(size-8,13U)))
+ };
+ }
+
+
+
+
vector Element::get_string () const
{
@@ -428,6 +470,8 @@ namespace MR {
return str(get_date());
case Element::TIME:
return str(get_time());
+ case Element::DATETIME:
+ return str(get_datetime().first) + " " + str(get_datetime().second);
case Element::STRING:
if (group == GROUP_DATA && element == ELEMENT_DATA) {
return "(data)";
diff --git a/core/file/dicom/element.h b/core/file/dicom/element.h
index 91ff60bb87..1142ba8c09 100644
--- a/core/file/dicom/element.h
+++ b/core/file/dicom/element.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -35,6 +35,12 @@ namespace MR {
Sequence (uint16_t group, uint16_t element, uint8_t* end) : group (group), element (element), end (end) { }
uint16_t group, element;
uint8_t* end;
+
+ bool is (uint16_t Group, uint16_t Element) const {
+ if (group != Group)
+ return false;
+ return element == Element;
+ }
};
class Date { NOMEMALIGN
@@ -95,6 +101,7 @@ namespace MR {
FLOAT,
DATE,
TIME,
+ DATETIME,
STRING,
SEQ,
OTHER
@@ -143,12 +150,16 @@ namespace MR {
return VR == VR_SQ || ( group == GROUP_DATA && element == ELEMENT_DATA && size == LENGTH_UNDEFINED );
}
+ bool ignore_when_parsing () const;
+ bool is_in_series_ref_sequence () const;
+
Type type () const;
vector get_int () const;
vector get_uint () const;
vector get_float () const;
Date get_date () const;
Time get_time () const;
+ std::pair get_datetime () const;
vector get_string () const;
int32_t get_int (size_t idx, int32_t default_value = 0) const { auto v (get_int()); return check_get (idx, v.size()) ? v[idx] : default_value; }
diff --git a/core/file/dicom/image.cpp b/core/file/dicom/image.cpp
index f08e3682d4..c7ee7062b6 100644
--- a/core/file/dicom/image.cpp
+++ b/core/file/dicom/image.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -27,15 +27,10 @@ namespace MR {
namespace Dicom {
-
void Image::parse_item (Element& item, const std::string& dirname)
{
-
- for (const auto& seq : item.parents) {
- // ignore anything within IconImageSequence:
- if (seq.group == 0x0088U && seq.element == 0x0200U)
- return;
- }
+ if (item.ignore_when_parsing())
+ return;
switch (item.group) {
case 0x0008U:
@@ -112,6 +107,12 @@ namespace MR {
case 0x1314U:
flip_angle = item.get_float (0, flip_angle);
return;
+ case 0x9074U:
+ acquisition_time = item.get_datetime().second;
+ return;
+ case 0x9082U:
+ echo_time = item.get_float (0, echo_time);
+ return;
case 0x9087U:
{ // ugly hack to handle badly formatted Philips data:
default_type v = item.get_float (0, bvalue);
@@ -133,13 +134,13 @@ namespace MR {
case 0x0019U:
switch (item.element) { // GE DW encoding info:
case 0x10BBU:
- G[0] = item.get_float (0, G[0]);
+ G_prs[0] = item.get_float (0, G[0]);
return;
case 0x10BCU:
- G[1] = item.get_float (0, G[1]);
+ G_prs[1] = item.get_float (0, G[1]);
return;
case 0x10BDU:
- G[2] = item.get_float (0, G[2]);
+ G_prs[2] = item.get_float (0, G[2]);
return;
case 0x100CU: //Siemens private DW encoding tags:
bvalue = item.get_float (0, bvalue);
@@ -158,6 +159,9 @@ namespace MR {
return;
case 0x0020U:
switch (item.element) {
+ case 0x000EU:
+ ignore_series_num = item.is_in_series_ref_sequence();
+ return;
case 0x0011U:
series_num = item.get_uint (0, series_num);
return;
@@ -202,6 +206,9 @@ namespace MR {
return;
case 0x0028U:
switch (item.element) {
+ case 0x0002U:
+ samples_per_pixel = item.get_uint (0, samples_per_pixel);
+ return;
case 0x0010U:
dim[1] = item.get_uint (0, dim[1]);
return;
@@ -241,12 +248,17 @@ namespace MR {
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, bvalue);
+ switch (item.element) {
+ case 0x1003:
+ bvalue = item.get_float (0, bvalue);
+ return;
+ case 0x1004:
+ philips_orientation = item.get_string(0, "\0")[0];
+ return;
+ }
return;
case 0x2005U: // Philips DW encoding info:
switch (item.element) {
@@ -259,6 +271,9 @@ namespace MR {
case 0x10B2U:
G[2] = item.get_float (0, G[2]);
return;
+ case 0x1413:
+ grad_number = item.get_int()[0];
+ return;
}
return;
case 0x7FE0U:
@@ -278,7 +293,7 @@ namespace MR {
if (in_frames) {
calc_distance();
frames.push_back (std::shared_ptr (new Frame (*this)));
- frame_offset += dim[0] * dim[1] * (bits_alloc/8);
+ frame_offset += dim[0] * dim[1] * (bits_alloc/8) * samples_per_pixel;
}
else
in_frames = true;
@@ -533,8 +548,8 @@ namespace MR {
for (auto frame_it = frames.cbegin()+1; frame_it != frames.cend(); ++frame_it) {
const Frame& frame (**frame_it);
- if (frame.series_num != previous->series_num ||
- frame.acq != previous->acq)
+ if ((!frame.ignore_series_num && frame.series_num != previous->series_num ) ||
+ frame.acq != previous->acq || frame.distance < previous->distance)
update_count (2, dim, index);
else if (frame.distance != previous->distance)
update_count (1, dim, index);
@@ -598,24 +613,27 @@ namespace MR {
std::string dw_scheme;
const size_t nDW = frames.size() / nslices;
- const bool rotate_DW_scheme = frames[0]->DW_scheme_wrt_image;
for (size_t n = 0; n < nDW; ++n) {
const Frame& frame (*frames[n*nslices]);
- std::array g = {{ 0.0, 0.0, 0.0, frame.bvalue }};
- if (g[3] && std::isfinite (frame.G[0]) && std::isfinite (frame.G[1]) && std::isfinite (frame.G[2])) {
-
- if (rotate_DW_scheme) {
- g[0] = image_transform(0,0)*frame.G[0] + image_transform(0,1)*frame.G[1] - image_transform(0,2)*frame.G[2];
- g[1] = image_transform(1,0)*frame.G[0] + image_transform(1,1)*frame.G[1] - image_transform(1,2)*frame.G[2];
- g[2] = image_transform(2,0)*frame.G[0] + image_transform(2,1)*frame.G[1] - image_transform(2,2)*frame.G[2];
- } else {
+ Eigen::Vector3d g = Eigen::Vector3d::Zero();
+ if (frame.bvalue) {
+ if (frame.G.allFinite()) {
g[0] = -frame.G[0];
g[1] = -frame.G[1];
g[2] = frame.G[2];
+ }
+ else if (frame.G_prs.allFinite()) {
+ Eigen::Matrix T = image_transform.matrix().leftCols(3);
+ T.col(2) *= -1.0;
+ // if PE direction along x, need to switch X & Y:
+ if (frame.pe_axis == 0) {
+ T.col(0).swap (T.col(1));
+ T.col(0) *= -1.0;
+ }
+ g = T * frame.G_prs;
}
-
}
- add_line (dw_scheme, str(g[0]) + "," + str(g[1]) + "," + str(g[2]) + "," + str(g[3]));
+ add_line (dw_scheme, str(g[0]) + "," + str(g[1]) + "," + str(g[2]) + "," + str(frame.bvalue));
}
return dw_scheme;
diff --git a/core/file/dicom/image.h b/core/file/dicom/image.h
index be39d21d5a..a5ebfd6962 100644
--- a/core/file/dicom/image.h
+++ b/core/file/dicom/image.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -33,7 +33,9 @@ namespace MR {
class Frame { MEMALIGN(Frame)
public:
Frame () {
- acq_dim[0] = acq_dim[1] = dim[0] = dim[1] = instance = series_num = acq = sequence = echo_index = UINT_MAX;
+ acq_dim[0] = acq_dim[1] = dim[0] = dim[1] = instance =
+ series_num = acq = sequence = echo_index = grad_number = UINT_MAX;
+ samples_per_pixel = 1;
position_vector[0] = position_vector[1] = position_vector[2] = NaN;
orientation_x[0] = orientation_x[1] = orientation_x[2] = NaN;
orientation_y[0] = orientation_y[1] = orientation_y[2] = NaN;
@@ -42,25 +44,27 @@ namespace MR {
pixel_size[0] = pixel_size[1] = slice_thickness = slice_spacing = NaN;
scale_intercept = 0.0;
scale_slope = 1.0;
- bvalue = G[0] = G[1] = G[2] = NaN;
+ bvalue = G[0] = G[1] = G[2] = G_prs[0] = G_prs[1] = G_prs[2] = NaN;
data = bits_alloc = data_size = frame_offset = 0;
- DW_scheme_wrt_image = false;
transfer_syntax_supported = true;
+ ignore_series_num = false;
pe_axis = 3;
pe_sign = 0;
+ philips_orientation = '\0';
pixel_bandwidth = bandwidth_per_pixel_phase_encode = echo_time = inversion_time = repetition_time = flip_angle = partial_fourier = time_after_start = NaN;
echo_train_length = 0;
bipolar_flag = readoutmode_flag = 0;
}
- size_t acq_dim[2], dim[2], series_num, instance, acq, sequence, echo_index;
- Eigen::Vector3 position_vector, orientation_x, orientation_y, orientation_z, G;
+ size_t acq_dim[2], dim[2], series_num, instance, acq, sequence, echo_index, grad_number, samples_per_pixel;
+ Eigen::Vector3d position_vector, orientation_x, orientation_y, orientation_z, G, G_prs;
default_type distance, pixel_size[2], slice_thickness, slice_spacing, scale_slope, scale_intercept, bvalue;
size_t data, bits_alloc, data_size, frame_offset;
std::string filename, image_type;
- bool DW_scheme_wrt_image, transfer_syntax_supported;
+ bool DW_scheme_wrt_image, transfer_syntax_supported, ignore_series_num;
size_t pe_axis;
int pe_sign;
+ char philips_orientation;
Time acquisition_time;
default_type pixel_bandwidth, bandwidth_per_pixel_phase_encode, echo_time, inversion_time, repetition_time, flip_angle, partial_fourier, time_after_start;
size_t echo_train_length;
@@ -69,7 +73,7 @@ namespace MR {
vector flip_angles;
bool operator< (const Frame& frame) const {
- if (series_num != frame.series_num)
+ if (!ignore_series_num && series_num != frame.series_num)
return series_num < frame.series_num;
if (image_type != frame.image_type)
return image_type < frame.image_type;
@@ -84,6 +88,8 @@ namespace MR {
return echo_index < frame.echo_index;
if (std::isfinite (echo_time) && echo_time != frame.echo_time)
return echo_time < frame.echo_time;
+ if (grad_number != frame.grad_number)
+ return grad_number < frame.grad_number;
if (sequence != frame.sequence)
return sequence < frame.sequence;
if (instance != frame.instance)
@@ -99,7 +105,7 @@ namespace MR {
else {
if (!orientation_x.allFinite() || !orientation_y.allFinite())
throw Exception ("slice orientation information missing from DICOM header!");
- Eigen::Vector3 normal = orientation_x.cross (orientation_y);
+ Eigen::Vector3d normal = orientation_x.cross (orientation_y);
if (normal.dot (orientation_z) < 0.0)
orientation_z = -normal;
else
@@ -113,6 +119,12 @@ namespace MR {
distance = orientation_z.dot (position_vector);
}
+ bool is_philips_iso () const {
+ if (philips_orientation == '\0')
+ return false;
+ return (philips_orientation == 'I' && bvalue > 0.0);
+ }
+
static vector count (const vector& frames);
static default_type get_slice_separation (const vector& frames, size_t nslices);
static std::string get_DW_scheme (const vector& frames, const size_t nslices, const transform_type& image_transform);
diff --git a/core/file/dicom/mapper.cpp b/core/file/dicom/mapper.cpp
index 0f6d58b347..a79fcb0850 100644
--- a/core/file/dicom/mapper.cpp
+++ b/core/file/dicom/mapper.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -35,6 +35,23 @@ namespace MR {
std::unique_ptr dicom_to_mapper (MR::Header& H, vector>& series)
{
+ //ENVVAR name: MRTRIX_PRESERVE_PHILIPS_ISO
+ //ENVVAR Do not remove the synthetic isotropically-weighted diffusion
+ //ENVVAR image often added at the end of the series on Philips
+ //ENVVAR scanners. By default, these images are removed from the series
+ //ENVVAR to prevent errors in downstream processing. If this
+ //ENVVAR environment variable is set, these images will be preserved in
+ //ENVVAR the output.
+ //ENVVAR
+ //ENVVAR Note that it can be difficult to ascertain which volume is the
+ //ENVVAR synthetic isotropically-weighed image, since its DW encoding
+ //ENVVAR will normally have been modified from its initial value
+ //ENVVAR (e.g. [ 0 0 0 1000 ] for a b=1000 acquisition) to b=0 due to
+ //ENVVAR b-value scaling.
+ bool preserve_philips_iso = ( getenv ("MRTRIX_PRESERVE_PHILIPS_ISO") != nullptr );
+
+
+
assert (series.size() > 0);
std::unique_ptr io_handler;
@@ -77,11 +94,13 @@ namespace MR {
std::sort (image_it->frames.begin(), image_it->frames.end(), compare_ptr_contents());
for (auto frame_it : image_it->frames)
if (frame_it->image_type == series_it->image_type)
- frames.push_back (frame_it.get());
+ if (!frame_it->is_philips_iso() || preserve_philips_iso)
+ frames.push_back (frame_it.get());
}
// otherwise add image frame:
else
- frames.push_back (image_it.get());
+ if (!image_it->is_philips_iso() || preserve_philips_iso)
+ frames.push_back (image_it.get());
}
}
@@ -189,9 +208,14 @@ namespace MR {
H.keyval()["FlipAngle"] = join (frame.flip_angles, ",");
}
- size_t nchannels = image.frames.size() ? 1 : image.data_size / (frame.dim[0] * frame.dim[1] * (frame.bits_alloc/8));
- if (nchannels > 1)
- INFO ("data segment is larger than expected from image dimensions - interpreting as multi-channel data");
+ size_t nchannels = image.samples_per_pixel;
+ if (nchannels == 1 && !image.frames.size()) {
+ // only guess number of samples per pixel if not explicitly set in
+ // DICOM and not using multi-frame:
+ nchannels = image.data_size / (frame.dim[0] * frame.dim[1] * (frame.bits_alloc/8));
+ if (nchannels > 1)
+ INFO ("data segment is larger than expected from image dimensions - interpreting as multi-channel data");
+ }
H.ndim() = 3 + (dim[0]*dim[2]>1) + (nchannels>1);
diff --git a/core/file/dicom/mapper.h b/core/file/dicom/mapper.h
index ee70067a71..46b6af39e2 100644
--- a/core/file/dicom/mapper.h
+++ b/core/file/dicom/mapper.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/dicom/patient.cpp b/core/file/dicom/patient.cpp
index 27b3d7c98e..c435efee5a 100644
--- a/core/file/dicom/patient.cpp
+++ b/core/file/dicom/patient.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -22,31 +22,46 @@ namespace MR {
namespace File {
namespace Dicom {
- std::shared_ptr Patient::find (const std::string& study_name, const std::string& study_ID,
- const std::string& study_date, const std::string& study_time)
+ namespace {
+ bool mismatched_UID_time_warning_issued = false;
+ }
+
+ std::shared_ptr Patient::find (const std::string& study_name, const std::string& study_ID,
+ const std::string& study_UID, const std::string& study_date, const std::string& study_time)
{
for (size_t n = 0; n < size(); n++) {
bool match = true;
if (study_name == (*this)[n]->name) {
- if (study_ID.size() && (*this)[n]->ID.size())
- if (study_ID != (*this)[n]->ID)
+ if (study_ID.size() && (*this)[n]->ID.size())
+ if (study_ID != (*this)[n]->ID)
match = false;
if (match) {
if (study_date.size() && (*this)[n]->date.size())
- if (study_date != (*this)[n]->date)
+ if (study_date != (*this)[n]->date)
match = false;
}
if (match) {
- if (study_time.size() && (*this)[n]->time.size())
- if (study_time != (*this)[n]->time)
+ if (study_time.size() && (*this)[n]->time.size())
+ if (study_time != (*this)[n]->time)
match = false;
}
- if (match)
+ if (!match) {
+ if (study_UID.size() && (*this)[n]->UID.size()) {
+ if (study_UID == (*this)[n]->UID) {
+ if (!mismatched_UID_time_warning_issued) {
+ WARN ("mismatched study time and UID - this may cause problems with series grouping");
+ mismatched_UID_time_warning_issued = true;
+ }
+ match = true;
+ }
+ }
+ }
+ if (match)
return (*this)[n];
}
}
- push_back (std::shared_ptr (new Study (this, study_name, study_ID, study_date, study_time)));
+ push_back (std::shared_ptr (new Study (this, study_name, study_ID, study_UID, study_date, study_time)));
return back();
}
@@ -57,12 +72,12 @@ namespace MR {
std::ostream& operator<< (std::ostream& stream, const Patient& item)
{
- stream << MR::printf (" %-30s %-16s %10s\n",
- item.name.c_str(),
- format_ID (item.ID).c_str(),
+ stream << MR::printf (" %-30s %-16s %10s\n",
+ item.name.c_str(),
+ format_ID (item.ID).c_str(),
format_date (item.DOB).c_str());
- for (size_t n = 0; n < item.size(); n++)
+ for (size_t n = 0; n < item.size(); n++)
stream << *item[n];
return stream;
diff --git a/core/file/dicom/patient.h b/core/file/dicom/patient.h
index a8b53902ca..f11fa268a7 100644
--- a/core/file/dicom/patient.h
+++ b/core/file/dicom/patient.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -28,13 +28,13 @@ namespace MR {
class Patient : public vector> { NOMEMALIGN
public:
- Patient (const std::string& patient_name, const std::string& patient_ID = "",
- const std::string& patient_DOB = "") :
+ Patient (const std::string& patient_name, const std::string& patient_ID,
+ const std::string& patient_DOB) :
name (patient_name), ID (patient_ID), DOB (patient_DOB) { }
std::string name, ID, DOB;
std::shared_ptr find (const std::string& study_name, const std::string& study_ID = "",
- const std::string& study_date = "", const std::string& study_time = "");
+ const std::string& study_UID = "", const std::string& study_date = "", const std::string& study_time = "");
bool operator< (const Patient& s) const {
if (name != s.name)
diff --git a/core/file/dicom/quick_scan.cpp b/core/file/dicom/quick_scan.cpp
index c44110be60..e926531abe 100644
--- a/core/file/dicom/quick_scan.cpp
+++ b/core/file/dicom/quick_scan.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -38,6 +38,7 @@ namespace MR {
study_ID.clear();
study_time.clear();
series.clear();
+ series_ref_UID.clear();
image_type.clear();
series_date.clear();
series_time.clear();
@@ -53,30 +54,35 @@ namespace MR {
bool in_frames = false;
while (item.read()) {
- if (item.is (0x0008U, 0x0008U)) current_image_type = join (item.get_string(), " ");
- else if (item.is (0x0008U, 0x0020U)) study_date = item.get_string (0);
- else if (item.is (0x0008U, 0x0021U)) series_date = item.get_string (0);
- else if (item.is (0x0008U, 0x0030U)) study_time = item.get_string (0);
- else if (item.is (0x0008U, 0x0031U)) series_time = item.get_string (0);
- else if (item.is (0x0008U, 0x0060U)) modality = item.get_string (0);
- else if (item.is (0x0008U, 0x1030U)) study = item.get_string (0);
- else if (item.is (0x0008U, 0x103EU)) series = item.get_string (0);
- else if (item.is (0x0010U, 0x0010U)) patient = item.get_string (0);
- else if (item.is (0x0010U, 0x0020U)) patient_ID = item.get_string (0);
- else if (item.is (0x0010U, 0x0030U)) patient_DOB = item.get_string (0);
- else if (item.is (0x0018U, 0x0024U)) sequence = item.get_string (0);
- else if (item.is (0x0020U, 0x0010U)) study_ID = item.get_string (0);
- else if (item.is (0x0020U, 0x0011U)) series_number = item.get_uint (0);
- else if (item.is (0x0028U, 0x0010U)) dim[1] = item.get_uint (0);
- else if (item.is (0x0028U, 0x0011U)) dim[0] = item.get_uint (0);
- else if (item.is (0x0028U, 0x0100U)) bits_alloc = item.get_uint (0);
- else if (item.is (0x7FE0U, 0x0010U)) data = item.offset (item.data);
- else if (item.is (0xFFFEU, 0xE000U)) {
- if (item.parents.size() &&
- item.parents.back().group == 0x5200U &&
- item.parents.back().element == 0x9230U) { // multi-frame item
- if (in_frames) ++image_type[current_image_type];
- else in_frames = true;
+ if (!item.ignore_when_parsing()) {
+
+ if (item.is (0x0008U, 0x0008U)) current_image_type = join (item.get_string(), " ");
+ else if (item.is (0x0008U, 0x0020U)) study_date = item.get_string (0);
+ else if (item.is (0x0008U, 0x0021U)) series_date = item.get_string (0);
+ else if (item.is (0x0008U, 0x0030U)) study_time = item.get_string (0);
+ else if (item.is (0x0008U, 0x0031U)) series_time = item.get_string (0);
+ else if (item.is (0x0008U, 0x0060U)) modality = item.get_string (0);
+ else if (item.is (0x0008U, 0x1030U)) study = item.get_string (0);
+ else if (item.is (0x0008U, 0x103EU)) series = item.get_string (0);
+ else if (item.is (0x0010U, 0x0010U)) patient = item.get_string (0);
+ else if (item.is (0x0010U, 0x0020U)) patient_ID = item.get_string (0);
+ else if (item.is (0x0010U, 0x0030U)) patient_DOB = item.get_string (0);
+ else if (item.is (0x0018U, 0x0024U)) sequence = item.get_string (0);
+ else if (item.is (0x0020U, 0x000DU)) study_UID = item.get_string (0);
+ else if (item.is (0x0020U, 0x000EU)) { if (item.is_in_series_ref_sequence()) series_ref_UID = item.get_string(0); }
+ else if (item.is (0x0020U, 0x0010U)) study_ID = item.get_string (0);
+ else if (item.is (0x0020U, 0x0011U)) series_number = item.get_uint (0);
+ else if (item.is (0x0028U, 0x0010U)) dim[1] = item.get_uint (0);
+ else if (item.is (0x0028U, 0x0011U)) dim[0] = item.get_uint (0);
+ else if (item.is (0x0028U, 0x0100U)) bits_alloc = item.get_uint (0);
+ else if (item.is (0x7FE0U, 0x0010U)) data = item.offset (item.data);
+ else if (item.is (0xFFFEU, 0xE000U)) {
+ if (item.parents.size() &&
+ item.parents.back().group == 0x5200U &&
+ item.parents.back().element == 0x9230U) { // multi-frame item
+ if (in_frames) ++image_type[current_image_type];
+ else in_frames = true;
+ }
}
}
diff --git a/core/file/dicom/quick_scan.h b/core/file/dicom/quick_scan.h
index ec9eecc296..5c07561994 100644
--- a/core/file/dicom/quick_scan.h
+++ b/core/file/dicom/quick_scan.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -31,8 +31,8 @@ namespace MR {
std::string filename, modality;
std::string patient, patient_ID, patient_DOB;
- std::string study, study_ID, study_date, study_time;
- std::string series, series_date, series_time, sequence;
+ std::string study, study_ID, study_UID, study_date, study_time;
+ std::string series, series_ref_UID, series_date, series_time, sequence;
std::map image_type;
size_t series_number, bits_alloc, dim[2], data;
bool transfer_syntax_supported;
diff --git a/core/file/dicom/select_cmdline.cpp b/core/file/dicom/select_cmdline.cpp
index 3b73ce662f..590b2b12cd 100644
--- a/core/file/dicom/select_cmdline.cpp
+++ b/core/file/dicom/select_cmdline.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/dicom/series.cpp b/core/file/dicom/series.cpp
index e20f7be8b3..3fca02d6ca 100644
--- a/core/file/dicom/series.cpp
+++ b/core/file/dicom/series.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/dicom/series.h b/core/file/dicom/series.h
index ac2de094cf..154afbd1e9 100644
--- a/core/file/dicom/series.h
+++ b/core/file/dicom/series.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -31,14 +31,13 @@ namespace MR {
class Series : public vector> { NOMEMALIGN
public:
Series (Study* parent, const std::string& series_name, size_t series_number, const std::string& image_type,
- const std::string& series_modality = "", const std::string& series_date = "", const std::string& series_time = "") :
- study (parent), name (series_name), image_type (image_type), modality (series_modality),
- date (series_date), time (series_time) {
- number = series_number;
- }
+ const std::string& series_ref_UID, const std::string& series_modality,
+ const std::string& series_date, const std::string& series_time) :
+ study (parent), name (series_name), image_type (image_type), series_ref_UID (series_ref_UID),
+ number (series_number), modality (series_modality), date (series_date), time (series_time) { }
Study* study;
- std::string name, image_type;
+ std::string name, image_type, series_ref_UID;
size_t number;
std::string modality;
std::string date;
diff --git a/core/file/dicom/study.cpp b/core/file/dicom/study.cpp
index 9ff0051734..e6c6f918b9 100644
--- a/core/file/dicom/study.cpp
+++ b/core/file/dicom/study.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -24,15 +24,28 @@ namespace MR {
namespace {
bool series_time_mismatch_warning_issued = false;
+ bool series_number_UID_mismatch_warning_issued = false;
}
- std::shared_ptr Study::find (const std::string& series_name, size_t series_number, const std::string& image_type,
+ std::shared_ptr Study::find (const std::string& series_name, size_t series_number,
+ const std::string& image_type, const std::string& series_ref_UID,
const std::string& series_modality, const std::string& series_date, const std::string& series_time)
{
for (size_t n = 0; n < size(); n++) {
bool match = true;
if (series_name == (*this)[n]->name) {
- if (series_number == (*this)[n]->number) {
+ match = (series_number == (*this)[n]->number);
+ if (!match && series_ref_UID.size() && (*this)[n]->series_ref_UID.size()) {
+ if (series_ref_UID == (*this)[n]->series_ref_UID) {
+ if (!series_number_UID_mismatch_warning_issued) {
+ series_number_UID_mismatch_warning_issued = true;
+ WARN ("mismatched series number and UID - this may cause problems with series grouping");
+ }
+ match = true;
+ }
+ }
+
+ if (match) {
if (image_type != (*this)[n]->image_type)
match = false;
if (series_modality.size() && (*this)[n]->modality.size())
@@ -54,7 +67,7 @@ namespace MR {
}
if (stime != stime_ref) {
if (!series_time_mismatch_warning_issued) {
- INFO ("WARNING: series times do not match - this may cause problem with series grouping");
+ INFO ("WARNING: series times do not match - this may cause problems with series grouping");
series_time_mismatch_warning_issued = true;
}
if (stime < stime_ref)
@@ -67,7 +80,7 @@ namespace MR {
}
}
- push_back (std::shared_ptr (new Series (this, series_name, series_number, image_type, series_modality, series_date, series_time)));
+ push_back (std::shared_ptr (new Series (this, series_name, series_number, image_type, series_ref_UID, series_modality, series_date, series_time)));
return back();
}
diff --git a/core/file/dicom/study.h b/core/file/dicom/study.h
index 3bff9734c3..4709964551 100644
--- a/core/file/dicom/study.h
+++ b/core/file/dicom/study.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -29,16 +29,18 @@ namespace MR {
class Study : public vector> { NOMEMALIGN
public:
- Study (Patient* parent, const std::string& study_name, const std::string& study_ID = "",
- const std::string& study_date = "", const std::string& study_time = "") :
+ Study (Patient* parent, const std::string& study_name, const std::string& study_ID,
+ const std::string& study_UID, const std::string& study_date, const std::string& study_time) :
patient (parent), name (study_name), ID (study_ID),
- date (study_date), time (study_time) { }
+ UID (study_UID), date (study_date), time (study_time) { }
Patient* patient;
- std::string name, ID, date, time;
+ std::string name, ID, UID, date, time;
- std::shared_ptr find (const std::string& series_name, size_t series_number, const std::string& image_type,
- const std::string& series_modality = "", const std::string& series_date = "", const std::string& series_time = "");
+ std::shared_ptr find (const std::string& series_name, size_t series_number,
+ const std::string& image_type, const std::string& series_ref_UID,
+ const std::string& series_modality, const std::string& series_date,
+ const std::string& series_time);
bool operator< (const Study& s) const {
if (date != s.date)
@@ -47,7 +49,9 @@ namespace MR {
return time < s.time;
if (name != s.name)
return name < s.name;
- return ID < s.ID;
+ if (ID != s.ID)
+ return ID < s.ID;
+ return UID < s.UID;
}
};
diff --git a/core/file/dicom/tree.cpp b/core/file/dicom/tree.cpp
index 7729724d9f..07e0fd8483 100644
--- a/core/file/dicom/tree.cpp
+++ b/core/file/dicom/tree.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -97,9 +97,10 @@ namespace MR {
}
std::shared_ptr patient = find (reader.patient, reader.patient_ID, reader.patient_DOB);
- std::shared_ptr study = patient->find (reader.study, reader.study_ID, reader.study_date, reader.study_time);
+ std::shared_ptr study = patient->find (reader.study, reader.study_ID, reader.study_UID, reader.study_date, reader.study_time);
for (const auto& image_type : reader.image_type) {
- std::shared_ptr series = study->find (reader.series, reader.series_number, image_type.first, reader.modality, reader.series_date, reader.series_time);
+ std::shared_ptr series = study->find (reader.series, reader.series_number, image_type.first,
+ reader.series_ref_UID, reader.modality, reader.series_date, reader.series_time);
std::shared_ptr image (new Image);
image->filename = filename;
diff --git a/core/file/dicom/tree.h b/core/file/dicom/tree.h
index 7ba69f8303..c42f752ebe 100644
--- a/core/file/dicom/tree.h
+++ b/core/file/dicom/tree.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -31,8 +31,8 @@ namespace MR {
public:
std::string description;
void read (const std::string& filename);
- std::shared_ptr find (const std::string& patient_name, const std::string& patient_ID = "",
- const std::string& patient_DOB = "");
+ std::shared_ptr find (const std::string& patient_name, const std::string& patient_ID,
+ const std::string& patient_DOB);
void sort() {
std::sort (begin(), end(), compare_ptr_contents());
diff --git a/core/file/entry.h b/core/file/entry.h
index db39308420..559eda4929 100644
--- a/core/file/entry.h
+++ b/core/file/entry.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/gz.h b/core/file/gz.h
index 1774558ec2..2f01e8b012 100644
--- a/core/file/gz.h
+++ b/core/file/gz.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/json_utils.cpp b/core/file/json_utils.cpp
index 644795d652..92e74c1116 100644
--- a/core/file/json_utils.cpp
+++ b/core/file/json_utils.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -160,8 +160,8 @@ namespace MR
auto slice_encoding_it = header.keyval().find ("SliceEncodingDirection");
if (slice_encoding_it != header.keyval().end()) {
if (do_realign) {
- const Eigen::Vector3 orig_dir (Axes::id2dir (slice_encoding_it->second));
- Eigen::Vector3 new_dir;
+ const Eigen::Vector3d orig_dir (Axes::id2dir (slice_encoding_it->second));
+ Eigen::Vector3d new_dir;
for (size_t axis = 0; axis != 3; ++axis)
new_dir[axis] = flip[perm[axis]] ? -orig_dir[perm[axis]] : orig_dir[perm[axis]];
slice_encoding_it->second = Axes::dir2id (new_dir);
@@ -293,8 +293,8 @@ namespace MR
}
auto slice_encoding_it = H_adj.keyval().find ("SliceEncodingDirection");
if (slice_encoding_it != H_adj.keyval().end()) {
- const Eigen::Vector3 orig_dir (Axes::id2dir (slice_encoding_it->second));
- Eigen::Vector3 new_dir;
+ const Eigen::Vector3d orig_dir (Axes::id2dir (slice_encoding_it->second));
+ Eigen::Vector3d new_dir;
for (size_t axis = 0; axis != 3; ++axis)
new_dir[axis] = flip[axis] ? orig_dir[order[axis]] : -orig_dir[order[axis]];
slice_encoding_it->second = Axes::dir2id (new_dir);
diff --git a/core/file/json_utils.h b/core/file/json_utils.h
index 83b15e0fa1..6ffc9f215d 100644
--- a/core/file/json_utils.h
+++ b/core/file/json_utils.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/key_value.cpp b/core/file/key_value.cpp
index ca7ea1cee0..087626bd7a 100644
--- a/core/file/key_value.cpp
+++ b/core/file/key_value.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/key_value.h b/core/file/key_value.h
index 93aa57afae..df5f0ecc7c 100644
--- a/core/file/key_value.h
+++ b/core/file/key_value.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/mgh.cpp b/core/file/mgh.cpp
index 4b3002dc86..181d41bd8d 100644
--- a/core/file/mgh.cpp
+++ b/core/file/mgh.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/mgh.h b/core/file/mgh.h
index 380264ab28..72f5cd1d07 100644
--- a/core/file/mgh.h
+++ b/core/file/mgh.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/mmap.cpp b/core/file/mmap.cpp
index 28ace8f68a..1e4d5d8d5f 100644
--- a/core/file/mmap.cpp
+++ b/core/file/mmap.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/mmap.h b/core/file/mmap.h
index 4692a13365..fc25d1c2f6 100644
--- a/core/file/mmap.h
+++ b/core/file/mmap.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/name_parser.cpp b/core/file/name_parser.cpp
index 1d14a36d93..694bf7c521 100644
--- a/core/file/name_parser.cpp
+++ b/core/file/name_parser.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/name_parser.h b/core/file/name_parser.h
index 88eed9241e..67f4b8f64f 100644
--- a/core/file/name_parser.h
+++ b/core/file/name_parser.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/nifti2.h b/core/file/nifti2.h
index 7dd1064ecd..32c9805bd6 100644
--- a/core/file/nifti2.h
+++ b/core/file/nifti2.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/nifti_utils.cpp b/core/file/nifti_utils.cpp
index 2c73fcee9f..d1e0c1f6e3 100644
--- a/core/file/nifti_utils.cpp
+++ b/core/file/nifti_utils.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/nifti_utils.h b/core/file/nifti_utils.h
index b25f544995..b588751be6 100644
--- a/core/file/nifti_utils.h
+++ b/core/file/nifti_utils.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/ofstream.cpp b/core/file/ofstream.cpp
index f1a5855a4d..08eb8f0629 100644
--- a/core/file/ofstream.cpp
+++ b/core/file/ofstream.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/ofstream.h b/core/file/ofstream.h
index a92dadd185..2a1a8a5145 100644
--- a/core/file/ofstream.h
+++ b/core/file/ofstream.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/path.h b/core/file/path.h
index 8bd614b930..8e95e2668f 100644
--- a/core/file/path.h
+++ b/core/file/path.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/png.cpp b/core/file/png.cpp
index cd606d0af1..9823d4c085 100644
--- a/core/file/png.cpp
+++ b/core/file/png.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/png.h b/core/file/png.h
index 36dab4d113..f1e35788e5 100644
--- a/core/file/png.h
+++ b/core/file/png.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/tiff.cpp b/core/file/tiff.cpp
index 332893b2c6..982054bedd 100644
--- a/core/file/tiff.cpp
+++ b/core/file/tiff.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/tiff.h b/core/file/tiff.h
index a9225f34df..2ed4613ec6 100644
--- a/core/file/tiff.h
+++ b/core/file/tiff.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/file/utils.h b/core/file/utils.h
index 97b6f12c0c..12925ee8e3 100644
--- a/core/file/utils.h
+++ b/core/file/utils.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/base.h b/core/filter/base.h
index 723871c8bd..b6cdbc112d 100644
--- a/core/filter/base.h
+++ b/core/filter/base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/connected_components.cpp b/core/filter/connected_components.cpp
index 2c14018caa..0097330959 100644
--- a/core/filter/connected_components.cpp
+++ b/core/filter/connected_components.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/connected_components.h b/core/filter/connected_components.h
index 44157b406c..57669a592c 100644
--- a/core/filter/connected_components.h
+++ b/core/filter/connected_components.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/dilate.h b/core/filter/dilate.h
index 5e553cb8f6..9938c36ef3 100644
--- a/core/filter/dilate.h
+++ b/core/filter/dilate.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/dwi_brain_mask.h b/core/filter/dwi_brain_mask.h
index 9e9cd31c12..7e2b5991ab 100644
--- a/core/filter/dwi_brain_mask.h
+++ b/core/filter/dwi_brain_mask.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/erode.h b/core/filter/erode.h
index 681f0fec0b..da024ca0c1 100644
--- a/core/filter/erode.h
+++ b/core/filter/erode.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/fft.h b/core/filter/fft.h
index bdfeb517e9..6a864a0f81 100644
--- a/core/filter/fft.h
+++ b/core/filter/fft.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/gradient.h b/core/filter/gradient.h
index c82949e097..2164f4cee9 100644
--- a/core/filter/gradient.h
+++ b/core/filter/gradient.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -144,7 +144,7 @@ namespace MR
if (wrt_scanner) {
Transform transform (in);
for (auto l = Loop(0,3) (out); l; ++l)
- out.row(3) = transform.image2scanner.linear() * Eigen::Vector3 (out.row(3));
+ out.row(3) = transform.image2scanner.linear() * Eigen::Vector3d (out.row(3));
}
}
}
diff --git a/core/filter/mask_clean.h b/core/filter/mask_clean.h
index 698f823fdf..fd01e426f1 100644
--- a/core/filter/mask_clean.h
+++ b/core/filter/mask_clean.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/median.h b/core/filter/median.h
index e0c508f833..9d2eb89de7 100644
--- a/core/filter/median.h
+++ b/core/filter/median.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/normalise.h b/core/filter/normalise.h
index 0257a24baa..e106c4e755 100644
--- a/core/filter/normalise.h
+++ b/core/filter/normalise.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/optimal_threshold.h b/core/filter/optimal_threshold.h
index 2427c2d884..b203326263 100644
--- a/core/filter/optimal_threshold.h
+++ b/core/filter/optimal_threshold.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/resize.h b/core/filter/resize.h
index bebfe310e9..1e09d8d212 100644
--- a/core/filter/resize.h
+++ b/core/filter/resize.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -78,7 +78,7 @@ namespace MR
if (voxel_size.size() != 3)
throw Exception ("the voxel size must be defined using a value for all three dimensions.");
- Eigen::Vector3 original_extent;
+ Eigen::Vector3d original_extent;
for (size_t j = 0; j < 3; ++j) {
if (voxel_size[j] <= 0.0)
throw Exception ("the voxel size must be larger than zero");
diff --git a/core/filter/reslice.h b/core/filter/reslice.h
index ad8f9a4f63..2b2239bb99 100644
--- a/core/filter/reslice.h
+++ b/core/filter/reslice.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/smooth.h b/core/filter/smooth.h
index 64cc8dfdf5..f89d4a5eda 100644
--- a/core/filter/smooth.h
+++ b/core/filter/smooth.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/warp.h b/core/filter/warp.h
index cd7fd04b8a..f45c976a79 100644
--- a/core/filter/warp.h
+++ b/core/filter/warp.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/filter/zclean.h b/core/filter/zclean.h
index a1daa3aba8..0449464546 100644
--- a/core/filter/zclean.h
+++ b/core/filter/zclean.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/fixel/helpers.h b/core/fixel/helpers.h
index c47ac0c833..3d7bbef5cd 100644
--- a/core/fixel/helpers.h
+++ b/core/fixel/helpers.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/fixel/keys.h b/core/fixel/keys.h
index cf30b6a610..9ae8a01916 100644
--- a/core/fixel/keys.h
+++ b/core/fixel/keys.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/fixel/legacy/fixel_metric.h b/core/fixel/legacy/fixel_metric.h
index dfebaa8254..f134af1b0d 100644
--- a/core/fixel/legacy/fixel_metric.h
+++ b/core/fixel/legacy/fixel_metric.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/fixel/legacy/image.h b/core/fixel/legacy/image.h
index b7f08148e5..006babc8ab 100644
--- a/core/fixel/legacy/image.h
+++ b/core/fixel/legacy/image.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/fixel/legacy/keys.h b/core/fixel/legacy/keys.h
index 0191c0015b..1f6618285c 100644
--- a/core/fixel/legacy/keys.h
+++ b/core/fixel/legacy/keys.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/fixel/loop.h b/core/fixel/loop.h
index 32c3df542f..141ad196a6 100644
--- a/core/fixel/loop.h
+++ b/core/fixel/loop.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/fixel/types.h b/core/fixel/types.h
index 0471d19ba9..0a57e8da4c 100644
--- a/core/fixel/types.h
+++ b/core/fixel/types.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/dicom.cpp b/core/formats/dicom.cpp
index 06af4b9918..1161bc7942 100644
--- a/core/formats/dicom.cpp
+++ b/core/formats/dicom.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/list.cpp b/core/formats/list.cpp
index f40a46c54e..a1f1bfd5ae 100644
--- a/core/formats/list.cpp
+++ b/core/formats/list.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/list.h b/core/formats/list.h
index 9b45d7f2ce..4d77a7e2d3 100644
--- a/core/formats/list.h
+++ b/core/formats/list.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/mgh.cpp b/core/formats/mgh.cpp
index e3f2446a01..7ebd1dfc5f 100644
--- a/core/formats/mgh.cpp
+++ b/core/formats/mgh.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/mgz.cpp b/core/formats/mgz.cpp
index 1fdc931569..79d708f7d1 100644
--- a/core/formats/mgz.cpp
+++ b/core/formats/mgz.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/mri.cpp b/core/formats/mri.cpp
index 3c82af0d52..44d29c42c0 100644
--- a/core/formats/mri.cpp
+++ b/core/formats/mri.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/mrtrix.cpp b/core/formats/mrtrix.cpp
index c3dd99a0df..b7bff3efaf 100644
--- a/core/formats/mrtrix.cpp
+++ b/core/formats/mrtrix.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/mrtrix_gz.cpp b/core/formats/mrtrix_gz.cpp
index 81199d81a7..1ff65b363b 100644
--- a/core/formats/mrtrix_gz.cpp
+++ b/core/formats/mrtrix_gz.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/mrtrix_sparse_legacy.cpp b/core/formats/mrtrix_sparse_legacy.cpp
index 35f59e4afa..776c16777e 100644
--- a/core/formats/mrtrix_sparse_legacy.cpp
+++ b/core/formats/mrtrix_sparse_legacy.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/mrtrix_utils.cpp b/core/formats/mrtrix_utils.cpp
index d85eed0e5f..5d48a95b48 100644
--- a/core/formats/mrtrix_utils.cpp
+++ b/core/formats/mrtrix_utils.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/mrtrix_utils.h b/core/formats/mrtrix_utils.h
index e1814be642..054c68110f 100644
--- a/core/formats/mrtrix_utils.h
+++ b/core/formats/mrtrix_utils.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/nifti1.cpp b/core/formats/nifti1.cpp
index e76a72eebf..941fe468f1 100644
--- a/core/formats/nifti1.cpp
+++ b/core/formats/nifti1.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/nifti1_gz.cpp b/core/formats/nifti1_gz.cpp
index 303c5d3965..411588ca5c 100644
--- a/core/formats/nifti1_gz.cpp
+++ b/core/formats/nifti1_gz.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/nifti2.cpp b/core/formats/nifti2.cpp
index cc9f92a4c2..106a38af6a 100644
--- a/core/formats/nifti2.cpp
+++ b/core/formats/nifti2.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/nifti2_gz.cpp b/core/formats/nifti2_gz.cpp
index dc519cbad4..f31a2439b5 100644
--- a/core/formats/nifti2_gz.cpp
+++ b/core/formats/nifti2_gz.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/par.cpp b/core/formats/par.cpp
index 558a1bb96c..7ed1c6d1f4 100644
--- a/core/formats/par.cpp
+++ b/core/formats/par.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/pipe.cpp b/core/formats/pipe.cpp
index 3bf08ab52c..30ced98cab 100644
--- a/core/formats/pipe.cpp
+++ b/core/formats/pipe.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/png.cpp b/core/formats/png.cpp
index 2a4c78f129..fdc212aae6 100644
--- a/core/formats/png.cpp
+++ b/core/formats/png.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -132,6 +132,16 @@ namespace MR
if (H.ndim() == 4 && H.size(3) > 4)
throw Exception ("A 4D image written to PNG must have between one and four volumes (requested: " + str(H.size(3)) + ")");
+ // TODO After looping over axes via square-bracket notation,
+ // there needs to be at least two axes with size greater than one
+ size_t unity_axes = 0;
+ for (size_t axis = 0; axis != H.ndim(); ++axis) {
+ if (H.size (axis) == 1)
+ ++unity_axes;
+ }
+ if (unity_axes - (H.ndim() - num_axes) < 2)
+ throw Exception ("Too few (non-unity) image axes to support PNG export");
+
// For 4D images, can support:
// - 1 volume (just greyscale)
// - 2 volumes (save as greyscale & alpha)
diff --git a/core/formats/ram.cpp b/core/formats/ram.cpp
index 738867e5b8..25b057f880 100644
--- a/core/formats/ram.cpp
+++ b/core/formats/ram.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/tiff.cpp b/core/formats/tiff.cpp
index 67b81c2de2..9177d71c41 100644
--- a/core/formats/tiff.cpp
+++ b/core/formats/tiff.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/formats/xds.cpp b/core/formats/xds.cpp
index 4f4a171293..7c29edda25 100644
--- a/core/formats/xds.cpp
+++ b/core/formats/xds.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/header.cpp b/core/header.cpp
index 6739cfb1b8..1ec35dad69 100644
--- a/core/header.cpp
+++ b/core/header.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -727,8 +727,8 @@ namespace MR
// header, that's also necessary to update here
auto slice_encoding_it = keyval().find ("SliceEncodingDirection");
if (slice_encoding_it != keyval().end()) {
- const Eigen::Vector3 orig_dir (Axes::id2dir (slice_encoding_it->second));
- Eigen::Vector3 new_dir;
+ const Eigen::Vector3d orig_dir (Axes::id2dir (slice_encoding_it->second));
+ Eigen::Vector3d new_dir;
for (size_t axis = 0; axis != 3; ++axis)
new_dir[axis] = orig_dir[realign_perm_[axis]] * (realign_flip_[realign_perm_[axis]] ? -1.0 : 1.0);
slice_encoding_it->second = Axes::dir2id (new_dir);
diff --git a/core/header.h b/core/header.h
index c12846c11e..7b801e8a9a 100644
--- a/core/header.h
+++ b/core/header.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image.h b/core/image.h
index cff17f777f..1bb330e4b2 100644
--- a/core/image.h
+++ b/core/image.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_diff.h b/core/image_diff.h
index 917e6cc506..590475f778 100644
--- a/core/image_diff.h
+++ b/core/image_diff.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_helpers.h b/core/image_helpers.h
index 2bdf028c34..07fd950fce 100644
--- a/core/image_helpers.h
+++ b/core/image_helpers.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -452,8 +452,8 @@ namespace MR
if (!dimensions_match(in1, in2, 0, 3))
return false;
- const Eigen::Vector3 vs1 (in1.spacing(0), in1.spacing(1), in1.spacing(2));
- const Eigen::Vector3 vs2 (in2.spacing(0), in2.spacing(1), in2.spacing(2));
+ const Eigen::Vector3d vs1 (in1.spacing(0), in1.spacing(1), in1.spacing(2));
+ const Eigen::Vector3d vs2 (in2.spacing(0), in2.spacing(1), in2.spacing(2));
Eigen::MatrixXd voxel_coord = Eigen::MatrixXd::Zero(4,4);
voxel_coord.row(3).fill(1.0);
diff --git a/core/image_io/base.cpp b/core/image_io/base.cpp
index d6a33f0076..6eac7aa5f5 100644
--- a/core/image_io/base.cpp
+++ b/core/image_io/base.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/base.h b/core/image_io/base.h
index a0a6f450a6..2b134ffcd6 100644
--- a/core/image_io/base.h
+++ b/core/image_io/base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/default.cpp b/core/image_io/default.cpp
index abc48bdb7b..440f370423 100644
--- a/core/image_io/default.cpp
+++ b/core/image_io/default.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/default.h b/core/image_io/default.h
index 565026ed3b..3f9798c45b 100644
--- a/core/image_io/default.h
+++ b/core/image_io/default.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/fetch_store.cpp b/core/image_io/fetch_store.cpp
index d5e2a94660..2ddb8bed3e 100644
--- a/core/image_io/fetch_store.cpp
+++ b/core/image_io/fetch_store.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/fetch_store.h b/core/image_io/fetch_store.h
index 626e3a9a53..20577b8b7c 100644
--- a/core/image_io/fetch_store.h
+++ b/core/image_io/fetch_store.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/gz.cpp b/core/image_io/gz.cpp
index aff2338949..5fccff0c43 100644
--- a/core/image_io/gz.cpp
+++ b/core/image_io/gz.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/gz.h b/core/image_io/gz.h
index 031611d505..404b051a5c 100644
--- a/core/image_io/gz.h
+++ b/core/image_io/gz.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/mosaic.cpp b/core/image_io/mosaic.cpp
index 5e87b79003..9e0b5d8292 100644
--- a/core/image_io/mosaic.cpp
+++ b/core/image_io/mosaic.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/mosaic.h b/core/image_io/mosaic.h
index c73a26bf52..7f2546aedb 100644
--- a/core/image_io/mosaic.h
+++ b/core/image_io/mosaic.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/pipe.cpp b/core/image_io/pipe.cpp
index 930329d3cf..902e908787 100644
--- a/core/image_io/pipe.cpp
+++ b/core/image_io/pipe.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/pipe.h b/core/image_io/pipe.h
index dfa9f65d5f..7e597c9130 100644
--- a/core/image_io/pipe.h
+++ b/core/image_io/pipe.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/png.cpp b/core/image_io/png.cpp
index b9ebe8ecc6..6ce0c79f86 100644
--- a/core/image_io/png.cpp
+++ b/core/image_io/png.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/png.h b/core/image_io/png.h
index 899d0d408c..c13ad05aa7 100644
--- a/core/image_io/png.h
+++ b/core/image_io/png.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/ram.cpp b/core/image_io/ram.cpp
index 616c6e8500..1789910056 100644
--- a/core/image_io/ram.cpp
+++ b/core/image_io/ram.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/ram.h b/core/image_io/ram.h
index e6bfc4ba08..302ba96b5e 100644
--- a/core/image_io/ram.h
+++ b/core/image_io/ram.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/scratch.cpp b/core/image_io/scratch.cpp
index ef0b03b10a..1ba1444eec 100644
--- a/core/image_io/scratch.cpp
+++ b/core/image_io/scratch.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/scratch.h b/core/image_io/scratch.h
index b1148b5268..d0b85cb14b 100644
--- a/core/image_io/scratch.h
+++ b/core/image_io/scratch.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/sparse.cpp b/core/image_io/sparse.cpp
index d205ae7951..02f982704c 100644
--- a/core/image_io/sparse.cpp
+++ b/core/image_io/sparse.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/sparse.h b/core/image_io/sparse.h
index 51efff4a3a..8c26775791 100644
--- a/core/image_io/sparse.h
+++ b/core/image_io/sparse.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/tiff.cpp b/core/image_io/tiff.cpp
index dd4e31269a..044d3e7fb7 100644
--- a/core/image_io/tiff.cpp
+++ b/core/image_io/tiff.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/tiff.h b/core/image_io/tiff.h
index 1650c743d5..975f258b06 100644
--- a/core/image_io/tiff.h
+++ b/core/image_io/tiff.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/variable_scaling.cpp b/core/image_io/variable_scaling.cpp
index 4e76e25789..83a1ae5ee9 100644
--- a/core/image_io/variable_scaling.cpp
+++ b/core/image_io/variable_scaling.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/image_io/variable_scaling.h b/core/image_io/variable_scaling.h
index 44d16e15bb..c1411db432 100644
--- a/core/image_io/variable_scaling.h
+++ b/core/image_io/variable_scaling.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/interp/base.h b/core/interp/base.h
index d61f82187d..8b521ba52b 100644
--- a/core/interp/base.h
+++ b/core/interp/base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -208,10 +208,10 @@ namespace MR
}
template
- Eigen::Vector3 intravoxel_offset (const VectorType& pos) {
+ Eigen::Vector3d intravoxel_offset (const VectorType& pos) {
if (set_out_of_bounds (pos))
- return Eigen::Vector3 (NaN, NaN, NaN);
- return Eigen::Vector3 (pos[0]-std::floor (pos[0]), pos[1]-std::floor (pos[1]), pos[2]-std::floor (pos[2]));
+ return Eigen::Vector3d (NaN, NaN, NaN);
+ return Eigen::Vector3d (pos[0]-std::floor (pos[0]), pos[1]-std::floor (pos[1]), pos[2]-std::floor (pos[2]));
}
};
diff --git a/core/interp/cubic.h b/core/interp/cubic.h
index ba79ca4fab..58a29f97fb 100644
--- a/core/interp/cubic.h
+++ b/core/interp/cubic.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -80,7 +80,7 @@ namespace MR
protected:
SplineType H[3];
- Eigen::Vector3 P;
+ Eigen::Vector3d P;
ssize_t clamp (ssize_t x, ssize_t dim) const {
if (x < 0) return 0;
@@ -120,7 +120,7 @@ namespace MR
/*! See file interp/base.h for details. */
template
bool voxel (const VectorType& pos) {
- Eigen::Vector3 f = Base::intravoxel_offset (pos);
+ Eigen::Vector3d f = Base::intravoxel_offset (pos);
if (Base::out_of_bounds)
return false;
P = pos;
@@ -244,7 +244,7 @@ namespace MR
/*! See file interp/base.h for details. */
template
bool voxel (const VectorType& pos) {
- Eigen::Vector3 f = Base::intravoxel_offset (pos);
+ Eigen::Vector3d f = Base::intravoxel_offset (pos);
if (Base::out_of_bounds)
return false;
P = pos;
@@ -405,7 +405,7 @@ namespace MR
/*! See file interp/base.h for details. */
template
bool voxel (const VectorType& pos) {
- Eigen::Vector3 f = Base::intravoxel_offset (pos);
+ Eigen::Vector3d f = Base::intravoxel_offset (pos);
if (Base::out_of_bounds)
return false;
P = pos;
diff --git a/core/interp/linear.h b/core/interp/linear.h
index a2631eda03..b87faeb1f6 100644
--- a/core/interp/linear.h
+++ b/core/interp/linear.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -107,7 +107,7 @@ namespace MR
protected:
const coef_type zero, eps;
- Eigen::Vector3 P;
+ Eigen::Vector3d P;
ssize_t clamp (ssize_t x, ssize_t dim) const {
if (x < 0) return 0;
@@ -148,7 +148,7 @@ namespace MR
/*! See file interp/base.h for details. */
template
bool voxel (const VectorType& pos) {
- Eigen::Vector3 f = Base::intravoxel_offset (pos);
+ Eigen::Vector3d f = Base::intravoxel_offset (pos);
if (Base::out_of_bounds)
return false;
P = pos;
@@ -276,7 +276,7 @@ namespace MR
/*! See file interp/base.h for details. */
template
bool voxel (const VectorType& pos) {
- Eigen::Vector3 f = Base::intravoxel_offset (pos.template cast());
+ Eigen::Vector3d f = Base::intravoxel_offset (pos.template cast());
if (Base::out_of_bounds)
return false;
P = pos;
@@ -436,7 +436,7 @@ namespace MR
/*! See file interp/base.h for details. */
template
bool voxel (const VectorType& pos) {
- Eigen::Vector3 f = Base::intravoxel_offset (pos.template cast());
+ Eigen::Vector3d f = Base::intravoxel_offset (pos.template cast());
if (Base::out_of_bounds)
return false;
P = pos;
diff --git a/core/interp/masked.h b/core/interp/masked.h
index 2398d09948..2eb953ea7f 100644
--- a/core/interp/masked.h
+++ b/core/interp/masked.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/interp/nearest.h b/core/interp/nearest.h
index 809080c7e4..feae3e39b2 100644
--- a/core/interp/nearest.h
+++ b/core/interp/nearest.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/interp/sinc.h b/core/interp/sinc.h
index c21f8a14f4..511bbb9494 100644
--- a/core/interp/sinc.h
+++ b/core/interp/sinc.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/SH.cpp b/core/math/SH.cpp
index c731712088..f58ce6a3ad 100644
--- a/core/math/SH.cpp
+++ b/core/math/SH.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/SH.h b/core/math/SH.h
index 2a0821c332..583a2a5926 100644
--- a/core/math/SH.h
+++ b/core/math/SH.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/Sn_scale_estimator.h b/core/math/Sn_scale_estimator.h
index 29d313efef..07a1dce43a 100644
--- a/core/math/Sn_scale_estimator.h
+++ b/core/math/Sn_scale_estimator.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/ZSH.h b/core/math/ZSH.h
index d891e7a594..45b01bf4c5 100644
--- a/core/math/ZSH.h
+++ b/core/math/ZSH.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/average_space.cpp b/core/math/average_space.cpp
index 8624adab97..03915f2b82 100644
--- a/core/math/average_space.cpp
+++ b/core/math/average_space.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/average_space.h b/core/math/average_space.h
index 5d777baf53..55cb582e24 100644
--- a/core/math/average_space.h
+++ b/core/math/average_space.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/bessel.cpp b/core/math/bessel.cpp
index 9e4e64f456..ad678cfea5 100644
--- a/core/math/bessel.cpp
+++ b/core/math/bessel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/bessel.h b/core/math/bessel.h
index 1c69e17331..c722982b0b 100644
--- a/core/math/bessel.h
+++ b/core/math/bessel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/betainc.cpp b/core/math/betainc.cpp
index 45648738e5..18844aa73f 100644
--- a/core/math/betainc.cpp
+++ b/core/math/betainc.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/betainc.h b/core/math/betainc.h
index 08af8a1725..6e6a4849d8 100644
--- a/core/math/betainc.h
+++ b/core/math/betainc.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/cauchy.h b/core/math/cauchy.h
index 40423a09e3..19dadb1c6f 100644
--- a/core/math/cauchy.h
+++ b/core/math/cauchy.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/chebyshev.h b/core/math/chebyshev.h
index 6d759aaf48..d7d993b6d6 100644
--- a/core/math/chebyshev.h
+++ b/core/math/chebyshev.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/check_gradient.h b/core/math/check_gradient.h
index ec490e2adb..fd29f449dd 100644
--- a/core/math/check_gradient.h
+++ b/core/math/check_gradient.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/condition_number.h b/core/math/condition_number.h
index aa943bdc86..623312653e 100644
--- a/core/math/condition_number.h
+++ b/core/math/condition_number.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/constrained_least_squares.h b/core/math/constrained_least_squares.h
index 6849a2f947..e87ecda849 100644
--- a/core/math/constrained_least_squares.h
+++ b/core/math/constrained_least_squares.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/cubic_spline.h b/core/math/cubic_spline.h
index 44efd8e1bf..6cc88f7569 100644
--- a/core/math/cubic_spline.h
+++ b/core/math/cubic_spline.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/erfinv.cpp b/core/math/erfinv.cpp
index 74b3f86ff8..5a370bd582 100644
--- a/core/math/erfinv.cpp
+++ b/core/math/erfinv.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/erfinv.h b/core/math/erfinv.h
index 07bcbbbeee..413f9e3c9a 100644
--- a/core/math/erfinv.h
+++ b/core/math/erfinv.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/factorial.h b/core/math/factorial.h
index 4c116ce758..56dc2905d1 100644
--- a/core/math/factorial.h
+++ b/core/math/factorial.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/gaussian.h b/core/math/gaussian.h
index ace8e72901..d730831533 100644
--- a/core/math/gaussian.h
+++ b/core/math/gaussian.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/golden_section_search.h b/core/math/golden_section_search.h
index 1102ede4f0..530aee43e2 100644
--- a/core/math/golden_section_search.h
+++ b/core/math/golden_section_search.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/gradient_descent.h b/core/math/gradient_descent.h
index 0745ceeb4a..ef3ffbfe0e 100644
--- a/core/math/gradient_descent.h
+++ b/core/math/gradient_descent.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/gradient_descent_bb.h b/core/math/gradient_descent_bb.h
index 13af3af320..a03f759536 100644
--- a/core/math/gradient_descent_bb.h
+++ b/core/math/gradient_descent_bb.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/hermite.h b/core/math/hermite.h
index eb3fcac503..de4da9e481 100644
--- a/core/math/hermite.h
+++ b/core/math/hermite.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/least_squares.h b/core/math/least_squares.h
index 7cab152fe3..a3616982fe 100644
--- a/core/math/least_squares.h
+++ b/core/math/least_squares.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/legendre.h b/core/math/legendre.h
index f40e301708..747accbbc2 100644
--- a/core/math/legendre.h
+++ b/core/math/legendre.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/math.h b/core/math/math.h
index 586c25db22..88192140b2 100644
--- a/core/math/math.h
+++ b/core/math/math.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/median.h b/core/math/median.h
index 9b2078b053..7ea240b236 100644
--- a/core/math/median.h
+++ b/core/math/median.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/polynomial.h b/core/math/polynomial.h
index 8c6d4ebb2b..1bad20fb8d 100644
--- a/core/math/polynomial.h
+++ b/core/math/polynomial.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/quadratic_line_search.h b/core/math/quadratic_line_search.h
index 4332ab713f..b1ae9df657 100644
--- a/core/math/quadratic_line_search.h
+++ b/core/math/quadratic_line_search.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/rician.h b/core/math/rician.h
index 8b1eb8a047..f43bd57653 100644
--- a/core/math/rician.h
+++ b/core/math/rician.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/rng.h b/core/math/rng.h
index f77f0f16e4..a9b4108eaf 100644
--- a/core/math/rng.h
+++ b/core/math/rng.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/sech.h b/core/math/sech.h
index 2614447a3c..57a59a9f41 100644
--- a/core/math/sech.h
+++ b/core/math/sech.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/sinc.h b/core/math/sinc.h
index 2cc449d12f..52a9032045 100644
--- a/core/math/sinc.h
+++ b/core/math/sinc.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/sphere.h b/core/math/sphere.h
index 34f12c3c6b..d0b3c79dbd 100644
--- a/core/math/sphere.h
+++ b/core/math/sphere.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/fwe.cpp b/core/math/stats/fwe.cpp
index 9908737eff..5a06ca24ae 100644
--- a/core/math/stats/fwe.cpp
+++ b/core/math/stats/fwe.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/fwe.h b/core/math/stats/fwe.h
index 345def3c0f..ede63957cc 100644
--- a/core/math/stats/fwe.h
+++ b/core/math/stats/fwe.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/glm.cpp b/core/math/stats/glm.cpp
index 3122120a67..7efc56d602 100644
--- a/core/math/stats/glm.cpp
+++ b/core/math/stats/glm.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/glm.h b/core/math/stats/glm.h
index f13be7b449..5218be153b 100644
--- a/core/math/stats/glm.h
+++ b/core/math/stats/glm.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/import.cpp b/core/math/stats/import.cpp
index c4cfdcdb03..bdf6cb3771 100644
--- a/core/math/stats/import.cpp
+++ b/core/math/stats/import.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/import.h b/core/math/stats/import.h
index fa08902f2f..f2036bfa2b 100644
--- a/core/math/stats/import.h
+++ b/core/math/stats/import.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/shuffle.cpp b/core/math/stats/shuffle.cpp
index 29a0e9b808..b218e4177a 100644
--- a/core/math/stats/shuffle.cpp
+++ b/core/math/stats/shuffle.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/shuffle.h b/core/math/stats/shuffle.h
index 23d20e316c..c2b8ca111b 100644
--- a/core/math/stats/shuffle.h
+++ b/core/math/stats/shuffle.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/stats/typedefs.h b/core/math/stats/typedefs.h
index 63ead859a9..d518261d71 100644
--- a/core/math/stats/typedefs.h
+++ b/core/math/stats/typedefs.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/welch_satterthwaite.h b/core/math/welch_satterthwaite.h
index a10a19e165..1a5dc10605 100644
--- a/core/math/welch_satterthwaite.h
+++ b/core/math/welch_satterthwaite.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/zstatistic.cpp b/core/math/zstatistic.cpp
index ae5d93fa05..4799bf5999 100644
--- a/core/math/zstatistic.cpp
+++ b/core/math/zstatistic.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/math/zstatistic.h b/core/math/zstatistic.h
index f4b579b0c6..d4277287dd 100644
--- a/core/math/zstatistic.h
+++ b/core/math/zstatistic.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/memory.h b/core/memory.h
index 9bc45d13cc..505282674d 100644
--- a/core/memory.h
+++ b/core/memory.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/misc/bitset.cpp b/core/misc/bitset.cpp
index 18e8386478..2c35048474 100644
--- a/core/misc/bitset.cpp
+++ b/core/misc/bitset.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/misc/bitset.h b/core/misc/bitset.h
index b9bf0e8b0f..515cf367fd 100644
--- a/core/misc/bitset.h
+++ b/core/misc/bitset.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/misc/voxel2vector.h b/core/misc/voxel2vector.h
index 630e4e8b57..6bca0d982a 100644
--- a/core/misc/voxel2vector.h
+++ b/core/misc/voxel2vector.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/mrtrix.cpp b/core/mrtrix.cpp
index f8f5ada105..0855993f5b 100644
--- a/core/mrtrix.cpp
+++ b/core/mrtrix.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/mrtrix.h b/core/mrtrix.h
index b953188aa8..eef2296138 100644
--- a/core/mrtrix.h
+++ b/core/mrtrix.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/ordered_thread_queue.h b/core/ordered_thread_queue.h
index a914ec8f18..92c4e5332e 100644
--- a/core/ordered_thread_queue.h
+++ b/core/ordered_thread_queue.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/phase_encoding.cpp b/core/phase_encoding.cpp
index 8c1e564f02..52e1b5daae 100644
--- a/core/phase_encoding.cpp
+++ b/core/phase_encoding.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/phase_encoding.h b/core/phase_encoding.h
index 141ce75e14..d8ce2d9218 100644
--- a/core/phase_encoding.h
+++ b/core/phase_encoding.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -116,7 +116,7 @@ namespace MR
erase ("TotalReadoutTime");
} else {
erase ("pe_scheme");
- const Eigen::Vector3 dir { PE(0, 0), PE(0, 1), PE(0, 2) };
+ const Eigen::Vector3d dir { PE(0, 0), PE(0, 1), PE(0, 2) };
header.keyval()["PhaseEncodingDirection"] = Axes::dir2id (dir);
if (PE.cols() >= 4)
header.keyval()["TotalReadoutTime"] = str(PE(0, 3), 3);
diff --git a/core/progressbar.cpp b/core/progressbar.cpp
index 9f2ce2073e..fad7088b25 100644
--- a/core/progressbar.cpp
+++ b/core/progressbar.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/progressbar.h b/core/progressbar.h
index e786e9bb94..a6260c6e7a 100644
--- a/core/progressbar.h
+++ b/core/progressbar.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/raw.h b/core/raw.h
index a40704a185..68bcd9e808 100644
--- a/core/raw.h
+++ b/core/raw.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/signal_handler.cpp b/core/signal_handler.cpp
index 616af4abe8..a0f162c8e7 100644
--- a/core/signal_handler.cpp
+++ b/core/signal_handler.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/signal_handler.h b/core/signal_handler.h
index 730f446cbc..147c09af95 100644
--- a/core/signal_handler.h
+++ b/core/signal_handler.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/signals.h b/core/signals.h
index c8abca0af5..810d0c8b7b 100644
--- a/core/signals.h
+++ b/core/signals.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/stats.cpp b/core/stats.cpp
index 611385c52c..53eb0ddc89 100644
--- a/core/stats.cpp
+++ b/core/stats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/stats.h b/core/stats.h
index 457821d59d..10439efe40 100644
--- a/core/stats.h
+++ b/core/stats.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/stride.cpp b/core/stride.cpp
index 5974ec700a..93605c39fe 100644
--- a/core/stride.cpp
+++ b/core/stride.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/stride.h b/core/stride.h
index d9a4be6553..66fe47b2aa 100644
--- a/core/stride.h
+++ b/core/stride.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/thread.cpp b/core/thread.cpp
index 87ac6b218e..140d463549 100644
--- a/core/thread.cpp
+++ b/core/thread.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/thread.h b/core/thread.h
index 614c4aa81a..866201c395 100644
--- a/core/thread.h
+++ b/core/thread.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/thread_queue.h b/core/thread_queue.h
index 0a2101c536..40d14f6e08 100644
--- a/core/thread_queue.h
+++ b/core/thread_queue.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/timer.h b/core/timer.h
index a82da4a5fd..641e47a381 100644
--- a/core/timer.h
+++ b/core/timer.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/transform.h b/core/transform.h
index b650962644..51be558842 100644
--- a/core/transform.h
+++ b/core/transform.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/core/types.h b/core/types.h
index ec4ba073c6..e7c47eb8d4 100644
--- a/core/types.h
+++ b/core/types.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -322,11 +322,6 @@ namespace std
}
-namespace Eigen {
- using Vector3 = Matrix;
- using Vector4 = Matrix;
-}
-
#endif
diff --git a/core/version.h b/core/version.h
index 4979d98509..4a1f7c1f9a 100644
--- a/core/version.h
+++ b/core/version.h
@@ -9,7 +9,7 @@
// git tag -s 3.3.0
// git push --follow-tags
-#define MRTRIX_BASE_VERSION "3.0.3"
+#define MRTRIX_BASE_VERSION "3.0.4"
#endif
diff --git a/docs/concepts/fixels_dixels.rst b/docs/concepts/fixels_dixels.rst
index f29a18e322..6f036a1802 100644
--- a/docs/concepts/fixels_dixels.rst
+++ b/docs/concepts/fixels_dixels.rst
@@ -45,7 +45,7 @@ voxel, can be considered as estimating fixels. However in the past,
researchers have resorted either to lengthy descriptive labels in an
attempt to express the nature of the data being manipulated, or have
adopted existing terms, which can lead to confusion with the original sense of
-the terms. Furthermore, these labels are not applied inconsistently
+the terms. Furthermore, these labels are not applied consistently
between publications; we hope that the term 'fixel', being unambiguous with
other interpretations of "fibre bundle" or "fascicle" or other examples,
will slowly become the standard term for describing these data.
diff --git a/docs/format_config_options b/docs/format_config_options
index 0096ac0273..64f850bff9 100755
--- a/docs/format_config_options
+++ b/docs/format_config_options
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/format_environment_variables b/docs/format_environment_variables
index 377553522c..ffb82da4c8 100755
--- a/docs/format_environment_variables
+++ b/docs/format_environment_variables
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/generate_user_docs.sh b/docs/generate_user_docs.sh
index b0ab886e4d..6f9481b5a8 100755
--- a/docs/generate_user_docs.sh
+++ b/docs/generate_user_docs.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/installation/using_containers.rst b/docs/installation/using_containers.rst
index d4098982d6..6bce0f31cf 100644
--- a/docs/installation/using_containers.rst
+++ b/docs/installation/using_containers.rst
@@ -9,6 +9,17 @@ of all *MRtrix3* commands (including those that possess dependencies on
other neuroimaging software packages) without necessitating any software
installation on the user system.
+FSL registration
+----------------
+
+The *MRtrix3* containers include within them a subset of those commands
+that are part of `FSL `_, as they are
+utilised within specific *MRtrix3* Python scripts. Obtaining the FSL
+software typically necessitates `registration `_.
+We therefore request that any users of *MRtrix3* containers who have not
+previously registered as a user of the FSL software complete that process,
+as recognition of utilisation of their software.
+
Using Docker
------------
@@ -24,7 +35,7 @@ along with any arguments / options to be provided to it)
If an *MRtrix3* image has not been built on the local system, the
most recent *MRtrix3* Docker image will be automatically downloaded from
-[DockerHub](https://hub.docker.com/r/mrtrix3/mrtrix3).
+[DockerHub](https://hub.docker.com/repository/docker/mrtrix3/mrtrix3).
Run GUI command
^^^^^^^^^^^^^^^
@@ -32,9 +43,12 @@ Run GUI command
The following instructions have been shown to work on Linux::
xhost +local:root
- docker run --rm -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY mrtrix3 mrview
+ docker run --rm -it --device /dev/dri/ -v /run:/run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY -e XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -u $UID mrtrix3 mrview
xhost -local:root # Run this when finished.
+It may however be possible that you will need to modify these commands
+in order to operate without warning / error on your system.
+
Explicitly build image locally
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -43,10 +57,10 @@ above, the following instruction can be run from a location in which the
*MRtrix3* source code has been cloned::
docker build --tag mrtrix3 .
-
-Set `DOCKER_BUILDKIT=1` to build parts of the Docker image in parallel,
+
+Set ``DOCKER_BUILDKIT=1`` to build parts of the Docker image in parallel,
which can speed up build time.
-Use `--build-arg MAKE_JOBS=4` to build *MRtrix3* with 4 processors
+Use ``--build-arg MAKE_JOBS=4`` to build *MRtrix3* with 4 processors
(can substitute this with any number of processors > 0); if omitted,
*MRtrix3* will be built using a single thread only.
@@ -67,8 +81,8 @@ Build container from DockerHub
This command converts the Docker image as stored on DockerHub into a
Singularity container stored on the user's local system::
- singularity build MRtrix3.sif docker://mrtrix/mrtrix3:
-
+ singularity build MRtrix3.sif docker://mrtrix3/mrtrix3:
+
(Replace "````" with the specific version tag of *MRtrix3*
desired)
@@ -87,8 +101,43 @@ along with any arguments / options to be provided to it)
Run GUI command
^^^^^^^^^^^^^^^
-The following usage has been shown to work on Linux::
+The following basic usage has been shown to work on Linux::
+
+ singularity run -B /run MRtrix3.sif mrview
+
+If you wish to utilise a *clean environment* when executing ``mrview``,
+you will likely find that it is necessary to explicitly set the ``DISPLAY``
+and ``XDG_RUNTIME_DIR`` environment variables. This could be done in a
+few different ways:
+
+1. Set environment variables that will be added to the clean
+ environment of the container::
+
+ export SINGULARITYENV_DISPLAY=$DISPLAY
+ export SINGULARITYENV_XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR
+ singularity run --cleanenv -B /run MRtrix3.sif mrview
+
+1. Explicitly set those envvars during invocation
+ (requires a relatively up-to-date Singularity)::
+
+ singularity run --cleanenv --env DISPLAY=$DISPLAY,XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR -B /run MRtrix3.sif mrview
+
+1. Create a text file that specifies the environment variables to be set,
+ and provide the path to that file at the command-line
+ (requires a relatively up-to-date Singularity)::
+
+ echo $'DISPLAY=$DISPLAY\nXDG_RUNTIME_DIR=$XDG_RUNTIME_DIR' > ~/.mrview.conf
+ singularity run --cleanenv --env-file ~/.singularity/mrview.conf -B /run MRtrix3.sif mrview
+
+If you experience difficulties here with ``mrview``, you may have better
+success if the Singularity container is built directly from the *MRtrix3*
+source code using the definition file "``Singularity``" rather than
+converting from a Docker container or using a custom definition file.
+
+If *not* using a clean environment, and you see the specific error::
- singularity exec -B /run MRtrix3.sif mrview
+ Qt: Session management error: None of the authentication protocols specified are supported
+This can be resolved by running::
+ unset SESSION_MANAGER
diff --git a/docs/reference/commands/5tt2gmwmi.rst b/docs/reference/commands/5tt2gmwmi.rst
index 77975f6eb2..d2bcd9a2f8 100644
--- a/docs/reference/commands/5tt2gmwmi.rst
+++ b/docs/reference/commands/5tt2gmwmi.rst
@@ -55,7 +55,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/5tt2vis.rst b/docs/reference/commands/5tt2vis.rst
index 53de643703..6bda37ae44 100644
--- a/docs/reference/commands/5tt2vis.rst
+++ b/docs/reference/commands/5tt2vis.rst
@@ -63,7 +63,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/5ttcheck.rst b/docs/reference/commands/5ttcheck.rst
index b0e8a9b6a6..255fa200d9 100644
--- a/docs/reference/commands/5ttcheck.rst
+++ b/docs/reference/commands/5ttcheck.rst
@@ -52,7 +52,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/5ttedit.rst b/docs/reference/commands/5ttedit.rst
index 0583bb6797..4aa3f32149 100644
--- a/docs/reference/commands/5ttedit.rst
+++ b/docs/reference/commands/5ttedit.rst
@@ -63,7 +63,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/5ttgen.rst b/docs/reference/commands/5ttgen.rst
index 06746097bf..82e21edbc6 100644
--- a/docs/reference/commands/5ttgen.rst
+++ b/docs/reference/commands/5ttgen.rst
@@ -75,7 +75,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -166,7 +166,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -269,7 +269,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -355,7 +355,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Matteo Mancini (m.mancini@ucl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -461,7 +461,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/afdconnectivity.rst b/docs/reference/commands/afdconnectivity.rst
index 10c2088e18..46dbef7e29 100644
--- a/docs/reference/commands/afdconnectivity.rst
+++ b/docs/reference/commands/afdconnectivity.rst
@@ -31,7 +31,7 @@ For valid comparisons of AFD connectivity across scans, images MUST be intensity
Note that the sum of the AFD is normalised by streamline length to account for subject differences in fibre bundle length. This normalisation results in a measure that is more related to the cross-sectional volume of the tract (and therefore 'connectivity'). Note that SIFT-ed tract count is a superior measure because it is unaffected by tangential yet unrelated fibres. However, AFD connectivity may be used as a substitute when Anatomically Constrained Tractography is not possible due to uncorrectable EPI distortions, and SIFT may therefore not be as effective.
-Longer discussion regarding this command can additionally be found at: https://mrtrix.readthedocs.io/en/3.0.3/concepts/afd_connectivity.html (as well as in the relevant reference).
+Longer discussion regarding this command can additionally be found at: https://mrtrix.readthedocs.io/en/3.0.4/concepts/afd_connectivity.html (as well as in the relevant reference).
Options
-------
@@ -74,7 +74,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/amp2response.rst b/docs/reference/commands/amp2response.rst
index c19a336d18..9cc95cdeeb 100644
--- a/docs/reference/commands/amp2response.rst
+++ b/docs/reference/commands/amp2response.rst
@@ -76,7 +76,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/amp2sh.rst b/docs/reference/commands/amp2sh.rst
index 3cde09ed9d..de34d2ae47 100644
--- a/docs/reference/commands/amp2sh.rst
+++ b/docs/reference/commands/amp2sh.rst
@@ -26,7 +26,7 @@ The spherical harmonic decomposition is calculated by least-squares linear fitti
The directions can be defined either as a DW gradient scheme (for example to compute the SH representation of the DW signal), a set of [az el] pairs as output by the dirgen command, or a set of [ x y z ] directions in Cartesian coordinates. The DW gradient scheme or direction set can be supplied within the input image header or using the -gradient or -directions option. Note that if a direction set and DW gradient scheme can be found, the direction set will be used by default.
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Options
-------
@@ -87,7 +87,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/connectome2tck.rst b/docs/reference/commands/connectome2tck.rst
index aaaf7f67a7..9ce45be798 100644
--- a/docs/reference/commands/connectome2tck.rst
+++ b/docs/reference/commands/connectome2tck.rst
@@ -118,7 +118,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/connectomeedit.rst b/docs/reference/commands/connectomeedit.rst
index 8ac766e2a7..241e83a71d 100644
--- a/docs/reference/commands/connectomeedit.rst
+++ b/docs/reference/commands/connectomeedit.rst
@@ -52,7 +52,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Matteo Frigo (matteo.frigo@inria.fr)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/connectomestats.rst b/docs/reference/commands/connectomestats.rst
index 9309f2db5a..e3d60beb9a 100644
--- a/docs/reference/commands/connectomestats.rst
+++ b/docs/reference/commands/connectomestats.rst
@@ -126,7 +126,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dcmedit.rst b/docs/reference/commands/dcmedit.rst
index 81ef1485a3..69f128235b 100644
--- a/docs/reference/commands/dcmedit.rst
+++ b/docs/reference/commands/dcmedit.rst
@@ -66,7 +66,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dcminfo.rst b/docs/reference/commands/dcminfo.rst
index 1ac6809c1d..49ecdf6326 100644
--- a/docs/reference/commands/dcminfo.rst
+++ b/docs/reference/commands/dcminfo.rst
@@ -58,7 +58,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dirflip.rst b/docs/reference/commands/dirflip.rst
index 8b7206a93b..80ccbd992c 100644
--- a/docs/reference/commands/dirflip.rst
+++ b/docs/reference/commands/dirflip.rst
@@ -60,7 +60,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dirgen.rst b/docs/reference/commands/dirgen.rst
index d0cf6acd52..26ff687525 100644
--- a/docs/reference/commands/dirgen.rst
+++ b/docs/reference/commands/dirgen.rst
@@ -70,7 +70,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dirmerge.rst b/docs/reference/commands/dirmerge.rst
index f8444352d6..e6c511c18a 100644
--- a/docs/reference/commands/dirmerge.rst
+++ b/docs/reference/commands/dirmerge.rst
@@ -54,7 +54,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dirorder.rst b/docs/reference/commands/dirorder.rst
index 2b49939ce3..fac0416555 100644
--- a/docs/reference/commands/dirorder.rst
+++ b/docs/reference/commands/dirorder.rst
@@ -58,7 +58,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dirsplit.rst b/docs/reference/commands/dirsplit.rst
index 252fd03d3e..cc23aa3483 100644
--- a/docs/reference/commands/dirsplit.rst
+++ b/docs/reference/commands/dirsplit.rst
@@ -55,7 +55,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dirstat.rst b/docs/reference/commands/dirstat.rst
index 99858a6713..bac82d3aed 100644
--- a/docs/reference/commands/dirstat.rst
+++ b/docs/reference/commands/dirstat.rst
@@ -111,7 +111,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwi2adc.rst b/docs/reference/commands/dwi2adc.rst
index 855eb9ba96..f351aeabaa 100644
--- a/docs/reference/commands/dwi2adc.rst
+++ b/docs/reference/commands/dwi2adc.rst
@@ -58,7 +58,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwi2fod.rst b/docs/reference/commands/dwi2fod.rst
index 6ee58804b5..20221d204e 100644
--- a/docs/reference/commands/dwi2fod.rst
+++ b/docs/reference/commands/dwi2fod.rst
@@ -23,7 +23,7 @@ Description
-----------
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Example usages
--------------
@@ -130,7 +130,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com) and Ben Jeurissen (ben.jeurissen@uantwerpen.be)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwi2mask.rst b/docs/reference/commands/dwi2mask.rst
index 56a273bf6c..06620d56bd 100644
--- a/docs/reference/commands/dwi2mask.rst
+++ b/docs/reference/commands/dwi2mask.rst
@@ -69,7 +69,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au), Thijs Dhollander (thijs.dhollander@gmail.com) and Ben Jeurissen (ben.jeurissen@uantwerpen.be)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwi2response.rst b/docs/reference/commands/dwi2response.rst
index b7c8c3bf46..26332d7a53 100644
--- a/docs/reference/commands/dwi2response.rst
+++ b/docs/reference/commands/dwi2response.rst
@@ -84,7 +84,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and Thijs Dhollander (thijs.dhollander@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -308,7 +308,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Thijs Dhollander (thijs.dhollander@gmail.com)
**Copyright:** Copyright (c) 2019 Thijs Dhollander and The Florey Institute of Neuroscience and Mental Health, Melbourne, Australia. This Software is provided on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Software is free of defects, merchantable, fit for a particular purpose or non-infringing.
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -414,7 +414,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -515,7 +515,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -628,7 +628,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -734,7 +734,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -842,7 +842,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwi2tensor.rst b/docs/reference/commands/dwi2tensor.rst
index b2bc5f80ae..2302fb9721 100644
--- a/docs/reference/commands/dwi2tensor.rst
+++ b/docs/reference/commands/dwi2tensor.rst
@@ -96,7 +96,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Ben Jeurissen (ben.jeurissen@uantwerpen.be)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwibiascorrect.rst b/docs/reference/commands/dwibiascorrect.rst
index 8cde9f5bc7..2e8617d443 100644
--- a/docs/reference/commands/dwibiascorrect.rst
+++ b/docs/reference/commands/dwibiascorrect.rst
@@ -73,7 +73,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -175,7 +175,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -275,7 +275,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwicat.rst b/docs/reference/commands/dwicat.rst
index 7c025ca4f5..242e485f68 100644
--- a/docs/reference/commands/dwicat.rst
+++ b/docs/reference/commands/dwicat.rst
@@ -67,7 +67,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Lena Dorfschmidt (ld548@cam.ac.uk) and Jakub Vohryzek (jakub.vohryzek@queens.ox.ac.uk) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwiextract.rst b/docs/reference/commands/dwiextract.rst
index fcb8fb3e58..fa390b402c 100644
--- a/docs/reference/commands/dwiextract.rst
+++ b/docs/reference/commands/dwiextract.rst
@@ -103,7 +103,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) and Thijs Dhollander (thijs.dhollander@gmail.com) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwifslpreproc.rst b/docs/reference/commands/dwifslpreproc.rst
index 3efd1efba8..9b4faf6694 100644
--- a/docs/reference/commands/dwifslpreproc.rst
+++ b/docs/reference/commands/dwifslpreproc.rst
@@ -159,7 +159,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwigradcheck.rst b/docs/reference/commands/dwigradcheck.rst
index 0b296ea282..2392ba188f 100644
--- a/docs/reference/commands/dwigradcheck.rst
+++ b/docs/reference/commands/dwigradcheck.rst
@@ -84,7 +84,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwinormalise.rst b/docs/reference/commands/dwinormalise.rst
index 490291d875..81dc6e7486 100644
--- a/docs/reference/commands/dwinormalise.rst
+++ b/docs/reference/commands/dwinormalise.rst
@@ -64,7 +64,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -153,7 +153,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -242,7 +242,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/dwishellmath.rst b/docs/reference/commands/dwishellmath.rst
index 8134caacc2..d9b15aa1bc 100644
--- a/docs/reference/commands/dwishellmath.rst
+++ b/docs/reference/commands/dwishellmath.rst
@@ -80,7 +80,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Daan Christiaens (daan.christiaens@kcl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixel2peaks.rst b/docs/reference/commands/fixel2peaks.rst
index 3c3afb0090..ef96181205 100644
--- a/docs/reference/commands/fixel2peaks.rst
+++ b/docs/reference/commands/fixel2peaks.rst
@@ -60,7 +60,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixel2sh.rst b/docs/reference/commands/fixel2sh.rst
index 4d9901fac6..e929935bd9 100644
--- a/docs/reference/commands/fixel2sh.rst
+++ b/docs/reference/commands/fixel2sh.rst
@@ -24,7 +24,7 @@ Description
This command generates spherical harmonic data from fixels that can be visualised using the ODF tool in MRview. The output ODF lobes are scaled according to the values in the input fixel image.
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Options
-------
@@ -61,7 +61,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) & David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixel2tsf.rst b/docs/reference/commands/fixel2tsf.rst
index 27f6b2082d..48695be7b1 100644
--- a/docs/reference/commands/fixel2tsf.rst
+++ b/docs/reference/commands/fixel2tsf.rst
@@ -59,7 +59,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixel2voxel.rst b/docs/reference/commands/fixel2voxel.rst
index 29016faff9..d6147a4449 100644
--- a/docs/reference/commands/fixel2voxel.rst
+++ b/docs/reference/commands/fixel2voxel.rst
@@ -78,7 +78,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) & David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixelcfestats.rst b/docs/reference/commands/fixelcfestats.rst
index a4bc72ece1..24993b6786 100644
--- a/docs/reference/commands/fixelcfestats.rst
+++ b/docs/reference/commands/fixelcfestats.rst
@@ -123,7 +123,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixelconnectivity.rst b/docs/reference/commands/fixelconnectivity.rst
index 37f5742e91..ed89c536f5 100644
--- a/docs/reference/commands/fixelconnectivity.rst
+++ b/docs/reference/commands/fixelconnectivity.rst
@@ -66,7 +66,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixelconvert.rst b/docs/reference/commands/fixelconvert.rst
index b339b61a9b..18ec89cb31 100644
--- a/docs/reference/commands/fixelconvert.rst
+++ b/docs/reference/commands/fixelconvert.rst
@@ -90,7 +90,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixelcorrespondence.rst b/docs/reference/commands/fixelcorrespondence.rst
index a0879de946..da6dde23cf 100644
--- a/docs/reference/commands/fixelcorrespondence.rst
+++ b/docs/reference/commands/fixelcorrespondence.rst
@@ -60,7 +60,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixelcrop.rst b/docs/reference/commands/fixelcrop.rst
index 44444bdc4b..1b5328fd4e 100644
--- a/docs/reference/commands/fixelcrop.rst
+++ b/docs/reference/commands/fixelcrop.rst
@@ -57,7 +57,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) & Rami Tabarra (rami.tabarra@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixelfilter.rst b/docs/reference/commands/fixelfilter.rst
index aacda9eeff..e4a7cdcbd3 100644
--- a/docs/reference/commands/fixelfilter.rst
+++ b/docs/reference/commands/fixelfilter.rst
@@ -75,7 +75,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fixelreorient.rst b/docs/reference/commands/fixelreorient.rst
index 0f843c8036..6cc726913a 100644
--- a/docs/reference/commands/fixelreorient.rst
+++ b/docs/reference/commands/fixelreorient.rst
@@ -57,7 +57,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/fod2fixel.rst b/docs/reference/commands/fod2fixel.rst
index 288ebd97d5..5583f1b080 100644
--- a/docs/reference/commands/fod2fixel.rst
+++ b/docs/reference/commands/fod2fixel.rst
@@ -88,7 +88,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/for_each.rst b/docs/reference/commands/for_each.rst
index 0a04fa4ac3..e5932ebbb8 100644
--- a/docs/reference/commands/for_each.rst
+++ b/docs/reference/commands/for_each.rst
@@ -107,7 +107,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/label2colour.rst b/docs/reference/commands/label2colour.rst
index ee2a3f7b8b..de554165f8 100644
--- a/docs/reference/commands/label2colour.rst
+++ b/docs/reference/commands/label2colour.rst
@@ -58,7 +58,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/label2mesh.rst b/docs/reference/commands/label2mesh.rst
index 9673e2a70c..cc9e04de0f 100644
--- a/docs/reference/commands/label2mesh.rst
+++ b/docs/reference/commands/label2mesh.rst
@@ -53,7 +53,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/labelconvert.rst b/docs/reference/commands/labelconvert.rst
index 0a9f1130c8..1529d4e99b 100644
--- a/docs/reference/commands/labelconvert.rst
+++ b/docs/reference/commands/labelconvert.rst
@@ -69,7 +69,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/labelsgmfix.rst b/docs/reference/commands/labelsgmfix.rst
index d06cf6fdd7..71dc6693b4 100644
--- a/docs/reference/commands/labelsgmfix.rst
+++ b/docs/reference/commands/labelsgmfix.rst
@@ -72,7 +72,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/labelstats.rst b/docs/reference/commands/labelstats.rst
index 8efd2224af..050114aaf0 100644
--- a/docs/reference/commands/labelstats.rst
+++ b/docs/reference/commands/labelstats.rst
@@ -54,7 +54,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/maskdump.rst b/docs/reference/commands/maskdump.rst
index 95775092e5..4ee2f13cd6 100644
--- a/docs/reference/commands/maskdump.rst
+++ b/docs/reference/commands/maskdump.rst
@@ -56,7 +56,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/maskfilter.rst b/docs/reference/commands/maskfilter.rst
index bbd0008a17..b9ecfa9f41 100644
--- a/docs/reference/commands/maskfilter.rst
+++ b/docs/reference/commands/maskfilter.rst
@@ -88,7 +88,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au), David Raffelt (david.raffelt@florey.edu.au), Thijs Dhollander (thijs.dhollander@gmail.com) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mesh2voxel.rst b/docs/reference/commands/mesh2voxel.rst
index 8692db5402..9d252bc4a5 100644
--- a/docs/reference/commands/mesh2voxel.rst
+++ b/docs/reference/commands/mesh2voxel.rst
@@ -54,7 +54,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/meshconvert.rst b/docs/reference/commands/meshconvert.rst
index 710ffe48a8..4c7ec8df16 100644
--- a/docs/reference/commands/meshconvert.rst
+++ b/docs/reference/commands/meshconvert.rst
@@ -55,7 +55,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/meshfilter.rst b/docs/reference/commands/meshfilter.rst
index 8cbe82bd3a..8051830c7d 100644
--- a/docs/reference/commands/meshfilter.rst
+++ b/docs/reference/commands/meshfilter.rst
@@ -73,7 +73,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mraverageheader.rst b/docs/reference/commands/mraverageheader.rst
index d41c9fedf7..252693ebe4 100644
--- a/docs/reference/commands/mraverageheader.rst
+++ b/docs/reference/commands/mraverageheader.rst
@@ -62,7 +62,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Maximilian Pietsch (maximilian.pietsch@kcl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrcalc.rst b/docs/reference/commands/mrcalc.rst
index 1e5d52148a..3e1888cfe6 100644
--- a/docs/reference/commands/mrcalc.rst
+++ b/docs/reference/commands/mrcalc.rst
@@ -224,7 +224,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrcat.rst b/docs/reference/commands/mrcat.rst
index 7c2393d8f4..0b27e2e314 100644
--- a/docs/reference/commands/mrcat.rst
+++ b/docs/reference/commands/mrcat.rst
@@ -68,7 +68,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrcentroid.rst b/docs/reference/commands/mrcentroid.rst
index 8f39c54195..23120bb00b 100644
--- a/docs/reference/commands/mrcentroid.rst
+++ b/docs/reference/commands/mrcentroid.rst
@@ -54,7 +54,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrcheckerboardmask.rst b/docs/reference/commands/mrcheckerboardmask.rst
index 093988d254..adf6948150 100644
--- a/docs/reference/commands/mrcheckerboardmask.rst
+++ b/docs/reference/commands/mrcheckerboardmask.rst
@@ -57,7 +57,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Max Pietsch (maximilian.pietsch@kcl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrclusterstats.rst b/docs/reference/commands/mrclusterstats.rst
index 8dda7fc05a..18f9bc0fd8 100644
--- a/docs/reference/commands/mrclusterstats.rst
+++ b/docs/reference/commands/mrclusterstats.rst
@@ -117,7 +117,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrcolour.rst b/docs/reference/commands/mrcolour.rst
index f101049c16..01aca6bd85 100644
--- a/docs/reference/commands/mrcolour.rst
+++ b/docs/reference/commands/mrcolour.rst
@@ -65,7 +65,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrconvert.rst b/docs/reference/commands/mrconvert.rst
index d9ba904f92..389a17b2c3 100644
--- a/docs/reference/commands/mrconvert.rst
+++ b/docs/reference/commands/mrconvert.rst
@@ -188,7 +188,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrdegibbs.rst b/docs/reference/commands/mrdegibbs.rst
index 3863ac81bb..df77805449 100644
--- a/docs/reference/commands/mrdegibbs.rst
+++ b/docs/reference/commands/mrdegibbs.rst
@@ -75,7 +75,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Ben Jeurissen (ben.jeurissen@uantwerpen.be) & J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrdump.rst b/docs/reference/commands/mrdump.rst
index 660b49ddbf..321c533e9a 100644
--- a/docs/reference/commands/mrdump.rst
+++ b/docs/reference/commands/mrdump.rst
@@ -58,7 +58,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mredit.rst b/docs/reference/commands/mredit.rst
index 66ffe8bb70..91037ce61c 100644
--- a/docs/reference/commands/mredit.rst
+++ b/docs/reference/commands/mredit.rst
@@ -64,7 +64,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrfilter.rst b/docs/reference/commands/mrfilter.rst
index 3006083e23..84fb857c30 100644
--- a/docs/reference/commands/mrfilter.rst
+++ b/docs/reference/commands/mrfilter.rst
@@ -118,7 +118,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au), David Raffelt (david.raffelt@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrgrid.rst b/docs/reference/commands/mrgrid.rst
index f3fa09bb3c..0d1b21c71e 100644
--- a/docs/reference/commands/mrgrid.rst
+++ b/docs/reference/commands/mrgrid.rst
@@ -129,7 +129,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Max Pietsch (maximilian.pietsch@kcl.ac.uk) & David Raffelt (david.raffelt@florey.edu.au) & Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrhistmatch.rst b/docs/reference/commands/mrhistmatch.rst
index a6e2ce59d4..ca9871422f 100644
--- a/docs/reference/commands/mrhistmatch.rst
+++ b/docs/reference/commands/mrhistmatch.rst
@@ -68,7 +68,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrhistogram.rst b/docs/reference/commands/mrhistogram.rst
index 25971bd01a..3289ce0dea 100644
--- a/docs/reference/commands/mrhistogram.rst
+++ b/docs/reference/commands/mrhistogram.rst
@@ -67,7 +67,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrinfo.rst b/docs/reference/commands/mrinfo.rst
index 636cfc6715..988c699f74 100644
--- a/docs/reference/commands/mrinfo.rst
+++ b/docs/reference/commands/mrinfo.rst
@@ -132,7 +132,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (d.tournier@brain.org.au) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrmath.rst b/docs/reference/commands/mrmath.rst
index badd2225a9..43800ebe41 100644
--- a/docs/reference/commands/mrmath.rst
+++ b/docs/reference/commands/mrmath.rst
@@ -85,7 +85,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrmetric.rst b/docs/reference/commands/mrmetric.rst
index 372fdf1442..732ef0dd4c 100644
--- a/docs/reference/commands/mrmetric.rst
+++ b/docs/reference/commands/mrmetric.rst
@@ -70,7 +70,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) and Max Pietsch (maximilian.pietsch@kcl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrregister.rst b/docs/reference/commands/mrregister.rst
index 0b842fbaed..ce54f5511d 100644
--- a/docs/reference/commands/mrregister.rst
+++ b/docs/reference/commands/mrregister.rst
@@ -217,7 +217,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) & Max Pietsch (maximilian.pietsch@kcl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrstats.rst b/docs/reference/commands/mrstats.rst
index b7d679871d..e3af101fa4 100644
--- a/docs/reference/commands/mrstats.rst
+++ b/docs/reference/commands/mrstats.rst
@@ -64,7 +64,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrthreshold.rst b/docs/reference/commands/mrthreshold.rst
index e844004c79..ad4697232c 100644
--- a/docs/reference/commands/mrthreshold.rst
+++ b/docs/reference/commands/mrthreshold.rst
@@ -102,7 +102,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrtransform.rst b/docs/reference/commands/mrtransform.rst
index 3ebfcbbdad..feb82de737 100644
--- a/docs/reference/commands/mrtransform.rst
+++ b/docs/reference/commands/mrtransform.rst
@@ -147,7 +147,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com) and David Raffelt (david.raffelt@florey.edu.au) and Max Pietsch (maximilian.pietsch@kcl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrtrix_cleanup.rst b/docs/reference/commands/mrtrix_cleanup.rst
index 834a3173e6..eeac8c0c43 100644
--- a/docs/reference/commands/mrtrix_cleanup.rst
+++ b/docs/reference/commands/mrtrix_cleanup.rst
@@ -72,7 +72,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mrview.rst b/docs/reference/commands/mrview.rst
index a4c6381efc..e0901e24fd 100644
--- a/docs/reference/commands/mrview.rst
+++ b/docs/reference/commands/mrview.rst
@@ -218,7 +218,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com), Dave Raffelt (david.raffelt@florey.edu.au), Robert E. Smith (robert.smith@florey.edu.au), Rami Tabbara (rami.tabbara@florey.edu.au), Max Pietsch (maximilian.pietsch@kcl.ac.uk), Thijs Dhollander (thijs.dhollander@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/mtnormalise.rst b/docs/reference/commands/mtnormalise.rst
index 83d7b0a568..fdb3e964b2 100644
--- a/docs/reference/commands/mtnormalise.rst
+++ b/docs/reference/commands/mtnormalise.rst
@@ -89,7 +89,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Thijs Dhollander (thijs.dhollander@gmail.com), Rami Tabbara (rami.tabbara@florey.edu.au), David Raffelt (david.raffelt@florey.edu.au), Jonas Rosnarho-Tornstrand (jonas.rosnarho-tornstrand@kcl.ac.uk) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/peaks2amp.rst b/docs/reference/commands/peaks2amp.rst
index d96e4c9312..1bbd9923fc 100644
--- a/docs/reference/commands/peaks2amp.rst
+++ b/docs/reference/commands/peaks2amp.rst
@@ -51,7 +51,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/peaks2fixel.rst b/docs/reference/commands/peaks2fixel.rst
index c2af3f44be..a0389863a4 100644
--- a/docs/reference/commands/peaks2fixel.rst
+++ b/docs/reference/commands/peaks2fixel.rst
@@ -53,7 +53,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/population_template.rst b/docs/reference/commands/population_template.rst
index a1a4ed2e01..b3d4de70c2 100644
--- a/docs/reference/commands/population_template.rst
+++ b/docs/reference/commands/population_template.rst
@@ -141,7 +141,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) & Max Pietsch (maximilian.pietsch@kcl.ac.uk) & Thijs Dhollander (thijs.dhollander@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/responsemean.rst b/docs/reference/commands/responsemean.rst
index 6bc86a4271..86e7b67796 100644
--- a/docs/reference/commands/responsemean.rst
+++ b/docs/reference/commands/responsemean.rst
@@ -71,7 +71,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/sh2amp.rst b/docs/reference/commands/sh2amp.rst
index c43e1fa6c1..ec50af75a0 100644
--- a/docs/reference/commands/sh2amp.rst
+++ b/docs/reference/commands/sh2amp.rst
@@ -35,7 +35,7 @@ If a full DW encoding is provided, the number of shells needs to match those fou
If the input image contains multiple shells (its size along the 5th dimension is greater than one), the program will expect the direction set to contain multiple shells, which can only be provided as a full DW encodings (the last two options in the list above).
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Options
-------
@@ -89,7 +89,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/sh2peaks.rst b/docs/reference/commands/sh2peaks.rst
index d117781b35..67f663f9ed 100644
--- a/docs/reference/commands/sh2peaks.rst
+++ b/docs/reference/commands/sh2peaks.rst
@@ -24,7 +24,7 @@ Description
Peaks of the spherical harmonic function in each voxel are located by commencing a Newton search along each of a set of pre-specified directions
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Options
-------
@@ -75,7 +75,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/sh2power.rst b/docs/reference/commands/sh2power.rst
index 3b0fc40654..28b87dba4f 100644
--- a/docs/reference/commands/sh2power.rst
+++ b/docs/reference/commands/sh2power.rst
@@ -24,7 +24,7 @@ Description
This command computes the sum of squared SH coefficients, which equals the mean-squared amplitude of the spherical function it represents.
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Options
-------
@@ -61,7 +61,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/sh2response.rst b/docs/reference/commands/sh2response.rst
index f58863576f..e7fff1dd13 100644
--- a/docs/reference/commands/sh2response.rst
+++ b/docs/reference/commands/sh2response.rst
@@ -24,7 +24,7 @@ Description
-----------
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Options
-------
@@ -63,7 +63,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/shbasis.rst b/docs/reference/commands/shbasis.rst
index fd396b3181..9ac9314982 100644
--- a/docs/reference/commands/shbasis.rst
+++ b/docs/reference/commands/shbasis.rst
@@ -27,7 +27,7 @@ This command provides a mechanism for testing the basis used in storage of image
Note that the "force_*" conversion choices should only be used in cases where this command has previously been unable to automatically determine the SH basis from the image data, but the user themselves are confident of the SH basis of the data.
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Options
-------
@@ -64,7 +64,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/shconv.rst b/docs/reference/commands/shconv.rst
index 2b2fd14ed7..e23af61f6f 100644
--- a/docs/reference/commands/shconv.rst
+++ b/docs/reference/commands/shconv.rst
@@ -28,10 +28,10 @@ If multiple pairs of inputs are provided, their contributions will be summed int
If the responses are multi-shell (with one line of coefficients per shell), the output will be a 5-dimensional image, with the SH coefficients of the signal in each shell stored at different indices along the 5th dimension.
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
The spherical harmonic coefficients are stored according the conventions described the main documentation, which can be found at the following link: |br|
-https://mrtrix.readthedocs.io/en/3.0.3/concepts/spherical_harmonics.html
+https://mrtrix.readthedocs.io/en/3.0.4/concepts/spherical_harmonics.html
Options
-------
@@ -76,7 +76,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/shview.rst b/docs/reference/commands/shview.rst
index 07ebf4d43c..ae16d22acd 100644
--- a/docs/reference/commands/shview.rst
+++ b/docs/reference/commands/shview.rst
@@ -52,7 +52,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tck2connectome.rst b/docs/reference/commands/tck2connectome.rst
index ff667ec93d..026dda04ec 100644
--- a/docs/reference/commands/tck2connectome.rst
+++ b/docs/reference/commands/tck2connectome.rst
@@ -127,7 +127,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tck2fixel.rst b/docs/reference/commands/tck2fixel.rst
index bbab736511..36d89a16a5 100644
--- a/docs/reference/commands/tck2fixel.rst
+++ b/docs/reference/commands/tck2fixel.rst
@@ -55,7 +55,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tckconvert.rst b/docs/reference/commands/tckconvert.rst
index 9c1989a346..5d23d6132a 100644
--- a/docs/reference/commands/tckconvert.rst
+++ b/docs/reference/commands/tckconvert.rst
@@ -57,6 +57,13 @@ Options for both PLY and RIB writer
- **-radius radius** radius of the streamlines
+Options specific to VTK writer
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+- **-ascii** write an ASCII VTK file (this is the default)
+
+- **-binary** write a binary VTK file
+
Standard options
^^^^^^^^^^^^^^^^
@@ -87,7 +94,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Daan Christiaens (daan.christiaens@kcl.ac.uk), J-Donald Tournier (jdtournier@gmail.com), Philip Broser (philip.broser@me.com), Daniel Blezek (daniel.blezek@gmail.com).
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tckdfc.rst b/docs/reference/commands/tckdfc.rst
index 5901adcb54..bb4130ea2c 100644
--- a/docs/reference/commands/tckdfc.rst
+++ b/docs/reference/commands/tckdfc.rst
@@ -91,7 +91,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tckedit.rst b/docs/reference/commands/tckedit.rst
index 41140eecdc..eb10dc3b27 100644
--- a/docs/reference/commands/tckedit.rst
+++ b/docs/reference/commands/tckedit.rst
@@ -129,7 +129,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tckgen.rst b/docs/reference/commands/tckgen.rst
index 4eced40b3d..e3b80d4a72 100644
--- a/docs/reference/commands/tckgen.rst
+++ b/docs/reference/commands/tckgen.rst
@@ -203,7 +203,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com) and Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tckinfo.rst b/docs/reference/commands/tckinfo.rst
index 09c2d9f255..b1be835478 100644
--- a/docs/reference/commands/tckinfo.rst
+++ b/docs/reference/commands/tckinfo.rst
@@ -52,7 +52,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tckmap.rst b/docs/reference/commands/tckmap.rst
index 242c6b8055..0a8d09243b 100644
--- a/docs/reference/commands/tckmap.rst
+++ b/docs/reference/commands/tckmap.rst
@@ -130,7 +130,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tckresample.rst b/docs/reference/commands/tckresample.rst
index b7b4bf9204..ca77fbdfd4 100644
--- a/docs/reference/commands/tckresample.rst
+++ b/docs/reference/commands/tckresample.rst
@@ -75,7 +75,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tcksample.rst b/docs/reference/commands/tcksample.rst
index af5c33ba6e..e86f7e19ed 100644
--- a/docs/reference/commands/tcksample.rst
+++ b/docs/reference/commands/tcksample.rst
@@ -67,7 +67,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tcksift.rst b/docs/reference/commands/tcksift.rst
index 0426c3b108..968f4da86c 100644
--- a/docs/reference/commands/tcksift.rst
+++ b/docs/reference/commands/tcksift.rst
@@ -99,7 +99,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tcksift2.rst b/docs/reference/commands/tcksift2.rst
index 38c41dd3cc..afb6cefbad 100644
--- a/docs/reference/commands/tcksift2.rst
+++ b/docs/reference/commands/tcksift2.rst
@@ -118,7 +118,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tckstats.rst b/docs/reference/commands/tckstats.rst
index 8046ab4b01..b1dd5e76d8 100644
--- a/docs/reference/commands/tckstats.rst
+++ b/docs/reference/commands/tckstats.rst
@@ -60,7 +60,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tcktransform.rst b/docs/reference/commands/tcktransform.rst
index 1da327b3d4..2bfe37562c 100644
--- a/docs/reference/commands/tcktransform.rst
+++ b/docs/reference/commands/tcktransform.rst
@@ -52,7 +52,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tensor2metric.rst b/docs/reference/commands/tensor2metric.rst
index 27029907a2..1987edb593 100644
--- a/docs/reference/commands/tensor2metric.rst
+++ b/docs/reference/commands/tensor2metric.rst
@@ -78,7 +78,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Thijs Dhollander (thijs.dhollander@gmail.com) & Ben Jeurissen (ben.jeurissen@uantwerpen.be) & J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/transformcalc.rst b/docs/reference/commands/transformcalc.rst
index 585d059a9b..74a84995ae 100644
--- a/docs/reference/commands/transformcalc.rst
+++ b/docs/reference/commands/transformcalc.rst
@@ -93,7 +93,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Max Pietsch (maximilian.pietsch@kcl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/transformcompose.rst b/docs/reference/commands/transformcompose.rst
index f299448acf..5bee3d2566 100644
--- a/docs/reference/commands/transformcompose.rst
+++ b/docs/reference/commands/transformcompose.rst
@@ -62,7 +62,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/transformconvert.rst b/docs/reference/commands/transformconvert.rst
index e7babc213e..0f5c5f36b9 100644
--- a/docs/reference/commands/transformconvert.rst
+++ b/docs/reference/commands/transformconvert.rst
@@ -71,7 +71,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Max Pietsch (maximilian.pietsch@kcl.ac.uk)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tsfdivide.rst b/docs/reference/commands/tsfdivide.rst
index 3fb7c198fa..6e14db6328 100644
--- a/docs/reference/commands/tsfdivide.rst
+++ b/docs/reference/commands/tsfdivide.rst
@@ -52,7 +52,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tsfinfo.rst b/docs/reference/commands/tsfinfo.rst
index b3e1726e26..c5c4524085 100644
--- a/docs/reference/commands/tsfinfo.rst
+++ b/docs/reference/commands/tsfinfo.rst
@@ -54,7 +54,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tsfmult.rst b/docs/reference/commands/tsfmult.rst
index 2d3c6860fe..1ce11d8040 100644
--- a/docs/reference/commands/tsfmult.rst
+++ b/docs/reference/commands/tsfmult.rst
@@ -52,7 +52,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tsfsmooth.rst b/docs/reference/commands/tsfsmooth.rst
index 3de64edd0c..7c6a082120 100644
--- a/docs/reference/commands/tsfsmooth.rst
+++ b/docs/reference/commands/tsfsmooth.rst
@@ -53,7 +53,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tsfthreshold.rst b/docs/reference/commands/tsfthreshold.rst
index 106606412d..74c84a5df6 100644
--- a/docs/reference/commands/tsfthreshold.rst
+++ b/docs/reference/commands/tsfthreshold.rst
@@ -54,7 +54,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/tsfvalidate.rst b/docs/reference/commands/tsfvalidate.rst
index b2d67638d1..a3b3cf2bad 100644
--- a/docs/reference/commands/tsfvalidate.rst
+++ b/docs/reference/commands/tsfvalidate.rst
@@ -51,7 +51,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/vectorstats.rst b/docs/reference/commands/vectorstats.rst
index cb662b96a8..c35b62e609 100644
--- a/docs/reference/commands/vectorstats.rst
+++ b/docs/reference/commands/vectorstats.rst
@@ -88,7 +88,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/voxel2fixel.rst b/docs/reference/commands/voxel2fixel.rst
index ae7e680b77..c6c24340b8 100644
--- a/docs/reference/commands/voxel2fixel.rst
+++ b/docs/reference/commands/voxel2fixel.rst
@@ -58,7 +58,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/voxel2mesh.rst b/docs/reference/commands/voxel2mesh.rst
index 3486c2bebf..7254bfd48c 100644
--- a/docs/reference/commands/voxel2mesh.rst
+++ b/docs/reference/commands/voxel2mesh.rst
@@ -62,7 +62,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/warp2metric.rst b/docs/reference/commands/warp2metric.rst
index e1d31ccea0..4a4967fd0c 100644
--- a/docs/reference/commands/warp2metric.rst
+++ b/docs/reference/commands/warp2metric.rst
@@ -58,7 +58,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/warpconvert.rst b/docs/reference/commands/warpconvert.rst
index 656d028106..2873c18e3d 100644
--- a/docs/reference/commands/warpconvert.rst
+++ b/docs/reference/commands/warpconvert.rst
@@ -63,7 +63,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/warpcorrect.rst b/docs/reference/commands/warpcorrect.rst
index 7a9173bc76..2e10068665 100644
--- a/docs/reference/commands/warpcorrect.rst
+++ b/docs/reference/commands/warpcorrect.rst
@@ -60,7 +60,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** David Raffelt (david.raffelt@florey.edu.au) & Max Pietsch (mail@maxpietsch.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/warpinit.rst b/docs/reference/commands/warpinit.rst
index 0fd88d60ee..b85f8bb3c6 100644
--- a/docs/reference/commands/warpinit.rst
+++ b/docs/reference/commands/warpinit.rst
@@ -62,7 +62,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** J-Donald Tournier (jdtournier@gmail.com)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/commands/warpinvert.rst b/docs/reference/commands/warpinvert.rst
index a8a9c4a254..52c63a0f90 100644
--- a/docs/reference/commands/warpinvert.rst
+++ b/docs/reference/commands/warpinvert.rst
@@ -60,7 +60,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch
**Author:** Robert E. Smith (robert.smith@florey.edu.au) and David Raffelt (david.raffelt@florey.edu.au)
-**Copyright:** Copyright (c) 2008-2021 the MRtrix3 contributors.
+**Copyright:** Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/docs/reference/environment_variables.rst b/docs/reference/environment_variables.rst
index fd3eca967f..29f968b6af 100644
--- a/docs/reference/environment_variables.rst
+++ b/docs/reference/environment_variables.rst
@@ -53,6 +53,21 @@ List of MRtrix3 environment variables
:option:`NumberOfThreads` setting in the configuration file, but
will be overridden by the ENVVAR ``-nthreads`` command-line option.
+.. envvar:: MRTRIX_PRESERVE_PHILIPS_ISO
+
+ Do not remove the synthetic isotropically-weighted diffusion
+ image often added at the end of the series on Philips
+ scanners. By default, these images are removed from the series
+ to prevent errors in downstream processing. If this
+ environment variable is set, these images will be preserved in
+ the output.
+
+ Note that it can be difficult to ascertain which volume is the
+ synthetic isotropically-weighed image, since its DW encoding
+ will normally have been modified from its initial value
+ (e.g. [ 0 0 0 1000 ] for a b=1000 acquisition) to b=0 due to
+ b-value scaling.
+
.. envvar:: MRTRIX_QUIET
Do not display information messages or progress status. This has
diff --git a/doxygen b/doxygen
index ec8a419cd0..4dd64abadd 100755
--- a/doxygen
+++ b/doxygen
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/generate_bash_completion.py b/generate_bash_completion.py
index 841fcda6ad..47a37e95ad 100755
--- a/generate_bash_completion.py
+++ b/generate_bash_completion.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/install_mime_types.sh b/install_mime_types.sh
index 00dba63cba..560b64a23c 100755
--- a/install_mime_types.sh
+++ b/install_mime_types.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -16,12 +16,11 @@
# For more details, see http://www.mrtrix.org/.
for s in 16 32 48 64 128; do
- for t in mrtrix mrtrix-gz nifti nifti-gz mgh mgz analyze; do #TODO add mrtrix-tracks
- xdg-icon-resource install --context apps --size $s icons/desktop/${s}x${s}/mrtrix.png application-x-${t}
- done
+ xdg-icon-resource install --context apps --size $s icons/desktop/${s}x${s}/mrtrix.png application-x-mrtrix
+ xdg-icon-resource install --context mimetypes --size $s icons/desktop/${s}x${s}/mrtrix.png x-mrtrix
done
xdg-mime install mrtrix-mime.xml
+sed s^Exec=mrview^Exec=$(pwd)/bin/mrview^ < mrview.desktop > mrtrix-mrview.desktop
xdg-desktop-menu install mrtrix-mrview.desktop
-xdg-desktop-icon install mrtrix-mrview.desktop
diff --git a/lib/mrtrix3/_5ttgen/freesurfer.py b/lib/mrtrix3/_5ttgen/freesurfer.py
index dc177c5484..752b6c9e7e 100644
--- a/lib/mrtrix3/_5ttgen/freesurfer.py
+++ b/lib/mrtrix3/_5ttgen/freesurfer.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/_5ttgen/fsl.py b/lib/mrtrix3/_5ttgen/fsl.py
index 3d04a9f555..946a554158 100644
--- a/lib/mrtrix3/_5ttgen/fsl.py
+++ b/lib/mrtrix3/_5ttgen/fsl.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/_5ttgen/gif.py b/lib/mrtrix3/_5ttgen/gif.py
index 0fa8b6f155..cc5c070d33 100644
--- a/lib/mrtrix3/_5ttgen/gif.py
+++ b/lib/mrtrix3/_5ttgen/gif.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/_5ttgen/hsvs.py b/lib/mrtrix3/_5ttgen/hsvs.py
index b105f5fa4f..a53d81213c 100644
--- a/lib/mrtrix3/_5ttgen/hsvs.py
+++ b/lib/mrtrix3/_5ttgen/hsvs.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
+
import glob, os, re
diff --git a/lib/mrtrix3/__init__.py b/lib/mrtrix3/__init__.py
index 537d4f1c5d..01e5fc1480 100644
--- a/lib/mrtrix3/__init__.py
+++ b/lib/mrtrix3/__init__.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
+
import inspect, os, sys
from collections import namedtuple
try:
@@ -78,7 +81,7 @@ class MRtrixError(MRtrixBaseError): #pylint: disable=unused-variable
# Set up terminal special characters now, since they may be dependent on the config file
def setup_ansi():
- global ANSI, CONFIG
+ global ANSI
if sys.stderr.isatty() and not ('TerminalColor' in CONFIG and CONFIG['TerminalColor'].lower() in ['no', 'false', '0']):
ANSI = ANSICodes('\033[0K', '\033[0m', '\033[03;32m', '\033[03;34m', '\033[01;31m', '\033[03;36m', '\033[00;31m') #pylint: disable=unused-variable
setup_ansi()
diff --git a/lib/mrtrix3/algorithm.py b/lib/mrtrix3/algorithm.py
index 77fafb752f..aa3ebd8221 100644
--- a/lib/mrtrix3/algorithm.py
+++ b/lib/mrtrix3/algorithm.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/app.py b/lib/mrtrix3/app.py
index 20c9751119..9717c86398 100644
--- a/lib/mrtrix3/app.py
+++ b/lib/mrtrix3/app.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-f-string
+
import argparse, inspect, math, os, random, shlex, shutil, signal, string, subprocess, sys, textwrap, time
from mrtrix3 import ANSI, CONFIG, MRtrixError, setup_ansi
from mrtrix3 import utils # Needed at global level
@@ -56,7 +59,7 @@
_DEFAULT_COPYRIGHT = \
-'''Copyright (c) 2008-2021 the MRtrix3 contributors.
+'''Copyright (c) 2008-2022 the MRtrix3 contributors.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -108,7 +111,7 @@
# , rather than executing this function directly
def _execute(module): #pylint: disable=unused-variable
from mrtrix3 import run #pylint: disable=import-outside-toplevel
- global ARGS, CMDLINE, CONTINUE_OPTION, DO_CLEANUP, EXEC_NAME, FORCE_OVERWRITE, NUM_THREADS, SCRATCH_DIR, VERBOSITY, WORKING_DIR
+ global ARGS, CMDLINE, CONTINUE_OPTION, DO_CLEANUP, FORCE_OVERWRITE, NUM_THREADS, SCRATCH_DIR, VERBOSITY
# Set up signal handlers
for sig in _SIGNALS:
@@ -268,7 +271,6 @@ def _execute(module): #pylint: disable=unused-variable
def check_output_path(item): #pylint: disable=unused-variable
- global ARGS, FORCE_OVERWRITE, WORKING_DIR
if not item:
return
abspath = os.path.abspath(os.path.join(WORKING_DIR, item))
@@ -287,7 +289,7 @@ def check_output_path(item): #pylint: disable=unused-variable
def make_scratch_dir(): #pylint: disable=unused-variable
from mrtrix3 import run #pylint: disable=import-outside-toplevel
- global ARGS, CONTINUE_OPTION, EXEC_NAME, SCRATCH_DIR, WORKING_DIR
+ global SCRATCH_DIR
if CONTINUE_OPTION:
debug('Skipping scratch directory creation due to use of -continue option')
return
@@ -309,7 +311,8 @@ def make_scratch_dir(): #pylint: disable=unused-variable
outfile.write(WORKING_DIR + '\n')
with open(os.path.join(SCRATCH_DIR, 'command.txt'), 'w') as outfile:
outfile.write(' '.join(sys.argv) + '\n')
- open(os.path.join(SCRATCH_DIR, 'log.txt'), 'w').close()
+ with open(os.path.join(SCRATCH_DIR, 'log.txt'), 'w'):
+ pass
# Also use this scratch directory for any piped images within run.command() calls,
# and for keeping a log of executed commands / functions
run.shared.set_scratch_dir(SCRATCH_DIR)
@@ -317,7 +320,6 @@ def make_scratch_dir(): #pylint: disable=unused-variable
def goto_scratch_dir(): #pylint: disable=unused-variable
- global SCRATCH_DIR
if not SCRATCH_DIR:
raise Exception('No scratch directory location set')
if VERBOSITY:
@@ -331,7 +333,6 @@ def goto_scratch_dir(): #pylint: disable=unused-variable
# all intermediates, the resource will be retained; if not, it will be deleted (in particular
# to dynamically free up storage space used by the script).
def cleanup(items): #pylint: disable=unused-variable
- global DO_CLEANUP, VERBOSITY
if not DO_CLEANUP:
return
if isinstance(items, list):
@@ -376,12 +377,10 @@ def cleanup(items): #pylint: disable=unused-variable
# A set of functions and variables for printing various information at the command-line.
def console(text): #pylint: disable=unused-variable
- global VERBOSITY
if VERBOSITY:
sys.stderr.write(EXEC_NAME + ': ' + ANSI.console + text + ANSI.clear + '\n')
def debug(text): #pylint: disable=unused-variable
- global EXEC_NAME, VERBOSITY
if VERBOSITY <= 2:
return
outer_frames = inspect.getouterframes(inspect.currentframe())
@@ -446,7 +445,6 @@ def var(*variables): #pylint: disable=unused-variable
del calling_frame
def warn(text): #pylint: disable=unused-variable
- global EXEC_NAME
sys.stderr.write(EXEC_NAME + ': ' + ANSI.warn + '[WARNING] ' + text + ANSI.clear + '\n')
@@ -468,7 +466,7 @@ class ProgressBar(object): #pylint: disable=unused-variable
def __init__(self, msg, target=0):
from mrtrix3 import run #pylint: disable=import-outside-toplevel
- global EXEC_NAME, VERBOSITY
+ global VERBOSITY
if not (isinstance(msg, utils.STRING_TYPES) or callable(msg)):
raise TypeError('app.ProgressBar must be constructed using either a string or a function')
self.counter = 0
@@ -518,7 +516,7 @@ def increment(self, msg=None):
def done(self, msg=None):
from mrtrix3 import run #pylint: disable=import-outside-toplevel
- global EXEC_NAME, VERBOSITY
+ global VERBOSITY
self.iscomplete = True
if msg is not None:
self.message = msg
@@ -538,7 +536,6 @@ def done(self, msg=None):
def _update(self):
- global EXEC_NAME
assert not self.iscomplete
if not self.orig_verbosity:
return
@@ -570,7 +567,6 @@ class Parser(argparse.ArgumentParser):
# pylint: disable=protected-access
def __init__(self, *args_in, **kwargs_in):
- global _DEFAULT_COPYRIGHT
self._author = None
self._citation_list = [ ]
self._copyright = _DEFAULT_COPYRIGHT
@@ -658,7 +654,6 @@ def parse_args(self):
def print_citation_warning(self):
# If a subparser has been invoked, the subparser's function should instead be called,
# since it might have had additional citations appended
- global ARGS
if self._subparsers:
subparser = getattr(ARGS, self._subparsers._group_actions[0].dest)
for alg in self._subparsers._group_actions[0].choices:
@@ -675,7 +670,7 @@ def print_citation_warning(self):
console('')
# Overloads argparse.ArgumentParser function to give a better error message on failed parsing
- def error(self, text):
+ def error(self, message):
for entry in sys.argv:
if '-help'.startswith(entry):
self.print_help()
@@ -689,7 +684,7 @@ def error(self, text):
if alg == sys.argv[1]:
usage = self._subparsers._group_actions[0].choices[alg].format_usage()
continue
- sys.stderr.write('\nError: %s\n' % text)
+ sys.stderr.write('\nError: %s\n' % message)
sys.stderr.write('Usage: ' + usage + '\n')
sys.stderr.write(' (Run ' + self.prog + ' -help for more information)\n\n')
sys.stderr.flush()
@@ -820,7 +815,7 @@ def print_group_options(group):
elif option.nargs:
if isinstance(option.nargs, int):
group_text += (' ' + option.dest.upper())*option.nargs
- elif option.nargs == '+' or option.nargs == '*':
+ elif option.nargs in ('+', '*'):
group_text += ' '
elif option.nargs == '?':
group_text += ' '
@@ -1092,7 +1087,7 @@ def print_version(self):
sys.stdout.flush()
def _get_ungrouped_options(self):
- return next((group for group in self._action_groups if group.title == 'optional arguments'), None)
+ return next((group for group in self._action_groups if group.title in ( 'options', 'optional arguments') ), None)
def _is_option_group(self, group):
# * Don't display empty groups
@@ -1103,7 +1098,7 @@ def _is_option_group(self, group):
not (len(group._group_actions) == 1 and \
isinstance(group._group_actions[0], argparse._SubParsersAction)) and \
not group == self._positionals and \
- group.title != 'optional arguments'
+ group.title not in ( 'options', 'optional arguments' )
@@ -1116,7 +1111,6 @@ def add_dwgrad_import_options(cmdline): #pylint: disable=unused-variable
cmdline.flag_mutually_exclusive_options( [ 'grad', 'fslgrad' ] )
def read_dwgrad_import_options(): #pylint: disable=unused-variable
from mrtrix3 import path #pylint: disable=import-outside-toplevel
- global ARGS
assert ARGS
if ARGS.grad:
return ' -grad ' + path.from_user(ARGS.grad)
@@ -1131,7 +1125,6 @@ def add_dwgrad_export_options(cmdline): #pylint: disable=unused-variable
cmdline.flag_mutually_exclusive_options( [ 'export_grad_mrtrix', 'export_grad_fsl' ] )
def read_dwgrad_export_options(): #pylint: disable=unused-variable
from mrtrix3 import path #pylint: disable=import-outside-toplevel
- global ARGS
assert ARGS
if ARGS.export_grad_mrtrix:
check_output_path(path.from_user(ARGS.export_grad_mrtrix, False))
@@ -1150,7 +1143,7 @@ def read_dwgrad_export_options(): #pylint: disable=unused-variable
# Handler function for dealing with system signals
def handler(signum, _frame):
from mrtrix3 import run #pylint: disable=import-outside-toplevel
- global _SIGNALS, EXEC_NAME, SCRATCH_DIR, WORKING_DIR
+ global SCRATCH_DIR
# Terminate any child processes in the run module
try:
run.shared.terminate(signum)
@@ -1173,9 +1166,12 @@ def handler(signum, _frame):
if os.getcwd() != WORKING_DIR:
os.chdir(WORKING_DIR)
if SCRATCH_DIR:
- try:
- shutil.rmtree(SCRATCH_DIR)
- except OSError:
- pass
- SCRATCH_DIR = ''
+ if DO_CLEANUP:
+ try:
+ shutil.rmtree(SCRATCH_DIR)
+ except OSError:
+ pass
+ SCRATCH_DIR = ''
+ else:
+ sys.stderr.write(EXEC_NAME + ': ' + ANSI.console + 'Scratch directory retained; location: ' + SCRATCH_DIR + ANSI.clear + '\n')
os._exit(signum) # pylint: disable=protected-access
diff --git a/lib/mrtrix3/dwi2response/dhollander.py b/lib/mrtrix3/dwi2response/dhollander.py
index cb4115da9a..cebfd94208 100644
--- a/lib/mrtrix3/dwi2response/dhollander.py
+++ b/lib/mrtrix3/dwi2response/dhollander.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-f-string
+
import math, shutil
from mrtrix3 import CONFIG, MRtrixError
from mrtrix3 import app, image, path, run
@@ -61,6 +64,11 @@ def needs_single_shell(): #pylint: disable=unused-variable
+def supports_mask(): #pylint: disable=unused-variable
+ return True
+
+
+
def execute(): #pylint: disable=unused-variable
bzero_threshold = float(CONFIG['BZeroThreshold']) if 'BZeroThreshold' in CONFIG else 10.0
diff --git a/lib/mrtrix3/dwi2response/fa.py b/lib/mrtrix3/dwi2response/fa.py
index 8f35312b91..5cac802be4 100644
--- a/lib/mrtrix3/dwi2response/fa.py
+++ b/lib/mrtrix3/dwi2response/fa.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -49,6 +49,11 @@ def needs_single_shell(): #pylint: disable=unused-variable
+def supports_mask(): #pylint: disable=unused-variable
+ return True
+
+
+
def execute(): #pylint: disable=unused-variable
bvalues = [ int(round(float(x))) for x in image.mrinfo('dwi.mif', 'shell_bvalues').split() ]
if len(bvalues) < 2:
diff --git a/lib/mrtrix3/dwi2response/manual.py b/lib/mrtrix3/dwi2response/manual.py
index 8142bc7543..c67e1a613a 100644
--- a/lib/mrtrix3/dwi2response/manual.py
+++ b/lib/mrtrix3/dwi2response/manual.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -52,6 +52,11 @@ def needs_single_shell(): #pylint: disable=unused-variable
+def supports_mask(): #pylint: disable=unused-variable
+ return False
+
+
+
def execute(): #pylint: disable=unused-variable
shells = [ int(round(float(x))) for x in image.mrinfo('dwi.mif', 'shell_bvalues').split() ]
diff --git a/lib/mrtrix3/dwi2response/msmt_5tt.py b/lib/mrtrix3/dwi2response/msmt_5tt.py
index e646359cf7..905a7b35bd 100644
--- a/lib/mrtrix3/dwi2response/msmt_5tt.py
+++ b/lib/mrtrix3/dwi2response/msmt_5tt.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -61,6 +61,11 @@ def needs_single_shell(): #pylint: disable=unused-variable
+def supports_mask(): #pylint: disable=unused-variable
+ return True
+
+
+
def execute(): #pylint: disable=unused-variable
# Ideally want to use the oversampling-based regridding of the 5TT image from the SIFT model, not mrtransform
# May need to commit 5ttregrid...
diff --git a/lib/mrtrix3/dwi2response/tax.py b/lib/mrtrix3/dwi2response/tax.py
index a7f2d77f7d..13f08cc38f 100644
--- a/lib/mrtrix3/dwi2response/tax.py
+++ b/lib/mrtrix3/dwi2response/tax.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-f-string
+
import math, os, shutil
from mrtrix3 import MRtrixError
from mrtrix3 import app, image, matrix, path, run
@@ -48,6 +51,11 @@ def needs_single_shell(): #pylint: disable=unused-variable
+def supports_mask(): #pylint: disable=unused-variable
+ return True
+
+
+
def execute(): #pylint: disable=unused-variable
lmax_option = ''
if app.ARGS.lmax:
diff --git a/lib/mrtrix3/dwi2response/tournier.py b/lib/mrtrix3/dwi2response/tournier.py
index 1e282c1f12..7e702f079b 100644
--- a/lib/mrtrix3/dwi2response/tournier.py
+++ b/lib/mrtrix3/dwi2response/tournier.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-f-string
+
import os, shutil
from mrtrix3 import MRtrixError
from mrtrix3 import app, image, matrix, path, run
@@ -49,6 +52,11 @@ def needs_single_shell(): #pylint: disable=unused-variable
+def supports_mask(): #pylint: disable=unused-variable
+ return True
+
+
+
def execute(): #pylint: disable=unused-variable
lmax_option = ''
if app.ARGS.lmax:
diff --git a/lib/mrtrix3/dwibiascorrect/ants.py b/lib/mrtrix3/dwibiascorrect/ants.py
index 68f10efdac..1ec983d6dc 100644
--- a/lib/mrtrix3/dwibiascorrect/ants.py
+++ b/lib/mrtrix3/dwibiascorrect/ants.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=consider-using-f-string
+
from distutils.spawn import find_executable
from mrtrix3 import MRtrixError
from mrtrix3 import app, path, run
diff --git a/lib/mrtrix3/dwibiascorrect/fsl.py b/lib/mrtrix3/dwibiascorrect/fsl.py
index 4df08e7a77..5693cff74e 100644
--- a/lib/mrtrix3/dwibiascorrect/fsl.py
+++ b/lib/mrtrix3/dwibiascorrect/fsl.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/dwinormalise/group.py b/lib/mrtrix3/dwinormalise/group.py
index 8b33cc2500..1ba624838a 100644
--- a/lib/mrtrix3/dwinormalise/group.py
+++ b/lib/mrtrix3/dwinormalise/group.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/dwinormalise/individual.py b/lib/mrtrix3/dwinormalise/individual.py
index 246357e9d0..6dabbacb84 100644
--- a/lib/mrtrix3/dwinormalise/individual.py
+++ b/lib/mrtrix3/dwinormalise/individual.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/fsl.py b/lib/mrtrix3/fsl.py
index 35dcc55384..8e467861e5 100644
--- a/lib/mrtrix3/fsl.py
+++ b/lib/mrtrix3/fsl.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/image.py b/lib/mrtrix3/image.py
index b8672932f9..49ff4c2c42 100644
--- a/lib/mrtrix3/image.py
+++ b/lib/mrtrix3/image.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -18,6 +18,9 @@
# data, rather than trying to duplicate support for all possible image formats natively
# in Python.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
+
import json, math, os, subprocess
from collections import namedtuple
@@ -242,7 +245,7 @@ def statistics(image_path, **kwargs): #pylint: disable=unused-variable
try:
from subprocess import DEVNULL #pylint: disable=import-outside-toplevel
except ImportError:
- DEVNULL = open(os.devnull, 'wb')
+ DEVNULL = open(os.devnull, 'wb') #pylint: disable=consider-using-with
proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=DEVNULL) #pylint: disable=consider-using-with
stdout = proc.communicate()[0]
if proc.returncode:
diff --git a/lib/mrtrix3/matrix.py b/lib/mrtrix3/matrix.py
index 8bc3dd7443..b8b2fa3070 100644
--- a/lib/mrtrix3/matrix.py
+++ b/lib/mrtrix3/matrix.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/path.py b/lib/mrtrix3/path.py
index 89391a175d..5969b36c20 100644
--- a/lib/mrtrix3/path.py
+++ b/lib/mrtrix3/path.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,6 +15,9 @@
# Collection of convenience functions for manipulating filesystem paths
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,redundant-u-string-prefix,consider-using-f-string
+
import ctypes, errno, inspect, os, random, string, subprocess, time
@@ -97,7 +100,8 @@ def make_temporary(suffix): #pylint: disable=unused-variable
if is_directory:
os.makedirs(temp_path)
else:
- open(temp_path, 'a').close()
+ with open(temp_path, 'a'):
+ pass
app.debug(temp_path)
return temp_path
except OSError as exception:
diff --git a/lib/mrtrix3/phaseencoding.py b/lib/mrtrix3/phaseencoding.py
index 7bf62be6f8..4825e6f434 100644
--- a/lib/mrtrix3/phaseencoding.py
+++ b/lib/mrtrix3/phaseencoding.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,6 +15,8 @@
# Functions relating to handling phase encoding information
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding,consider-using-f-string
from mrtrix3 import COMMAND_HISTORY_STRING, MRtrixError
diff --git a/lib/mrtrix3/run.py b/lib/mrtrix3/run.py
index 0714e1651c..d0448a725b 100644
--- a/lib/mrtrix3/run.py
+++ b/lib/mrtrix3/run.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -13,6 +13,9 @@
#
# For more details, see http://www.mrtrix.org/.
+# note: deal with these warnings properly when we drop support for Python 2:
+# pylint: disable=unspecified-encoding
+
import collections, itertools, os, shlex, signal, string, subprocess, sys, tempfile, threading
from distutils.spawn import find_executable
from mrtrix3 import ANSI, BIN_PATH, COMMAND_HISTORY_STRING, EXE_LIST, MRtrixBaseError, MRtrixError
@@ -61,7 +64,7 @@ def __init__(self):
self.env.pop('MRTRIX_QUIET')
except KeyError:
pass
- self.env['MRTRIX_LOGLEVEL'] = 1
+ self.env['MRTRIX_LOGLEVEL'] = '1'
# Flagged by calling the set_continue() function;
# run.command() and run.function() calls will be skipped until one of the inputs to
@@ -224,7 +227,6 @@ def __str__(self):
def command(cmd, **kwargs): #pylint: disable=unused-variable
from mrtrix3 import app, path #pylint: disable=import-outside-toplevel
- global shared #pylint: disable=invalid-name
def quote_nonpipe(item):
return item if item == '|' else path.quote(item)
diff --git a/lib/mrtrix3/sh.py b/lib/mrtrix3/sh.py
index 1f36600be2..be35de1c7d 100644
--- a/lib/mrtrix3/sh.py
+++ b/lib/mrtrix3/sh.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/lib/mrtrix3/utils.py b/lib/mrtrix3/utils.py
index 22e357de1c..f10e11bcf0 100644
--- a/lib/mrtrix3/utils.py
+++ b/lib/mrtrix3/utils.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -60,10 +60,10 @@ def __init__(self, message, value):
raise TypeError('Construction of RunList class expects either an '
'integer (number of commands/functions to run), or a '
'list of command strings to execute')
- def command(self, cmd):
+ def command(self, cmd, **kwargs):
from mrtrix3 import run #pylint: disable=import-outside-toplevel
assert self.valid
- run.command(cmd)
+ run.command(cmd, **kwargs)
self._increment()
def function(self, func, *args, **kwargs):
from mrtrix3 import run #pylint: disable=import-outside-toplevel
@@ -112,7 +112,7 @@ def decode(line):
if len(line) < 2:
continue
name, var = line.rstrip().partition(":")[::2]
- if name in res.keys():
+ if name in res:
res[name].append(var.split())
else:
res[name] = var.split()
diff --git a/matlab/private/add_field.m b/matlab/private/add_field.m
index e6f340e49f..f8588a6e2a 100644
--- a/matlab/private/add_field.m
+++ b/matlab/private/add_field.m
@@ -1,4 +1,4 @@
-% Copyright (c) 2008-2021 the MRtrix3 contributors.
+% Copyright (c) 2008-2022 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/matlab/read_mrtrix.m b/matlab/read_mrtrix.m
index 911a2947ca..a6fc1428cd 100644
--- a/matlab/read_mrtrix.m
+++ b/matlab/read_mrtrix.m
@@ -1,4 +1,4 @@
-% Copyright (c) 2008-2021 the MRtrix3 contributors.
+% Copyright (c) 2008-2022 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/matlab/read_mrtrix_tracks.m b/matlab/read_mrtrix_tracks.m
index 2deaf39839..be0eb616bd 100644
--- a/matlab/read_mrtrix_tracks.m
+++ b/matlab/read_mrtrix_tracks.m
@@ -1,4 +1,4 @@
-% Copyright (c) 2008-2021 the MRtrix3 contributors.
+% Copyright (c) 2008-2022 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/matlab/read_mrtrix_tsf.m b/matlab/read_mrtrix_tsf.m
index 38661e8446..eee68be9d6 100644
--- a/matlab/read_mrtrix_tsf.m
+++ b/matlab/read_mrtrix_tsf.m
@@ -1,4 +1,4 @@
-% Copyright (c) 2008-2021 the MRtrix3 contributors.
+% Copyright (c) 2008-2022 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/matlab/write_mrtrix.m b/matlab/write_mrtrix.m
index a4733768f1..f9edcf7a60 100644
--- a/matlab/write_mrtrix.m
+++ b/matlab/write_mrtrix.m
@@ -1,4 +1,4 @@
-% Copyright (c) 2008-2021 the MRtrix3 contributors.
+% Copyright (c) 2008-2022 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/matlab/write_mrtrix_tracks.m b/matlab/write_mrtrix_tracks.m
index 2ef38d5c2e..b0b6648aff 100644
--- a/matlab/write_mrtrix_tracks.m
+++ b/matlab/write_mrtrix_tracks.m
@@ -1,4 +1,4 @@
-% Copyright (c) 2008-2021 the MRtrix3 contributors.
+% Copyright (c) 2008-2022 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -37,7 +37,9 @@ function write_mrtrix_tracks (tracks, filename)
if strcmpi (names{i}, 'data'), continue; end
if strcmpi (names{i}, 'count'), continue; end
if strcmpi (names{i}, 'datatype'), continue; end
- fprintf (f, '%s: %s\n', names{i}, getfield(tracks, names{i}));
+ if iscell (tracks.(names{i}))
+ fprintf (f, '%s: %s\n', names{i}, strjoin(tracks.(names{i}), '\n'));
+ else fprintf (f, '%s: %s\n', names{i}, tracks.(names{i})); end
end
data_offset = ftell (f) + 20;
fprintf (f, 'file: . %d\nEND\n', data_offset);
diff --git a/matlab/write_mrtrix_tsf.m b/matlab/write_mrtrix_tsf.m
index b1f40a48f4..a3ed77117f 100644
--- a/matlab/write_mrtrix_tsf.m
+++ b/matlab/write_mrtrix_tsf.m
@@ -1,4 +1,4 @@
-% Copyright (c) 2008-2021 the MRtrix3 contributors.
+% Copyright (c) 2008-2022 the MRtrix3 contributors.
%
% This Source Code Form is subject to the terms of the Mozilla Public
% License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -15,7 +15,7 @@
function write_mrtrix_tsf (tsf, filename)
-% function: write_mrtrix_tsf (tracks, filename)
+% function: write_mrtrix_tsf (tsf, filename)
%
% writes the tsf data stored as a cell array in the 'data' field of the
% tsf variable to the MRtrix format tsf 'filename'. All other fields
@@ -23,10 +23,10 @@ function write_mrtrix_tsf (tsf, filename)
% expected to supplied as character arrays.
assert(isfield(tsf, 'data'), ...
- 'input tracks variable does not contain required ''data'' field');
+ 'input tsf variable does not contain required ''data'' field');
assert(iscell(tsf.data), ...
- 'input tracks.data variable should be a cell array');
+ 'input tsf.data variable should be a cell array');
f = fopen (filename, 'w', 'ieee-le');
assert(f ~= -1, 'error opening %s', filename);
@@ -38,7 +38,9 @@ function write_mrtrix_tsf (tsf, filename)
if strcmpi (names{i}, 'data'), continue; end
if strcmpi (names{i}, 'count'), continue; end
if strcmpi (names{i}, 'datatype'), continue; end
- fprintf (f, '%s: %s\n', names{i}, getfield(tsf, names{i}));
+ if iscell (tsf.(names{i}))
+ fprintf (f, '%s: %s\n', names{i}, strjoin(tsf.(names{i}), '\n'));
+ else fprintf (f, '%s: %s\n', names{i}, tsf.(names{i})); end
end
data_offset = ftell (f) + 20;
data_offset=data_offset+mod((4-mod(data_offset,4)),4);
diff --git a/mrtrix-mime.xml b/mrtrix-mime.xml
index fa50c2fdc6..ffb3336013 100644
--- a/mrtrix-mime.xml
+++ b/mrtrix-mime.xml
@@ -3,6 +3,7 @@
MRtrix image
+
@@ -12,36 +13,43 @@
MRtrix image (compressed)
+
NIfTI image
+
NIfTI image (compressed)
+
MGH image
+
MGH image (compressed)
+
Analyze image
+
MRtrix streamlines file
+
diff --git a/mrtrix-mrview.desktop b/mrtrix-mrview.desktop
deleted file mode 100644
index 1e1951f65b..0000000000
--- a/mrtrix-mrview.desktop
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/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/mrview.desktop b/mrview.desktop
new file mode 100644
index 0000000000..88093f5670
--- /dev/null
+++ b/mrview.desktop
@@ -0,0 +1,27 @@
+#!/usr/bin/env xdg-open
+
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# Covered Software is provided under this License on an "as is"
+# basis, without warranty of any kind, either expressed, implied, or
+# statutory, including, without limitation, warranties that the
+# Covered Software is free of defects, merchantable, fit for a
+# particular purpose or non-infringing.
+# See the Mozilla Public License v. 2.0 for more details.
+#
+# For more details, see http://www.mrtrix.org/.
+[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/package_mrtrix b/package_mrtrix
index 6b0c2859f7..fdd878869e 100755
--- a/package_mrtrix
+++ b/package_mrtrix
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/run_pylint b/run_pylint
index 2dfadd7234..162b3b2f73 100755
--- a/run_pylint
+++ b/run_pylint
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/run_tests b/run_tests
index 5e805f2d66..1d20d8672e 100755
--- a/run_tests
+++ b/run_tests
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/set_path b/set_path
index b113a05d09..b2d8de6cbf 100755
--- a/set_path
+++ b/set_path
@@ -1,7 +1,6 @@
#!/usr/bin/env python
-
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/_5ttgen/FreeSurfer2ACT.txt b/share/mrtrix3/_5ttgen/FreeSurfer2ACT.txt
index 08739fc0fc..b41cc7f394 100644
--- a/share/mrtrix3/_5ttgen/FreeSurfer2ACT.txt
+++ b/share/mrtrix3/_5ttgen/FreeSurfer2ACT.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/_5ttgen/FreeSurfer2ACT_sgm_amyg_hipp.txt b/share/mrtrix3/_5ttgen/FreeSurfer2ACT_sgm_amyg_hipp.txt
index 707fda19a4..7d657eb221 100644
--- a/share/mrtrix3/_5ttgen/FreeSurfer2ACT_sgm_amyg_hipp.txt
+++ b/share/mrtrix3/_5ttgen/FreeSurfer2ACT_sgm_amyg_hipp.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/_5ttgen/hsvs/AmygSubfields.txt b/share/mrtrix3/_5ttgen/hsvs/AmygSubfields.txt
index 8a20c91ca1..95b22f92cb 100644
--- a/share/mrtrix3/_5ttgen/hsvs/AmygSubfields.txt
+++ b/share/mrtrix3/_5ttgen/hsvs/AmygSubfields.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/_5ttgen/hsvs/HippSubfields.txt b/share/mrtrix3/_5ttgen/hsvs/HippSubfields.txt
index 23f766350d..89da743a38 100644
--- a/share/mrtrix3/_5ttgen/hsvs/HippSubfields.txt
+++ b/share/mrtrix3/_5ttgen/hsvs/HippSubfields.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/aal.txt b/share/mrtrix3/labelconvert/aal.txt
index 68d871816b..0733750311 100644
--- a/share/mrtrix3/labelconvert/aal.txt
+++ b/share/mrtrix3/labelconvert/aal.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/aal2.txt b/share/mrtrix3/labelconvert/aal2.txt
index b1eaff3900..1a63a777db 100644
--- a/share/mrtrix3/labelconvert/aal2.txt
+++ b/share/mrtrix3/labelconvert/aal2.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/fs2lobes_cinginc_convert.txt b/share/mrtrix3/labelconvert/fs2lobes_cinginc_convert.txt
index 1b9549c738..6498246abd 100644
--- a/share/mrtrix3/labelconvert/fs2lobes_cinginc_convert.txt
+++ b/share/mrtrix3/labelconvert/fs2lobes_cinginc_convert.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/fs2lobes_cinginc_labels.txt b/share/mrtrix3/labelconvert/fs2lobes_cinginc_labels.txt
index c890c485b8..3afb5ea0f8 100644
--- a/share/mrtrix3/labelconvert/fs2lobes_cinginc_labels.txt
+++ b/share/mrtrix3/labelconvert/fs2lobes_cinginc_labels.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/fs2lobes_cingsep_convert.txt b/share/mrtrix3/labelconvert/fs2lobes_cingsep_convert.txt
index 3acf5f1686..236c4019ef 100644
--- a/share/mrtrix3/labelconvert/fs2lobes_cingsep_convert.txt
+++ b/share/mrtrix3/labelconvert/fs2lobes_cingsep_convert.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/fs2lobes_cingsep_labels.txt b/share/mrtrix3/labelconvert/fs2lobes_cingsep_labels.txt
index 17e63866df..48f18928bf 100644
--- a/share/mrtrix3/labelconvert/fs2lobes_cingsep_labels.txt
+++ b/share/mrtrix3/labelconvert/fs2lobes_cingsep_labels.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/fs_a2009s.txt b/share/mrtrix3/labelconvert/fs_a2009s.txt
index f50a0d9918..07eca39ee8 100644
--- a/share/mrtrix3/labelconvert/fs_a2009s.txt
+++ b/share/mrtrix3/labelconvert/fs_a2009s.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/fs_default.txt b/share/mrtrix3/labelconvert/fs_default.txt
index 83918d437a..fa41283d3d 100644
--- a/share/mrtrix3/labelconvert/fs_default.txt
+++ b/share/mrtrix3/labelconvert/fs_default.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/hcpmmp1_ordered.txt b/share/mrtrix3/labelconvert/hcpmmp1_ordered.txt
index 43922265e2..fb23bcd861 100644
--- a/share/mrtrix3/labelconvert/hcpmmp1_ordered.txt
+++ b/share/mrtrix3/labelconvert/hcpmmp1_ordered.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/hcpmmp1_original.txt b/share/mrtrix3/labelconvert/hcpmmp1_original.txt
index f9ee37ea15..bfe4d674c5 100644
--- a/share/mrtrix3/labelconvert/hcpmmp1_original.txt
+++ b/share/mrtrix3/labelconvert/hcpmmp1_original.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelconvert/lpba40.txt b/share/mrtrix3/labelconvert/lpba40.txt
index 3e4c8eb969..e075da26b9 100644
--- a/share/mrtrix3/labelconvert/lpba40.txt
+++ b/share/mrtrix3/labelconvert/lpba40.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/share/mrtrix3/labelsgmfix/FreeSurferSGM.txt b/share/mrtrix3/labelsgmfix/FreeSurferSGM.txt
index 1d9ddcef56..92044cf835 100644
--- a/share/mrtrix3/labelsgmfix/FreeSurferSGM.txt
+++ b/share/mrtrix3/labelsgmfix/FreeSurferSGM.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2008-2021 the MRtrix3 contributors.
+# Copyright (c) 2008-2022 the MRtrix3 contributors.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/colourmap.cpp b/src/colourmap.cpp
index a3dd9296c4..d808ccb1d4 100644
--- a/src/colourmap.cpp
+++ b/src/colourmap.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/colourmap.h b/src/colourmap.h
index 96aad55d38..42fbee3be7 100644
--- a/src/colourmap.h
+++ b/src/colourmap.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/connectome/connectome.cpp b/src/connectome/connectome.cpp
index 476ce862f9..7326631649 100644
--- a/src/connectome/connectome.cpp
+++ b/src/connectome/connectome.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/connectome/connectome.h b/src/connectome/connectome.h
index 12354dd87f..3e57e98631 100644
--- a/src/connectome/connectome.h
+++ b/src/connectome/connectome.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/connectome/enhance.cpp b/src/connectome/enhance.cpp
index 5d29b9eb00..8b44585a17 100644
--- a/src/connectome/enhance.cpp
+++ b/src/connectome/enhance.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/connectome/enhance.h b/src/connectome/enhance.h
index 0d399116a7..5eb8023bba 100644
--- a/src/connectome/enhance.h
+++ b/src/connectome/enhance.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/connectome/lut.cpp b/src/connectome/lut.cpp
index 1f8595bcc4..7324386974 100644
--- a/src/connectome/lut.cpp
+++ b/src/connectome/lut.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/connectome/lut.h b/src/connectome/lut.h
index 502273b4b8..e2d60ea718 100644
--- a/src/connectome/lut.h
+++ b/src/connectome/lut.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/connectome/mat2vec.h b/src/connectome/mat2vec.h
index f38a46761a..bf79d0f712 100644
--- a/src/connectome/mat2vec.h
+++ b/src/connectome/mat2vec.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/bootstrap.h b/src/dwi/bootstrap.h
index 05c3cac2da..a5cdf6f23a 100644
--- a/src/dwi/bootstrap.h
+++ b/src/dwi/bootstrap.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/directions/file.cpp b/src/dwi/directions/file.cpp
index 17c5b59c5c..be8e192fe0 100644
--- a/src/dwi/directions/file.cpp
+++ b/src/dwi/directions/file.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/directions/file.h b/src/dwi/directions/file.h
index b9e85f74d7..170478a336 100644
--- a/src/dwi/directions/file.h
+++ b/src/dwi/directions/file.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/directions/mask.cpp b/src/dwi/directions/mask.cpp
index 798ca77b2f..725f129983 100644
--- a/src/dwi/directions/mask.cpp
+++ b/src/dwi/directions/mask.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/directions/mask.h b/src/dwi/directions/mask.h
index 9b8119b03b..36839c4501 100644
--- a/src/dwi/directions/mask.h
+++ b/src/dwi/directions/mask.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/directions/predefined.cpp b/src/dwi/directions/predefined.cpp
index e1e7ef5634..a451acfc17 100644
--- a/src/dwi/directions/predefined.cpp
+++ b/src/dwi/directions/predefined.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/directions/predefined.h b/src/dwi/directions/predefined.h
index b0db50d0d3..ef376093c1 100644
--- a/src/dwi/directions/predefined.h
+++ b/src/dwi/directions/predefined.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/directions/set.cpp b/src/dwi/directions/set.cpp
index 66cfeb6332..f950b602eb 100644
--- a/src/dwi/directions/set.cpp
+++ b/src/dwi/directions/set.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -103,7 +103,7 @@ namespace MR {
Vertex (const Set& set, const index_type index, const bool inverse) :
dir (set[index] * (inverse ? -1.0 : 1.0)),
index (index) { }
- const Eigen::Vector3 dir;
+ const Eigen::Vector3d dir;
const index_type index; // Indexes the underlying direction set
};
@@ -115,7 +115,7 @@ namespace MR {
dist (std::max ( { vertices[one].dir.dot (normal), vertices[two].dir.dot (normal), vertices[three].dir.dot (normal) } ) ) { }
bool includes (const index_type i) const { return (indices[0] == i || indices[1] == i || indices[2] == i); }
const std::array indices; // Indexes the vertices vector
- const Eigen::Vector3 normal;
+ const Eigen::Vector3d normal;
const default_type dist;
};
@@ -327,7 +327,7 @@ namespace MR {
- index_type FastLookupSet::select_direction (const Eigen::Vector3& p) const
+ index_type FastLookupSet::select_direction (const Eigen::Vector3d& p) const
{
const size_t grid_index = dir2gridindex (p);
@@ -349,7 +349,7 @@ namespace MR {
- index_type FastLookupSet::select_direction_slow (const Eigen::Vector3& p) const
+ index_type FastLookupSet::select_direction_slow (const Eigen::Vector3d& p) const
{
index_type dir = 0;
@@ -417,7 +417,7 @@ namespace MR {
case 3: el += el_grid_step; break;
}
- const Eigen::Vector3 p (cos(az) * sin(el), sin(az) * sin(el), cos (el));
+ const Eigen::Vector3d p (cos(az) * sin(el), sin(az) * sin(el), cos (el));
const index_type nearest_dir = select_direction_slow (p);
bool dir_present = false;
for (vector::const_iterator d = grid_lookup[i].begin(); !dir_present && d != grid_lookup[i].end(); ++d)
@@ -453,7 +453,7 @@ namespace MR {
- size_t FastLookupSet::dir2gridindex (const Eigen::Vector3& p) const
+ size_t FastLookupSet::dir2gridindex (const Eigen::Vector3d& p) const
{
const default_type azimuth = atan2(p[1], p[0]);
@@ -477,7 +477,7 @@ namespace MR {
size_t error_count = 0;
const size_t checks = 1000000;
for (size_t i = 0; i != checks; ++i) {
- Eigen::Vector3 p (normal(rng), normal(rng), normal(rng));
+ Eigen::Vector3d p (normal(rng), normal(rng), normal(rng));
p.normalize();
if (select_direction (p) != select_direction_slow (p))
++error_count;
diff --git a/src/dwi/directions/set.h b/src/dwi/directions/set.h
index d5cedbd311..bf457924a8 100644
--- a/src/dwi/directions/set.h
+++ b/src/dwi/directions/set.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -84,7 +84,7 @@ namespace MR {
}
size_t size () const { return unit_vectors.size(); }
- const Eigen::Vector3& get_dir (const size_t i) const { assert (i < size()); return unit_vectors[i]; }
+ const Eigen::Vector3d& get_dir (const size_t i) const { assert (i < size()); return unit_vectors[i]; }
const vector& get_adj_dirs (const size_t i) const { assert (i < size()); return adj_dirs[i]; }
bool dirs_are_adjacent (const index_type one, const index_type two) const {
assert (one < size());
@@ -98,13 +98,13 @@ namespace MR {
index_type get_min_linkage (const index_type one, const index_type two) const;
- const vector& get_dirs() const { return unit_vectors; }
- const Eigen::Vector3& operator[] (const size_t i) const { assert (i < size()); return unit_vectors[i]; }
+ const vector& get_dirs() const { return unit_vectors; }
+ const Eigen::Vector3d& operator[] (const size_t i) const { assert (i < size()); return unit_vectors[i]; }
protected:
- vector unit_vectors;
+ vector unit_vectors;
vector< vector > adj_dirs; // Note: not self-inclusive
@@ -179,7 +179,7 @@ namespace MR {
az_begin (that.az_begin),
el_begin (that.el_begin) { }
- index_type select_direction (const Eigen::Vector3&) const;
+ index_type select_direction (const Eigen::Vector3d&) const;
@@ -192,11 +192,11 @@ namespace MR {
FastLookupSet ();
- index_type select_direction_slow (const Eigen::Vector3&) const;
+ index_type select_direction_slow (const Eigen::Vector3d&) const;
void initialise();
- size_t dir2gridindex (const Eigen::Vector3&) const;
+ size_t dir2gridindex (const Eigen::Vector3d&) const;
void test_lookup() const;
diff --git a/src/dwi/fixel_map.h b/src/dwi/fixel_map.h
index 4dbf415ee0..47a37cd926 100644
--- a/src/dwi/fixel_map.h
+++ b/src/dwi/fixel_map.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/fmls.cpp b/src/dwi/fmls.cpp
index a5ea7fb612..ed0b1d6eef 100644
--- a/src/dwi/fmls.cpp
+++ b/src/dwi/fmls.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -264,7 +264,7 @@ namespace MR {
// Revise multiple peaks if present
for (size_t peak_index = 0; peak_index != i->num_peaks(); ++peak_index) {
- Eigen::Vector3 newton_peak_dir = i->get_peak_dir (peak_index); // to be updated by subsequent Math::SH::get_peak() call
+ Eigen::Vector3d newton_peak_dir = i->get_peak_dir (peak_index); // to be updated by subsequent Math::SH::get_peak() call
const default_type newton_peak_value = Math::SH::get_peak (in, lmax, newton_peak_dir, &(*precomputer));
if (std::isfinite (newton_peak_value) && newton_peak_dir.allFinite()) {
diff --git a/src/dwi/fmls.h b/src/dwi/fmls.h
index ea8bb2d9b4..f57dcfced3 100644
--- a/src/dwi/fmls.h
+++ b/src/dwi/fmls.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -92,13 +92,13 @@ namespace MR
assert ((value <= 0.0 && neg) || (value >= 0.0 && !neg));
mask[bin] = true;
values[bin] = value;
- const Eigen::Vector3& dir = mask.get_dirs()[bin];
+ const Eigen::Vector3d& dir = mask.get_dirs()[bin];
const default_type multiplier = (mean_dir.dot (dir)) > 0.0 ? 1.0 : -1.0;
mean_dir += dir * multiplier * abs(value) * weight;
integral += abs (value * weight);
}
- void revise_peak (const size_t index, const Eigen::Vector3& revised_peak_dir, const default_type revised_peak_value)
+ void revise_peak (const size_t index, const Eigen::Vector3d& revised_peak_dir, const default_type revised_peak_value)
{
assert (!neg);
assert (index < num_peaks());
@@ -142,8 +142,8 @@ namespace MR
const Eigen::Array& get_values() const { return values; }
default_type get_max_peak_value() const { return max_peak_value; }
size_t num_peaks() const { return peak_dirs.size(); }
- const Eigen::Vector3& get_peak_dir (const size_t i) const { assert (i < num_peaks()); return peak_dirs[i]; }
- const Eigen::Vector3& get_mean_dir() const { return mean_dir; }
+ const Eigen::Vector3d& get_peak_dir (const size_t i) const { assert (i < num_peaks()); return peak_dirs[i]; }
+ const Eigen::Vector3d& get_mean_dir() const { return mean_dir; }
default_type get_integral() const { return integral; }
bool is_negative() const { return neg; }
@@ -152,8 +152,8 @@ namespace MR
DWI::Directions::Mask mask;
Eigen::Array values;
default_type max_peak_value;
- vector peak_dirs;
- Eigen::Vector3 mean_dir;
+ vector peak_dirs;
+ Eigen::Vector3d mean_dir;
default_type integral;
bool neg;
diff --git a/src/dwi/noise_estimator.h b/src/dwi/noise_estimator.h
index 3af0383af9..b9b8b90d14 100644
--- a/src/dwi/noise_estimator.h
+++ b/src/dwi/noise_estimator.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/sdeconv/csd.cpp b/src/dwi/sdeconv/csd.cpp
index d6c48c36de..98395e680b 100644
--- a/src/dwi/sdeconv/csd.cpp
+++ b/src/dwi/sdeconv/csd.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/sdeconv/csd.h b/src/dwi/sdeconv/csd.h
index db1826d99c..6d3f97e75b 100644
--- a/src/dwi/sdeconv/csd.h
+++ b/src/dwi/sdeconv/csd.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/sdeconv/msmt_csd.cpp b/src/dwi/sdeconv/msmt_csd.cpp
index 14bee98270..67f1d8037b 100644
--- a/src/dwi/sdeconv/msmt_csd.cpp
+++ b/src/dwi/sdeconv/msmt_csd.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/sdeconv/msmt_csd.h b/src/dwi/sdeconv/msmt_csd.h
index 409e3d2582..5027e2977d 100644
--- a/src/dwi/sdeconv/msmt_csd.h
+++ b/src/dwi/sdeconv/msmt_csd.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tensor.h b/src/dwi/tensor.h
index 188ca95ff6..17580a5dd2 100644
--- a/src/dwi/tensor.h
+++ b/src/dwi/tensor.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/ACT/act.cpp b/src/dwi/tractography/ACT/act.cpp
index 1cbc613156..48c22121f1 100644
--- a/src/dwi/tractography/ACT/act.cpp
+++ b/src/dwi/tractography/ACT/act.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/ACT/act.h b/src/dwi/tractography/ACT/act.h
index 7747a80409..0f754e482b 100644
--- a/src/dwi/tractography/ACT/act.h
+++ b/src/dwi/tractography/ACT/act.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/ACT/gmwmi.cpp b/src/dwi/tractography/ACT/gmwmi.cpp
index 9fca26181c..601e938b18 100644
--- a/src/dwi/tractography/ACT/gmwmi.cpp
+++ b/src/dwi/tractography/ACT/gmwmi.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/ACT/gmwmi.h b/src/dwi/tractography/ACT/gmwmi.h
index 3f7702cc8f..210d567cb2 100644
--- a/src/dwi/tractography/ACT/gmwmi.h
+++ b/src/dwi/tractography/ACT/gmwmi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/ACT/method.h b/src/dwi/tractography/ACT/method.h
index e7fe701985..748be48c2c 100644
--- a/src/dwi/tractography/ACT/method.h
+++ b/src/dwi/tractography/ACT/method.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/ACT/shared.h b/src/dwi/tractography/ACT/shared.h
index f85024aef2..38e6309c38 100644
--- a/src/dwi/tractography/ACT/shared.h
+++ b/src/dwi/tractography/ACT/shared.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/ACT/tissues.h b/src/dwi/tractography/ACT/tissues.h
index c123be26c4..e10dcaa7c7 100644
--- a/src/dwi/tractography/ACT/tissues.h
+++ b/src/dwi/tractography/ACT/tissues.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/energy.h b/src/dwi/tractography/GT/energy.h
index 8277a0bd46..a49b4b3b73 100644
--- a/src/dwi/tractography/GT/energy.h
+++ b/src/dwi/tractography/GT/energy.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/externalenergy.cpp b/src/dwi/tractography/GT/externalenergy.cpp
index 1ea614373c..d3ab1ce8c6 100644
--- a/src/dwi/tractography/GT/externalenergy.cpp
+++ b/src/dwi/tractography/GT/externalenergy.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/externalenergy.h b/src/dwi/tractography/GT/externalenergy.h
index 87d33ce002..8486e32391 100644
--- a/src/dwi/tractography/GT/externalenergy.h
+++ b/src/dwi/tractography/GT/externalenergy.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/gt.cpp b/src/dwi/tractography/GT/gt.cpp
index 7dbde81b5c..ebce884377 100644
--- a/src/dwi/tractography/GT/gt.cpp
+++ b/src/dwi/tractography/GT/gt.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/gt.h b/src/dwi/tractography/GT/gt.h
index fb64356b83..862b8d2c76 100644
--- a/src/dwi/tractography/GT/gt.h
+++ b/src/dwi/tractography/GT/gt.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/internalenergy.cpp b/src/dwi/tractography/GT/internalenergy.cpp
index 544b20a90f..458b2c022a 100644
--- a/src/dwi/tractography/GT/internalenergy.cpp
+++ b/src/dwi/tractography/GT/internalenergy.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/internalenergy.h b/src/dwi/tractography/GT/internalenergy.h
index 3bda60223b..bb86aa7159 100644
--- a/src/dwi/tractography/GT/internalenergy.h
+++ b/src/dwi/tractography/GT/internalenergy.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/mhsampler.cpp b/src/dwi/tractography/GT/mhsampler.cpp
index 5aeb37be48..11f3f54eaa 100644
--- a/src/dwi/tractography/GT/mhsampler.cpp
+++ b/src/dwi/tractography/GT/mhsampler.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/mhsampler.h b/src/dwi/tractography/GT/mhsampler.h
index 5e896c11b8..4b4fb3bf54 100644
--- a/src/dwi/tractography/GT/mhsampler.h
+++ b/src/dwi/tractography/GT/mhsampler.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/particle.cpp b/src/dwi/tractography/GT/particle.cpp
index 61516ba22b..b40d087a7e 100644
--- a/src/dwi/tractography/GT/particle.cpp
+++ b/src/dwi/tractography/GT/particle.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/particle.h b/src/dwi/tractography/GT/particle.h
index e438e2e984..141dc76134 100644
--- a/src/dwi/tractography/GT/particle.h
+++ b/src/dwi/tractography/GT/particle.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/particlegrid.cpp b/src/dwi/tractography/GT/particlegrid.cpp
index f9d47ec641..e68460ddfa 100644
--- a/src/dwi/tractography/GT/particlegrid.cpp
+++ b/src/dwi/tractography/GT/particlegrid.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/particlegrid.h b/src/dwi/tractography/GT/particlegrid.h
index 673e5bccd0..30d9d1959d 100644
--- a/src/dwi/tractography/GT/particlegrid.h
+++ b/src/dwi/tractography/GT/particlegrid.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -53,7 +53,7 @@ namespace MR {
// Initialise scanner-to-grid transform
Eigen::DiagonalMatrix newspacing (2.0*Particle::L, 2.0*Particle::L, 2.0*Particle::L);
- Eigen::Vector3 shift (image.spacing(0)/2.0 - Particle::L,
+ Eigen::Vector3d shift (image.spacing(0)/2.0 - Particle::L,
image.spacing(1)/2.0 - Particle::L,
image.spacing(2)/2.0 - Particle::L);
T_s2g = image.transform() * newspacing;
diff --git a/src/dwi/tractography/GT/particlepool.h b/src/dwi/tractography/GT/particlepool.h
index 12eae15b89..8306c63d6b 100644
--- a/src/dwi/tractography/GT/particlepool.h
+++ b/src/dwi/tractography/GT/particlepool.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/GT/spatiallock.h b/src/dwi/tractography/GT/spatiallock.h
index 85e9e5a11e..09d8f555ca 100644
--- a/src/dwi/tractography/GT/spatiallock.h
+++ b/src/dwi/tractography/GT/spatiallock.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/fixel.h b/src/dwi/tractography/SIFT/fixel.h
index 210e0c4f49..866a38f691 100644
--- a/src/dwi/tractography/SIFT/fixel.h
+++ b/src/dwi/tractography/SIFT/fixel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/gradient_sort.cpp b/src/dwi/tractography/SIFT/gradient_sort.cpp
index 5f08f9674a..6ab06f285a 100644
--- a/src/dwi/tractography/SIFT/gradient_sort.cpp
+++ b/src/dwi/tractography/SIFT/gradient_sort.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/gradient_sort.h b/src/dwi/tractography/SIFT/gradient_sort.h
index 9c9344937c..9a04be1fa7 100644
--- a/src/dwi/tractography/SIFT/gradient_sort.h
+++ b/src/dwi/tractography/SIFT/gradient_sort.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/model.h b/src/dwi/tractography/SIFT/model.h
index 2adfae62fa..7105d66699 100644
--- a/src/dwi/tractography/SIFT/model.h
+++ b/src/dwi/tractography/SIFT/model.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -113,7 +113,8 @@ namespace MR
mapper (i.header(), i.dirs),
mutex (new std::mutex),
TD_sum (0.0),
- fixel_TDs (master.fixels.size(), 0.0)
+ fixel_TDs (master.fixels.size(), 0.0),
+ fixel_counts (master.fixels.size(), 0)
{
mapper.set_upsample_ratio (upsample_ratio);
mapper.set_use_precise_mapping (true);
@@ -123,7 +124,8 @@ namespace MR
mapper (that.mapper),
mutex (that.mutex),
TD_sum (0.0),
- fixel_TDs (master.fixels.size(), 0.0) { }
+ fixel_TDs (master.fixels.size(), 0.0),
+ fixel_counts (master.fixels.size(), 0) { }
~TrackMappingWorker();
bool operator() (const Tractography::Streamline<>&);
private:
@@ -132,6 +134,7 @@ namespace MR
std::shared_ptr mutex;
double TD_sum;
vector fixel_TDs;
+ vector fixel_counts;
};
class FixelRemapper
@@ -316,8 +319,26 @@ namespace MR
+ namespace {
+ // Split multi-threaded increment here based on whether or not the Fixel
+ // template class does or does not possess member add_TD (const double, const track_t)
+ template
+ using void_t = void;
+ template
+ struct has_add_TD_function : std::false_type { NOMEMALIGN };
+ template
+ struct has_add_TD_function().add_TD(0.0, 0))> : std::true_type { NOMEMALIGN };
+ template
+ typename std::enable_if::value, void>::type increment (FixelType& fixel, const double length, const track_t count) {
+ fixel.add_TD (length, count);
+ }
+ template
+ typename std::enable_if::value, void>::type increment (FixelType& fixel, const double length, const track_t count) {
+ fixel += length;
+ }
+ }
template
Model::TrackMappingWorker::~TrackMappingWorker()
@@ -325,7 +346,7 @@ namespace MR
std::lock_guard lock (*mutex);
master.TD_sum += TD_sum;
for (size_t i = 0; i != fixel_TDs.size(); ++i)
- master.fixels[i] += fixel_TDs[i];
+ increment (master.fixels[i], fixel_TDs[i], fixel_counts[i]);
}
@@ -362,8 +383,10 @@ namespace MR
master.contributions[in.get_index()] = new TrackContribution (masked_contributions, total_contribution, total_length);
TD_sum += total_contribution;
- for (vector::const_iterator i = masked_contributions.begin(); i != masked_contributions.end(); ++i)
+ for (vector::const_iterator i = masked_contributions.begin(); i != masked_contributions.end(); ++i) {
fixel_TDs [i->get_fixel_index()] += i->get_length();
+ ++fixel_counts [i->get_fixel_index()];
+ }
return true;
diff --git a/src/dwi/tractography/SIFT/model_base.h b/src/dwi/tractography/SIFT/model_base.h
index 459de7ace4..10a71ef43f 100644
--- a/src/dwi/tractography/SIFT/model_base.h
+++ b/src/dwi/tractography/SIFT/model_base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -74,7 +74,7 @@ namespace MR
weight (1.0),
dir () { }
- FixelBase (const default_type amp, const Eigen::Vector3& d) :
+ FixelBase (const default_type amp, const Eigen::Vector3d& d) :
FOD (amp),
TD (0.0),
weight (1.0),
@@ -91,7 +91,7 @@ namespace MR
default_type get_FOD() const { return FOD; }
default_type get_TD() const { return TD; }
default_type get_weight() const { return weight; }
- const Eigen::Vector3& get_dir() const { return dir; }
+ const Eigen::Vector3d& get_dir() const { return dir; }
void scale_FOD (const default_type factor) { FOD *= factor; }
void set_weight (const default_type w) { weight = w; }
@@ -105,7 +105,7 @@ namespace MR
protected:
default_type FOD, TD, weight;
- Eigen::Vector3 dir;
+ Eigen::Vector3d dir;
default_type get_cost_unweighted (const default_type mu) const { return Math::pow2 (get_diff (mu)); }
diff --git a/src/dwi/tractography/SIFT/output.h b/src/dwi/tractography/SIFT/output.h
index 308b3091cb..537f9f1e1b 100644
--- a/src/dwi/tractography/SIFT/output.h
+++ b/src/dwi/tractography/SIFT/output.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/proc_mask.cpp b/src/dwi/tractography/SIFT/proc_mask.cpp
index e9e7b9343b..bbd2b084a7 100644
--- a/src/dwi/tractography/SIFT/proc_mask.cpp
+++ b/src/dwi/tractography/SIFT/proc_mask.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/proc_mask.h b/src/dwi/tractography/SIFT/proc_mask.h
index 50df027811..3129a52828 100644
--- a/src/dwi/tractography/SIFT/proc_mask.h
+++ b/src/dwi/tractography/SIFT/proc_mask.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/sift.cpp b/src/dwi/tractography/SIFT/sift.cpp
index c28eedecbb..e6bf23245a 100644
--- a/src/dwi/tractography/SIFT/sift.cpp
+++ b/src/dwi/tractography/SIFT/sift.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/sift.h b/src/dwi/tractography/SIFT/sift.h
index 5d47f0acfd..169a18ea6e 100644
--- a/src/dwi/tractography/SIFT/sift.h
+++ b/src/dwi/tractography/SIFT/sift.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/sifter.cpp b/src/dwi/tractography/SIFT/sifter.cpp
index 2bfa51b105..383c8b7efb 100644
--- a/src/dwi/tractography/SIFT/sifter.cpp
+++ b/src/dwi/tractography/SIFT/sifter.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/sifter.h b/src/dwi/tractography/SIFT/sifter.h
index 0ffbcb7f4a..27dd7cee43 100644
--- a/src/dwi/tractography/SIFT/sifter.h
+++ b/src/dwi/tractography/SIFT/sifter.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/track_contribution.cpp b/src/dwi/tractography/SIFT/track_contribution.cpp
index 2db3f541cc..46f57f0dac 100644
--- a/src/dwi/tractography/SIFT/track_contribution.cpp
+++ b/src/dwi/tractography/SIFT/track_contribution.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/track_contribution.h b/src/dwi/tractography/SIFT/track_contribution.h
index badb5ee013..4b4f2b9bc4 100644
--- a/src/dwi/tractography/SIFT/track_contribution.h
+++ b/src/dwi/tractography/SIFT/track_contribution.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/track_index_range.cpp b/src/dwi/tractography/SIFT/track_index_range.cpp
index 23a9495e41..73b3fa7322 100644
--- a/src/dwi/tractography/SIFT/track_index_range.cpp
+++ b/src/dwi/tractography/SIFT/track_index_range.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/track_index_range.h b/src/dwi/tractography/SIFT/track_index_range.h
index e5cdcb9a5d..927a65004e 100644
--- a/src/dwi/tractography/SIFT/track_index_range.h
+++ b/src/dwi/tractography/SIFT/track_index_range.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT/types.h b/src/dwi/tractography/SIFT/types.h
index a186961dbc..af5aadaa83 100644
--- a/src/dwi/tractography/SIFT/types.h
+++ b/src/dwi/tractography/SIFT/types.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/coeff_optimiser.cpp b/src/dwi/tractography/SIFT2/coeff_optimiser.cpp
index eb0645aa2f..467bed704c 100644
--- a/src/dwi/tractography/SIFT2/coeff_optimiser.cpp
+++ b/src/dwi/tractography/SIFT2/coeff_optimiser.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/coeff_optimiser.h b/src/dwi/tractography/SIFT2/coeff_optimiser.h
index 4eb9a73ad0..219f00a7be 100644
--- a/src/dwi/tractography/SIFT2/coeff_optimiser.h
+++ b/src/dwi/tractography/SIFT2/coeff_optimiser.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/fixel.h b/src/dwi/tractography/SIFT2/fixel.h
index 7ed35b6c2d..3d88d74069 100644
--- a/src/dwi/tractography/SIFT2/fixel.h
+++ b/src/dwi/tractography/SIFT2/fixel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/fixel_updater.cpp b/src/dwi/tractography/SIFT2/fixel_updater.cpp
index 3cf68f937a..55efcbd65e 100644
--- a/src/dwi/tractography/SIFT2/fixel_updater.cpp
+++ b/src/dwi/tractography/SIFT2/fixel_updater.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/fixel_updater.h b/src/dwi/tractography/SIFT2/fixel_updater.h
index 85e55502d7..07559e5106 100644
--- a/src/dwi/tractography/SIFT2/fixel_updater.h
+++ b/src/dwi/tractography/SIFT2/fixel_updater.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/line_search.cpp b/src/dwi/tractography/SIFT2/line_search.cpp
index c49435eb0d..4db496c994 100644
--- a/src/dwi/tractography/SIFT2/line_search.cpp
+++ b/src/dwi/tractography/SIFT2/line_search.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/line_search.h b/src/dwi/tractography/SIFT2/line_search.h
index 03ff99eec1..edf205c6d9 100644
--- a/src/dwi/tractography/SIFT2/line_search.h
+++ b/src/dwi/tractography/SIFT2/line_search.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/reg_calculator.cpp b/src/dwi/tractography/SIFT2/reg_calculator.cpp
index 6874eda7a8..56334634a4 100644
--- a/src/dwi/tractography/SIFT2/reg_calculator.cpp
+++ b/src/dwi/tractography/SIFT2/reg_calculator.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/reg_calculator.h b/src/dwi/tractography/SIFT2/reg_calculator.h
index d68418d0c2..2081b3c892 100644
--- a/src/dwi/tractography/SIFT2/reg_calculator.h
+++ b/src/dwi/tractography/SIFT2/reg_calculator.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/regularisation.h b/src/dwi/tractography/SIFT2/regularisation.h
index b6afdfb58a..98d49d0310 100644
--- a/src/dwi/tractography/SIFT2/regularisation.h
+++ b/src/dwi/tractography/SIFT2/regularisation.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/streamline_stats.cpp b/src/dwi/tractography/SIFT2/streamline_stats.cpp
index 3d9ea1f026..a402d0bcf2 100644
--- a/src/dwi/tractography/SIFT2/streamline_stats.cpp
+++ b/src/dwi/tractography/SIFT2/streamline_stats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/streamline_stats.h b/src/dwi/tractography/SIFT2/streamline_stats.h
index f4d1e89e03..b9f5d63bfc 100644
--- a/src/dwi/tractography/SIFT2/streamline_stats.h
+++ b/src/dwi/tractography/SIFT2/streamline_stats.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/SIFT2/tckfactor.cpp b/src/dwi/tractography/SIFT2/tckfactor.cpp
index 842befe35e..c84fcd96a8 100644
--- a/src/dwi/tractography/SIFT2/tckfactor.cpp
+++ b/src/dwi/tractography/SIFT2/tckfactor.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -48,11 +48,10 @@ namespace MR {
void TckFactor::set_reg_lambdas (const double lambda_tikhonov, const double lambda_tv)
{
assert (num_tracks());
- double A = 0.0, sum_PM = 0.0;
- for (size_t i = 1; i != fixels.size(); ++i) {
+ double A = 0.0;
+ for (size_t i = 1; i != fixels.size(); ++i)
A += fixels[i].get_weight() * Math::pow2 (fixels[i].get_FOD());
- sum_PM += fixels[i].get_weight();
- }
+
A /= double(num_tracks());
INFO ("Constant A scaling regularisation terms to match data term is " + str(A));
reg_multiplier_tikhonov = lambda_tikhonov * A;
@@ -336,8 +335,6 @@ namespace MR {
// Leaving out testing the fixel exclusion mask criterion; doesn't converge, and results in CF increase
} while (((new_cf - prev_cf < required_cf_change) || (iter < min_iters) /* || !fixels_to_exclude.empty() */ ) && (iter < max_iters));
-
- progress.done();
}
diff --git a/src/dwi/tractography/SIFT2/tckfactor.h b/src/dwi/tractography/SIFT2/tckfactor.h
index 00f5ece3a1..c906840384 100644
--- a/src/dwi/tractography/SIFT2/tckfactor.h
+++ b/src/dwi/tractography/SIFT2/tckfactor.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/calibrator.h b/src/dwi/tractography/algorithms/calibrator.h
index bb74b36df0..0340e7329b 100644
--- a/src/dwi/tractography/algorithms/calibrator.h
+++ b/src/dwi/tractography/algorithms/calibrator.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/fact.h b/src/dwi/tractography/algorithms/fact.h
index e9b7162f18..0f8d7bc6e6 100644
--- a/src/dwi/tractography/algorithms/fact.h
+++ b/src/dwi/tractography/algorithms/fact.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/iFOD1.cpp b/src/dwi/tractography/algorithms/iFOD1.cpp
index fcace41690..cbd4242d31 100644
--- a/src/dwi/tractography/algorithms/iFOD1.cpp
+++ b/src/dwi/tractography/algorithms/iFOD1.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/iFOD1.h b/src/dwi/tractography/algorithms/iFOD1.h
index 3e25dd4c66..f7fa552422 100644
--- a/src/dwi/tractography/algorithms/iFOD1.h
+++ b/src/dwi/tractography/algorithms/iFOD1.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/iFOD2.cpp b/src/dwi/tractography/algorithms/iFOD2.cpp
index dde9e3368b..ebc352e276 100644
--- a/src/dwi/tractography/algorithms/iFOD2.cpp
+++ b/src/dwi/tractography/algorithms/iFOD2.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/iFOD2.h b/src/dwi/tractography/algorithms/iFOD2.h
index 6140449a72..f4cdc864b0 100644
--- a/src/dwi/tractography/algorithms/iFOD2.h
+++ b/src/dwi/tractography/algorithms/iFOD2.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/nulldist.h b/src/dwi/tractography/algorithms/nulldist.h
index a30bf10195..4b5e8b6a29 100644
--- a/src/dwi/tractography/algorithms/nulldist.h
+++ b/src/dwi/tractography/algorithms/nulldist.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/sd_stream.h b/src/dwi/tractography/algorithms/sd_stream.h
index 75d0fd812b..6844334b5f 100644
--- a/src/dwi/tractography/algorithms/sd_stream.h
+++ b/src/dwi/tractography/algorithms/sd_stream.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/seedtest.h b/src/dwi/tractography/algorithms/seedtest.h
index c9b82abf18..5b1629c4a1 100644
--- a/src/dwi/tractography/algorithms/seedtest.h
+++ b/src/dwi/tractography/algorithms/seedtest.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/tensor_det.h b/src/dwi/tractography/algorithms/tensor_det.h
index a18861e96f..3830ea3e9a 100644
--- a/src/dwi/tractography/algorithms/tensor_det.h
+++ b/src/dwi/tractography/algorithms/tensor_det.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/algorithms/tensor_prob.h b/src/dwi/tractography/algorithms/tensor_prob.h
index fa8bd52baa..970d8795b4 100644
--- a/src/dwi/tractography/algorithms/tensor_prob.h
+++ b/src/dwi/tractography/algorithms/tensor_prob.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/connectome.cpp b/src/dwi/tractography/connectome/connectome.cpp
index 642fa54915..13853c218c 100644
--- a/src/dwi/tractography/connectome/connectome.cpp
+++ b/src/dwi/tractography/connectome/connectome.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/connectome.h b/src/dwi/tractography/connectome/connectome.h
index 74a3c67078..f2778a7943 100644
--- a/src/dwi/tractography/connectome/connectome.h
+++ b/src/dwi/tractography/connectome/connectome.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/exemplar.cpp b/src/dwi/tractography/connectome/exemplar.cpp
index 8948ad12bc..a872c51464 100644
--- a/src/dwi/tractography/connectome/exemplar.cpp
+++ b/src/dwi/tractography/connectome/exemplar.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/exemplar.h b/src/dwi/tractography/connectome/exemplar.h
index c2aa28e603..8431eae6cd 100644
--- a/src/dwi/tractography/connectome/exemplar.h
+++ b/src/dwi/tractography/connectome/exemplar.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/extract.cpp b/src/dwi/tractography/connectome/extract.cpp
index 27b6047b62..8db32cf2a5 100644
--- a/src/dwi/tractography/connectome/extract.cpp
+++ b/src/dwi/tractography/connectome/extract.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/extract.h b/src/dwi/tractography/connectome/extract.h
index 4e845ecc96..2a48ecf0c2 100644
--- a/src/dwi/tractography/connectome/extract.h
+++ b/src/dwi/tractography/connectome/extract.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/mapped_track.h b/src/dwi/tractography/connectome/mapped_track.h
index 25e69b3f46..597708cfad 100644
--- a/src/dwi/tractography/connectome/mapped_track.h
+++ b/src/dwi/tractography/connectome/mapped_track.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/mapper.h b/src/dwi/tractography/connectome/mapper.h
index 9d908f1ec3..675db26bea 100644
--- a/src/dwi/tractography/connectome/mapper.h
+++ b/src/dwi/tractography/connectome/mapper.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/matrix.cpp b/src/dwi/tractography/connectome/matrix.cpp
index 4853b71320..34a5feba0c 100644
--- a/src/dwi/tractography/connectome/matrix.cpp
+++ b/src/dwi/tractography/connectome/matrix.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/matrix.h b/src/dwi/tractography/connectome/matrix.h
index 4a68a49315..3bf47d82c5 100644
--- a/src/dwi/tractography/connectome/matrix.h
+++ b/src/dwi/tractography/connectome/matrix.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/metric.h b/src/dwi/tractography/connectome/metric.h
index 7433c0256d..4238be0ade 100644
--- a/src/dwi/tractography/connectome/metric.h
+++ b/src/dwi/tractography/connectome/metric.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/streamline.h b/src/dwi/tractography/connectome/streamline.h
index 08afce45b1..f74c1f4102 100644
--- a/src/dwi/tractography/connectome/streamline.h
+++ b/src/dwi/tractography/connectome/streamline.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/connectome/tck2nodes.cpp b/src/dwi/tractography/connectome/tck2nodes.cpp
index f741d62a3d..58911f8894 100644
--- a/src/dwi/tractography/connectome/tck2nodes.cpp
+++ b/src/dwi/tractography/connectome/tck2nodes.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -31,8 +31,8 @@ namespace Connectome {
node_t Tck2nodes_end_voxels::select_node (const Tractography::Streamline<>& tck, Image& v, const bool end) const
{
- const Eigen::Vector3 p ((end ? tck.back() : tck.front()).cast());
- const Eigen::Vector3 v_float (transform->scanner2voxel * p);
+ const Eigen::Vector3d p ((end ? tck.back() : tck.front()).cast());
+ const Eigen::Vector3d v_float (transform->scanner2voxel * p);
for (size_t axis = 0; axis != 3; ++axis)
v.index(axis) = std::round (v_float[axis]);
if (is_out_of_bounds (v))
@@ -72,14 +72,14 @@ node_t Tck2nodes_radial::select_node (const Tractography::Streamline<>& tck, Ima
default_type min_dist = max_dist;
node_t node = 0;
- const Eigen::Vector3 p = (end ? tck.back() : tck.front()).cast();
- const Eigen::Vector3 v_float = transform->scanner2voxel * p;
+ const Eigen::Vector3d p = (end ? tck.back() : tck.front()).cast();
+ const Eigen::Vector3d v_float = transform->scanner2voxel * p;
const voxel_type centre { int(std::round (v_float[0])), int(std::round (v_float[1])), int(std::round (v_float[2])) };
for (vector::const_iterator offset = radial_search.begin(); offset != radial_search.end(); ++offset) {
const voxel_type this_voxel (centre + *offset);
- const Eigen::Vector3 p_voxel (transform->voxel2scanner * this_voxel.matrix().cast());
+ const Eigen::Vector3d p_voxel (transform->voxel2scanner * this_voxel.matrix().cast());
const default_type dist ((p - p_voxel).norm());
if (dist > min_dist + 2*max_add_dist)
@@ -112,7 +112,7 @@ node_t Tck2nodes_revsearch::select_node (const Tractography::Streamline<>& tck,
default_type dist = 0.0;
for (int index = start_index; index != midpoint_index; index += step) {
- const Eigen::Vector3 v_float = transform->scanner2voxel * tck[index].cast();
+ const Eigen::Vector3d v_float = transform->scanner2voxel * tck[index].cast();
const voxel_type voxel { int(std::round (v_float[0])), int(std::round (v_float[1])), int(std::round (v_float[2])) };
assign_pos_of (voxel).to (v);
if (!is_out_of_bounds (v)) {
@@ -137,15 +137,15 @@ node_t Tck2nodes_forwardsearch::select_node (const Tractography::Streamline<>& t
// Start by defining the endpoint and the tangent at the endpoint
const int index = end ? (tck.size() - 1) : 0;
const int step = end ? -1 : 1;
- const Eigen::Vector3 p = tck[index].cast();
- Eigen::Vector3 t;
+ const Eigen::Vector3d p = tck[index].cast();
+ Eigen::Vector3d t;
// Heuristic for determining the tangent at the streamline endpoint
if (tck.size() > 2) {
- const Eigen::Vector3 second_last_step = (tck[index+step] - tck[index+2*step]).cast();
- const Eigen::Vector3 last_step = (tck[index] - tck[index+step]).cast();
+ const Eigen::Vector3d second_last_step = (tck[index+step] - tck[index+2*step]).cast();
+ const Eigen::Vector3d last_step = (tck[index] - tck[index+step]).cast();
const default_type length_ratio = last_step.norm() / second_last_step.norm();
- const Eigen::Vector3 curvature (last_step - (second_last_step * length_ratio));
+ const Eigen::Vector3d curvature (last_step - (second_last_step * length_ratio));
t = last_step + curvature;
} else {
t = (tck[index] - tck[index+step]).cast();
@@ -159,7 +159,7 @@ node_t Tck2nodes_forwardsearch::select_node (const Tractography::Streamline<>& t
// Voxel containing streamline endpoint not guaranteed to be appropriate
// Should it be tested anyway? Probably
- const Eigen::Vector3 vp (transform->scanner2voxel * p);
+ const Eigen::Vector3d vp (transform->scanner2voxel * p);
const voxel_type voxel { int(std::round (vp[0])), int(std::round (vp[1])), int(std::round (vp[2])) };
if (is_out_of_bounds (v, voxel))
return 0;
@@ -203,11 +203,11 @@ node_t Tck2nodes_forwardsearch::select_node (const Tractography::Streamline<>& t
-default_type Tck2nodes_forwardsearch::get_cf (const Eigen::Vector3& p, const Eigen::Vector3& t, const voxel_type& v) const
+default_type Tck2nodes_forwardsearch::get_cf (const Eigen::Vector3d& p, const Eigen::Vector3d& t, const voxel_type& v) const
{
- const Eigen::Vector3 vfloat { default_type(v[0]), default_type(v[1]), default_type(v[2]) };
- const Eigen::Vector3 vp (transform->voxel2scanner * vfloat);
- Eigen::Vector3 offset (vp - p);
+ const Eigen::Vector3d vfloat { default_type(v[0]), default_type(v[1]), default_type(v[2]) };
+ const Eigen::Vector3d vp (transform->voxel2scanner * vfloat);
+ Eigen::Vector3d offset (vp - p);
const default_type dist = offset.norm();
offset.normalize();
const default_type angle = std::acos (t.dot (offset));
@@ -234,7 +234,7 @@ void Tck2nodes_all_voxels::select_nodes (const Streamline<>& tck, Image&
{
std::set result;
for (Streamline<>::const_iterator p = tck.begin(); p != tck.end(); ++p) {
- const Eigen::Vector3 v_float = transform->scanner2voxel * p->cast();
+ const Eigen::Vector3d v_float = transform->scanner2voxel * p->cast();
const voxel_type voxel (int(std::round (v_float[0])), int(std::round (v_float[1])), int(std::round (v_float[2])));
assign_pos_of (voxel).to (v);
if (!is_out_of_bounds (v)) {
diff --git a/src/dwi/tractography/connectome/tck2nodes.h b/src/dwi/tractography/connectome/tck2nodes.h
index cc613a9dc7..34b161f6e0 100644
--- a/src/dwi/tractography/connectome/tck2nodes.h
+++ b/src/dwi/tractography/connectome/tck2nodes.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -204,7 +204,7 @@ class Tck2nodes_forwardsearch : public Tck2nodes_base
const default_type max_dist;
const default_type angle_limit;
- default_type get_cf (const Eigen::Vector3&, const Eigen::Vector3&, const voxel_type&) const;
+ default_type get_cf (const Eigen::Vector3d&, const Eigen::Vector3d&, const voxel_type&) const;
};
diff --git a/src/dwi/tractography/editing/editing.cpp b/src/dwi/tractography/editing/editing.cpp
index f2475a8ccf..8bb0e3e01d 100644
--- a/src/dwi/tractography/editing/editing.cpp
+++ b/src/dwi/tractography/editing/editing.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/editing/editing.h b/src/dwi/tractography/editing/editing.h
index 902dd3f175..8e6798e36e 100644
--- a/src/dwi/tractography/editing/editing.h
+++ b/src/dwi/tractography/editing/editing.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/editing/loader.h b/src/dwi/tractography/editing/loader.h
index 0aa06d61a2..e3c505fb70 100644
--- a/src/dwi/tractography/editing/loader.h
+++ b/src/dwi/tractography/editing/loader.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/editing/receiver.cpp b/src/dwi/tractography/editing/receiver.cpp
index 4fc13ef71e..00abe66420 100644
--- a/src/dwi/tractography/editing/receiver.cpp
+++ b/src/dwi/tractography/editing/receiver.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/editing/receiver.h b/src/dwi/tractography/editing/receiver.h
index 8e4c23e043..ae0e70e2ef 100644
--- a/src/dwi/tractography/editing/receiver.h
+++ b/src/dwi/tractography/editing/receiver.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/editing/worker.cpp b/src/dwi/tractography/editing/worker.cpp
index 212c0a2ce4..ca45343036 100644
--- a/src/dwi/tractography/editing/worker.cpp
+++ b/src/dwi/tractography/editing/worker.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/editing/worker.h b/src/dwi/tractography/editing/worker.h
index 49436f7c8b..8241c3cca3 100644
--- a/src/dwi/tractography/editing/worker.h
+++ b/src/dwi/tractography/editing/worker.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/file.h b/src/dwi/tractography/file.h
index 0fb4756820..b9f200f58a 100644
--- a/src/dwi/tractography/file.h
+++ b/src/dwi/tractography/file.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/file_base.cpp b/src/dwi/tractography/file_base.cpp
index ed3354da4e..74ad170f4b 100644
--- a/src/dwi/tractography/file_base.cpp
+++ b/src/dwi/tractography/file_base.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -36,6 +36,8 @@ namespace MR {
if (key == "roi" || key == "prior_roi") {
try {
vector V (split (kv.value(), " \t", true, 2));
+ if (V.size() != 2)
+ throw 1;
properties.prior_rois.insert (std::pair (V[0], V[1]));
}
catch (...) {
diff --git a/src/dwi/tractography/file_base.h b/src/dwi/tractography/file_base.h
index f17da1528b..1c43532a90 100644
--- a/src/dwi/tractography/file_base.h
+++ b/src/dwi/tractography/file_base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/buffer_scratch_dump.h b/src/dwi/tractography/mapping/buffer_scratch_dump.h
index 375531c5dd..7710220aaf 100644
--- a/src/dwi/tractography/mapping/buffer_scratch_dump.h
+++ b/src/dwi/tractography/mapping/buffer_scratch_dump.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/fixel_td_map.cpp b/src/dwi/tractography/mapping/fixel_td_map.cpp
index 9491598562..ad9807e960 100644
--- a/src/dwi/tractography/mapping/fixel_td_map.cpp
+++ b/src/dwi/tractography/mapping/fixel_td_map.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/fixel_td_map.h b/src/dwi/tractography/mapping/fixel_td_map.h
index 8ea097ca10..1b25d30e17 100644
--- a/src/dwi/tractography/mapping/fixel_td_map.h
+++ b/src/dwi/tractography/mapping/fixel_td_map.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/gaussian/mapper.cpp b/src/dwi/tractography/mapping/gaussian/mapper.cpp
index 37c6b2d320..89e31f997a 100644
--- a/src/dwi/tractography/mapping/gaussian/mapper.cpp
+++ b/src/dwi/tractography/mapping/gaussian/mapper.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/gaussian/mapper.h b/src/dwi/tractography/mapping/gaussian/mapper.h
index 2ba3322476..2b7508aeec 100644
--- a/src/dwi/tractography/mapping/gaussian/mapper.h
+++ b/src/dwi/tractography/mapping/gaussian/mapper.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -103,10 +103,10 @@ namespace MR {
template void voxelise_precise (const Streamline<>&, Cont&) const;
template void voxelise_ends (const Streamline<>&, Cont&) const;
- inline void add_to_set (SetVoxel& , const Eigen::Vector3i&, const Eigen::Vector3&, const default_type, const default_type) const;
- inline void add_to_set (SetVoxelDEC&, const Eigen::Vector3i&, const Eigen::Vector3&, const default_type, const default_type) const;
- inline void add_to_set (SetDixel& , const Eigen::Vector3i&, const Eigen::Vector3&, const default_type, const default_type) const;
- inline void add_to_set (SetVoxelTOD&, const Eigen::Vector3i&, const Eigen::Vector3&, const default_type, const default_type) const;
+ inline void add_to_set (SetVoxel& , const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type, const default_type) const;
+ inline void add_to_set (SetVoxelDEC&, const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type, const default_type) const;
+ inline void add_to_set (SetDixel& , const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type, const default_type) const;
+ inline void add_to_set (SetVoxelTOD&, const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type, const default_type) const;
// Convenience function to convert from streamline position index to a linear-interpolated
// factor value (TrackMapperTWI member field factors[] only contains one entry per pre-upsampled point)
@@ -128,7 +128,7 @@ namespace MR {
for (size_t i = 0; i != last; ++i) {
vox = round (scanner2voxel * tck[i]);
if (check (vox, info)) {
- const Eigen::Vector3 dir ((tck[i+1] - tck[prev]).cast().normalized());
+ const Eigen::Vector3d dir ((tck[i+1] - tck[prev]).cast().normalized());
const default_type factor = tck_index_to_factor (i);
add_to_set (output, vox, dir, 1.0, factor);
}
@@ -137,7 +137,7 @@ namespace MR {
vox = round (scanner2voxel * tck[last]);
if (check (vox, info)) {
- const Eigen::Vector3 dir ((tck[last] - tck[prev]).cast().normalized());
+ const Eigen::Vector3d dir ((tck[last] - tck[prev]).cast().normalized());
const default_type factor = tck_index_to_factor (last);
add_to_set (output, vox, dir, 1.0f, factor);
}
@@ -227,7 +227,7 @@ namespace MR {
}
length += (p_prev - p_voxel_exit).norm();
- Eigen::Vector3 traversal_vector = (p_voxel_exit - p_voxel_entry).cast().normalized();
+ Eigen::Vector3d traversal_vector = (p_voxel_exit - p_voxel_entry).cast().normalized();
if (traversal_vector.allFinite() && check (this_voxel, info)) {
const default_type index_voxel_exit = default_type(p) + mu;
const size_t mean_tck_index = std::round (0.5 * (index_voxel_entry + index_voxel_exit));
@@ -247,7 +247,7 @@ namespace MR {
for (size_t end = 0; end != 2; ++end) {
const Eigen::Vector3i vox = round (scanner2voxel * (end ? tck.back() : tck.front()));
if (check (vox, info)) {
- const Eigen::Vector3 dir = (end ? (tck[tck.size()-1] - tck[tck.size()-2]) : (tck[0] - tck[1])).cast().normalized();
+ const Eigen::Vector3d dir = (end ? (tck[tck.size()-1] - tck[tck.size()-2]) : (tck[0] - tck[1])).cast().normalized();
const default_type factor = (end ? factors.back() : factors.front());
add_to_set (out, vox, dir, 1.0, factor);
}
@@ -256,21 +256,21 @@ namespace MR {
- inline void TrackMapper::add_to_set (SetVoxel& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l, const default_type f) const
+ inline void TrackMapper::add_to_set (SetVoxel& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l, const default_type f) const
{
out.insert (v, l, f);
}
- inline void TrackMapper::add_to_set (SetVoxelDEC& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l, const default_type f) const
+ inline void TrackMapper::add_to_set (SetVoxelDEC& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l, const default_type f) const
{
out.insert (v, d, l, f);
}
- inline void TrackMapper::add_to_set (SetDixel& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l, const default_type f) const
+ inline void TrackMapper::add_to_set (SetDixel& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l, const default_type f) const
{
assert (dixel_plugin);
const size_t bin = (*dixel_plugin) (d);
out.insert (v, bin, l, f);
}
- inline void TrackMapper::add_to_set (SetVoxelTOD& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l, const default_type f) const
+ inline void TrackMapper::add_to_set (SetVoxelTOD& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l, const default_type f) const
{
assert (tod_plugin);
VoxelTOD::vector_type sh;
diff --git a/src/dwi/tractography/mapping/gaussian/voxel.h b/src/dwi/tractography/mapping/gaussian/voxel.h
index baa100dfb0..5c6a77cfe7 100644
--- a/src/dwi/tractography/mapping/gaussian/voxel.h
+++ b/src/dwi/tractography/mapping/gaussian/voxel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -80,18 +80,18 @@ namespace MR {
public:
VoxelDEC () : Base (), VoxelAddon () { }
VoxelDEC (const Eigen::Vector3i& V) : Base (V), VoxelAddon () { }
- VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3& d) : Base (V, d), VoxelAddon () { }
- VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3& d, const default_type l) : Base (V, d, l), VoxelAddon () { }
- VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3& d, const default_type l, const default_type f) : Base (V, d, l), VoxelAddon (f) { }
+ VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3d& d) : Base (V, d), VoxelAddon () { }
+ VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3d& d, const default_type l) : Base (V, d, l), VoxelAddon () { }
+ VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3d& d, const default_type l, const default_type f) : Base (V, d, l), VoxelAddon (f) { }
VoxelDEC& operator= (const VoxelDEC& V) { Base::operator= (V); VoxelAddon::operator= (V); return (*this); }
void operator+= (const default_type) const { assert (0); }
- void operator+= (const Eigen::Vector3&) const { assert (0); }
+ void operator+= (const Eigen::Vector3d&) const { assert (0); }
bool operator== (const VoxelDEC& V) const { return Base::operator== (V); }
bool operator< (const VoxelDEC& V) const { return Base::operator< (V); }
- void add (const Eigen::Vector3&, const default_type) const { assert (0); }
- void add (const Eigen::Vector3& i, const default_type l, const default_type f) const { Base::add (i, l); VoxelAddon::operator+= (f); }
+ void add (const Eigen::Vector3d&, const default_type) const { assert (0); }
+ void add (const Eigen::Vector3d& i, const default_type l, const default_type f) const { Base::add (i, l); VoxelAddon::operator+= (f); }
void normalize() const { VoxelAddon::normalize (get_length()); Base::normalize(); }
};
@@ -191,7 +191,7 @@ namespace MR {
using VoxType = VoxelDEC;
- inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l, const default_type f)
+ inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l, const default_type f)
{
const VoxelDEC temp (v, d, l, f);
iterator existing = std::set::find (temp);
diff --git a/src/dwi/tractography/mapping/loader.h b/src/dwi/tractography/mapping/loader.h
index 352f11a936..05f069b31f 100644
--- a/src/dwi/tractography/mapping/loader.h
+++ b/src/dwi/tractography/mapping/loader.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/mapper.cpp b/src/dwi/tractography/mapping/mapper.cpp
index d0c0d31111..15296c8886 100644
--- a/src/dwi/tractography/mapping/mapper.cpp
+++ b/src/dwi/tractography/mapping/mapper.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -254,7 +254,7 @@ void TrackMapperTWI::load_factors (const Streamline<>& tck) const
if (contrast != CURVATURE)
throw Exception ("Unsupported contrast in function TrackMapperTWI::load_factors()");
- vector tangents;
+ vector tangents;
tangents.reserve (tck.size());
// Would like to be able to manipulate the length over which the tangent calculation is affected
@@ -271,7 +271,7 @@ void TrackMapperTWI::load_factors (const Streamline<>& tck) const
step_sizes.reserve (tck.size());
for (size_t i = 0; i != tck.size(); ++i) {
- Eigen::Vector3 this_tangent;
+ Eigen::Vector3d this_tangent;
if (i == 0)
this_tangent = ((tck[1] - tck[0] ).cast().normalized());
else if (i == tck.size() - 1)
@@ -322,7 +322,7 @@ void TrackMapperTWI::load_factors (const Streamline<>& tck) const
// Smooth both the tangent vectors and the principal normal vectors according to a Gaussuan kernel
// Remember: tangent vectors are unit length, but for principal normal vectors length must be preserved!
- vector smoothed_tangents;
+ vector smoothed_tangents;
smoothed_tangents.reserve (tangents.size());
static const default_type gaussian_theta = CURVATURE_TRACK_SMOOTHING_FWHM / (2.0 * sqrt (2.0 * log (2.0)));
@@ -330,7 +330,7 @@ void TrackMapperTWI::load_factors (const Streamline<>& tck) const
for (size_t i = 0; i != tck.size(); ++i) {
- Eigen::Vector3 this_tangent (0.0, 0.0, 0.0);
+ Eigen::Vector3d this_tangent (0.0, 0.0, 0.0);
for (size_t j = 0; j != tck.size(); ++j) {
const default_type distance = spline_distances (i, j);
diff --git a/src/dwi/tractography/mapping/mapper.h b/src/dwi/tractography/mapping/mapper.h
index a3e38ec2b4..6855c8016c 100644
--- a/src/dwi/tractography/mapping/mapper.h
+++ b/src/dwi/tractography/mapping/mapper.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -160,11 +160,11 @@ namespace MR {
virtual void postprocess (const Streamline<>& tck, SetVoxelExtras& out) const { }
// Used by voxelise() and voxelise_precise() to increment the relevant set
- inline void add_to_set (SetVoxel& , const Eigen::Vector3i&, const Eigen::Vector3&, const default_type) const;
- inline void add_to_set (SetVoxelDEC&, const Eigen::Vector3i&, const Eigen::Vector3&, const default_type) const;
- inline void add_to_set (SetVoxelDir&, const Eigen::Vector3i&, const Eigen::Vector3&, const default_type) const;
- inline void add_to_set (SetDixel& , const Eigen::Vector3i&, const Eigen::Vector3&, const default_type) const;
- inline void add_to_set (SetVoxelTOD&, const Eigen::Vector3i&, const Eigen::Vector3&, const default_type) const;
+ inline void add_to_set (SetVoxel& , const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type) const;
+ inline void add_to_set (SetVoxelDEC&, const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type) const;
+ inline void add_to_set (SetVoxelDir&, const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type) const;
+ inline void add_to_set (SetDixel& , const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type) const;
+ inline void add_to_set (SetVoxelTOD&, const Eigen::Vector3i&, const Eigen::Vector3d&, const default_type) const;
DWI::Tractography::Resampling::Upsampler upsampler;
@@ -183,7 +183,7 @@ namespace MR {
for (auto i = tck.cbegin(); i != last; ++i) {
vox = round (scanner2voxel * (*i));
if (check (vox, info)) {
- const Eigen::Vector3 dir = (*(i+1) - *prev).cast().normalized();
+ const Eigen::Vector3d dir = (*(i+1) - *prev).cast().normalized();
if (dir.allFinite() && !dir.isZero())
add_to_set (output, vox, dir, 1.0);
}
@@ -192,7 +192,7 @@ namespace MR {
vox = round (scanner2voxel * (*last));
if (check (vox, info)) {
- const Eigen::Vector3 dir = (*last - *prev).cast().normalized();
+ const Eigen::Vector3d dir = (*last - *prev).cast().normalized();
if (dir.allFinite() && !dir.isZero())
add_to_set (output, vox, dir, 1.0);
}
@@ -282,7 +282,7 @@ namespace MR {
}
length += (p_prev - p_voxel_exit).norm();
- const Eigen::Vector3 traversal_vector = (p_voxel_exit - p_voxel_entry).cast().normalized();
+ const Eigen::Vector3d traversal_vector = (p_voxel_exit - p_voxel_entry).cast().normalized();
if (std::isfinite (traversal_vector[0]) && check (this_voxel, info))
add_to_set (out, this_voxel, traversal_vector, length);
@@ -300,13 +300,13 @@ namespace MR {
if (tck.size() == 1) {
const auto vox = round (scanner2voxel * tck.front());
if (check (vox, info))
- add_to_set (out, vox, Eigen::Vector3(NaN, NaN, NaN), 1.0);
+ add_to_set (out, vox, Eigen::Vector3d(NaN, NaN, NaN), 1.0);
return;
}
for (size_t end = 0; end != 2; ++end) {
const auto vox = round (scanner2voxel * (end ? tck.back() : tck.front()));
if (check (vox, info)) {
- Eigen::Vector3 dir { NaN, NaN, NaN };
+ Eigen::Vector3d dir { NaN, NaN, NaN };
if (tck.size() > 1)
dir = (end ? (tck[tck.size()-1] - tck[tck.size()-2]) : (tck[0] - tck[1])).cast().normalized();
add_to_set (out, vox, dir, 1.0);
@@ -318,25 +318,25 @@ namespace MR {
// These are inlined to make as fast as possible
- inline void TrackMapperBase::add_to_set (SetVoxel& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l) const
+ inline void TrackMapperBase::add_to_set (SetVoxel& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l) const
{
out.insert (v, l);
}
- inline void TrackMapperBase::add_to_set (SetVoxelDEC& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l) const
+ inline void TrackMapperBase::add_to_set (SetVoxelDEC& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l) const
{
out.insert (v, d, l);
}
- inline void TrackMapperBase::add_to_set (SetVoxelDir& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l) const
+ inline void TrackMapperBase::add_to_set (SetVoxelDir& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l) const
{
out.insert (v, d, l);
}
- inline void TrackMapperBase::add_to_set (SetDixel& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l) const
+ inline void TrackMapperBase::add_to_set (SetDixel& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l) const
{
assert (dixel_plugin);
const DWI::Directions::index_type bin = (*dixel_plugin) (d);
out.insert (v, bin, l);
}
- inline void TrackMapperBase::add_to_set (SetVoxelTOD& out, const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l) const
+ inline void TrackMapperBase::add_to_set (SetVoxelTOD& out, const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l) const
{
assert (tod_plugin);
Eigen::Matrix sh;
diff --git a/src/dwi/tractography/mapping/mapper_plugins.cpp b/src/dwi/tractography/mapping/mapper_plugins.cpp
index c1d5df0d0f..c935f5fe22 100644
--- a/src/dwi/tractography/mapping/mapper_plugins.cpp
+++ b/src/dwi/tractography/mapping/mapper_plugins.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -65,7 +65,7 @@ namespace MR {
if (statistic == ENDS_CORR) {
for (; index >= 0 && index < ssize_t(tck.size()); index += step) {
- const Eigen::Vector3 p = interp.scanner2voxel * tck[index].cast();
+ const Eigen::Vector3d p = interp.scanner2voxel * tck[index].cast();
const Eigen::Array3i v ( { int(std::round (p[0])), int(std::round (p[1])), int(std::round (p[2])) } );
if (!is_out_of_bounds (backtrack_mask, v)) {
assign_pos_of (v, 0, 3).to (backtrack_mask);
@@ -152,7 +152,7 @@ namespace MR {
if (interp.scanner (tck[index])) {
for (interp.index(3) = 0; interp.index(3) != interp.size(3); ++interp.index(3))
sh_coeffs[interp.index(3)] = interp.value();
- const Eigen::Vector3 dir = (tck[(index == ssize_t(tck.size()-1)) ? index : (index+1)] - tck[index ? (index-1) : 0]).cast().normalized();
+ const Eigen::Vector3d dir = (tck[(index == ssize_t(tck.size()-1)) ? index : (index+1)] - tck[index ? (index-1) : 0]).cast().normalized();
factors.push_back (precomputer->value (sh_coeffs, dir));
} else {
factors.push_back (NaN);
@@ -170,7 +170,7 @@ namespace MR {
for (interp.index(3) = 0; interp.index(3) != interp.size(3); ++interp.index(3))
sh_coeffs[interp.index(3)] = interp.value();
// Get the FOD amplitude along the streamline tangent
- const Eigen::Vector3 dir = (tck[(i == tck.size()-1) ? i : (i+1)] - tck[i ? (i-1) : 0]).cast().normalized();
+ const Eigen::Vector3d dir = (tck[(i == tck.size()-1) ? i : (i+1)] - tck[i ? (i-1) : 0]).cast().normalized();
factors.push_back (precomputer->value (sh_coeffs, dir));
} else {
factors.push_back (NaN);
diff --git a/src/dwi/tractography/mapping/mapper_plugins.h b/src/dwi/tractography/mapping/mapper_plugins.h
index c12693188a..aef75d14e8 100644
--- a/src/dwi/tractography/mapping/mapper_plugins.h
+++ b/src/dwi/tractography/mapping/mapper_plugins.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -45,7 +45,7 @@ namespace MR {
dirs (directions) { }
DixelMappingPlugin (const DixelMappingPlugin& that) :
dirs (that.dirs) { }
- DWI::Directions::index_type operator() (const Eigen::Vector3& d) const { return dirs.select_direction (d); }
+ DWI::Directions::index_type operator() (const Eigen::Vector3d& d) const { return dirs.select_direction (d); }
private:
const DWI::Directions::FastLookupSet& dirs;
};
diff --git a/src/dwi/tractography/mapping/mapping.cpp b/src/dwi/tractography/mapping/mapping.cpp
index e0f36000e2..90d41acb68 100644
--- a/src/dwi/tractography/mapping/mapping.cpp
+++ b/src/dwi/tractography/mapping/mapping.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/mapping.h b/src/dwi/tractography/mapping/mapping.h
index 4326b1a5bd..e6c659d516 100644
--- a/src/dwi/tractography/mapping/mapping.h
+++ b/src/dwi/tractography/mapping/mapping.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/twi_stats.cpp b/src/dwi/tractography/mapping/twi_stats.cpp
index ee63f72d53..0a41f79f3a 100644
--- a/src/dwi/tractography/mapping/twi_stats.cpp
+++ b/src/dwi/tractography/mapping/twi_stats.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/twi_stats.h b/src/dwi/tractography/mapping/twi_stats.h
index 54ba938455..a15a3287ed 100644
--- a/src/dwi/tractography/mapping/twi_stats.h
+++ b/src/dwi/tractography/mapping/twi_stats.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/voxel.cpp b/src/dwi/tractography/mapping/voxel.cpp
index e7ebf60283..5b22a6aad7 100644
--- a/src/dwi/tractography/mapping/voxel.cpp
+++ b/src/dwi/tractography/mapping/voxel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/voxel.h b/src/dwi/tractography/mapping/voxel.h
index 95e16722e3..0c48dc30ac 100644
--- a/src/dwi/tractography/mapping/voxel.h
+++ b/src/dwi/tractography/mapping/voxel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -47,7 +47,7 @@ namespace MR {
return (V[0] >= 0 && V[0] < H.size(0) && V[1] >= 0 && V[1] < H.size(1) && V[2] >= 0 && V[2] < H.size(2));
}
- inline Eigen::Vector3 vec2DEC (const Eigen::Vector3& d)
+ inline Eigen::Vector3d vec2DEC (const Eigen::Vector3d& d)
{
return { abs(d[0]), abs(d[1]), abs(d[2]) };
}
@@ -85,11 +85,11 @@ namespace MR {
Voxel (V),
colour (0.0, 0.0, 0.0) { }
- VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3& d) :
+ VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3d& d) :
Voxel (V),
colour (vec2DEC (d)) { }
- VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3& d, const float l) :
+ VoxelDEC (const Eigen::Vector3i& V, const Eigen::Vector3d& d, const float l) :
Voxel (V, l),
colour (vec2DEC (d)) { }
@@ -101,13 +101,13 @@ namespace MR {
bool operator< (const VoxelDEC& V) const { return Voxel::operator< (V); }
void normalize() const { colour.normalize(); Voxel::normalize(); }
- void set_dir (const Eigen::Vector3& i) { colour = vec2DEC (i); }
- void add (const Eigen::Vector3& i, const default_type l) const { Voxel::operator+= (l); colour += vec2DEC (i); }
- void operator+= (const Eigen::Vector3& i) const { Voxel::operator+= (1.0); colour += vec2DEC (i); }
- const Eigen::Vector3& get_colour() const { return colour; }
+ void set_dir (const Eigen::Vector3d& i) { colour = vec2DEC (i); }
+ void add (const Eigen::Vector3d& i, const default_type l) const { Voxel::operator+= (l); colour += vec2DEC (i); }
+ void operator+= (const Eigen::Vector3d& i) const { Voxel::operator+= (1.0); colour += vec2DEC (i); }
+ const Eigen::Vector3d& get_colour() const { return colour; }
private:
- mutable Eigen::Vector3 colour;
+ mutable Eigen::Vector3d colour;
};
@@ -127,11 +127,11 @@ namespace MR {
Voxel (V),
dir (0.0, 0.0, 0.0) { }
- VoxelDir (const Eigen::Vector3i& V, const Eigen::Vector3& d) :
+ VoxelDir (const Eigen::Vector3i& V, const Eigen::Vector3d& d) :
Voxel (V),
dir (d) { }
- VoxelDir (const Eigen::Vector3i& V, const Eigen::Vector3& d, const default_type l) :
+ VoxelDir (const Eigen::Vector3i& V, const Eigen::Vector3d& d, const default_type l) :
Voxel (V, l),
dir (d) { }
@@ -142,13 +142,13 @@ namespace MR {
bool operator< (const VoxelDir& V) const { return Voxel::operator< (V); }
void normalize() const { dir.normalize(); Voxel::normalize(); }
- void set_dir (const Eigen::Vector3& i) { dir = i; }
- void add (const Eigen::Vector3& i, const default_type l) const { Voxel::operator+= (l); dir += i * (dir.dot(i) < 0.0 ? -1.0 : 1.0); }
- void operator+= (const Eigen::Vector3& i) const { Voxel::operator+= (1.0); dir += i * (dir.dot(i) < 0.0 ? -1.0 : 1.0); }
- const Eigen::Vector3& get_dir() const { return dir; }
+ void set_dir (const Eigen::Vector3d& i) { dir = i; }
+ void add (const Eigen::Vector3d& i, const default_type l) const { Voxel::operator+= (l); dir += i * (dir.dot(i) < 0.0 ? -1.0 : 1.0); }
+ void operator+= (const Eigen::Vector3d& i) const { Voxel::operator+= (1.0); dir += i * (dir.dot(i) < 0.0 ? -1.0 : 1.0); }
+ const Eigen::Vector3d& get_dir() const { return dir; }
private:
- mutable Eigen::Vector3 dir;
+ mutable Eigen::Vector3d dir;
};
@@ -317,12 +317,12 @@ namespace MR {
else
existing->add (v.get_colour(), v.get_length());
}
- inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3& d)
+ inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3d& d)
{
const VoxelDEC temp (v, d);
insert (temp);
}
- inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l)
+ inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l)
{
const VoxelDEC temp (v, d, l);
insert (temp);
@@ -344,12 +344,12 @@ namespace MR {
else
existing->add (v.get_dir(), v.get_length());
}
- inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3& d)
+ inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3d& d)
{
const VoxelDir temp (v, d);
insert (temp);
}
- inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3& d, const default_type l)
+ inline void insert (const Eigen::Vector3i& v, const Eigen::Vector3d& d, const default_type l)
{
const VoxelDir temp (v, d, l);
insert (temp);
diff --git a/src/dwi/tractography/mapping/writer.cpp b/src/dwi/tractography/mapping/writer.cpp
index 966ff6957b..f18afb8769 100644
--- a/src/dwi/tractography/mapping/writer.cpp
+++ b/src/dwi/tractography/mapping/writer.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/mapping/writer.h b/src/dwi/tractography/mapping/writer.h
index 6193280148..d85d7d6b6e 100644
--- a/src/dwi/tractography/mapping/writer.h
+++ b/src/dwi/tractography/mapping/writer.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -277,8 +277,8 @@ namespace MR {
// Convenience functions for Directionally-Encoded Colour processing
- Eigen::Vector3 get_dec ();
- void set_dec (const Eigen::Vector3&);
+ Eigen::Vector3d get_dec ();
+ void set_dec (const Eigen::Vector3d&);
// Convenience functions for Track Orientation Distribution processing
void get_tod ( VoxelTOD::vector_type&);
@@ -458,10 +458,10 @@ namespace MR {
template
- Eigen::Vector3 MapWriter::get_dec ()
+ Eigen::Vector3d MapWriter::get_dec ()
{
assert (type == DEC);
- Eigen::Vector3 value;
+ Eigen::Vector3d value;
buffer.index(3) = 0; value[0] = buffer.value();
buffer.index(3)++; value[1] = buffer.value();
buffer.index(3)++; value[2] = buffer.value();
@@ -469,7 +469,7 @@ namespace MR {
}
template
- void MapWriter::set_dec (const Eigen::Vector3& value)
+ void MapWriter::set_dec (const Eigen::Vector3d& value)
{
assert (type == DEC);
buffer.index(3) = 0; buffer.value() = value[0];
diff --git a/src/dwi/tractography/properties.cpp b/src/dwi/tractography/properties.cpp
index ccf2a7112d..a82f49fdcc 100644
--- a/src/dwi/tractography/properties.cpp
+++ b/src/dwi/tractography/properties.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/properties.h b/src/dwi/tractography/properties.h
index b7770858c1..737e616d0a 100644
--- a/src/dwi/tractography/properties.h
+++ b/src/dwi/tractography/properties.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/arc.cpp b/src/dwi/tractography/resampling/arc.cpp
index 410b1d3758..efe4d4d219 100644
--- a/src/dwi/tractography/resampling/arc.cpp
+++ b/src/dwi/tractography/resampling/arc.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/arc.h b/src/dwi/tractography/resampling/arc.h
index a339ee7eb8..6ec220b1d3 100644
--- a/src/dwi/tractography/resampling/arc.h
+++ b/src/dwi/tractography/resampling/arc.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/downsampler.cpp b/src/dwi/tractography/resampling/downsampler.cpp
index ceb75bb1b8..075365e9fd 100644
--- a/src/dwi/tractography/resampling/downsampler.cpp
+++ b/src/dwi/tractography/resampling/downsampler.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/downsampler.h b/src/dwi/tractography/resampling/downsampler.h
index 29da93025c..c7aea9ae28 100644
--- a/src/dwi/tractography/resampling/downsampler.h
+++ b/src/dwi/tractography/resampling/downsampler.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/endpoints.cpp b/src/dwi/tractography/resampling/endpoints.cpp
index e1b7760bb8..d7c682043f 100644
--- a/src/dwi/tractography/resampling/endpoints.cpp
+++ b/src/dwi/tractography/resampling/endpoints.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/endpoints.h b/src/dwi/tractography/resampling/endpoints.h
index 7853e06178..6501a84209 100644
--- a/src/dwi/tractography/resampling/endpoints.h
+++ b/src/dwi/tractography/resampling/endpoints.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/fixed_num_points.cpp b/src/dwi/tractography/resampling/fixed_num_points.cpp
index 801248f087..2091ce74b2 100644
--- a/src/dwi/tractography/resampling/fixed_num_points.cpp
+++ b/src/dwi/tractography/resampling/fixed_num_points.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/fixed_num_points.h b/src/dwi/tractography/resampling/fixed_num_points.h
index 64f6184ee8..2a019fc52e 100644
--- a/src/dwi/tractography/resampling/fixed_num_points.h
+++ b/src/dwi/tractography/resampling/fixed_num_points.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/fixed_step_size.cpp b/src/dwi/tractography/resampling/fixed_step_size.cpp
index a562d3a4fe..c3562e76d4 100644
--- a/src/dwi/tractography/resampling/fixed_step_size.cpp
+++ b/src/dwi/tractography/resampling/fixed_step_size.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/fixed_step_size.h b/src/dwi/tractography/resampling/fixed_step_size.h
index ea7f408477..8a6e23cc99 100644
--- a/src/dwi/tractography/resampling/fixed_step_size.h
+++ b/src/dwi/tractography/resampling/fixed_step_size.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/resampling.cpp b/src/dwi/tractography/resampling/resampling.cpp
index 96efbe6660..0d2badde3a 100644
--- a/src/dwi/tractography/resampling/resampling.cpp
+++ b/src/dwi/tractography/resampling/resampling.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/resampling.h b/src/dwi/tractography/resampling/resampling.h
index 418986dc3b..0c4b218cb7 100644
--- a/src/dwi/tractography/resampling/resampling.h
+++ b/src/dwi/tractography/resampling/resampling.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/upsampler.cpp b/src/dwi/tractography/resampling/upsampler.cpp
index b68e7f1ded..4335fb008e 100644
--- a/src/dwi/tractography/resampling/upsampler.cpp
+++ b/src/dwi/tractography/resampling/upsampler.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/resampling/upsampler.h b/src/dwi/tractography/resampling/upsampler.h
index 35cbb74908..233b27dd74 100644
--- a/src/dwi/tractography/resampling/upsampler.h
+++ b/src/dwi/tractography/resampling/upsampler.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/rng.cpp b/src/dwi/tractography/rng.cpp
index 8cc5dd8a67..29fe957531 100644
--- a/src/dwi/tractography/rng.cpp
+++ b/src/dwi/tractography/rng.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/rng.h b/src/dwi/tractography/rng.h
index a63a7925b9..488d2d27e0 100644
--- a/src/dwi/tractography/rng.h
+++ b/src/dwi/tractography/rng.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/roi.cpp b/src/dwi/tractography/roi.cpp
index 54c0d20567..0d0a37f053 100644
--- a/src/dwi/tractography/roi.cpp
+++ b/src/dwi/tractography/roi.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/roi.h b/src/dwi/tractography/roi.h
index 98fd5ac399..9aac867a89 100644
--- a/src/dwi/tractography/roi.h
+++ b/src/dwi/tractography/roi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/scalar_file.h b/src/dwi/tractography/scalar_file.h
index 3f7184cdb2..263dc3d1fe 100644
--- a/src/dwi/tractography/scalar_file.h
+++ b/src/dwi/tractography/scalar_file.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/base.h b/src/dwi/tractography/seeding/base.h
index f32bffafe5..4a69493c2a 100644
--- a/src/dwi/tractography/seeding/base.h
+++ b/src/dwi/tractography/seeding/base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/basic.cpp b/src/dwi/tractography/seeding/basic.cpp
index 66fc2816b4..cfd7644307 100644
--- a/src/dwi/tractography/seeding/basic.cpp
+++ b/src/dwi/tractography/seeding/basic.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/basic.h b/src/dwi/tractography/seeding/basic.h
index e950f7ed98..4bef8ac190 100644
--- a/src/dwi/tractography/seeding/basic.h
+++ b/src/dwi/tractography/seeding/basic.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/dynamic.cpp b/src/dwi/tractography/seeding/dynamic.cpp
index 069932ca8c..d7f54897c9 100644
--- a/src/dwi/tractography/seeding/dynamic.cpp
+++ b/src/dwi/tractography/seeding/dynamic.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/dynamic.h b/src/dwi/tractography/seeding/dynamic.h
index 1b7809a65f..77b1653340 100644
--- a/src/dwi/tractography/seeding/dynamic.h
+++ b/src/dwi/tractography/seeding/dynamic.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/gmwmi.cpp b/src/dwi/tractography/seeding/gmwmi.cpp
index 75ec1a2432..a6b925e74e 100644
--- a/src/dwi/tractography/seeding/gmwmi.cpp
+++ b/src/dwi/tractography/seeding/gmwmi.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/gmwmi.h b/src/dwi/tractography/seeding/gmwmi.h
index 7142a7948e..d36be2e59a 100644
--- a/src/dwi/tractography/seeding/gmwmi.h
+++ b/src/dwi/tractography/seeding/gmwmi.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/list.cpp b/src/dwi/tractography/seeding/list.cpp
index 8827962e45..d4bc7797f8 100644
--- a/src/dwi/tractography/seeding/list.cpp
+++ b/src/dwi/tractography/seeding/list.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/list.h b/src/dwi/tractography/seeding/list.h
index ba8d40f630..8a11865536 100644
--- a/src/dwi/tractography/seeding/list.h
+++ b/src/dwi/tractography/seeding/list.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/seeding.cpp b/src/dwi/tractography/seeding/seeding.cpp
index a509282897..e18d641520 100644
--- a/src/dwi/tractography/seeding/seeding.cpp
+++ b/src/dwi/tractography/seeding/seeding.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/seeding/seeding.h b/src/dwi/tractography/seeding/seeding.h
index cf10b81585..71d6091531 100644
--- a/src/dwi/tractography/seeding/seeding.h
+++ b/src/dwi/tractography/seeding/seeding.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/streamline.h b/src/dwi/tractography/streamline.h
index 55c1eb1fbd..77be625d84 100644
--- a/src/dwi/tractography/streamline.h
+++ b/src/dwi/tractography/streamline.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/early_exit.cpp b/src/dwi/tractography/tracking/early_exit.cpp
index b61ac69e01..67500aac57 100644
--- a/src/dwi/tractography/tracking/early_exit.cpp
+++ b/src/dwi/tractography/tracking/early_exit.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/early_exit.h b/src/dwi/tractography/tracking/early_exit.h
index fb74c65a7a..7d48c7b919 100644
--- a/src/dwi/tractography/tracking/early_exit.h
+++ b/src/dwi/tractography/tracking/early_exit.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/exec.h b/src/dwi/tractography/tracking/exec.h
index 6f127f5b32..60af4c4f7b 100644
--- a/src/dwi/tractography/tracking/exec.h
+++ b/src/dwi/tractography/tracking/exec.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/generated_track.h b/src/dwi/tractography/tracking/generated_track.h
index 18c5a438ab..76167f93aa 100644
--- a/src/dwi/tractography/tracking/generated_track.h
+++ b/src/dwi/tractography/tracking/generated_track.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/method.cpp b/src/dwi/tractography/tracking/method.cpp
index 3f126ccddd..1946e1942d 100644
--- a/src/dwi/tractography/tracking/method.cpp
+++ b/src/dwi/tractography/tracking/method.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/method.h b/src/dwi/tractography/tracking/method.h
index dc88b14c4c..da487724b5 100644
--- a/src/dwi/tractography/tracking/method.h
+++ b/src/dwi/tractography/tracking/method.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/shared.cpp b/src/dwi/tractography/tracking/shared.cpp
index f9db2c7e96..94dfb74e0d 100644
--- a/src/dwi/tractography/tracking/shared.cpp
+++ b/src/dwi/tractography/tracking/shared.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/shared.h b/src/dwi/tractography/tracking/shared.h
index 4040db1eff..1647a8d5a3 100644
--- a/src/dwi/tractography/tracking/shared.h
+++ b/src/dwi/tractography/tracking/shared.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/tractography.cpp b/src/dwi/tractography/tracking/tractography.cpp
index 7836532223..e073435895 100644
--- a/src/dwi/tractography/tracking/tractography.cpp
+++ b/src/dwi/tractography/tracking/tractography.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/tractography.h b/src/dwi/tractography/tracking/tractography.h
index c2378661b4..71ba75872f 100644
--- a/src/dwi/tractography/tracking/tractography.h
+++ b/src/dwi/tractography/tracking/tractography.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/types.h b/src/dwi/tractography/tracking/types.h
index 8ed5f9a634..bf39052e86 100644
--- a/src/dwi/tractography/tracking/types.h
+++ b/src/dwi/tractography/tracking/types.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/write_kernel.cpp b/src/dwi/tractography/tracking/write_kernel.cpp
index 3578146bed..3b87f7ab35 100644
--- a/src/dwi/tractography/tracking/write_kernel.cpp
+++ b/src/dwi/tractography/tracking/write_kernel.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/tracking/write_kernel.h b/src/dwi/tractography/tracking/write_kernel.h
index 91a043f5c4..b4f618056f 100644
--- a/src/dwi/tractography/tracking/write_kernel.h
+++ b/src/dwi/tractography/tracking/write_kernel.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/weights.cpp b/src/dwi/tractography/weights.cpp
index 050a28a169..df8cc249f6 100644
--- a/src/dwi/tractography/weights.cpp
+++ b/src/dwi/tractography/weights.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/dwi/tractography/weights.h b/src/dwi/tractography/weights.h
index b8ead44c5f..59f1b0c664 100644
--- a/src/dwi/tractography/weights.h
+++ b/src/dwi/tractography/weights.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/exec_version.h b/src/exec_version.h
index 65e6929899..d46c3b93fc 100644
--- a/src/exec_version.h
+++ b/src/exec_version.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/fixel/filter/base.h b/src/fixel/filter/base.h
index bd898e6f12..9202e04d1a 100644
--- a/src/fixel/filter/base.h
+++ b/src/fixel/filter/base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/fixel/filter/connect.cpp b/src/fixel/filter/connect.cpp
index d3acbfd76d..ced6563850 100644
--- a/src/fixel/filter/connect.cpp
+++ b/src/fixel/filter/connect.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/fixel/filter/connect.h b/src/fixel/filter/connect.h
index c863d60ea7..db0c530a8c 100644
--- a/src/fixel/filter/connect.h
+++ b/src/fixel/filter/connect.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
diff --git a/src/fixel/filter/smooth.cpp b/src/fixel/filter/smooth.cpp
index 9c9551f889..f008f7fa32 100644
--- a/src/fixel/filter/smooth.cpp
+++ b/src/fixel/filter/smooth.cpp
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2021 the MRtrix3 contributors.
+/* Copyright (c) 2008-2022 the MRtrix3 contributors.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -46,7 +46,7 @@ namespace MR
fixel_positions.resize (matrix.size());
const Transform transform (index_image);
for (auto i = Loop (index_image, 0, 3) (index_image); i; ++i) {
- const Eigen::Vector3 vox ((default_type)index_image.index(0), (default_type)index_image.index(1), (default_type)index_image.index(2));
+ const Eigen::Vector3d vox ((default_type)index_image.index(0), (default_type)index_image.index(1), (default_type)index_image.index(2));
const Eigen::Vector3f scanner = (transform.voxel2scanner * vox).cast