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(); index_image.index(3) = 0; const index_type count = index_image.value(); diff --git a/src/fixel/filter/smooth.h b/src/fixel/filter/smooth.h index 6d60ffe11a..394a951160 100644 --- a/src/fixel/filter/smooth.h +++ b/src/fixel/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/src/fixel/index_remapper.cpp b/src/fixel/index_remapper.cpp index 2a0d8a9f7a..aba42e79d2 100644 --- a/src/fixel/index_remapper.cpp +++ b/src/fixel/index_remapper.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/index_remapper.h b/src/fixel/index_remapper.h index 610fc31965..6b839157fb 100644 --- a/src/fixel/index_remapper.h +++ b/src/fixel/index_remapper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/matrix.cpp b/src/fixel/matrix.cpp index ecf76fe1da..f1a19524cd 100644 --- a/src/fixel/matrix.cpp +++ b/src/fixel/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 @@ -147,7 +147,7 @@ namespace MR bool operator() (const DWI::Tractography::Streamline<>& tck, vector& out) const { - using direction_type = Eigen::Vector3; + using direction_type = Eigen::Vector3d; using SetVoxelDir = DWI::Tractography::Mapping::SetVoxelDir; SetVoxelDir in; diff --git a/src/fixel/matrix.h b/src/fixel/matrix.h index 26737404a2..49ea072668 100644 --- a/src/fixel/matrix.h +++ b/src/fixel/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/gui/color_button.cpp b/src/gui/color_button.cpp index da1cbafe42..27b86d8f6b 100644 --- a/src/gui/color_button.cpp +++ b/src/gui/color_button.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/color_button.h b/src/gui/color_button.h index 909707b264..fe2549b626 100644 --- a/src/gui/color_button.h +++ b/src/gui/color_button.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/crosshair.cpp b/src/gui/crosshair.cpp index 20344a6b61..88f6872c71 100644 --- a/src/gui/crosshair.cpp +++ b/src/gui/crosshair.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/crosshair.h b/src/gui/crosshair.h index d7ed43051d..186d744dcf 100644 --- a/src/gui/crosshair.h +++ b/src/gui/crosshair.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/cursor.cpp b/src/gui/cursor.cpp index 1f20a7e4e5..544f9a123e 100644 --- a/src/gui/cursor.cpp +++ b/src/gui/cursor.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/cursor.h b/src/gui/cursor.h index 1d3a3ddf2e..b400a6959b 100644 --- a/src/gui/cursor.h +++ b/src/gui/cursor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dialog/dialog.cpp b/src/gui/dialog/dialog.cpp index 0f743091b9..98c2c106ad 100644 --- a/src/gui/dialog/dialog.cpp +++ b/src/gui/dialog/dialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dialog/dialog.h b/src/gui/dialog/dialog.h index 44f71444e7..eda7c5aae8 100644 --- a/src/gui/dialog/dialog.h +++ b/src/gui/dialog/dialog.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dialog/dicom.cpp b/src/gui/dialog/dicom.cpp index 3236a6e5a0..aa850040cf 100644 --- a/src/gui/dialog/dicom.cpp +++ b/src/gui/dialog/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/src/gui/dialog/dicom.h b/src/gui/dialog/dicom.h index 9dcb3a3507..417a864118 100644 --- a/src/gui/dialog/dicom.h +++ b/src/gui/dialog/dicom.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dialog/file.cpp b/src/gui/dialog/file.cpp index 4232d9a94c..43d3c04bb8 100644 --- a/src/gui/dialog/file.cpp +++ b/src/gui/dialog/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/gui/dialog/file.h b/src/gui/dialog/file.h index d97139d007..aa8d1d1210 100644 --- a/src/gui/dialog/file.h +++ b/src/gui/dialog/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/gui/dialog/image_properties.cpp b/src/gui/dialog/image_properties.cpp index 88a4302837..227e850ffc 100644 --- a/src/gui/dialog/image_properties.cpp +++ b/src/gui/dialog/image_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/gui/dialog/image_properties.h b/src/gui/dialog/image_properties.h index 26ee20e613..9e51d0fa67 100644 --- a/src/gui/dialog/image_properties.h +++ b/src/gui/dialog/image_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/gui/dialog/list.cpp b/src/gui/dialog/list.cpp index 328b71be62..5ba5124dc9 100644 --- a/src/gui/dialog/list.cpp +++ b/src/gui/dialog/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/gui/dialog/list.h b/src/gui/dialog/list.h index bb2a089d38..45cab6847f 100644 --- a/src/gui/dialog/list.h +++ b/src/gui/dialog/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/gui/dialog/opengl.cpp b/src/gui/dialog/opengl.cpp index 6c3eba480d..ad12c4f642 100644 --- a/src/gui/dialog/opengl.cpp +++ b/src/gui/dialog/opengl.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dialog/opengl.h b/src/gui/dialog/opengl.h index 44524d6de8..787ee2ba30 100644 --- a/src/gui/dialog/opengl.h +++ b/src/gui/dialog/opengl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dialog/progress.cpp b/src/gui/dialog/progress.cpp index f40df2b516..58477099c8 100644 --- a/src/gui/dialog/progress.cpp +++ b/src/gui/dialog/progress.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dialog/progress.h b/src/gui/dialog/progress.h index 9ccec31969..c0452ca8aa 100644 --- a/src/gui/dialog/progress.h +++ b/src/gui/dialog/progress.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dialog/report_exception.cpp b/src/gui/dialog/report_exception.cpp index 5257f1d6ed..5fbe109301 100644 --- a/src/gui/dialog/report_exception.cpp +++ b/src/gui/dialog/report_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/src/gui/dialog/report_exception.h b/src/gui/dialog/report_exception.h index febcd31bff..338e8aa6ac 100644 --- a/src/gui/dialog/report_exception.h +++ b/src/gui/dialog/report_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/src/gui/dwi/render_frame.cpp b/src/gui/dwi/render_frame.cpp index f3f31a15d6..43a1f44c78 100644 --- a/src/gui/dwi/render_frame.cpp +++ b/src/gui/dwi/render_frame.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dwi/render_frame.h b/src/gui/dwi/render_frame.h index 5f8b368c73..4e705f80b8 100644 --- a/src/gui/dwi/render_frame.h +++ b/src/gui/dwi/render_frame.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/dwi/renderer.cpp b/src/gui/dwi/renderer.cpp index dd52a35cea..3ed87f64a5 100644 --- a/src/gui/dwi/renderer.cpp +++ b/src/gui/dwi/renderer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -623,14 +623,14 @@ namespace MR if (I == i) { // Invert a direction if required - std::array d {{ dirs[i], dirs[j], dirs[k] }}; - const Eigen::Vector3 mean_dir ((d[0]+d[1]+d[2]).normalized()); + std::array d {{ dirs[i], dirs[j], dirs[k] }}; + const Eigen::Vector3d mean_dir ((d[0]+d[1]+d[2]).normalized()); for (size_t v = 0; v != 3; ++v) { if (d[v].dot (mean_dir) < 0.0) d[v] = -d[v]; } // Conform to right hand rule - const Eigen::Vector3 normal (((d[1]-d[0]).cross (d[2]-d[1])).normalized()); + const Eigen::Vector3d normal (((d[1]-d[0]).cross (d[2]-d[1])).normalized()); if (normal.dot (mean_dir) < 0.0) indices_data.push_back ( {{GLint(i), GLint(k), GLint(j)}} ); else diff --git a/src/gui/dwi/renderer.h b/src/gui/dwi/renderer.h index e5bb071a7c..ea2a1f47de 100644 --- a/src/gui/dwi/renderer.h +++ b/src/gui/dwi/renderer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/gui.cpp b/src/gui/gui.cpp index 4fbfe0b5eb..f2acbba438 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/gui.h b/src/gui/gui.h index 89109c7951..a5a9e780e8 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/lighting_dock.cpp b/src/gui/lighting_dock.cpp index 7a19749e9a..311aa5328c 100644 --- a/src/gui/lighting_dock.cpp +++ b/src/gui/lighting_dock.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/lighting_dock.h b/src/gui/lighting_dock.h index 99d0edfb1c..b882a97921 100644 --- a/src/gui/lighting_dock.h +++ b/src/gui/lighting_dock.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/adjust_button.cpp b/src/gui/mrview/adjust_button.cpp index 0131c97679..b253e6fe3c 100644 --- a/src/gui/mrview/adjust_button.cpp +++ b/src/gui/mrview/adjust_button.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/adjust_button.h b/src/gui/mrview/adjust_button.h index 733cc19b63..c479f97b55 100644 --- a/src/gui/mrview/adjust_button.h +++ b/src/gui/mrview/adjust_button.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/colourbars.cpp b/src/gui/mrview/colourbars.cpp index ce2b1c5bff..edf9afa441 100644 --- a/src/gui/mrview/colourbars.cpp +++ b/src/gui/mrview/colourbars.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/colourbars.h b/src/gui/mrview/colourbars.h index aaa061fb8e..0da176a606 100644 --- a/src/gui/mrview/colourbars.h +++ b/src/gui/mrview/colourbars.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/colourmap_button.cpp b/src/gui/mrview/colourmap_button.cpp index 5df4327b46..523e28b023 100644 --- a/src/gui/mrview/colourmap_button.cpp +++ b/src/gui/mrview/colourmap_button.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/colourmap_button.h b/src/gui/mrview/colourmap_button.h index 48a72e085a..4f5e8bdda5 100644 --- a/src/gui/mrview/colourmap_button.h +++ b/src/gui/mrview/colourmap_button.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/colourmap_menu.cpp b/src/gui/mrview/colourmap_menu.cpp index 6443fc2948..4cf3f53b42 100644 --- a/src/gui/mrview/colourmap_menu.cpp +++ b/src/gui/mrview/colourmap_menu.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/colourmap_menu.h b/src/gui/mrview/colourmap_menu.h index b0443a9a15..a8fede392f 100644 --- a/src/gui/mrview/colourmap_menu.h +++ b/src/gui/mrview/colourmap_menu.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/combo_box_error.cpp b/src/gui/mrview/combo_box_error.cpp index 0fe727a6e2..929ff84e66 100644 --- a/src/gui/mrview/combo_box_error.cpp +++ b/src/gui/mrview/combo_box_error.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/combo_box_error.h b/src/gui/mrview/combo_box_error.h index 99f9467aa7..f693c27d71 100644 --- a/src/gui/mrview/combo_box_error.h +++ b/src/gui/mrview/combo_box_error.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/displayable.cpp b/src/gui/mrview/displayable.cpp index fccc144ede..c9defa4dec 100644 --- a/src/gui/mrview/displayable.cpp +++ b/src/gui/mrview/displayable.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/displayable.h b/src/gui/mrview/displayable.h index f297113507..81565a2099 100644 --- a/src/gui/mrview/displayable.h +++ b/src/gui/mrview/displayable.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/file_open.cpp b/src/gui/mrview/file_open.cpp index 78b6062425..1279e6603f 100644 --- a/src/gui/mrview/file_open.cpp +++ b/src/gui/mrview/file_open.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/file_open.h b/src/gui/mrview/file_open.h index 999b77e154..6d68fd9488 100644 --- a/src/gui/mrview/file_open.h +++ b/src/gui/mrview/file_open.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/gui_image.cpp b/src/gui/mrview/gui_image.cpp index 8e45584632..f03eafadf8 100644 --- a/src/gui/mrview/gui_image.cpp +++ b/src/gui/mrview/gui_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 diff --git a/src/gui/mrview/gui_image.h b/src/gui/mrview/gui_image.h index 12d8b1cd83..7b7dab7dca 100644 --- a/src/gui/mrview/gui_image.h +++ b/src/gui/mrview/gui_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/src/gui/mrview/icons.h b/src/gui/mrview/icons.h index 0ba1536297..0946a4f599 100644 --- a/src/gui/mrview/icons.h +++ b/src/gui/mrview/icons.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/base.cpp b/src/gui/mrview/mode/base.cpp index 07a7e41b79..bb1224b1a2 100644 --- a/src/gui/mrview/mode/base.cpp +++ b/src/gui/mrview/mode/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/src/gui/mrview/mode/base.h b/src/gui/mrview/mode/base.h index 1a9801a418..5acbe31b4c 100644 --- a/src/gui/mrview/mode/base.h +++ b/src/gui/mrview/mode/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/gui/mrview/mode/lightbox.cpp b/src/gui/mrview/mode/lightbox.cpp index b7f9531497..4a64a6b643 100644 --- a/src/gui/mrview/mode/lightbox.cpp +++ b/src/gui/mrview/mode/lightbox.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/lightbox.h b/src/gui/mrview/mode/lightbox.h index 377d67177e..4816e727ea 100644 --- a/src/gui/mrview/mode/lightbox.h +++ b/src/gui/mrview/mode/lightbox.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/lightbox_gui.h b/src/gui/mrview/mode/lightbox_gui.h index 0685ea55cd..b294eb9805 100644 --- a/src/gui/mrview/mode/lightbox_gui.h +++ b/src/gui/mrview/mode/lightbox_gui.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/list.h b/src/gui/mrview/mode/list.h index 76e01ae607..461a565636 100644 --- a/src/gui/mrview/mode/list.h +++ b/src/gui/mrview/mode/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/gui/mrview/mode/ortho.cpp b/src/gui/mrview/mode/ortho.cpp index 97b73d7ee5..9e13c2fdbc 100644 --- a/src/gui/mrview/mode/ortho.cpp +++ b/src/gui/mrview/mode/ortho.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/ortho.h b/src/gui/mrview/mode/ortho.h index 4310a750e9..fb99090c8f 100644 --- a/src/gui/mrview/mode/ortho.h +++ b/src/gui/mrview/mode/ortho.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/slice.cpp b/src/gui/mrview/mode/slice.cpp index 27bb0c3ecf..7c8e251ce9 100644 --- a/src/gui/mrview/mode/slice.cpp +++ b/src/gui/mrview/mode/slice.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/slice.h b/src/gui/mrview/mode/slice.h index 0a97d2a154..17a3e99b4a 100644 --- a/src/gui/mrview/mode/slice.h +++ b/src/gui/mrview/mode/slice.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/volume.cpp b/src/gui/mrview/mode/volume.cpp index 48f002cb91..2a3ae660c1 100644 --- a/src/gui/mrview/mode/volume.cpp +++ b/src/gui/mrview/mode/volume.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/mode/volume.h b/src/gui/mrview/mode/volume.h index 33df2615fa..e7ac9f7406 100644 --- a/src/gui/mrview/mode/volume.h +++ b/src/gui/mrview/mode/volume.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/spin_box.h b/src/gui/mrview/spin_box.h index 5a43a7557e..f4176126e5 100644 --- a/src/gui/mrview/spin_box.h +++ b/src/gui/mrview/spin_box.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/client.cpp b/src/gui/mrview/sync/client.cpp index 5d79b8629f..bd86e9d99f 100644 --- a/src/gui/mrview/sync/client.cpp +++ b/src/gui/mrview/sync/client.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/client.h b/src/gui/mrview/sync/client.h index 12d24dd051..32f8119d54 100644 --- a/src/gui/mrview/sync/client.h +++ b/src/gui/mrview/sync/client.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/enums.h b/src/gui/mrview/sync/enums.h index 097608cf4e..854b2ea75d 100644 --- a/src/gui/mrview/sync/enums.h +++ b/src/gui/mrview/sync/enums.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/interprocesscommunicator.cpp b/src/gui/mrview/sync/interprocesscommunicator.cpp index 5cb59c7c16..fd10251a4c 100644 --- a/src/gui/mrview/sync/interprocesscommunicator.cpp +++ b/src/gui/mrview/sync/interprocesscommunicator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/interprocesscommunicator.h b/src/gui/mrview/sync/interprocesscommunicator.h index 3432c83c35..17376b89fa 100644 --- a/src/gui/mrview/sync/interprocesscommunicator.h +++ b/src/gui/mrview/sync/interprocesscommunicator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/localsocketreader.cpp b/src/gui/mrview/sync/localsocketreader.cpp index 01be84e35d..5061886d3c 100644 --- a/src/gui/mrview/sync/localsocketreader.cpp +++ b/src/gui/mrview/sync/localsocketreader.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/localsocketreader.h b/src/gui/mrview/sync/localsocketreader.h index 42ed3182a9..79adbb161c 100644 --- a/src/gui/mrview/sync/localsocketreader.h +++ b/src/gui/mrview/sync/localsocketreader.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/processlock.cpp b/src/gui/mrview/sync/processlock.cpp index 09c85407b6..68766b207d 100644 --- a/src/gui/mrview/sync/processlock.cpp +++ b/src/gui/mrview/sync/processlock.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/processlock.h b/src/gui/mrview/sync/processlock.h index bebeba0d8f..851fb7d199 100644 --- a/src/gui/mrview/sync/processlock.h +++ b/src/gui/mrview/sync/processlock.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/syncmanager.cpp b/src/gui/mrview/sync/syncmanager.cpp index a7dffe2597..c263d2b158 100644 --- a/src/gui/mrview/sync/syncmanager.cpp +++ b/src/gui/mrview/sync/syncmanager.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/sync/syncmanager.h b/src/gui/mrview/sync/syncmanager.h index ea05db95c7..afb41306a1 100644 --- a/src/gui/mrview/sync/syncmanager.h +++ b/src/gui/mrview/sync/syncmanager.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/base.cpp b/src/gui/mrview/tool/base.cpp index 4be5ef5d35..1c6fef7b48 100644 --- a/src/gui/mrview/tool/base.cpp +++ b/src/gui/mrview/tool/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/src/gui/mrview/tool/base.h b/src/gui/mrview/tool/base.h index 3e1f17d050..5e9864bcaa 100644 --- a/src/gui/mrview/tool/base.h +++ b/src/gui/mrview/tool/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/gui/mrview/tool/connectome/colourmap_observers.cpp b/src/gui/mrview/tool/connectome/colourmap_observers.cpp index d5049c8b49..34faeb76da 100644 --- a/src/gui/mrview/tool/connectome/colourmap_observers.cpp +++ b/src/gui/mrview/tool/connectome/colourmap_observers.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/colourmap_observers.h b/src/gui/mrview/tool/connectome/colourmap_observers.h index 37b5f163b2..cb902302f1 100644 --- a/src/gui/mrview/tool/connectome/colourmap_observers.h +++ b/src/gui/mrview/tool/connectome/colourmap_observers.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/connectome.cpp b/src/gui/mrview/tool/connectome/connectome.cpp index 7d51dbe20b..7f45d6981c 100644 --- a/src/gui/mrview/tool/connectome/connectome.cpp +++ b/src/gui/mrview/tool/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 @@ -2485,7 +2485,8 @@ namespace MR std::map node_ordering; for (size_t i = 1; i <= num_nodes(); ++i) - node_ordering.insert (std::make_pair (projection.depth_of (nodes[i].get_com()), i)); + if (nodes[i].get_volume() > 0) + node_ordering.insert (std::make_pair (projection.depth_of (nodes[i].get_com()), i)); for (auto it = node_ordering.rbegin(); it != node_ordering.rend(); ++it) { const Node& node (nodes[it->second]); @@ -3692,7 +3693,7 @@ namespace MR fade = node_selection_settings.get_edge_associated_colour_fade(); colour = node_selection_settings.get_edge_associated_colour(); } - if (selected_nodes[edge.get_node_index (0)] & selected_nodes[edge.get_node_index (1)]) { + if (selected_nodes[edge.get_node_index (0)] && selected_nodes[edge.get_node_index (1)]) { fade = node_selection_settings.get_edge_selected_colour_fade(); colour = node_selection_settings.get_edge_selected_colour(); } @@ -3705,7 +3706,7 @@ namespace MR float multiplier = node_selection_settings.get_edge_other_size_multiplier(); if (selected_nodes[edge.get_node_index (0)] || selected_nodes[edge.get_node_index (1)]) multiplier = node_selection_settings.get_edge_associated_size_multiplier(); - if (selected_nodes[edge.get_node_index (0)] & selected_nodes[edge.get_node_index (1)]) + if (selected_nodes[edge.get_node_index (0)] && selected_nodes[edge.get_node_index (1)]) multiplier = node_selection_settings.get_edge_selected_size_multiplier(); return (multiplier * edge.get_size()); } @@ -3716,7 +3717,7 @@ namespace MR float multiplier = node_selection_settings.get_edge_other_alpha_multiplier(); if (selected_nodes[edge.get_node_index (0)] || selected_nodes[edge.get_node_index (1)]) multiplier = node_selection_settings.get_edge_associated_alpha_multiplier(); - if (selected_nodes[edge.get_node_index (0)] & selected_nodes[edge.get_node_index (1)]) + if (selected_nodes[edge.get_node_index (0)] && selected_nodes[edge.get_node_index (1)]) multiplier = node_selection_settings.get_edge_selected_alpha_multiplier(); return (multiplier * edge.get_alpha()); } diff --git a/src/gui/mrview/tool/connectome/connectome.h b/src/gui/mrview/tool/connectome/connectome.h index fa0946a35a..55257db734 100644 --- a/src/gui/mrview/tool/connectome/connectome.h +++ b/src/gui/mrview/tool/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/gui/mrview/tool/connectome/edge.cpp b/src/gui/mrview/tool/connectome/edge.cpp index 4b36cdc23a..72f60bc772 100644 --- a/src/gui/mrview/tool/connectome/edge.cpp +++ b/src/gui/mrview/tool/connectome/edge.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/edge.h b/src/gui/mrview/tool/connectome/edge.h index 5ad0d36877..4e90d1cd2f 100644 --- a/src/gui/mrview/tool/connectome/edge.h +++ b/src/gui/mrview/tool/connectome/edge.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/file_data_vector.cpp b/src/gui/mrview/tool/connectome/file_data_vector.cpp index 1fd833a15e..27e67919d3 100644 --- a/src/gui/mrview/tool/connectome/file_data_vector.cpp +++ b/src/gui/mrview/tool/connectome/file_data_vector.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/file_data_vector.h b/src/gui/mrview/tool/connectome/file_data_vector.h index 5e9d0759a2..52854d4497 100644 --- a/src/gui/mrview/tool/connectome/file_data_vector.h +++ b/src/gui/mrview/tool/connectome/file_data_vector.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/matrix_list.cpp b/src/gui/mrview/tool/connectome/matrix_list.cpp index cb7e72db95..a82d7177e2 100644 --- a/src/gui/mrview/tool/connectome/matrix_list.cpp +++ b/src/gui/mrview/tool/connectome/matrix_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/gui/mrview/tool/connectome/matrix_list.h b/src/gui/mrview/tool/connectome/matrix_list.h index a2cd175ec0..14ded29244 100644 --- a/src/gui/mrview/tool/connectome/matrix_list.h +++ b/src/gui/mrview/tool/connectome/matrix_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/gui/mrview/tool/connectome/node.cpp b/src/gui/mrview/tool/connectome/node.cpp index e48717a1b5..cf83b56854 100644 --- a/src/gui/mrview/tool/connectome/node.cpp +++ b/src/gui/mrview/tool/connectome/node.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/node.h b/src/gui/mrview/tool/connectome/node.h index c5f4b5f59d..fe3d97f4d3 100644 --- a/src/gui/mrview/tool/connectome/node.h +++ b/src/gui/mrview/tool/connectome/node.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/node_list.cpp b/src/gui/mrview/tool/connectome/node_list.cpp index 4b9702a481..0e71a2fb82 100644 --- a/src/gui/mrview/tool/connectome/node_list.cpp +++ b/src/gui/mrview/tool/connectome/node_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/gui/mrview/tool/connectome/node_list.h b/src/gui/mrview/tool/connectome/node_list.h index 5761b46b25..7776eb6616 100644 --- a/src/gui/mrview/tool/connectome/node_list.h +++ b/src/gui/mrview/tool/connectome/node_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/gui/mrview/tool/connectome/node_overlay.cpp b/src/gui/mrview/tool/connectome/node_overlay.cpp index a0b0d00782..2f7ee79cc8 100644 --- a/src/gui/mrview/tool/connectome/node_overlay.cpp +++ b/src/gui/mrview/tool/connectome/node_overlay.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/node_overlay.h b/src/gui/mrview/tool/connectome/node_overlay.h index f8b48d67b8..9b087a1a3c 100644 --- a/src/gui/mrview/tool/connectome/node_overlay.h +++ b/src/gui/mrview/tool/connectome/node_overlay.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/selection.cpp b/src/gui/mrview/tool/connectome/selection.cpp index 7d03d46c24..9ac70661d7 100644 --- a/src/gui/mrview/tool/connectome/selection.cpp +++ b/src/gui/mrview/tool/connectome/selection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/selection.h b/src/gui/mrview/tool/connectome/selection.h index e465c7b5ad..ffb1b0cd6a 100644 --- a/src/gui/mrview/tool/connectome/selection.h +++ b/src/gui/mrview/tool/connectome/selection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/shaders.cpp b/src/gui/mrview/tool/connectome/shaders.cpp index 02e59846fe..ac5990f1bf 100644 --- a/src/gui/mrview/tool/connectome/shaders.cpp +++ b/src/gui/mrview/tool/connectome/shaders.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/shaders.h b/src/gui/mrview/tool/connectome/shaders.h index ef91f7f4e4..23ea58fb87 100644 --- a/src/gui/mrview/tool/connectome/shaders.h +++ b/src/gui/mrview/tool/connectome/shaders.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/connectome/types.h b/src/gui/mrview/tool/connectome/types.h index c3155d492a..3f369672cb 100644 --- a/src/gui/mrview/tool/connectome/types.h +++ b/src/gui/mrview/tool/connectome/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/gui/mrview/tool/fixel/base_fixel.cpp b/src/gui/mrview/tool/fixel/base_fixel.cpp index ca97f579b4..8a2781f274 100644 --- a/src/gui/mrview/tool/fixel/base_fixel.cpp +++ b/src/gui/mrview/tool/fixel/base_fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/fixel/base_fixel.h b/src/gui/mrview/tool/fixel/base_fixel.h index f4db3100b4..1b02e17d0e 100644 --- a/src/gui/mrview/tool/fixel/base_fixel.h +++ b/src/gui/mrview/tool/fixel/base_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/gui/mrview/tool/fixel/directory.cpp b/src/gui/mrview/tool/fixel/directory.cpp index a2bd179609..97f5469511 100644 --- a/src/gui/mrview/tool/fixel/directory.cpp +++ b/src/gui/mrview/tool/fixel/directory.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/fixel/directory.h b/src/gui/mrview/tool/fixel/directory.h index 3835809d3a..cb7ab1f60d 100644 --- a/src/gui/mrview/tool/fixel/directory.h +++ b/src/gui/mrview/tool/fixel/directory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/fixel/fixel.cpp b/src/gui/mrview/tool/fixel/fixel.cpp index f1e187915c..c5c1d794ab 100644 --- a/src/gui/mrview/tool/fixel/fixel.cpp +++ b/src/gui/mrview/tool/fixel/fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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,32 +48,41 @@ namespace MR size_t old_size = items.size(); for (size_t i = 0, N = filenames.size(); i < N; ++i) { BaseFixel* fixel_image(nullptr); - try - { - if(Path::has_suffix (filenames[i], {".msf", ".msh"})) - fixel_image = new Legacy (filenames[i], fixel_tool); - else - fixel_image = new Directory (filenames[i], fixel_tool); - } - catch (InvalidFixelDirectoryException &) { try { - fixel_image = new Image4D (filenames[i], fixel_tool); + if(Path::has_suffix (filenames[i], {".msf", ".msh"})) + fixel_image = new Legacy (filenames[i], fixel_tool); + else + fixel_image = new Directory (filenames[i], fixel_tool); } - catch (InvalidImageException& e) + catch (InvalidFixelDirectoryException& error) { - e.display(); - continue; + error.push_back("Couldn't open \"" + filenames[i] + "\" as a Directory fixel dataset"); + try + { + fixel_image = new Image4D (filenames[i], fixel_tool); + } + catch (InvalidImageException& e) + { + error.push_back(e); + error.push_back("Couldn't open \"" + filenames[i] + "\" as a 4D vector image"); + throw error; + } + } + catch(InvalidImageException& e) + { + e.push_back("Couldn't open \"" + filenames[i] + "\" as a Legacy fixel dataset"); + throw e; } } - catch(InvalidImageException& e) + catch(Exception& e) { + e.push_back("Error loading \"" + filenames[i] + "\" as a fixel dataset"); e.display(); continue; } - items.push_back (std::unique_ptr (fixel_image)); } diff --git a/src/gui/mrview/tool/fixel/fixel.h b/src/gui/mrview/tool/fixel/fixel.h index 50150446ed..d3fe8c3eba 100644 --- a/src/gui/mrview/tool/fixel/fixel.h +++ b/src/gui/mrview/tool/fixel/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/gui/mrview/tool/fixel/image4D.cpp b/src/gui/mrview/tool/fixel/image4D.cpp index 5fd5f0b03f..b6e894eddc 100644 --- a/src/gui/mrview/tool/fixel/image4D.cpp +++ b/src/gui/mrview/tool/fixel/image4D.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/fixel/image4D.h b/src/gui/mrview/tool/fixel/image4D.h index 22ac1caaca..0df7b58ee9 100644 --- a/src/gui/mrview/tool/fixel/image4D.h +++ b/src/gui/mrview/tool/fixel/image4D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/fixel/legacy.cpp b/src/gui/mrview/tool/fixel/legacy.cpp index 9f05114637..cebbbf252f 100644 --- a/src/gui/mrview/tool/fixel/legacy.cpp +++ b/src/gui/mrview/tool/fixel/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/src/gui/mrview/tool/fixel/legacy.h b/src/gui/mrview/tool/fixel/legacy.h index 6b286688cc..781d77573a 100644 --- a/src/gui/mrview/tool/fixel/legacy.h +++ b/src/gui/mrview/tool/fixel/legacy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/fixel/vector_structs.h b/src/gui/mrview/tool/fixel/vector_structs.h index 2c982f2c35..4457bbb2dd 100644 --- a/src/gui/mrview/tool/fixel/vector_structs.h +++ b/src/gui/mrview/tool/fixel/vector_structs.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/list.h b/src/gui/mrview/tool/list.h index e6237af28d..73cac65e03 100644 --- a/src/gui/mrview/tool/list.h +++ b/src/gui/mrview/tool/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/gui/mrview/tool/list_model_base.h b/src/gui/mrview/tool/list_model_base.h index 6e3e614dce..5bd32df81c 100644 --- a/src/gui/mrview/tool/list_model_base.h +++ b/src/gui/mrview/tool/list_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 diff --git a/src/gui/mrview/tool/odf/item.cpp b/src/gui/mrview/tool/odf/item.cpp index 022a47d32b..04c1cee0f7 100644 --- a/src/gui/mrview/tool/odf/item.cpp +++ b/src/gui/mrview/tool/odf/item.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/odf/item.h b/src/gui/mrview/tool/odf/item.h index d99a91c6d2..4b28fb809a 100644 --- a/src/gui/mrview/tool/odf/item.h +++ b/src/gui/mrview/tool/odf/item.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/odf/model.cpp b/src/gui/mrview/tool/odf/model.cpp index 468b486aec..9893225fb9 100644 --- a/src/gui/mrview/tool/odf/model.cpp +++ b/src/gui/mrview/tool/odf/model.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/odf/model.h b/src/gui/mrview/tool/odf/model.h index 4a7ad661a7..44c50b835a 100644 --- a/src/gui/mrview/tool/odf/model.h +++ b/src/gui/mrview/tool/odf/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 diff --git a/src/gui/mrview/tool/odf/odf.cpp b/src/gui/mrview/tool/odf/odf.cpp index 5ee184e77d..ce12aa9c74 100644 --- a/src/gui/mrview/tool/odf/odf.cpp +++ b/src/gui/mrview/tool/odf/odf.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -131,7 +131,7 @@ namespace MR lmax_label->setAlignment (Qt::AlignHCenter); box_layout->addWidget (lmax_label, 0, 2); lmax_selector = new SpinBox (this); - lmax_selector->setMinimum (2); + lmax_selector->setMinimum (0); lmax_selector->setMaximum (16); lmax_selector->setSingleStep (2); lmax_selector->setValue (8); diff --git a/src/gui/mrview/tool/odf/odf.h b/src/gui/mrview/tool/odf/odf.h index 4581f2c23f..bcd0943c10 100644 --- a/src/gui/mrview/tool/odf/odf.h +++ b/src/gui/mrview/tool/odf/odf.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/odf/preview.cpp b/src/gui/mrview/tool/odf/preview.cpp index 1b1f8cff46..b5f6dd6dde 100644 --- a/src/gui/mrview/tool/odf/preview.cpp +++ b/src/gui/mrview/tool/odf/preview.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/odf/preview.h b/src/gui/mrview/tool/odf/preview.h index 2564379d7a..72b66b0030 100644 --- a/src/gui/mrview/tool/odf/preview.h +++ b/src/gui/mrview/tool/odf/preview.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/odf/type.h b/src/gui/mrview/tool/odf/type.h index 10661d263d..2a43a7cb65 100644 --- a/src/gui/mrview/tool/odf/type.h +++ b/src/gui/mrview/tool/odf/type.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/overlay.cpp b/src/gui/mrview/tool/overlay.cpp index 4f59f57e9a..f9250f2ac2 100644 --- a/src/gui/mrview/tool/overlay.cpp +++ b/src/gui/mrview/tool/overlay.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/overlay.h b/src/gui/mrview/tool/overlay.h index e3290669c1..b6bd70b128 100644 --- a/src/gui/mrview/tool/overlay.h +++ b/src/gui/mrview/tool/overlay.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/roi_editor/item.cpp b/src/gui/mrview/tool/roi_editor/item.cpp index e6e97fa7ad..168ef430d5 100644 --- a/src/gui/mrview/tool/roi_editor/item.cpp +++ b/src/gui/mrview/tool/roi_editor/item.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/roi_editor/item.h b/src/gui/mrview/tool/roi_editor/item.h index a4cac7e735..2e32e942df 100644 --- a/src/gui/mrview/tool/roi_editor/item.h +++ b/src/gui/mrview/tool/roi_editor/item.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/roi_editor/model.cpp b/src/gui/mrview/tool/roi_editor/model.cpp index 5039ec97a2..289b1c4d5e 100644 --- a/src/gui/mrview/tool/roi_editor/model.cpp +++ b/src/gui/mrview/tool/roi_editor/model.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/roi_editor/model.h b/src/gui/mrview/tool/roi_editor/model.h index 33600391e9..298db439e4 100644 --- a/src/gui/mrview/tool/roi_editor/model.h +++ b/src/gui/mrview/tool/roi_editor/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 diff --git a/src/gui/mrview/tool/roi_editor/roi.cpp b/src/gui/mrview/tool/roi_editor/roi.cpp index 1cb5a12f72..f7517220bc 100644 --- a/src/gui/mrview/tool/roi_editor/roi.cpp +++ b/src/gui/mrview/tool/roi_editor/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/gui/mrview/tool/roi_editor/roi.h b/src/gui/mrview/tool/roi_editor/roi.h index b85d74a79e..09366f654d 100644 --- a/src/gui/mrview/tool/roi_editor/roi.h +++ b/src/gui/mrview/tool/roi_editor/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/gui/mrview/tool/roi_editor/undoentry.cpp b/src/gui/mrview/tool/roi_editor/undoentry.cpp index c7f6fe9dc2..033d99503e 100644 --- a/src/gui/mrview/tool/roi_editor/undoentry.cpp +++ b/src/gui/mrview/tool/roi_editor/undoentry.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/roi_editor/undoentry.h b/src/gui/mrview/tool/roi_editor/undoentry.h index 12bb2b9c06..252140469a 100644 --- a/src/gui/mrview/tool/roi_editor/undoentry.h +++ b/src/gui/mrview/tool/roi_editor/undoentry.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/screen_capture.cpp b/src/gui/mrview/tool/screen_capture.cpp index 91b4d0bf9a..7a0e87ace4 100644 --- a/src/gui/mrview/tool/screen_capture.cpp +++ b/src/gui/mrview/tool/screen_capture.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/screen_capture.h b/src/gui/mrview/tool/screen_capture.h index 95bfea6431..0176cf482e 100644 --- a/src/gui/mrview/tool/screen_capture.h +++ b/src/gui/mrview/tool/screen_capture.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/tractography/track_scalar_file.cpp b/src/gui/mrview/tool/tractography/track_scalar_file.cpp index 1657aaae29..b0d496fb8d 100644 --- a/src/gui/mrview/tool/tractography/track_scalar_file.cpp +++ b/src/gui/mrview/tool/tractography/track_scalar_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/gui/mrview/tool/tractography/track_scalar_file.h b/src/gui/mrview/tool/tractography/track_scalar_file.h index e70715a949..30e0b4e0fb 100644 --- a/src/gui/mrview/tool/tractography/track_scalar_file.h +++ b/src/gui/mrview/tool/tractography/track_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/gui/mrview/tool/tractography/tractogram.cpp b/src/gui/mrview/tool/tractography/tractogram.cpp index e9c39099ee..1dc550e4aa 100644 --- a/src/gui/mrview/tool/tractography/tractogram.cpp +++ b/src/gui/mrview/tool/tractography/tractogram.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/tractography/tractogram.h b/src/gui/mrview/tool/tractography/tractogram.h index a6f0de59ad..5de379b685 100644 --- a/src/gui/mrview/tool/tractography/tractogram.h +++ b/src/gui/mrview/tool/tractography/tractogram.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/tractography/tractogram_enums.h b/src/gui/mrview/tool/tractography/tractogram_enums.h index 9f6d9beb01..0e9933ff62 100644 --- a/src/gui/mrview/tool/tractography/tractogram_enums.h +++ b/src/gui/mrview/tool/tractography/tractogram_enums.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/tractography/tractography.cpp b/src/gui/mrview/tool/tractography/tractography.cpp index 080622ce23..cfd9bd07d3 100644 --- a/src/gui/mrview/tool/tractography/tractography.cpp +++ b/src/gui/mrview/tool/tractography/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 @@ -954,32 +954,28 @@ namespace MR } - if (opt.opt->is ("tractography.tsf_colourmap")) - { + if (opt.opt->is ("tractography.tsf_colourmap")) { try { int n = opt[0]; if (n < 0 || !ColourMap::maps[n].name) - throw Exception ("invalid overlay colourmap index \"" + std::string (opt[0]) + "\" for -tractography.tsf_colourmap option"); - // help needed here ! - // scalar_file_options->set_track_colormap(n) ? - } - catch (Exception& e) { e.display(); } - - if (process_commandline_option_tsf_check_tracto_loaded()) { + throw Exception ("invalid tsf colourmap index \"" + std::string (opt[0]) + "\" for -tractography.tsf_colourmap option"); + if (process_commandline_option_tsf_check_tracto_loaded()) { // get list of selected tractograms: QModelIndexList indices = tractogram_list_view->selectionModel()->selectedIndexes(); if (indices.size() != 1) throw Exception ("-tractography.tsf_colourmap option requires one tractogram to be selected"); + // get pointer to tractogram: Tractogram* tractogram = tractogram_list_model->get_tractogram (indices[0]); + // check tractogram has a scalar file attached and prepare the scalar_file_options object: - if (tractogram->get_color_type() == TrackColourType::ScalarFile){ + if (tractogram->get_color_type() == TrackColourType::ScalarFile) { scalar_file_options->set_tractogram (tractogram); - // invoke member function (which needs to be added - see below): scalar_file_options->set_colourmap (opt[0]); - } - - } + } + } + } catch (Exception& e) { e.display(); } + return true; } diff --git a/src/gui/mrview/tool/tractography/tractography.h b/src/gui/mrview/tool/tractography/tractography.h index 4518df4bf1..c91a6d7fc9 100644 --- a/src/gui/mrview/tool/tractography/tractography.h +++ b/src/gui/mrview/tool/tractography/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/gui/mrview/tool/transform.cpp b/src/gui/mrview/tool/transform.cpp index f31f627d4f..9beac8f271 100644 --- a/src/gui/mrview/tool/transform.cpp +++ b/src/gui/mrview/tool/transform.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/transform.h b/src/gui/mrview/tool/transform.h index 1f02f157de..bd2434fe4a 100644 --- a/src/gui/mrview/tool/transform.h +++ b/src/gui/mrview/tool/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/src/gui/mrview/tool/view.cpp b/src/gui/mrview/tool/view.cpp index 2365cb6156..df1e1ad1e7 100644 --- a/src/gui/mrview/tool/view.cpp +++ b/src/gui/mrview/tool/view.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/tool/view.h b/src/gui/mrview/tool/view.h index 3f1fb03617..b8824540f7 100644 --- a/src/gui/mrview/tool/view.h +++ b/src/gui/mrview/tool/view.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/volume.cpp b/src/gui/mrview/volume.cpp index e4a131a4bb..59b2f841aa 100644 --- a/src/gui/mrview/volume.cpp +++ b/src/gui/mrview/volume.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/volume.h b/src/gui/mrview/volume.h index d88cf0a731..5f7e9a9d24 100644 --- a/src/gui/mrview/volume.h +++ b/src/gui/mrview/volume.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/window.cpp b/src/gui/mrview/window.cpp index 207e87f17e..0d67c3410b 100644 --- a/src/gui/mrview/window.cpp +++ b/src/gui/mrview/window.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/mrview/window.h b/src/gui/mrview/window.h index 36290ce1d1..be0576b858 100644 --- a/src/gui/mrview/window.h +++ b/src/gui/mrview/window.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/font.cpp b/src/gui/opengl/font.cpp index a6337580d0..c065fb0327 100644 --- a/src/gui/opengl/font.cpp +++ b/src/gui/opengl/font.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/font.h b/src/gui/opengl/font.h index 905f47fccb..250f3adb50 100644 --- a/src/gui/opengl/font.h +++ b/src/gui/opengl/font.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/gl.cpp b/src/gui/opengl/gl.cpp index 75c2846ee0..efb9f26a91 100644 --- a/src/gui/opengl/gl.cpp +++ b/src/gui/opengl/gl.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/gl.h b/src/gui/opengl/gl.h index 01a40556bd..238b525912 100644 --- a/src/gui/opengl/gl.h +++ b/src/gui/opengl/gl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/gl_core_3_3.cpp b/src/gui/opengl/gl_core_3_3.cpp index 8232ce61d0..b87c034d9c 100644 --- a/src/gui/opengl/gl_core_3_3.cpp +++ b/src/gui/opengl/gl_core_3_3.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/gl_core_3_3.h b/src/gui/opengl/gl_core_3_3.h index 9a8f65df31..1f960477c4 100644 --- a/src/gui/opengl/gl_core_3_3.h +++ b/src/gui/opengl/gl_core_3_3.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/lighting.cpp b/src/gui/opengl/lighting.cpp index 1c9d05a8f3..06ffcac8b5 100644 --- a/src/gui/opengl/lighting.cpp +++ b/src/gui/opengl/lighting.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/lighting.h b/src/gui/opengl/lighting.h index 5dd995b930..de8e1519b0 100644 --- a/src/gui/opengl/lighting.h +++ b/src/gui/opengl/lighting.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/shader.cpp b/src/gui/opengl/shader.cpp index 89194d1fd1..01b0874c94 100644 --- a/src/gui/opengl/shader.cpp +++ b/src/gui/opengl/shader.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/shader.h b/src/gui/opengl/shader.h index 302f99f933..d48b8c76cb 100644 --- a/src/gui/opengl/shader.h +++ b/src/gui/opengl/shader.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/opengl/transformation.h b/src/gui/opengl/transformation.h index 7f919f8992..c67a534d69 100644 --- a/src/gui/opengl/transformation.h +++ b/src/gui/opengl/transformation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/projection.cpp b/src/gui/projection.cpp index 55718600b6..1a2f05806b 100644 --- a/src/gui/projection.cpp +++ b/src/gui/projection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/projection.h b/src/gui/projection.h index 2685294baf..d8c969d31e 100644 --- a/src/gui/projection.h +++ b/src/gui/projection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shapes/cube.cpp b/src/gui/shapes/cube.cpp index e0c0fb62e5..201969b4d1 100644 --- a/src/gui/shapes/cube.cpp +++ b/src/gui/shapes/cube.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shapes/cube.h b/src/gui/shapes/cube.h index 5950a59f00..1319d680bc 100644 --- a/src/gui/shapes/cube.h +++ b/src/gui/shapes/cube.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shapes/cylinder.cpp b/src/gui/shapes/cylinder.cpp index 1119f42b13..5c7f10c627 100644 --- a/src/gui/shapes/cylinder.cpp +++ b/src/gui/shapes/cylinder.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shapes/cylinder.h b/src/gui/shapes/cylinder.h index 09f65f4f44..f8b88359ae 100644 --- a/src/gui/shapes/cylinder.h +++ b/src/gui/shapes/cylinder.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shapes/halfsphere.cpp b/src/gui/shapes/halfsphere.cpp index 2a2767cb6a..21f058bfdd 100644 --- a/src/gui/shapes/halfsphere.cpp +++ b/src/gui/shapes/halfsphere.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shapes/halfsphere.h b/src/gui/shapes/halfsphere.h index ac03aa0665..deac0b7253 100644 --- a/src/gui/shapes/halfsphere.h +++ b/src/gui/shapes/halfsphere.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shapes/sphere.cpp b/src/gui/shapes/sphere.cpp index 34f36c6a86..a4047df174 100644 --- a/src/gui/shapes/sphere.cpp +++ b/src/gui/shapes/sphere.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shapes/sphere.h b/src/gui/shapes/sphere.h index f9ca1a1e71..afd4b48e84 100644 --- a/src/gui/shapes/sphere.h +++ b/src/gui/shapes/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/src/gui/shview/file_open.cpp b/src/gui/shview/file_open.cpp index ccaa58c8e3..48539949b5 100644 --- a/src/gui/shview/file_open.cpp +++ b/src/gui/shview/file_open.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shview/file_open.h b/src/gui/shview/file_open.h index 999b77e154..6d68fd9488 100644 --- a/src/gui/shview/file_open.h +++ b/src/gui/shview/file_open.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shview/icons.h b/src/gui/shview/icons.h index a834e5f976..4da63c3e34 100644 --- a/src/gui/shview/icons.h +++ b/src/gui/shview/icons.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shview/render_window.cpp b/src/gui/shview/render_window.cpp index cfe7cd9a40..7be1cc9327 100644 --- a/src/gui/shview/render_window.cpp +++ b/src/gui/shview/render_window.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/gui/shview/render_window.h b/src/gui/shview/render_window.h index 9e368f0775..325cee7029 100644 --- a/src/gui/shview/render_window.h +++ b/src/gui/shview/render_window.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/min_mem_array.h b/src/min_mem_array.h index 6ec6aec74c..b153d0eee1 100644 --- a/src/min_mem_array.h +++ b/src/min_mem_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/src/registration/linear.cpp b/src/registration/linear.cpp index d135de2058..a8153c2e98 100644 --- a/src/registration/linear.cpp +++ b/src/registration/linear.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/linear.h b/src/registration/linear.h index f4f28ec4b5..8ae4db4f8c 100644 --- a/src/registration/linear.h +++ b/src/registration/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 @@ -442,7 +442,7 @@ namespace MR // set control point coordinates inside +-1/3 of the midway_image size { - Eigen::Vector3 ext (midway_image_header.spacing(0) / 6.0, + Eigen::Vector3d ext (midway_image_header.spacing(0) / 6.0, midway_image_header.spacing(1) / 6.0, midway_image_header.spacing(2) / 6.0); for (size_t i = 0; i<3; ++i) diff --git a/src/registration/metric/cc_helper.h b/src/registration/metric/cc_helper.h index fc14044486..084f3c2215 100644 --- a/src/registration/metric/cc_helper.h +++ b/src/registration/metric/cc_helper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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 int nmax = extent[0] * extent[1] * extent[2]; Eigen::VectorXd n1 = Eigen::VectorXd(nmax); Eigen::VectorXd n2 = Eigen::VectorXd(nmax); - Eigen::Vector3 pos; + Eigen::Vector3d pos; for (auto l = Loop("precomputing cross correlation values") (im1_image); l; ++l) { pos[0] = im1_image.index(0); pos[1] = im1_image.index(1); diff --git a/src/registration/metric/cross_correlation.h b/src/registration/metric/cross_correlation.h index b492b01d59..85a0a78898 100644 --- a/src/registration/metric/cross_correlation.h +++ b/src/registration/metric/cross_correlation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -39,7 +39,7 @@ namespace MR const Iterator& iter, Eigen::Matrix& gradient) { - // const Eigen::Vector3 pos = Eigen::Vector3 (iter.index(0), iter.index(1), iter.index(2)); + // const Eigen::Vector3d pos = Eigen::Vector3d (iter.index(0), iter.index(1), iter.index(2)); assert (params.processed_mask.valid()); assert (params.processed_image.valid()); diff --git a/src/registration/metric/demons.h b/src/registration/metric/demons.h index 97708cd3ec..c9ded89215 100644 --- a/src/registration/metric/demons.h +++ b/src/registration/metric/demons.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -118,8 +118,8 @@ namespace MR im1_update.row(3) = 0.0; im2_update.row(3) = 0.0; } else { - im1_update.row(3) = Eigen::Vector3 (speed * grad.array() / denominator); - im2_update.row(3) = -Eigen::Vector3 (im1_update.row(3)); + im1_update.row(3) = Eigen::Vector3d (speed * grad.array() / denominator); + im2_update.row(3) = -Eigen::Vector3d (im1_update.row(3)); } } diff --git a/src/registration/metric/demons4D.h b/src/registration/metric/demons4D.h index 7027dc7284..2ce5e0395a 100644 --- a/src/registration/metric/demons4D.h +++ b/src/registration/metric/demons4D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/metric/demons_cc.h b/src/registration/metric/demons_cc.h index bfb916b4c4..5deec78291 100644 --- a/src/registration/metric/demons_cc.h +++ b/src/registration/metric/demons_cc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/metric/difference_robust.h b/src/registration/metric/difference_robust.h index 857c0d9026..38ce2574aa 100644 --- a/src/registration/metric/difference_robust.h +++ b/src/registration/metric/difference_robust.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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,9 +35,9 @@ namespace MR template default_type operator() (Params& params, - const Eigen::Vector3 im1_point, - const Eigen::Vector3 im2_point, - const Eigen::Vector3 midway_point, + const Eigen::Vector3d im1_point, + const Eigen::Vector3d im2_point, + const Eigen::Vector3d midway_point, Eigen::Matrix& gradient) { assert (!this->weighted && "FIXME: set_weights not implemented for 3D metric"); @@ -103,9 +103,9 @@ namespace MR template default_type operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient) { params.im1_image_interp->value_and_gradient_row_wrt_scanner (im1_values, im1_grad); diff --git a/src/registration/metric/evaluate.h b/src/registration/metric/evaluate.h index 10f5017bdd..68c759e640 100644 --- a/src/registration/metric/evaluate.h +++ b/src/registration/metric/evaluate.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/metric/linear_base.h b/src/registration/metric/linear_base.h index ead1eaec72..e4050dd11f 100644 --- a/src/registration/metric/linear_base.h +++ b/src/registration/metric/linear_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 @@ -56,9 +56,9 @@ namespace MR template default_type operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient); protected: diff --git a/src/registration/metric/local_cross_correlation.h b/src/registration/metric/local_cross_correlation.h index cedd1d8f99..08f99fc902 100644 --- a/src/registration/metric/local_cross_correlation.h +++ b/src/registration/metric/local_cross_correlation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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,7 +36,7 @@ namespace MR void operator() (MaskType& mask, ImageType3& out) { if (!mask.value()) return; - Eigen::Vector3 pos (mask.index(0), mask.index(1), mask.index(2)); + Eigen::Vector3d pos (mask.index(0), mask.index(1), mask.index(2)); out.index(0) = pos[0]; out.index(1) = pos[1]; out.index(2) = pos[2]; @@ -237,7 +237,7 @@ namespace MR return 0.0; } - const Eigen::Vector3 pos = Eigen::Vector3(default_type(iter.index(0)), default_type(iter.index(0)), default_type(iter.index(0))); + const Eigen::Vector3d pos = Eigen::Vector3d(default_type(iter.index(0)), default_type(iter.index(0)), default_type(iter.index(0))); params.processed_image_interp->voxel(pos); typename Params::Im1ValueType val1; typename Params::Im2ValueType val2; @@ -266,9 +266,9 @@ namespace MR // ITK: // derivWRTImage[dim] = 2.0 * sFixedMoving / (sFixedFixed_sMovingMoving) * (fixedI - sFixedMoving / sMovingMoving * movingI) * movingImageGradient[dim]; - Eigen::Vector3 derivWRTImage = - A_BC * ((val2 - A/B * val1) * grad1 - 0.0 * (val1 - A/C * val2) * grad2); + Eigen::Vector3d derivWRTImage = - A_BC * ((val2 - A/B * val1) * grad1 - 0.0 * (val1 - A/C * val2) * grad2); - const Eigen::Vector3 midway_point = midway_v2s * pos; + const Eigen::Vector3d midway_point = midway_v2s * pos; const auto jacobian_vec = params.transformation.get_jacobian_vector_wrt_params (midway_point); gradient.segment<4>(0) += derivWRTImage(0) * jacobian_vec; gradient.segment<4>(4) += derivWRTImage(1) * jacobian_vec; diff --git a/src/registration/metric/mean_squared.h b/src/registration/metric/mean_squared.h index a577f2b08c..e7223a74bf 100644 --- a/src/registration/metric/mean_squared.h +++ b/src/registration/metric/mean_squared.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -32,9 +32,9 @@ namespace MR public: template default_type operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient) { assert (!this->weighted && "FIXME: set_weights not implemented for 3D metric"); @@ -67,9 +67,9 @@ namespace MR public: template default_type operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient) { assert (!this->weighted && "FIXME: set_weights not implemented for 3D metric"); @@ -99,9 +99,9 @@ namespace MR template default_type operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient) { assert (!this->weighted && "FIXME: set_weights not implemented for 3D metric"); @@ -139,9 +139,9 @@ namespace MR public: template default_type operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient) { const ssize_t volumes = params.im1_image_interp->size(3); @@ -192,9 +192,9 @@ namespace MR template default_type operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient) { const ssize_t volumes = params.im1_image_interp->size(3); @@ -229,9 +229,9 @@ namespace MR public: template default_type operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient) { const ssize_t volumes = params.im1_image_interp->size(3); @@ -302,9 +302,9 @@ namespace MR template Eigen::Matrix operator() (Params& params, - const Eigen::Vector3& im1_point, - const Eigen::Vector3& im2_point, - const Eigen::Vector3& midway_point, + const Eigen::Vector3d& im1_point, + const Eigen::Vector3d& im2_point, + const Eigen::Vector3d& midway_point, Eigen::Matrix& gradient) { assert (volumes == params.im1_image_interp->size(3)); diff --git a/src/registration/metric/params.h b/src/registration/metric/params.h index 3f1eadd6a7..58a804a610 100644 --- a/src/registration/metric/params.h +++ b/src/registration/metric/params.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -131,7 +131,7 @@ namespace MR } void update_control_points () { - const Eigen::Vector3 centre = transformation.get_centre(); + const Eigen::Vector3d centre = transformation.get_centre(); control_points.resize(4, 4); // tetrahedron centred at centre of midspace scaled by control_point_exent control_points << 1.0, -1.0, -1.0, 1.0, @@ -181,10 +181,10 @@ namespace MR im2_image, midway_image, trafo2, no_oversampling, NAN); auto T = MR::Transform(midway_image).voxel2scanner; - Eigen::Vector3 midway_point, voxel_pos, im1_point, im2_point; + Eigen::Vector3d midway_point, voxel_pos, im1_point, im2_point; for (auto i = Loop (midway_image) (check, im1_reslicer, im2_reslicer); i; ++i) { - voxel_pos = Eigen::Vector3 ((default_type)check.index(0), (default_type)check.index(1), (default_type)check.index(2)); + voxel_pos = Eigen::Vector3d ((default_type)check.index(0), (default_type)check.index(1), (default_type)check.index(2)); midway_point = T * voxel_pos; check.index(3) = 0; @@ -237,7 +237,7 @@ namespace MR MR::copy_ptr im1_mask_interp; MR::copy_ptr im2_mask_interp; default_type loop_density; - Eigen::Vector3 control_point_exent; + Eigen::Vector3d control_point_exent; bool robust_estimate_subset; bool robust_estimate_use_score; diff --git a/src/registration/metric/robust_estimators.h b/src/registration/metric/robust_estimators.h index 5b570b460a..6f1ae1e31d 100644 --- a/src/registration/metric/robust_estimators.h +++ b/src/registration/metric/robust_estimators.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/metric/thread_kernel.h b/src/registration/metric/thread_kernel.h index 9ab610524e..7c7115a2aa 100644 --- a/src/registration/metric/thread_kernel.h +++ b/src/registration/metric/thread_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 @@ -125,12 +125,12 @@ namespace MR typename cost_is_vector::no = 0, typename is_asymmetric::no = 0) { - Eigen::Vector3 voxel_pos ((default_type)iter.index(0), (default_type)iter.index(1), (default_type)iter.index(2)); - Eigen::Vector3 midway_point = voxel2scanner * voxel_pos; + Eigen::Vector3d voxel_pos ((default_type)iter.index(0), (default_type)iter.index(1), (default_type)iter.index(2)); + Eigen::Vector3d midway_point = voxel2scanner * voxel_pos; - Eigen::Vector3 im2_point; + Eigen::Vector3d im2_point; params.transformation.transform_half_inverse (im2_point, midway_point); if (params.im2_mask_interp) { params.im2_mask_interp->scanner (im2_point); @@ -143,7 +143,7 @@ namespace MR return; } - Eigen::Vector3 im1_point; + Eigen::Vector3d im1_point; params.transformation.transform_half (im1_point, midway_point); if (params.im1_mask_interp) { params.im1_mask_interp->scanner (im1_point); @@ -176,8 +176,8 @@ namespace MR typename cost_is_vector::no = 0, typename is_asymmetric::yes = 0) { - Eigen::Vector3 voxel_pos ((default_type)iter.index(0), (default_type)iter.index(1), (default_type)iter.index(2)); - Eigen::Vector3 im2_point = voxel2scanner * voxel_pos; // image 2 == midway_point == fixed image + Eigen::Vector3d voxel_pos ((default_type)iter.index(0), (default_type)iter.index(1), (default_type)iter.index(2)); + Eigen::Vector3d im2_point = voxel2scanner * voxel_pos; // image 2 == midway_point == fixed image // shift voxel position as evaluate iterates over a subset of the image if (params.robust_estimate_subset) { @@ -212,7 +212,7 @@ namespace MR return; } - Eigen::Vector3 im1_point; // moving + Eigen::Vector3d im1_point; // moving params.transformation.transform_half (im1_point, im2_point); // transform_half is full transformation, transform_half_inverse is identity if (params.im1_mask_interp) { params.im1_mask_interp->scanner (im1_point); @@ -240,11 +240,11 @@ namespace MR typename cost_is_vector::yes = 0, typename is_asymmetric::no = 0) { - Eigen::Vector3 voxel_pos ((default_type)iter.index(0), (default_type)iter.index(1), (default_type)iter.index(2)); + Eigen::Vector3d voxel_pos ((default_type)iter.index(0), (default_type)iter.index(1), (default_type)iter.index(2)); - Eigen::Vector3 midway_point = voxel2scanner * voxel_pos; + Eigen::Vector3d midway_point = voxel2scanner * voxel_pos; - Eigen::Vector3 im2_point; + Eigen::Vector3d im2_point; params.transformation.transform_half_inverse (im2_point, midway_point); if (params.im2_mask_interp) { params.im2_mask_interp->scanner (im2_point); @@ -252,7 +252,7 @@ namespace MR return; } - Eigen::Vector3 im1_point; + Eigen::Vector3d im1_point; params.transformation.transform_half (im1_point, midway_point); if (params.im1_mask_interp) { params.im1_mask_interp->scanner (im1_point); @@ -298,7 +298,7 @@ namespace MR typename is_asymmetric::no = 0) { assert(params.processed_image.valid()); - Eigen::Vector3 voxel_pos ((default_type)iter.index(0), (default_type)iter.index(1), (default_type)iter.index(2)); + Eigen::Vector3d voxel_pos ((default_type)iter.index(0), (default_type)iter.index(1), (default_type)iter.index(2)); if (params.processed_mask.valid()){ assign_pos_of (iter, 0, 3).to (params.processed_mask); diff --git a/src/registration/multi_contrast.cpp b/src/registration/multi_contrast.cpp index 80541d4b33..52f2a9cac0 100644 --- a/src/registration/multi_contrast.cpp +++ b/src/registration/multi_contrast.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/multi_contrast.h b/src/registration/multi_contrast.h index 3fd1b95c01..8941ad1810 100644 --- a/src/registration/multi_contrast.h +++ b/src/registration/multi_contrast.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/multi_resolution_lmax.h b/src/registration/multi_resolution_lmax.h index 9ee9e97c41..f8f4a9b68a 100644 --- a/src/registration/multi_resolution_lmax.h +++ b/src/registration/multi_resolution_lmax.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/nonlinear.cpp b/src/registration/nonlinear.cpp index 28f2b03f61..68c9668f2e 100644 --- a/src/registration/nonlinear.cpp +++ b/src/registration/nonlinear.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/nonlinear.h b/src/registration/nonlinear.h index 075050f58f..8f7c85f7f0 100644 --- a/src/registration/nonlinear.h +++ b/src/registration/nonlinear.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/shared.h b/src/registration/shared.h index 265193dcd7..b04351534b 100644 --- a/src/registration/shared.h +++ b/src/registration/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/registration/transform/affine.cpp b/src/registration/transform/affine.cpp index 6d304af173..9a4502cb77 100644 --- a/src/registration/transform/affine.cpp +++ b/src/registration/transform/affine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -248,14 +248,14 @@ namespace MR */ - Eigen::Matrix Affine::get_jacobian_vector_wrt_params (const Eigen::Vector3& p) const { + Eigen::Matrix Affine::get_jacobian_vector_wrt_params (const Eigen::Vector3d& p) const { Eigen::Matrix jac; jac.head(3) = p - centre; jac(3) = 1.0; return jac; } - Eigen::MatrixXd Affine::get_jacobian_wrt_params (const Eigen::Vector3& p) const { + Eigen::MatrixXd Affine::get_jacobian_wrt_params (const Eigen::Vector3d& p) const { Eigen::MatrixXd jacobian (3, 12); jacobian.setZero(); const auto v = get_jacobian_vector_wrt_params(p); diff --git a/src/registration/transform/affine.h b/src/registration/transform/affine.h index c3cefc0092..2a2579007f 100644 --- a/src/registration/transform/affine.h +++ b/src/registration/transform/affine.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -110,9 +110,9 @@ namespace MR this->optimiser_weights << weights, weights, weights; } - Eigen::Matrix get_jacobian_vector_wrt_params (const Eigen::Vector3& p) const ; + Eigen::Matrix get_jacobian_vector_wrt_params (const Eigen::Vector3d& p) const ; - Eigen::MatrixXd get_jacobian_wrt_params (const Eigen::Vector3& p) const ; + Eigen::MatrixXd get_jacobian_wrt_params (const Eigen::Vector3d& p) const ; void set_parameter_vector (const Eigen::Matrix& param_vector); diff --git a/src/registration/transform/base.h b/src/registration/transform/base.h index eed2d68dc3..ff0c2b3bbf 100644 --- a/src/registration/transform/base.h +++ b/src/registration/transform/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 @@ -118,7 +118,7 @@ namespace MR return number_of_parameters; } - Eigen::Matrix get_jacobian_vector_wrt_params (const Eigen::Vector3& p) const { + Eigen::Matrix get_jacobian_vector_wrt_params (const Eigen::Vector3d& p) const { throw Exception ("FIXME: get_jacobian_vector_wrt_params not implemented for this metric"); Eigen::Matrix jac; return jac; @@ -173,23 +173,23 @@ namespace MR compute_halfspace_transformations(); } - const Eigen::Vector3 get_translation() const { + const Eigen::Vector3d get_translation() const { return trafo.translation(); } - void set_centre_without_transform_update (const Eigen::Vector3& centre_in) { + void set_centre_without_transform_update (const Eigen::Vector3d& centre_in) { centre = centre_in; DEBUG ("centre: " + str(centre.transpose())); } - void set_centre (const Eigen::Vector3& centre_in) { + void set_centre (const Eigen::Vector3d& centre_in) { centre = centre_in; DEBUG ("centre: " + str(centre.transpose())); compute_offset(); compute_halfspace_transformations(); } - const Eigen::Vector3 get_centre() const { + const Eigen::Vector3d get_centre() const { return centre; } @@ -212,7 +212,7 @@ namespace MR nonsymmetric = asym; } - void set_offset (const Eigen::Vector3& offset_in) { + void set_offset (const Eigen::Vector3d& offset_in) { trafo.translation() = offset_in; compute_halfspace_transformations(); } @@ -280,7 +280,7 @@ namespace MR Eigen::Transform trafo; Eigen::Transform trafo_half; Eigen::Transform trafo_half_inverse; - Eigen::Vector3 centre; + Eigen::Vector3d centre; Eigen::VectorXd optimiser_weights; bool nonsymmetric; diff --git a/src/registration/transform/convergence_check.cpp b/src/registration/transform/convergence_check.cpp index 297f79ae14..63ddd1c42c 100644 --- a/src/registration/transform/convergence_check.cpp +++ b/src/registration/transform/convergence_check.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/transform/convergence_check.h b/src/registration/transform/convergence_check.h index 5a1ed3c461..53eac06e61 100644 --- a/src/registration/transform/convergence_check.h +++ b/src/registration/transform/convergence_check.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/transform/initialiser.cpp b/src/registration/transform/initialiser.cpp index 944a316037..91c4d6778f 100644 --- a/src/registration/transform/initialiser.cpp +++ b/src/registration/transform/initialiser.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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 const vector& contrast_settings) { CONSOLE ("initialising centre of rotation using centre of mass"); - Eigen::Vector3 im1_centre_mass, im2_centre_mass; - Eigen::Vector3 im1_centre_mass_transformed, im2_centre_mass_transformed; + Eigen::Vector3d im1_centre_mass, im2_centre_mass; + Eigen::Vector3d im1_centre_mass_transformed, im2_centre_mass_transformed; Image bogus_mask; @@ -47,7 +47,7 @@ namespace MR transform.transform_half_inverse (im1_centre_mass_transformed, im1_centre_mass); transform.transform_half (im2_centre_mass_transformed, im2_centre_mass); - Eigen::Vector3 centre = (im1_centre_mass + im2_centre_mass) * 0.5; + Eigen::Vector3d centre = (im1_centre_mass + im2_centre_mass) * 0.5; DEBUG("centre: " + str(centre.transpose())); transform.set_centre_without_transform_update (centre); } @@ -61,13 +61,13 @@ namespace MR Registration::Transform::Init::LinearInitialisationParams& init) { CONSOLE ("initialising centre of rotation using geometric centre"); - Eigen::Vector3 im1_centre_scanner; + Eigen::Vector3d im1_centre_scanner; get_geometric_centre (im1, im1_centre_scanner); - Eigen::Vector3 im2_centre_scanner; + Eigen::Vector3d im2_centre_scanner; get_geometric_centre (im2, im2_centre_scanner); - Eigen::Vector3 centre = (im1_centre_scanner + im2_centre_scanner) / 2.0; + Eigen::Vector3d centre = (im1_centre_scanner + im2_centre_scanner) / 2.0; DEBUG("centre: " + str(centre.transpose())); transform.set_centre_without_transform_update (centre); } @@ -82,14 +82,14 @@ namespace MR Registration::Transform::Init::LinearInitialisationParams& init) { CONSOLE ("initialising centre of rotation and translation using geometric centre"); - Eigen::Vector3 im1_centre_scanner; + Eigen::Vector3d im1_centre_scanner; get_geometric_centre (im1, im1_centre_scanner); - Eigen::Vector3 im2_centre_scanner; + Eigen::Vector3d im2_centre_scanner; get_geometric_centre (im2, im2_centre_scanner); - Eigen::Vector3 translation = im1_centre_scanner - im2_centre_scanner; - Eigen::Vector3 centre = (im1_centre_scanner + im2_centre_scanner) / 2.0; + Eigen::Vector3d translation = im1_centre_scanner - im2_centre_scanner; + Eigen::Vector3d centre = (im1_centre_scanner + im2_centre_scanner) / 2.0; transform.set_centre (centre); transform.set_translation (translation); } diff --git a/src/registration/transform/initialiser.h b/src/registration/transform/initialiser.h index c7cdf1bb19..771767e045 100644 --- a/src/registration/transform/initialiser.h +++ b/src/registration/transform/initialiser.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/transform/initialiser_helpers.cpp b/src/registration/transform/initialiser_helpers.cpp index 6455cf1696..e96a143798 100644 --- a/src/registration/transform/initialiser_helpers.cpp +++ b/src/registration/transform/initialiser_helpers.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -98,8 +98,8 @@ namespace MR if (!mask.value()) return; } - Eigen::Vector3 voxel_pos ((default_type)image.index(0), (default_type)image.index(1), (default_type)image.index(2)); - Eigen::Vector3 scanner_pos = transform.voxel2scanner * voxel_pos; + Eigen::Vector3d voxel_pos ((default_type)image.index(0), (default_type)image.index(1), (default_type)image.index(2)); + Eigen::Vector3d scanner_pos = transform.voxel2scanner * voxel_pos; default_type xc = scanner_pos[0] - centre[0]; default_type yc = scanner_pos[1] - centre[1]; @@ -165,8 +165,8 @@ namespace MR if (!mask.valid()) { for (auto i = Loop (0, 3)(image); i; ++i) { - Eigen::Vector3 voxel_pos ((default_type)image.index(0), (default_type)image.index(1), (default_type)image.index(2)); - Eigen::Vector3 scanner_pos = transform.voxel2scanner * voxel_pos; + Eigen::Vector3d voxel_pos ((default_type)image.index(0), (default_type)image.index(1), (default_type)image.index(2)); + Eigen::Vector3d scanner_pos = transform.voxel2scanner * voxel_pos; default_type xc = scanner_pos[0] - centre[0]; default_type yc = scanner_pos[1] - centre[1]; @@ -191,8 +191,8 @@ namespace MR for (auto i = Loop (0, 3)(image, mask); i; ++i) { if (mask.value() <= 0.0) continue; - Eigen::Vector3 voxel_pos ((default_type)image.index(0), (default_type)image.index(1), (default_type)image.index(2)); - Eigen::Vector3 scanner_pos = transform.voxel2scanner * voxel_pos; + Eigen::Vector3d voxel_pos ((default_type)image.index(0), (default_type)image.index(1), (default_type)image.index(2)); + Eigen::Vector3d scanner_pos = transform.voxel2scanner * voxel_pos; default_type val = image.value(); default_type xc = scanner_pos[0] - centre[0]; @@ -272,7 +272,7 @@ namespace MR void get_centre_of_mass (Image& im, Image& mask, - Eigen::Vector3& centre_of_mass, + Eigen::Vector3d& centre_of_mass, const vector& contrast_settings) { centre_of_mass.setZero(); default_type mass (0.0); @@ -326,8 +326,8 @@ namespace MR get_centre_of_mass (im1, init.init_translation.unmasked1 ? bogus_mask : mask1, im1_centre_of_mass, contrast_settings); get_centre_of_mass (im2, init.init_translation.unmasked2 ? bogus_mask : mask2, im2_centre_of_mass, contrast_settings); - Eigen::Vector3 centre = (im1_centre_of_mass + im2_centre_of_mass) / 2.0; - Eigen::Vector3 translation = im1_centre_of_mass - im2_centre_of_mass; + Eigen::Vector3d centre = (im1_centre_of_mass + im2_centre_of_mass) / 2.0; + Eigen::Vector3d translation = im1_centre_of_mass - im2_centre_of_mass; transform.set_centre_without_transform_update (centre); transform.set_translation (translation); #ifdef DEBUG_INIT @@ -375,8 +375,8 @@ namespace MR // Transform tra1; MR::Transform T1 (im1); MR::Transform T2 (im2); - Eigen::Vector3 c1 = T1.scanner2voxel * im1_centre_of_mass; - Eigen::Vector3 c2 = T2.scanner2voxel * im2_centre_of_mass; + Eigen::Vector3d c1 = T1.scanner2voxel * im1_centre_of_mass; + Eigen::Vector3d c2 = T2.scanner2voxel * im2_centre_of_mass; VEC(c1) VEC(c2) im1_moments.index(0) = std::round(c1[0]); @@ -405,9 +405,9 @@ namespace MR void MomentsInitialiser::run () { if (!calculate_eigenvectors(im1, im2, mask1, mask2)) { WARN ("Image moments not successful. Using centre of mass instead."); - Eigen::Vector3 centre = (im1_centre_of_mass + im2_centre_of_mass) / 2.0; + Eigen::Vector3d centre = (im1_centre_of_mass + im2_centre_of_mass) / 2.0; transform.set_centre (centre); - Eigen::Vector3 translation = im1_centre_of_mass - im2_centre_of_mass; + Eigen::Vector3d translation = im1_centre_of_mass - im2_centre_of_mass; transform.set_translation (translation); return; } @@ -466,8 +466,8 @@ namespace MR assert(abs(A.determinant() - 1.0) < 0.0001); A = A.transpose().eval(); // A * im2_evec = im1_evec - Eigen::Vector3 centre = (im1_centre_of_mass + im2_centre_of_mass) / 2.0; - Eigen::Vector3 offset = im1_centre_of_mass - im2_centre_of_mass; + Eigen::Vector3d centre = (im1_centre_of_mass + im2_centre_of_mass) / 2.0; + Eigen::Vector3d offset = im1_centre_of_mass - im2_centre_of_mass; transform.set_centre_without_transform_update (centre); Eigen::Translation T_offset (offset), T_c2 (im2_centre_of_mass); @@ -530,8 +530,8 @@ namespace MR Eigen::Matrix& centre_of_mass) { // centre of mass is calculated using only the zeroth order // TODO multithread - Eigen::Vector3 voxel_pos = Eigen::Vector3::Zero(); - Eigen::Vector3 scanner = Eigen::Vector3::Zero(); + Eigen::Vector3d voxel_pos = Eigen::Vector3d::Zero(); + Eigen::Vector3d scanner = Eigen::Vector3d::Zero(); MR::Transform im_transform (im); default_type im_mass (0.0); diff --git a/src/registration/transform/initialiser_helpers.h b/src/registration/transform/initialiser_helpers.h index 7adb506b2f..140df96660 100644 --- a/src/registration/transform/initialiser_helpers.h +++ b/src/registration/transform/initialiser_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 @@ -37,7 +37,7 @@ namespace MR template void get_geometric_centre (const ImageType& image, Eigen::Matrix& centre) { - Eigen::Vector3 centre_voxel; + Eigen::Vector3d centre_voxel; centre_voxel[0] = (static_cast(image.size(0)) / 2.0) - 1.0; centre_voxel[1] = (static_cast(image.size(1)) / 2.0) - 1.0; centre_voxel[2] = (static_cast(image.size(2)) / 2.0) - 1.0; @@ -47,7 +47,7 @@ namespace MR void get_centre_of_mass (Image& im, Image& mask, - Eigen::Vector3& centre_of_mass, + Eigen::Vector3d& centre_of_mass, const vector& contrast_settings); bool get_sorted_eigen_vecs_vals (const Eigen::Matrix& mat, @@ -132,7 +132,7 @@ namespace MR Image& mask1; Image& mask2; const vector& contrast_settings; - Eigen::Vector3 im1_centre, im2_centre; + Eigen::Vector3d im1_centre, im2_centre; Eigen::Matrix im1_centre_of_mass, im2_centre_of_mass; Eigen::Matrix im1_covariance_matrix, im2_covariance_matrix; Eigen::Matrix im1_evec, im2_evec; diff --git a/src/registration/transform/reorient.h b/src/registration/transform/reorient.h index 492eea9d82..bf71b2d202 100644 --- a/src/registration/transform/reorient.h +++ b/src/registration/transform/reorient.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/transform/rigid.cpp b/src/registration/transform/rigid.cpp index 6d5b658e11..d215ab1c45 100644 --- a/src/registration/transform/rigid.cpp +++ b/src/registration/transform/rigid.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -234,14 +234,14 @@ namespace MR */ - Eigen::Matrix Rigid::get_jacobian_vector_wrt_params (const Eigen::Vector3& p) const { + Eigen::Matrix Rigid::get_jacobian_vector_wrt_params (const Eigen::Vector3d& p) const { Eigen::Matrix jac; jac.head(3) = p - centre; jac(3) = 1.0; return jac; } - Eigen::MatrixXd Rigid::get_jacobian_wrt_params (const Eigen::Vector3& p) const { + Eigen::MatrixXd Rigid::get_jacobian_wrt_params (const Eigen::Vector3d& p) const { Eigen::MatrixXd jacobian (3, 12); jacobian.setZero(); const auto v = get_jacobian_vector_wrt_params(p); diff --git a/src/registration/transform/rigid.h b/src/registration/transform/rigid.h index e1a65170fa..05cf747654 100644 --- a/src/registration/transform/rigid.h +++ b/src/registration/transform/rigid.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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,9 @@ namespace MR this->optimiser_weights << weights, weights, weights; } - Eigen::Matrix get_jacobian_vector_wrt_params (const Eigen::Vector3& p) const ; + Eigen::Matrix get_jacobian_vector_wrt_params (const Eigen::Vector3d& p) const ; - Eigen::MatrixXd get_jacobian_wrt_params (const Eigen::Vector3& p) const ; + Eigen::MatrixXd get_jacobian_wrt_params (const Eigen::Vector3d& p) const ; void set_parameter_vector (const Eigen::Matrix& param_vector); diff --git a/src/registration/transform/robust.cpp b/src/registration/transform/robust.cpp index dc64b86006..9a3814e372 100644 --- a/src/registration/transform/robust.cpp +++ b/src/registration/transform/robust.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/registration/transform/search.h b/src/registration/transform/search.h index 445ba5d795..4db55b40c1 100644 --- a/src/registration/transform/search.h +++ b/src/registration/transform/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/registration/warp/compose.h b/src/registration/warp/compose.h index 16bccce87a..7b1ac171a8 100644 --- a/src/registration/warp/compose.h +++ b/src/registration/warp/compose.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -40,7 +40,7 @@ namespace MR template void operator() (InputDeformationFieldType& deform_input, OutputDeformationFieldType& deform_output) { - deform_output.row(3) = transform * Eigen::Vector3 (deform_input.row(3)); + deform_output.row(3) = transform * Eigen::Vector3d (deform_input.row(3)); } protected: @@ -58,8 +58,8 @@ namespace MR template void operator() (DisplacementFieldType& disp_input, DeformationFieldType& deform_output) { - Eigen::Vector3 voxel (disp_input.index(0), disp_input.index(1), disp_input.index(2)); - deform_output.row(3) = linear_transform * (image_transform.voxel2scanner * voxel + Eigen::Vector3 (disp_input.row(3))); + Eigen::Vector3d voxel (disp_input.index(0), disp_input.index(1), disp_input.index(2)); + deform_output.row(3) = linear_transform * (image_transform.voxel2scanner * voxel + Eigen::Vector3d (disp_input.row(3))); } protected: @@ -74,15 +74,15 @@ namespace MR void operator() (Image& disp_input1, Image& disp_output) { - Eigen::Vector3 voxel ((default_type)disp_input1.index(0), (default_type)disp_input1.index(1), (default_type)disp_input1.index(2)); - Eigen::Vector3 voxel_position = disp1_transform.voxel2scanner * voxel; - Eigen::Vector3 original_position = voxel_position + Eigen::Vector3(disp_input1.row(3)); + Eigen::Vector3d voxel ((default_type)disp_input1.index(0), (default_type)disp_input1.index(1), (default_type)disp_input1.index(2)); + Eigen::Vector3d voxel_position = disp1_transform.voxel2scanner * voxel; + Eigen::Vector3d original_position = voxel_position + Eigen::Vector3d(disp_input1.row(3)); disp2_interp.scanner (original_position); if (!disp2_interp) { disp_output.row(3) = disp_input1.row(3); } else { - Eigen::Vector3 displacement (Eigen::Vector3(disp2_interp.row(3)).array() * step); - Eigen::Vector3 new_position = displacement + original_position; + Eigen::Vector3d displacement (Eigen::Vector3d(disp2_interp.row(3)).array() * step); + Eigen::Vector3d new_position = displacement + original_position; disp_output.row(3) = new_position - voxel_position; } } @@ -106,18 +106,18 @@ namespace MR void operator() (Image& deform) { - Eigen::Vector3 voxel ((default_type)deform.index(0), (default_type)deform.index(1), (default_type)deform.index(2)); - Eigen::Vector3 position = linear1 * voxel; + Eigen::Vector3d voxel ((default_type)deform.index(0), (default_type)deform.index(1), (default_type)deform.index(2)); + Eigen::Vector3d position = linear1 * voxel; deform1_interp.scanner (position); if (!deform1_interp) { deform.row(3) = out_of_bounds; } else { - Eigen::Vector3 position2 = deform1_interp.row(3); + Eigen::Vector3d position2 = deform1_interp.row(3); deform2_interp.scanner (position2); if (!deform2_interp) { deform.row(3) = out_of_bounds; } else { - Eigen::Vector3 position3 = deform2_interp.row(3); + Eigen::Vector3d position3 = deform2_interp.row(3); deform.row(3) = linear2 * position3; } } @@ -128,7 +128,7 @@ namespace MR Interp::Linear deform1_interp; Interp::Linear deform2_interp; const transform_type linear2; - Eigen::Vector3 out_of_bounds; + Eigen::Vector3d out_of_bounds; }; @@ -162,7 +162,7 @@ namespace MR default_type max_norm = 0.0; auto max_norm_func = [&max_norm](Image& update) { - default_type norm = Eigen::Vector3 (update.row(3)).norm(); + default_type norm = Eigen::Vector3d (update.row(3)).norm(); if (norm > max_norm) max_norm = norm; }; @@ -184,7 +184,7 @@ namespace MR default_type scaled_step = step / scale_factor; // apply the step size and scale factor at once ThreadedLoop (update).run ( [&scaled_step](Image& update, Image& scaled_update) { - scaled_update.row(3) = Eigen::Vector3 (update.row(3)) * scaled_step; + scaled_update.row(3) = Eigen::Vector3d (update.row(3)) * scaled_step; }, update, *scaled_update); // CONSOLE ("composing " + str(std::log2 (scale_factor)) + "times"); diff --git a/src/registration/warp/convert.h b/src/registration/warp/convert.h index e41555ed65..20283387f3 100644 --- a/src/registration/warp/convert.h +++ b/src/registration/warp/convert.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -34,8 +34,8 @@ namespace MR void displacement2deformation (ImageType& input, ImageType& output) { MR::Transform transform (input); auto kernel = [&] (ImageType& input, ImageType& output) { - Eigen::Vector3 voxel ((default_type)input.index(0), (default_type)input.index(1), (default_type)input.index(2)); - output.row(3) = (transform.voxel2scanner * voxel).template cast () + Eigen::Vector3 (input.row(3)); + Eigen::Vector3d voxel ((default_type)input.index(0), (default_type)input.index(1), (default_type)input.index(2)); + output.row(3) = (transform.voxel2scanner * voxel).template cast () + Eigen::Vector3d (input.row(3)); }; ThreadedLoop (input, 0, 3).run (kernel, input, output); } @@ -44,8 +44,8 @@ namespace MR void deformation2displacement (ImageType& input, ImageType& output) { MR::Transform transform (input); auto kernel = [&] (ImageType& input, ImageType& output) { - Eigen::Vector3 voxel ((default_type)input.index(0), (default_type)input.index(1), (default_type)input.index(2)); - output.row(3) = Eigen::Vector3(input.row(3)) - transform.voxel2scanner * voxel; + Eigen::Vector3d voxel ((default_type)input.index(0), (default_type)input.index(1), (default_type)input.index(2)); + output.row(3) = Eigen::Vector3d(input.row(3)) - transform.voxel2scanner * voxel; }; ThreadedLoop (input, 0, 3).run (kernel, input, output); } diff --git a/src/registration/warp/helpers.h b/src/registration/warp/helpers.h index 6edf3e2718..73fefc68a7 100644 --- a/src/registration/warp/helpers.h +++ b/src/registration/warp/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/src/registration/warp/invert.h b/src/registration/warp/invert.h index ea5dcd9e3e..e51e0a0070 100644 --- a/src/registration/warp/invert.h +++ b/src/registration/warp/invert.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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,9 +47,9 @@ namespace MR void operator() (Image& displacement_inverse) { - Eigen::Vector3 voxel ((default_type)displacement_inverse.index(0), (default_type)displacement_inverse.index(1), (default_type)displacement_inverse.index(2)); - Eigen::Vector3 truth = transform.voxel2scanner * voxel; - Eigen::Vector3 current = truth + Eigen::Vector3(displacement_inverse.row(3)); + Eigen::Vector3d voxel ((default_type)displacement_inverse.index(0), (default_type)displacement_inverse.index(1), (default_type)displacement_inverse.index(2)); + Eigen::Vector3d truth = transform.voxel2scanner * voxel; + Eigen::Vector3d current = truth + Eigen::Vector3d(displacement_inverse.row(3)); size_t iter = 0; default_type error = std::numeric_limits::max(); @@ -62,10 +62,10 @@ namespace MR private: - default_type update (Eigen::Vector3& current, const Eigen::Vector3& truth) + default_type update (Eigen::Vector3d& current, const Eigen::Vector3d& truth) { displacement.scanner (current); - Eigen::Vector3 discrepancy = truth - (current + Eigen::Vector3 (displacement.row(3))); + Eigen::Vector3d discrepancy = truth - (current + Eigen::Vector3d (displacement.row(3))); current += discrepancy; return discrepancy.dot (discrepancy); } @@ -91,9 +91,9 @@ namespace MR void operator() (Image& inv_deform) { - Eigen::Vector3 voxel ((default_type)inv_deform.index(0), (default_type)inv_deform.index(1), (default_type)inv_deform.index(2)); - Eigen::Vector3 truth = transform.voxel2scanner * voxel; - Eigen::Vector3 current = inv_deform.row(3); + Eigen::Vector3d voxel ((default_type)inv_deform.index(0), (default_type)inv_deform.index(1), (default_type)inv_deform.index(2)); + Eigen::Vector3d truth = transform.voxel2scanner * voxel; + Eigen::Vector3d current = inv_deform.row(3); size_t iter = 0; default_type error = std::numeric_limits::max(); @@ -106,10 +106,10 @@ namespace MR private: - default_type update (Eigen::Vector3& current, const Eigen::Vector3& truth) + default_type update (Eigen::Vector3d& current, const Eigen::Vector3d& truth) { deform.scanner (current); - Eigen::Vector3 discrepancy = truth - Eigen::Vector3 (deform.row(3)); + Eigen::Vector3d discrepancy = truth - Eigen::Vector3d (deform.row(3)); current += discrepancy; return discrepancy.dot (discrepancy); } diff --git a/src/stats/cfe.cpp b/src/stats/cfe.cpp index 5ab7b6f63f..6279a5da31 100644 --- a/src/stats/cfe.cpp +++ b/src/stats/cfe.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/cfe.h b/src/stats/cfe.h index 6fc740f4c3..f5250ec7dd 100644 --- a/src/stats/cfe.h +++ b/src/stats/cfe.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/cluster.cpp b/src/stats/cluster.cpp index da9f4232b4..d193c7633e 100644 --- a/src/stats/cluster.cpp +++ b/src/stats/cluster.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/cluster.h b/src/stats/cluster.h index 7b7ce2ca2a..d6b02be192 100644 --- a/src/stats/cluster.h +++ b/src/stats/cluster.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/enhance.h b/src/stats/enhance.h index f462de4313..495147b665 100644 --- a/src/stats/enhance.h +++ b/src/stats/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/stats/permstack.cpp b/src/stats/permstack.cpp index 90c0ebed79..4594539eb2 100644 --- a/src/stats/permstack.cpp +++ b/src/stats/permstack.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/permstack.h b/src/stats/permstack.h index 8a4b09f39c..128ba5d2e3 100644 --- a/src/stats/permstack.h +++ b/src/stats/permstack.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/permtest.cpp b/src/stats/permtest.cpp index 75686b5a87..d7e29dc62f 100644 --- a/src/stats/permtest.cpp +++ b/src/stats/permtest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/permtest.h b/src/stats/permtest.h index 99399742f0..bb8267ad94 100644 --- a/src/stats/permtest.h +++ b/src/stats/permtest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/tfce.cpp b/src/stats/tfce.cpp index dce8035552..3b3a3217c5 100644 --- a/src/stats/tfce.cpp +++ b/src/stats/tfce.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/stats/tfce.h b/src/stats/tfce.h index e05f4b7cff..ceb51690f2 100644 --- a/src/stats/tfce.h +++ b/src/stats/tfce.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/algo/image2mesh.h b/src/surface/algo/image2mesh.h index af74ae4699..a5a8a2b012 100644 --- a/src/surface/algo/image2mesh.h +++ b/src/surface/algo/image2mesh.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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,7 +122,7 @@ namespace MR const auto existing = vox2vertindex.find (voxels[in_vertex]); if (existing == vox2vertindex.end()) { triangle_vertices[out_vertex] = vertices.size(); - Eigen::Vector3 pos_voxelspace (default_type(voxels[in_vertex][0]) - 0.5, default_type(voxels[in_vertex][1]) - 0.5, default_type(voxels[in_vertex][2]) - 0.5); + Eigen::Vector3d pos_voxelspace (default_type(voxels[in_vertex][0]) - 0.5, default_type(voxels[in_vertex][1]) - 0.5, default_type(voxels[in_vertex][2]) - 0.5); vertices.push_back (transform.voxel2scanner * pos_voxelspace); } else { triangle_vertices[out_vertex] = existing->second; diff --git a/src/surface/algo/mesh2image.cpp b/src/surface/algo/mesh2image.cpp index 690429a789..ecdb2e719a 100644 --- a/src/surface/algo/mesh2image.cpp +++ b/src/surface/algo/mesh2image.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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 // For speed, want the vertex data to be in voxel positions Mesh mesh; - vector polygon_normals; + vector polygon_normals; // For every edge voxel, stores those polygons that may intersect the voxel using Vox2Poly = std::map< Vox, vector >; @@ -126,13 +126,13 @@ namespace MR mesh.load_quad_vertices (vertices, poly_index - mesh.num_triangles()); // Test whether or not the two objects can be separated via projection onto an axis - auto separating_axis = [&] (const Eigen::Vector3& axis) -> bool { + auto separating_axis = [&] (const Eigen::Vector3d& axis) -> bool { default_type voxel_low = std::numeric_limits::infinity(); default_type voxel_high = -std::numeric_limits::infinity(); default_type poly_low = std::numeric_limits::infinity(); default_type poly_high = -std::numeric_limits::infinity(); - static const Eigen::Vector3 voxel_offsets[8] = { { -0.5, -0.5, -0.5 }, + static const Eigen::Vector3d voxel_offsets[8] = { { -0.5, -0.5, -0.5 }, { -0.5, -0.5, 0.5 }, { -0.5, 0.5, -0.5 }, { -0.5, 0.5, 0.5 }, @@ -142,7 +142,7 @@ namespace MR { 0.5, 0.5, 0.5 } }; for (size_t i = 0; i != 8; ++i) { - const Eigen::Vector3 v (vox.matrix().cast() + voxel_offsets[i]); + const Eigen::Vector3d v (vox.matrix().cast() + voxel_offsets[i]); const default_type projection = axis.dot (v); voxel_low = std::min (voxel_low, projection); voxel_high = std::max (voxel_high, projection); @@ -163,7 +163,7 @@ namespace MR // All cross-products between voxel and polygon edges // Polygon normal for (size_t i = 0; i != 3; ++i) { - Eigen::Vector3 axis (0.0, 0.0, 0.0); + Eigen::Vector3d axis (0.0, 0.0, 0.0); axis[i] = 1.0; if (separating_axis (axis)) return false; @@ -228,7 +228,7 @@ namespace MR for (adj_voxel[1] = centre_voxel[1]-1; adj_voxel[1] <= centre_voxel[1]+1; ++adj_voxel[1]) { for (adj_voxel[0] = centre_voxel[0]-1; adj_voxel[0] <= centre_voxel[0]+1; ++adj_voxel[0]) { if (!is_out_of_bounds (H, adj_voxel) && (adj_voxel - centre_voxel).any()) { - const Eigen::Vector3 offset (adj_voxel.cast().matrix() - mesh.vert(i)); + const Eigen::Vector3d offset (adj_voxel.cast().matrix() - mesh.vert(i)); const default_type dp_normal = offset.dot (mesh.norm(i)); const default_type offset_on_plane = (offset - (mesh.norm(i) * dp_normal)).norm(); assign_pos_of (adj_voxel).to (sum_distances); @@ -376,13 +376,13 @@ namespace MR class Pipe { NOMEMALIGN public: - Pipe (const Mesh& mesh, const vector& polygon_normals) : + Pipe (const Mesh& mesh, const vector& polygon_normals) : mesh (mesh), polygon_normals (polygon_normals) { // Generate a set of points within this voxel that need to be tested individually - offsets_to_test.reset(new vector()); + offsets_to_test.reset(new vector()); offsets_to_test->reserve (pve_nsamples); for (size_t x_idx = 0; x_idx != pve_os_ratio; ++x_idx) { const default_type x = -0.5 + ((default_type(x_idx) + 0.5) / default_type(pve_os_ratio)); @@ -404,7 +404,7 @@ namespace MR size_t inside_mesh_count = 0; for (vector::const_iterator i_p = offsets_to_test->begin(); i_p != offsets_to_test->end(); ++i_p) { Vertex p (*i_p); - p += Eigen::Vector3 (voxel[0], voxel[1], voxel[2]); + p += Eigen::Vector3d (voxel[0], voxel[1], voxel[2]); default_type best_min_edge_distance_on_plane = -std::numeric_limits::infinity(); bool best_result_inside = false; @@ -412,7 +412,7 @@ namespace MR // Only test against those polygons that are near this voxel for (vector::const_iterator polygon_index = in.second.begin(); polygon_index != in.second.end(); ++polygon_index) { - const Eigen::Vector3& n (polygon_normals[*polygon_index]); + const Eigen::Vector3d& n (polygon_normals[*polygon_index]); const size_t polygon_num_vertices = (*polygon_index < mesh.num_triangles()) ? 3 : 4; VertexList v; @@ -516,9 +516,9 @@ namespace MR private: const Mesh& mesh; - const vector& polygon_normals; + const vector& polygon_normals; - std::shared_ptr> offsets_to_test; + std::shared_ptr> offsets_to_test; }; diff --git a/src/surface/algo/mesh2image.h b/src/surface/algo/mesh2image.h index 6dbae0f515..2ac7382ea9 100644 --- a/src/surface/algo/mesh2image.h +++ b/src/surface/algo/mesh2image.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/filter/base.cpp b/src/surface/filter/base.cpp index b4cf72158b..d95c5507b7 100644 --- a/src/surface/filter/base.cpp +++ b/src/surface/filter/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/src/surface/filter/base.h b/src/surface/filter/base.h index 1d9612d485..84eab40e93 100644 --- a/src/surface/filter/base.h +++ b/src/surface/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/surface/filter/smooth.cpp b/src/surface/filter/smooth.cpp index c1c8cdcd83..8df3a48b02 100644 --- a/src/surface/filter/smooth.cpp +++ b/src/surface/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 diff --git a/src/surface/filter/smooth.h b/src/surface/filter/smooth.h index 1d765a7d9a..b90cfd3778 100644 --- a/src/surface/filter/smooth.h +++ b/src/surface/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/src/surface/filter/vertex_transform.cpp b/src/surface/filter/vertex_transform.cpp index 0eb052605b..c33f54b098 100644 --- a/src/surface/filter/vertex_transform.cpp +++ b/src/surface/filter/vertex_transform.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -93,7 +93,7 @@ namespace MR case transform_t::FS2REAL: vector axes( 3 ); auto M = File::NIfTI::adjust_transform( header, axes ); - Eigen::Vector3 cras( 3, 1 ); + Eigen::Vector3d cras( 3, 1 ); for ( size_t i = 0; i < 3; i++ ) { cras[ i ] = M( i, 3 ); diff --git a/src/surface/filter/vertex_transform.h b/src/surface/filter/vertex_transform.h index 534bd5d884..a27ad6a357 100644 --- a/src/surface/filter/vertex_transform.h +++ b/src/surface/filter/vertex_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/src/surface/freesurfer.cpp b/src/surface/freesurfer.cpp index 5d21d989ca..08ac3137af 100644 --- a/src/surface/freesurfer.cpp +++ b/src/surface/freesurfer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/freesurfer.h b/src/surface/freesurfer.h index 7347acab01..af16b01b77 100644 --- a/src/surface/freesurfer.h +++ b/src/surface/freesurfer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/mesh.cpp b/src/surface/mesh.cpp index ce68ee28bb..88a60abd07 100644 --- a/src/surface/mesh.cpp +++ b/src/surface/mesh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -293,7 +293,7 @@ namespace MR warn_attribute = true; triangles.push_back ( vector { uint32_t(vertices.size()-3), uint32_t(vertices.size()-2), uint32_t(vertices.size()-1) } ); - const Eigen::Vector3 computed_normal = Surface::normal (*this, triangles.back()); + const Eigen::Vector3d computed_normal = Surface::normal (*this, triangles.back()); if (computed_normal.dot (normal.cast()) < 0.0) warn_right_hand_rule = true; if (abs (computed_normal.dot (normal.cast())) < 0.99) @@ -357,7 +357,7 @@ namespace MR throw Exception ("Error parsing STL file " + Path::basename (path) + ": facet ended with " + str(vertex_index) + " vertices"); triangles.push_back ( vector { uint32_t(vertices.size()-3), uint32_t(vertices.size()-2), uint32_t(vertices.size()-1) } ); vertex_index = 0; - const Eigen::Vector3 computed_normal = Surface::normal (*this, triangles.back()); + const Eigen::Vector3d computed_normal = Surface::normal (*this, triangles.back()); if (computed_normal.dot (normal) < 0.0) warn_right_hand_rule = true; if (abs (computed_normal.dot (normal)) < 0.99) @@ -720,7 +720,7 @@ namespace MR out.write (reinterpret_cast(&count), sizeof(uint32_t)); const uint16_t attribute_byte_count = 0; for (TriangleList::const_iterator i = triangles.begin(); i != triangles.end(); ++i) { - const Eigen::Vector3 n (normal (*this, *i)); + const Eigen::Vector3d n (normal (*this, *i)); const float n_temp[3] { float(n[0]), float(n[1]), float(n[2]) }; out.write (reinterpret_cast(&n_temp[0]), 3 * sizeof(float)); for (size_t v = 0; v != 3; ++v) { @@ -737,7 +737,7 @@ namespace MR File::OFStream out (path); out << "solid \n"; for (TriangleList::const_iterator i = triangles.begin(); i != triangles.end(); ++i) { - const Eigen::Vector3 n (normal (*this, *i)); + const Eigen::Vector3d n (normal (*this, *i)); out << "facet normal " << str (n[0]) << " " << str (n[1]) << " " << str (n[2]) << "\n"; out << " outer loop\n"; for (size_t v = 0; v != 3; ++v) { diff --git a/src/surface/mesh.h b/src/surface/mesh.h index db1f9e7d78..896f48dafe 100644 --- a/src/surface/mesh.h +++ b/src/surface/mesh.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/mesh_multi.cpp b/src/surface/mesh_multi.cpp index d9eacaed0f..5ae1125d9e 100644 --- a/src/surface/mesh_multi.cpp +++ b/src/surface/mesh_multi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/mesh_multi.h b/src/surface/mesh_multi.h index 4da4bdc374..875c4c963a 100644 --- a/src/surface/mesh_multi.h +++ b/src/surface/mesh_multi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/polygon.cpp b/src/surface/polygon.cpp index d3c3e11f25..876bf6fae1 100644 --- a/src/surface/polygon.cpp +++ b/src/surface/polygon.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/polygon.h b/src/surface/polygon.h index f110ccc76b..cab19bf492 100644 --- a/src/surface/polygon.h +++ b/src/surface/polygon.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/scalar.cpp b/src/surface/scalar.cpp index de0a7c842b..137607a52e 100644 --- a/src/surface/scalar.cpp +++ b/src/surface/scalar.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/scalar.h b/src/surface/scalar.h index 20cffbad9f..2135e860b8 100644 --- a/src/surface/scalar.h +++ b/src/surface/scalar.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to 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/surface/types.h b/src/surface/types.h index f7080dc933..806c358839 100644 --- a/src/surface/types.h +++ b/src/surface/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 @@ -29,7 +29,7 @@ namespace MR { - using Vertex = Eigen::Vector3; + using Vertex = Eigen::Vector3d; using VertexList = vector; using Triangle = Polygon<3>; using TriangleList = vector; @@ -41,7 +41,7 @@ namespace MR public: using Eigen::Array3i::Array3i; Vox () : Eigen::Array3i (-1, -1, -1) { } - Vox (const Eigen::Vector3& p) : Eigen::Array3i (int(std::round (p[0])), int(std::round (p[1])), int(std::round (p[2]))) { } + 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 ((*this)[2] == i[2] ? (((*this)[1] == i[1]) ? ((*this)[0] < i[0]) : ((*this)[1] < i[1])) : ((*this)[2] < i[2])); diff --git a/src/surface/utils.h b/src/surface/utils.h index 78e1e55cdc..04f5c8a436 100644 --- a/src/surface/utils.h +++ b/src/surface/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/src/wrap_r.h b/src/wrap_r.h index c1cbf4cb9a..582f0db842 100644 --- a/src/wrap_r.h +++ b/src/wrap_r.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/binaries/tests/dwidenoise b/testing/binaries/tests/dwidenoise index 94cccb6758..ec3b242eb3 100644 --- a/testing/binaries/tests/dwidenoise +++ b/testing/binaries/tests/dwidenoise @@ -4,5 +4,5 @@ dwidenoise dwi.mif -extent 3 - | testing_diff_image - dwidenoise/extent3.mif -vo dwidenoise dwi.mif -extent 5,3,1 - | testing_diff_image - dwidenoise/extent531.mif -voxel 1e-4 dwidenoise dwi.mif -noise tmp-noise.mif - | testing_diff_image - dwidenoise/denoised.mif -voxel 1e-4 && testing_diff_image tmp-noise.mif dwidenoise/noise.mif -image $(mrcalc dwi_mean.mif -abs 1e-4 -mult - | mrfilter - smooth -) dwidenoise dwi.mif -extent 3 -noise tmp-noise3.mif - | testing_diff_image - dwidenoise/extent3.mif -voxel 1e-4 && testing_diff_image tmp-noise3.mif dwidenoise/noise3.mif -image $(mrcalc dwi_mean.mif -abs 1e-4 -mult - | mrfilter - smooth -) -dwidenoise dwi.mif -estimator Exp1 - | testing_diff_image - dwidenoise/denoised_exp1.mif -voxel 1e-4 -dwidenoise dwi.mif -noise tmp-noise-exp1.mif -estimator Exp1 - | testing_diff_image - dwidenoise/denoised_exp1.mif -voxel 1e-4 && testing_diff_image tmp-noise-exp1.mif dwidenoise/noise_exp1.mif -image $(mrcalc dwi_mean.mif -abs 1e-4 -mult - | mrfilter - smooth -) +dwidenoise dwi.mif -estimator Exp1 - | testing_diff_image - dwidenoise/denoised_exp1.mif -voxel 1e-3 +dwidenoise dwi.mif -noise tmp-noise-exp1.mif -estimator Exp1 - | testing_diff_image - dwidenoise/denoised_exp1.mif -voxel 1e-3 && testing_diff_image tmp-noise-exp1.mif dwidenoise/noise_exp1.mif -image $(mrcalc dwi_mean.mif -abs 1e-4 -mult - | mrfilter - smooth -) diff --git a/testing/binaries/tests/fixelcfestats b/testing/binaries/tests/fixelcfestats index 18a18e692d..2def76e2bc 100644 --- a/testing/binaries/tests/fixelcfestats +++ b/testing/binaries/tests/fixelcfestats @@ -1,4 +1,4 @@ fixelcfestats fixelfilter/smooth/out/ fixelcfestats/subjects.txt fixelcfestats/design.txt fixelcfestats/contrast.txt SIFT_phantom/matrix/ tmp/ -cfe_legacy -force && testing_diff_image tmp/abs_effect.mif fixelcfestats/legacy/abs_effect.mif -frac 1e-5 && testing_diff_image tmp/beta0.mif fixelcfestats/legacy/beta0.mif -frac 1e-5 && testing_diff_image tmp/beta1.mif fixelcfestats/legacy/beta1.mif -frac 1e-5 && testing_diff_image tmp/std_dev.mif fixelcfestats/legacy/std_dev.mif -frac 1e-5 && testing_diff_image tmp/std_effect.mif fixelcfestats/legacy/std_effect.mif -frac 1e-5 && testing_diff_image tmp/tvalue.mif fixelcfestats/legacy/tvalue.mif -frac 1e-5 && mrcalc tmp/fwe_1mpvalue.mif 0.95 -gt - | testing_diff_image - SIFT_phantom/fixels/upper.mif -fixelcfestats fixelfilter/smooth/out/ fixelcfestats/subjects.txt fixelcfestats/design.txt fixelcfestats/contrast.txt SIFT_phantom/matrix/ tmp/ -force && testing_diff_image tmp/abs_effect.mif fixelcfestats/default/abs_effect.mif && testing_diff_image tmp/beta0.mif fixelcfestats/default/beta0.mif && testing_diff_image tmp/beta1.mif fixelcfestats/default/beta1.mif && testing_diff_image tmp/cfe.mif fixelcfestats/default/cfe.mif && testing_diff_image tmp/std_dev.mif fixelcfestats/default/std_dev.mif && testing_diff_image tmp/std_effect.mif fixelcfestats/default/std_effect.mif && testing_diff_image tmp/tvalue.mif fixelcfestats/default/tvalue.mif && testing_diff_image tmp/Zstat.mif fixelcfestats/default/Zstat.mif && mrcalc tmp/fwe_1mpvalue.mif 0.95 -gt - | testing_diff_image - SIFT_phantom/fixels/upper.mif +fixelcfestats fixelfilter/smooth/out/ fixelcfestats/subjects.txt fixelcfestats/design.txt fixelcfestats/contrast.txt SIFT_phantom/matrix/ tmp/ -force && testing_diff_image tmp/abs_effect.mif fixelcfestats/default/abs_effect.mif -abs 1e-6 && testing_diff_image tmp/beta0.mif fixelcfestats/default/beta0.mif -abs 1e-6 && testing_diff_image tmp/beta1.mif fixelcfestats/default/beta1.mif -abs 1e-6 && testing_diff_image tmp/cfe.mif fixelcfestats/default/cfe.mif -abs 1e-6 && testing_diff_image tmp/std_dev.mif fixelcfestats/default/std_dev.mif -abs 1e-6 && testing_diff_image tmp/std_effect.mif fixelcfestats/default/std_effect.mif -abs 1e-6 && testing_diff_image tmp/tvalue.mif fixelcfestats/default/tvalue.mif -abs 1e-6 && testing_diff_image tmp/Zstat.mif fixelcfestats/default/Zstat.mif -abs 1e-6 && mrcalc tmp/fwe_1mpvalue.mif 0.95 -gt - | testing_diff_image - SIFT_phantom/fixels/upper.mif -abs 1e-6 fixelcfestats fixelfilter/smooth/out/ fixelcfestats/subjects.txt fixelcfestats/design.txt fixelcfestats/contrast.txt SIFT_phantom/matrix/ tmp/ -mask SIFT_phantom/fixels/upper.mif -force && testing_diff_image tmp/abs_effect.mif fixelcfestats/masked/abs_effect.mif && testing_diff_image tmp/beta0.mif fixelcfestats/masked/beta0.mif && testing_diff_image tmp/beta1.mif fixelcfestats/masked/beta1.mif && testing_diff_image tmp/cfe.mif fixelcfestats/masked/cfe.mif && testing_diff_image tmp/std_dev.mif fixelcfestats/masked/std_dev.mif && testing_diff_image tmp/std_effect.mif fixelcfestats/masked/std_effect.mif && testing_diff_image tmp/tvalue.mif fixelcfestats/masked/tvalue.mif && testing_diff_image tmp/Zstat.mif fixelcfestats/masked/Zstat.mif && mrcalc tmp/fwe_1mpvalue.mif 0.95 -gt - | testing_diff_image - SIFT_phantom/fixels/upper.mif diff --git a/testing/binaries/tests/tckconvert b/testing/binaries/tests/tckconvert index 83127d3bac..3044fd328d 100644 --- a/testing/binaries/tests/tckconvert +++ b/testing/binaries/tests/tckconvert @@ -1,8 +1,19 @@ -tckconvert tracks.tck tmp.vtk -force && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tmp.vtk > tmppoints1.txt && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tckconvert/out0.vtk > tmppoints2.txt && testing_diff_matrix tmppoints1.txt tmppoints2.txt -abs 1e-4 -tckconvert tracks.tck tmp.vtk -force && awk '/LINES/,0' tmp.vtk > tmplines1.txt && awk '/LINES/,0' tckconvert/out0.vtk > tmplines2.txt && diff tmplines1.txt tmplines2.txt -tckconvert tracks.tck -scanner2voxel dwi.mif tmp.vtk -force && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tmp.vtk > tmppoints1.txt && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tckconvert/out1.vtk > tmppoints2.txt && testing_diff_matrix tmppoints1.txt tmppoints2.txt -abs 1e-4 -tckconvert tracks.tck -scanner2voxel dwi.mif tmp.vtk -force && awk '/LINES/,0' tmp.vtk > tmplines1.txt && awk '/LINES/,0' tckconvert/out1.vtk > tmplines2.txt && diff tmplines1.txt tmplines2.txt +tckconvert -ascii tracks.tck tmp.vtk -force && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tmp.vtk > tmppoints1.txt && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tckconvert/out0.vtk > tmppoints2.txt && testing_diff_matrix tmppoints1.txt tmppoints2.txt -abs 1e-4 +tckconvert tracks.tck tmp.vtk -force +tckconvert -ascii tracks.tck tmp.vtk -force && awk '/LINES/,0' tmp.vtk > tmplines1.txt && awk '/LINES/,0' tckconvert/out0.vtk > tmplines2.txt && diff tmplines1.txt tmplines2.txt +tckconvert -ascii tracks.tck -scanner2voxel dwi.mif tmp.vtk -force && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tmp.vtk > tmppoints1.txt && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tckconvert/out1.vtk > tmppoints2.txt && testing_diff_matrix tmppoints1.txt tmppoints2.txt -abs 1e-4 +tckconvert -ascii tracks.tck -scanner2voxel dwi.mif tmp.vtk -force && awk '/LINES/,0' tmp.vtk > tmplines1.txt && awk '/LINES/,0' tckconvert/out1.vtk > tmplines2.txt && diff tmplines1.txt tmplines2.txt tckedit tracks.tck -number 10 tmp.tck -nthread 0 && tckconvert tmp.tck tmp-[].txt && cat tmp-*.txt > tmp-all.txt && testing_diff_matrix tmp-all.txt tckconvert/out2-all.txt -abs 1e-4 tckconvert tckconvert/out2-[2:9].txt tmp.tck -force && testing_diff_tck tmp.tck tckconvert/out3.tck echo 1 2 3 > tmp.txt && tckconvert -force -quiet tmp.txt tmp.tck && tckconvert -quiet -force tmp.tck tmp.rib && [ $(wc -l < tmp.rib ) == 4 ] tckconvert -force -quiet tckconvert/empty.vtk tmp.tck + +# convert tck -> binary vtk: +tckconvert tracks.tck tmp.vtk -binary -force -quiet && diff tmp.vtk tckconvert/tracks-binary.vtk + +# convert binary vtk -> ascii vtk: +tckconvert tckconvert/tracks-binary.vtk tmp.vtk -ascii -force && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tmp.vtk > tmppoints1.txt && awk '/POINTS/{s=1;next}/LINES/{s=0}s' tckconvert/out0.vtk > tmppoints2.txt && testing_diff_matrix tmppoints1.txt tmppoints2.txt -abs 1e-4 + +# convert binary vtk -> tck: +tckconvert tckconvert/tracks-binary.vtk tmp.tck -force && testing_diff_tck tmp.tck tracks.tck + diff --git a/testing/binaries/tests/tckgen b/testing/binaries/tests/tckgen index 7a2f126266..a07142d9f6 100644 --- a/testing/binaries/tests/tckgen +++ b/testing/binaries/tests/tckgen @@ -10,5 +10,5 @@ tckgen SIFT_phantom/fods.mif -algo ifod2 -seed_image SIFT_phantom/mask.mif -mask tckgen SIFT_phantom/fods.mif -algo sd_stream -seed_image SIFT_phantom/mask.mif -mask SIFT_phantom/mask.mif -minlength 4 -select 100 -seed_direction 1,0,0 tmp.tck -force tckgen SIFT_phantom/dwi.mif -algo tensor_prob -seed_image SIFT_phantom/mask.mif -mask SIFT_phantom/mask.mif -minlength 4 -select 100 tmp.tck -force tckgen SIFT_phantom/fods.mif -algo ifod1 -seed_image SIFT_phantom/mask.mif -act SIFT_phantom/5tt.mif -backtrack -select 100 tmp.tck -force -tckgen dwi.mif -algo tensor_det -seed_grid_per_voxel mrcrop/mask.mif 3 -nthread 0 tmp.tck -force && testing_diff_tck tmp.tck tckgen/tensor_det.tck -tckgen dwi.mif -algo tensor_det -seed_grid_per_voxel mrcrop/mask.mif 3 tmp.tck -force && testing_diff_tck tmp.tck tckgen/tensor_det.tck -unordered && testing_diff_tck tckgen/tensor_det.tck tmp.tck -unordered +tckgen dwi.mif -algo tensor_det -seed_grid_per_voxel mrcrop/mask.mif 3 -nthread 0 tmp.tck -force && testing_diff_tck tmp.tck tckgen/tensor_det.tck -distance 1e-4 +tckgen dwi.mif -algo tensor_det -seed_grid_per_voxel mrcrop/mask.mif 3 tmp.tck -force && testing_diff_tck tmp.tck tckgen/tensor_det.tck -unordered -distance 1e-4 && testing_diff_tck tckgen/tensor_det.tck tmp.tck -unordered -distance 1e-4 diff --git a/testing/binaries/tests/tcksift2 b/testing/binaries/tests/tcksift2 index f0c0c5bad4..c6281688e4 100644 --- a/testing/binaries/tests/tcksift2 +++ b/testing/binaries/tests/tcksift2 @@ -1 +1,2 @@ tcksift2 SIFT_phantom/tracks.tck SIFT_phantom/fods.mif tmp.csv -force && tckmap SIFT_phantom/tracks.tck -template SIFT_phantom/mask.mif -precise -tck_weights_in tmp.csv tmp.mif -force && mrstats tmp.mif -mask SIFT_phantom/upper.mif -output mean > tmp1.txt && mrstats tmp.mif -mask SIFT_phantom/lower.mif -output mean > tmp2.txt && testing_diff_matrix tmp1.txt tmp2.txt -abs 50 +tcksift2 SIFT_phantom/tracks.tck SIFT_phantom/fods.mif tmp.csv -force -nthreads 0 && tckmap SIFT_phantom/tracks.tck -template SIFT_phantom/mask.mif -precise -tck_weights_in tmp.csv tmp.mif -force && mrstats tmp.mif -mask SIFT_phantom/upper.mif -output mean > tmp1.txt && mrstats tmp.mif -mask SIFT_phantom/lower.mif -output mean > tmp2.txt && testing_diff_matrix tmp1.txt tmp2.txt -abs 50 diff --git a/testing/cmd/testing_diff_dir.cpp b/testing/cmd/testing_diff_dir.cpp index c2e13384a7..8c699db09f 100644 --- a/testing/cmd/testing_diff_dir.cpp +++ b/testing/cmd/testing_diff_dir.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_diff_fixel.cpp b/testing/cmd/testing_diff_fixel.cpp index 8feb6a9144..6bc912a14b 100644 --- a/testing/cmd/testing_diff_fixel.cpp +++ b/testing/cmd/testing_diff_fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_diff_fixel_old.cpp b/testing/cmd/testing_diff_fixel_old.cpp index a255bee1e3..8b4751e2aa 100644 --- a/testing/cmd/testing_diff_fixel_old.cpp +++ b/testing/cmd/testing_diff_fixel_old.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_diff_header.cpp b/testing/cmd/testing_diff_header.cpp index 7be7e4a27e..c89f42d579 100644 --- a/testing/cmd/testing_diff_header.cpp +++ b/testing/cmd/testing_diff_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 diff --git a/testing/cmd/testing_diff_image.cpp b/testing/cmd/testing_diff_image.cpp index cd57a391eb..313e17f1bb 100644 --- a/testing/cmd/testing_diff_image.cpp +++ b/testing/cmd/testing_diff_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 diff --git a/testing/cmd/testing_diff_matrix.cpp b/testing/cmd/testing_diff_matrix.cpp index 00b4247d37..9fdd8f5bda 100644 --- a/testing/cmd/testing_diff_matrix.cpp +++ b/testing/cmd/testing_diff_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/testing/cmd/testing_diff_mesh.cpp b/testing/cmd/testing_diff_mesh.cpp index f976645a31..fe4e2d1e2c 100644 --- a/testing/cmd/testing_diff_mesh.cpp +++ b/testing/cmd/testing_diff_mesh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form 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,12 +84,12 @@ void run () for (size_t i = 0; i != in1.num_triangles(); ++i) { // Explicitly load the vertex data - std::array v1; + std::array v1; for (size_t vertex = 0; vertex != 3; ++vertex) v1[vertex] = in1.vert(in1.tri(i)[vertex]); bool match_found = false; for (size_t j = 0; j != in2.num_triangles() && !match_found; ++j) { - std::array v2; + std::array v2; for (size_t vertex = 0; vertex != 3; ++vertex) v2[vertex] = in2.vert (in2.tri(j)[vertex]); bool all_vertices_matched = true; @@ -111,12 +111,12 @@ void run () } for (size_t i = 0; i != in1.num_quads(); ++i) { - std::array v1; + std::array v1; for (size_t vertex = 0; vertex != 4; ++vertex) v1[vertex] = in1.vert (in1.quad(i)[vertex]); bool match_found = false; for (size_t j = 0; j != in2.num_quads() && !match_found; ++j) { - std::array v2; + std::array v2; for (size_t vertex = 0; vertex != 4; ++vertex) v2[vertex] = in2.vert (in2.quad(j)[vertex]); bool all_vertices_matched = true; diff --git a/testing/cmd/testing_diff_peaks.cpp b/testing/cmd/testing_diff_peaks.cpp index 0708c4655b..284f97a787 100644 --- a/testing/cmd/testing_diff_peaks.cpp +++ b/testing/cmd/testing_diff_peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -68,7 +68,7 @@ void run () .run ([&tol] (decltype(in1)& a, decltype(in2)& b) { for (size_t i = 0; i != size_t(a.size(3)); i += 3) { - Eigen::Vector3 veca, vecb; + Eigen::Vector3d veca, vecb; for (size_t axis = 0; axis != 3; ++axis) { a.index(3) = b.index(3) = i + axis; veca[axis] = a.value(); diff --git a/testing/cmd/testing_diff_tck.cpp b/testing/cmd/testing_diff_tck.cpp index 767e746f4c..cbab0327b8 100644 --- a/testing/cmd/testing_diff_tck.cpp +++ b/testing/cmd/testing_diff_tck.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_diff_tsf.cpp b/testing/cmd/testing_diff_tsf.cpp index 80ad36648f..0ad61b048b 100644 --- a/testing/cmd/testing_diff_tsf.cpp +++ b/testing/cmd/testing_diff_tsf.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_gen_data.cpp b/testing/cmd/testing_gen_data.cpp index 5fa549c0af..d359a33701 100644 --- a/testing/cmd/testing_gen_data.cpp +++ b/testing/cmd/testing_gen_data.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_unit_tests_bitset.cpp b/testing/cmd/testing_unit_tests_bitset.cpp index 5d2a854b98..8c0905dc7c 100644 --- a/testing/cmd/testing_unit_tests_bitset.cpp +++ b/testing/cmd/testing_unit_tests_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/testing/cmd/testing_unit_tests_erfinv.cpp b/testing/cmd/testing_unit_tests_erfinv.cpp index afc1ad6328..c59517df68 100644 --- a/testing/cmd/testing_unit_tests_erfinv.cpp +++ b/testing/cmd/testing_unit_tests_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/testing/cmd/testing_unit_tests_icls.cpp b/testing/cmd/testing_unit_tests_icls.cpp index 6ddd82fe92..fc2f19d3eb 100644 --- a/testing/cmd/testing_unit_tests_icls.cpp +++ b/testing/cmd/testing_unit_tests_icls.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_unit_tests_ordered_include.cpp b/testing/cmd/testing_unit_tests_ordered_include.cpp index 892d7f2d5d..6c28bad664 100644 --- a/testing/cmd/testing_unit_tests_ordered_include.cpp +++ b/testing/cmd/testing_unit_tests_ordered_include.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_unit_tests_ordered_queue.cpp b/testing/cmd/testing_unit_tests_ordered_queue.cpp index 4fec71ddd5..a70de36988 100644 --- a/testing/cmd/testing_unit_tests_ordered_queue.cpp +++ b/testing/cmd/testing_unit_tests_ordered_queue.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_unit_tests_parse_ints.cpp b/testing/cmd/testing_unit_tests_parse_ints.cpp index fd58398855..2aba264fae 100644 --- a/testing/cmd/testing_unit_tests_parse_ints.cpp +++ b/testing/cmd/testing_unit_tests_parse_ints.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_unit_tests_sh_precomputer.cpp b/testing/cmd/testing_unit_tests_sh_precomputer.cpp index 2923599c7b..3e622cf019 100644 --- a/testing/cmd/testing_unit_tests_sh_precomputer.cpp +++ b/testing/cmd/testing_unit_tests_sh_precomputer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/cmd/testing_unit_tests_shuffle.cpp b/testing/cmd/testing_unit_tests_shuffle.cpp index 7805e048a3..d40d9be544 100644 --- a/testing/cmd/testing_unit_tests_shuffle.cpp +++ b/testing/cmd/testing_unit_tests_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/testing/cmd/testing_unit_tests_to.cpp b/testing/cmd/testing_unit_tests_to.cpp index 4987a13059..f4f96f25ac 100644 --- a/testing/cmd/testing_unit_tests_to.cpp +++ b/testing/cmd/testing_unit_tests_to.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/scripts/tests/dwicat b/testing/scripts/tests/dwicat index d0f9e6c548..4974fb837e 100644 --- a/testing/scripts/tests/dwicat +++ b/testing/scripts/tests/dwicat @@ -2,4 +2,4 @@ mkdir -p ../tmp/dwicat && mrconvert BIDS/sub-01/dwi/sub-01_dwi.nii.gz -fslgrad B dwicat tmp01_b1000.mif tmp03_b2000.mif tmp03_b3000.mif ../tmp/dwicat/sharedb0_unmasked.mif -force && testing_diff_image ../tmp/dwicat/sharedb0_unmasked.mif tmp02.mif -frac 1e-6 dwiextract tmp.mif tmp11_b0.mif -shell 0 -force && dwiextract tmp.mif tmp11_b1000.mif -shell 1000 -force && dwiextract tmp.mif tmp11_b2000.mif -shell 2000 -force && dwiextract tmp.mif tmp11_b3000.mif -shell 3000 -force && mrconvert tmp11_b0.mif -coord 3 0,1 - | mrcat - tmp11_b1000.mif tmp12_b1000.mif -axis 3 -force && mrconvert tmp11_b0.mif -coord 3 2,3 - | mrcat - tmp11_b2000.mif tmp12_b2000.mif -axis 3 -force && mrconvert tmp11_b0.mif -coord 3 4,5 - | mrcat - tmp11_b3000.mif tmp12_b3000.mif -axis 3 -force && mrcalc tmp12_b2000.mif 0.2 -mult tmp13_b2000.mif -force && mrcalc tmp12_b3000.mif 5.0 -mult tmp13_b3000.mif -force && mrcat tmp12_b1000.mif tmp12_b2000.mif tmp12_b3000.mif tmp14.mif -axis 3 -force && dwicat tmp12_b1000.mif tmp13_b2000.mif tmp13_b3000.mif ../tmp/dwicat/ownb0_masked.mif -mask BIDS/sub-01/dwi/sub-01_brainmask.nii.gz -force && testing_diff_image ../tmp/dwicat/ownb0_masked.mif tmp14.mif -frac 0.01 dwicat tmp12_b1000.mif tmp13_b2000.mif tmp13_b3000.mif ../tmp/dwicat/ownb0_unmasked.mif -force && testing_diff_image ../tmp/dwicat/ownb0_unmasked.mif tmp14.mif -frac 0.02 - +dwiextract tmp12_b1000.mif -bzero - | mrconvert - tmp12_b1000_1b0.mif -coord 3 0 -axes 0,1,2 -force && dwicat tmp12_b1000.mif tmp12_b1000_1b0.mif ../tmp/dwicat/3dinput.mif -force diff --git a/testing/src/diff_images.h b/testing/src/diff_images.h index bdcc25cfdc..77cbdf21a4 100644 --- a/testing/src/diff_images.h +++ b/testing/src/diff_images.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/src/unit_tests/tractography/roi_unit_tests.h b/testing/src/unit_tests/tractography/roi_unit_tests.h index c4c8a1344d..e903089585 100644 --- a/testing/src/unit_tests/tractography/roi_unit_tests.h +++ b/testing/src/unit_tests/tractography/roi_unit_tests.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/testing/src/unit_tests/unit_test.h b/testing/src/unit_tests/unit_test.h index cc99bba597..5495c050aa 100644 --- a/testing/src/unit_tests/unit_test.h +++ b/testing/src/unit_tests/unit_test.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2021 the MRtrix3 contributors. +/* Copyright (c) 2008-2022 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/update_copyright b/update_copyright index f2e3f81b01..e81a13fb69 100755 --- a/update_copyright +++ b/update_copyright @@ -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 datetime, os from collections import namedtuple diff --git a/update_dev_doc b/update_dev_doc index e818cdd313..82f0474974 100755 --- a/update_dev_doc +++ b/update_dev_doc @@ -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 @@ -25,6 +25,7 @@ set -e git pull git rm -rf * cp -r ../devdoc/* . + touch .nojekyll git add . git commit -a -m "automatic update of dev doc" git push