diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 17fdd705a7..67c65fa39d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -27,7 +27,7 @@ jobs: - name: install dependencies run: | sudo apt-get update - sudo apt-get install clang 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 libpng-dev - name: configure run: ./configure -assert || { cat configure.log; false; } @@ -41,6 +41,8 @@ jobs: - name: binary tests run: ./run_tests binaries || { cat testing_binaries.log; false; } + - name: check command documentation + run: ./docs/generate_user_docs.sh && git diff --exit-code docs/ @@ -103,9 +105,6 @@ jobs: - name: binary tests run: ./run_tests binaries || { cat testing_binaries.log; false; } - - name: check command documentation - run: ./docs/generate_user_docs.sh && git diff --exit-code docs/ - @@ -183,13 +182,7 @@ jobs: run: python3 -m sphinx -n -N -W -w sphinx.log docs/ tmp/ - name: install build dependencies - 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; } - - - name: check build with Python 2 - run: python2 ./build -dryrun || { cat build.log; false; } + run: sudo apt-get install clang libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev - name: check configure with Python 3 run: python3 ./configure || { cat configure.log; false; } diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml new file mode 100644 index 0000000000..a9fc37b5d6 --- /dev/null +++ b/.github/workflows/releases.yml @@ -0,0 +1,137 @@ +name: Releases + +on: + workflow_dispatch: + inputs: + branch: + description: 'Branch to release from' + required: true + default: 'dev' + +jobs: + linux-release: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.event.inputs.branch }} + + - name: Set env vars + id: envs + run: | + commit_sha=$(git rev-parse HEAD) + date=$(date +%Y_%m_%d) + echo "commit_sha=$commit_sha" >> $GITHUB_OUTPUT + echo "date=$date" >> $GITHUB_OUTPUT + echo "output_name=mrtrix3-linux-$commit_sha-$date" >> $GITHUB_OUTPUT + + - name: Install Eigen3 + run: | + git clone https://gitlab.com/libeigen/eigen.git && cd eigen && git checkout 3.4.0 + cmake -B build && cmake --build build + sudo cmake --install build + + - name: Install Qt 6 + uses: jurplel/install-qt-action@v3 + with: + version: '6.7.0' + set-env: true + + - name: Run build + run: | + ./packaging/package-linux-tarball.sh . + mv mrtrix.tar.gz ${{ steps.envs.outputs.output_name }}.tar.gz + + - name: Upload release artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.envs.outputs.output_name }} + path: ${{ steps.envs.outputs.output_name }}.tar.gz + + macos-release: + runs-on: macos-latest + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.event.inputs.branch }} + + - name: Set env vars + id: envs + run: | + commit_sha=$(git rev-parse HEAD) + date=$(date +%Y_%m_%d) + echo "commit_sha=$commit_sha" >> $GITHUB_OUTPUT + echo "date=$date" >> $GITHUB_OUTPUT + echo "output_name=mrtrix3-macos-$commit_sha-$date" >> $GITHUB_OUTPUT + + - name: Install deps + run: brew install numpy cmake qt eigen pkg-config fftw libpng ninja + + - name: Run build + run: | + cd ./packaging/macos + ./build ${{ github.event.inputs.branch }} + mv ./mrtrix3-macos-${{ github.event.inputs.branch }}.tar.xz ../../${{ steps.envs.outputs.output_name }}.tar.xz + + - name: Upload release artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.envs.outputs.output_name }} + path: ${{ steps.envs.outputs.output_name }}.tar.xz + + windows-release: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + + env: + MINGW_PACKAGE_PREFIX: mingw-w64-ucrt-x86_64 + + steps: + - uses: msys2/setup-msys2@v2 + with: + msystem: UCRT64 + install: | + git + python + ${{env.MINGW_PACKAGE_PREFIX}}-bc + ${{env.MINGW_PACKAGE_PREFIX}}-cmake + ${{env.MINGW_PACKAGE_PREFIX}}-diffutils + ${{env.MINGW_PACKAGE_PREFIX}}-eigen3 + ${{env.MINGW_PACKAGE_PREFIX}}-fftw + ${{env.MINGW_PACKAGE_PREFIX}}-gcc + ${{env.MINGW_PACKAGE_PREFIX}}-libtiff + ${{env.MINGW_PACKAGE_PREFIX}}-ninja + ${{env.MINGW_PACKAGE_PREFIX}}-pkg-config + ${{env.MINGW_PACKAGE_PREFIX}}-qt6-base + ${{env.MINGW_PACKAGE_PREFIX}}-qt6-svg + ${{env.MINGW_PACKAGE_PREFIX}}-zlib + + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.event.inputs.branch }} + + - name: Set env vars + id: envs + run: | + commit_sha=$(git rev-parse HEAD) + date=$(date +%Y_%m_%d) + echo "commit_sha=$commit_sha" >> $GITHUB_OUTPUT + echo "date=$date" >> $GITHUB_OUTPUT + echo "output_name=mrtrix3-windows-$commit_sha-$date" >> $GITHUB_OUTPUT + + - name: Run build + run: | + cd packaging/mingw + ./run.sh ${{ steps.envs.outputs.commit_sha }} mrtrix3 + mv mingw*.tar.zst ../../../${{ steps.envs.outputs.output_name }}.tar.zst + + - name: Upload release artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.envs.outputs.output_name }} + path: ${{ steps.envs.outputs.output_name }}.tar.zst diff --git a/.github/workflows/weekly_sanitizers.yml b/.github/workflows/weekly_sanitizers.yml new file mode 100644 index 0000000000..8394635069 --- /dev/null +++ b/.github/workflows/weekly_sanitizers.yml @@ -0,0 +1,62 @@ +name: Sanitizers checks + +on: + workflow_dispatch: + # Run this every Sunday at midnight + schedule: + - cron: "0 0 * * 0" + +jobs: + linux-clang-build: + runs-on: ubuntu-latest + + env: + SCCACHE_GHA_ENABLED: "true" + SCCACHE_CACHE_SIZE: "2G" + + strategy: + fail-fast: false + matrix: + sanitizer: [address, thread, undefined] + + steps: + - uses: actions/checkout@v1 + with: + submodules: true + ref: dev + + - name: install dependencies + run: | + sudo apt-get update + sudo apt-get install clang llvm qt6-base-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev ninja-build python3-numpy + + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 + + - name: Get CMake + uses: lukka/get-cmake@latest + with: + cmakeVersion: '3.16.3' + + - name: Print CMake version + run: cmake --version + + - name: configure + run: > + cmake + -B build + -G Ninja + -D CMAKE_BUILD_TYPE=RelWithDebInfo + -D MRTRIX_BUILD_TESTS=ON + -D ECM_ENABLE_SANITIZERS=${{ matrix.sanitizer }} + -D CMAKE_C_COMPILER=clang + -D CMAKE_CXX_COMPILER=clang++ + + - name: build + run: cmake --build build + + - name: binary tests + run: cd build && ctest -L binary --output-on-failure + + - name: unit tests + run: cd build && ctest -L unittest --output-on-failure diff --git a/.readthedocs.yml b/.readthedocs.yml index 190bddd5ac..db226449e0 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,6 +5,13 @@ # Required version: 2 +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.10" + + # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py @@ -20,6 +27,5 @@ formats: # Optionally set the version of Python and requirements required to build your docs python: - version: 3.7 install: - requirements: docs/requirements.txt diff --git a/Dockerfile b/Dockerfile index 0a30e90d9f..8ba036b7a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG MAKE_JOBS="1" ARG DEBIAN_FRONTEND="noninteractive" FROM python:3.8-slim AS base -FROM buildpack-deps:buster AS base-builder +FROM buildpack-deps:bookworm AS base-builder FROM base-builder AS mrtrix3-builder @@ -22,7 +22,8 @@ RUN apt-get -qq update \ libqt5opengl5-dev \ libqt5svg5-dev \ libtiff5-dev \ - qt5-default \ + python3 \ + qtbase5-dev \ zlib1g-dev \ && rm -rf /var/lib/apt/lists/* @@ -30,31 +31,31 @@ RUN apt-get -qq update \ ARG MAKE_JOBS WORKDIR /opt/mrtrix3 RUN git clone -b $MRTRIX3_GIT_COMMITISH --depth 1 https://github.com/MRtrix3/mrtrix3.git . \ - && ./configure $MRTRIX3_CONFIGURE_FLAGS \ - && NUMBER_OF_PROCESSORS=$MAKE_JOBS ./build $MRTRIX3_BUILD_FLAGS \ + && python3 ./configure $MRTRIX3_CONFIGURE_FLAGS \ + && NUMBER_OF_PROCESSORS=$MAKE_JOBS python3 ./build $MRTRIX3_BUILD_FLAGS \ && rm -rf tmp # Download minified ART ACPCdetect (V2.0). -FROM base-builder as acpcdetect-installer +FROM base-builder AS acpcdetect-installer WORKDIR /opt/art RUN curl -fsSL https://osf.io/73h5s/download \ | tar xz --strip-components 1 # Download minified ANTs (2.3.4-2). -FROM base-builder as ants-installer +FROM base-builder AS ants-installer WORKDIR /opt/ants RUN curl -fsSL https://osf.io/yswa4/download \ | tar xz --strip-components 1 # Download FreeSurfer files. -FROM base-builder as freesurfer-installer +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-2) -FROM base-builder as fsl-installer +# Download minified FSL (6.0.7.7) +FROM base-builder AS fsl-installer WORKDIR /opt/fsl -RUN curl -fsSL https://osf.io/dtep4/download \ +RUN curl -fsSL https://osf.io/ph9ex/download \ | tar xz --strip-components 1 # Build final image. @@ -66,7 +67,8 @@ RUN apt-get -qq update \ binutils \ dc \ less \ - libfftw3-3 \ + libfftw3-single3 \ + libfftw3-double3 \ libgl1-mesa-glx \ libgomp1 \ liblapack3 \ @@ -77,8 +79,10 @@ RUN apt-get -qq update \ libqt5svg5 \ libqt5widgets5 \ libquadmath0 \ - libtiff5 \ + libtiff5-dev \ + python3 \ python3-distutils \ + procps \ && rm -rf /var/lib/apt/lists/* COPY --from=acpcdetect-installer /opt/art /opt/art @@ -95,12 +99,13 @@ ENV ANTSPATH="/opt/ants/bin" \ FSLMULTIFILEQUIT="TRUE" \ FSLTCLSH="/opt/fsl/bin/fsltclsh" \ FSLWISH="/opt/fsl/bin/fslwish" \ - LD_LIBRARY_PATH="/opt/fsl/lib:$LD_LIBRARY_PATH" \ - PATH="/opt/mrtrix3/bin:/opt/ants/bin:/opt/art/bin:/opt/fsl/bin:$PATH" + PATH="/opt/mrtrix3/bin:/opt/ants/bin:/opt/art/bin:/opt/fsl/share/fsl/bin:$PATH" # 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 +RUN ln -s /usr/bin/python3 /usr/bin/python + CMD ["/bin/bash"] diff --git a/Singularity b/Singularity index 21904e74fa..b17eb16b1b 100644 --- a/Singularity +++ b/Singularity @@ -26,8 +26,8 @@ Include: apt export FSLDIR FSLOUTPUTTYPE FSLMULTIFILEQUIT FSLTCLSH FSLWISH # All - 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" + LD_LIBRARY_PATH="/.singularity.d/libs:/usr/lib:$LD_LIBRARY_PATH" + PATH="/opt/mrtrix3/bin:/opt/ants/bin:/opt/art/bin:/opt/fsl/share/fsl/bin:$PATH" export LD_LIBRARY_PATH PATH %post @@ -51,8 +51,8 @@ Include: apt 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-2). - mkdir -p /opt/fsl && curl -fsSL https://osf.io/dtep4/download | tar xz -C /opt/fsl --strip-components 1 + # Download minified FSL (6.0.7.7). + mkdir -p /opt/fsl && curl -fsSL https://osf.io/ph9ex/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 diff --git a/bin/5ttgen b/bin/5ttgen index 6eceb138eb..f473eb254b 100755 --- a/bin/5ttgen +++ b/bin/5ttgen @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 4aee34878b..953daea6ce 100755 --- a/bin/blend +++ b/bin/blend @@ -1,6 +1,6 @@ #!/usr/bin/env python2 -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/convert_bruker b/bin/convert_bruker index 9e28c806ea..4dd6abc7c1 100755 --- a/bin/convert_bruker +++ b/bin/convert_bruker @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwi2response b/bin/dwi2response index da7b8e1623..160f98e3e5 100755 --- a/bin/dwi2response +++ b/bin/dwi2response @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwibiascorrect b/bin/dwibiascorrect index 0ce76612d6..98e50afb10 100755 --- a/bin/dwibiascorrect +++ b/bin/dwibiascorrect @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 fda0f6f874..42269e4a6d 100755 --- a/bin/dwicat +++ b/bin/dwicat @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwifslpreproc b/bin/dwifslpreproc index 4e804e5554..1ec58eb433 100755 --- a/bin/dwifslpreproc +++ b/bin/dwifslpreproc @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -23,7 +23,10 @@ import itertools, json, math, os, shutil, sys -from distutils.spawn import find_executable +try: + from shutil import which as find_executable +except ImportError: + from distutils.spawn import find_executable # pylint: disable=deprecated-module @@ -115,7 +118,11 @@ def execute(): #pylint: disable=unused-variable if not fsl_path: raise MRtrixError('Environment variable FSLDIR is not set; please run appropriate FSL configuration script') - if not pe_design == 'None': + if pe_design == 'None': + topup_config_path = None + topup_cmd = None + applytopup_cmd = None + else: topup_config_path = os.path.join(fsl_path, 'etc', 'flirtsch', 'b02b0.cnf') if not os.path.isfile(topup_config_path): raise MRtrixError('Could not find necessary default config file for FSL topup command (expected location: ' + topup_config_path + ')') @@ -476,7 +483,7 @@ def execute(): #pylint: disable=unused-variable overwrite_dwi_pe_scheme = True if manual_trt: # Compare manual specification to that read from the header - if not scheme_times_match(dwi_pe_scheme, dwi_manual_pe_scheme): + if len(dwi_pe_scheme[0]) == 4 and app.ARGS.readout_time is not None and not scheme_times_match(dwi_pe_scheme, dwi_manual_pe_scheme): app.warn('User-defined total readout time does not match what is stored in DWI image header; proceeding with user specification') overwrite_dwi_pe_scheme = True if overwrite_dwi_pe_scheme: @@ -513,7 +520,7 @@ def execute(): #pylint: disable=unused-variable # Deal with the phase-encoding of the images to be fed to topup (if applicable) - do_topup = (not pe_design == 'None') + do_topup = pe_design != 'None' overwrite_se_epi_pe_scheme = False se_epi_path = 'se_epi.mif' dwi_permvols_preeddy_option = '' @@ -549,7 +556,7 @@ def execute(): #pylint: disable=unused-variable app.warn('User-defined phase-encoding direction design does not match what is stored in SE EPI image header; proceeding with user specification') overwrite_se_epi_pe_scheme = True if manual_trt: - if not scheme_times_match(se_epi_pe_scheme, se_epi_manual_pe_scheme): + if len(se_epi_pe_scheme[0]) == 4 and not scheme_times_match(se_epi_pe_scheme, se_epi_manual_pe_scheme): app.warn('User-defined total readout time does not match what is stored in SE EPI image header; proceeding with user specification') overwrite_se_epi_pe_scheme = True if overwrite_se_epi_pe_scheme: diff --git a/bin/dwigradcheck b/bin/dwigradcheck index 5dea3ae521..8009cb8789 100755 --- a/bin/dwigradcheck +++ b/bin/dwigradcheck @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -163,6 +163,9 @@ def execute(): #pylint: disable=unused-variable grad_option = ' -fslgrad ' + grad_path + ' bvals' + else: + assert False + # Run the tracking experiment run.command('tckgen -algorithm tensor_det data.mif' + grad_option + ' -seed_image mask.mif -mask mask.mif' + number_option + ' -minlength 0 -downsample 5 tracks' + suffix + '.tck') @@ -202,6 +205,8 @@ def execute(): #pylint: disable=unused-variable grad_import_option = ' -grad grad' + suffix + '.b' elif best[3] == 'image': grad_import_option = ' -fslgrad bvecs' + suffix + ' bvals' + else: + assert False run.command('mrinfo data.mif' + grad_import_option + grad_export_option, force=app.FORCE_OVERWRITE) diff --git a/bin/dwinormalise b/bin/dwinormalise index 71e324659b..0935cabe17 100755 --- a/bin/dwinormalise +++ b/bin/dwinormalise @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 f9bb2f6059..ac7a3ab965 100755 --- a/bin/dwishellmath +++ b/bin/dwishellmath @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/for_each b/bin/for_each index 14665697b0..c8ae85fd5f 100755 --- a/bin/for_each +++ b/bin/for_each @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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,6 +48,9 @@ def usage(cmdline): #pylint: disable=unused-variable cmdline.add_example_usage('Testing the command string substitution', 'for_each -test * : mrconvert IN PRE.mif', 'By specifying the -test option, the script will print to the terminal the results of text substitutions for all of the specified inputs, but will not actually execute those commands. It can therefore be used to verify that the script is receiving the intended set of inputs, and that the text substitutions on those inputs lead to the intended command strings.') + cmdline.add_example_usage('Utilising shell operators within the command substitution', + 'for_each * : tensor2metric IN/dwi.mif - "|" tensor2metric - -fa IN/fa.mif', + 'In this example, if the double-quotes were NOT placed around the pipe operator, then the shell would take the sum total output of the for_each script and pipe that to a single invocation of the tensor2metric command. Since in this example it is instead desired for the pipe operator to be a part of the command string that is executed multiple times by the for_each script, it must be escaped using double-quotes.') cmdline.add_argument('inputs', help='Each of the inputs for which processing should be run', nargs='+') cmdline.add_argument('colon', help='Colon symbol (":") delimiting the for_each inputs & command-line options from the actual command to be executed', type=str, choices=[':']) cmdline.add_argument('command', help='The command string to run for each input, containing any number of substitutions listed in the Description section', type=str) @@ -201,12 +204,12 @@ def execute(): #pylint: disable=unused-variable parallel = app.NUM_THREADS is not None and app.NUM_THREADS > 1 def progress_string(): - text = str(sum([ 1 if job.returncode is not None else 0 for job in jobs ])) + \ + text = str(sum(1 if job.returncode is not None else 0 for job in jobs)) + \ '/' + \ str(len(jobs)) + \ ' jobs completed ' + \ ('across ' + str(app.NUM_THREADS) + ' threads' if parallel else 'sequentially') - fail_count = sum([ 1 if job.returncode else 0 for job in jobs ]) + fail_count = sum(bool(job.returncode) for job in jobs) if fail_count: text += ' (' + str(fail_count) + ' errors)' return text @@ -257,7 +260,7 @@ def execute(): #pylint: disable=unused-variable progress.done() assert all(job.returncode is not None for job in jobs) - fail_count = sum([ 1 if job.returncode else 0 for job in jobs ]) + fail_count = sum(bool(job.returncode) for job in jobs) if fail_count: app.warn(str(fail_count) + ' of ' + str(len(jobs)) + ' jobs did not complete successfully') if fail_count > 1: diff --git a/bin/gen_scheme b/bin/gen_scheme index 897a8f27a1..0f5a374ba1 100755 --- a/bin/gen_scheme +++ b/bin/gen_scheme @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 4e13316208..6c5acca716 100755 --- a/bin/labelsgmfix +++ b/bin/labelsgmfix @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/mrtrix3.py b/bin/mrtrix3.py index ea8967d532..12c0164325 100644 --- a/bin/mrtrix3.py +++ b/bin/mrtrix3.py @@ -14,22 +14,47 @@ # # For more details, see http://www.mrtrix.org/. -import imp, os, sys -from distutils.spawn import find_executable +import os, sys -def imported(lib_path): - success = False - fp = None +try: + # since importlib code below only works on Python 3.5+ + # https://stackoverflow.com/a/50395128 + if sys.version_info < (3,5): + raise ImportError + + import importlib.util + + def imported(lib_path): + try: + spec = importlib.util.spec_from_file_location('mrtrix3', os.path.join (lib_path, 'mrtrix3', '__init__.py')) + module = importlib.util.module_from_spec (spec) + sys.modules[spec.name] = module + spec.loader.exec_module (module) + return True + except ImportError: + return False + +except ImportError: try: - fp, pathname, description = imp.find_module('mrtrix3', [ lib_path ]) - imp.load_module('mrtrix3', fp, pathname, description) - success = True + import imp except ImportError: - pass - finally: - if fp: - fp.close() - return success + print ('failed to import either imp or importlib module!') + sys.exit(1) + + def imported(lib_path): + success = False + fp = None + try: + fp, pathname, description = imp.find_module('mrtrix3', [ lib_path ]) + imp.load_module('mrtrix3', fp, pathname, description) + success = True + except ImportError: + pass + finally: + if fp: + fp.close() + return success + # Can the MRtrix3 Python modules be found based on their relative location to this file? # Note that this includes the case where this file is a softlink within an external module, diff --git a/bin/mrtrix_cleanup b/bin/mrtrix_cleanup index 1fdc41ed6c..7491700040 100755 --- a/bin/mrtrix_cleanup +++ b/bin/mrtrix_cleanup @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/notfound b/bin/notfound index d52003924c..8a30ae75f6 100755 --- a/bin/notfound +++ b/bin/notfound @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 18c87ae66a..edd1635b94 100755 --- a/bin/population_template +++ b/bin/population_template @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -119,7 +119,7 @@ def copy(src, dst, follow_symlinks=True): return dst -def check_linear_transformation(transformation, cmd, max_scaling=0.5, max_shear=0.2, max_rot=None, pause_on_warn=True): +def check_linear_transformation(transformation, cmd, max_scaling=0.5, max_shear=0.2, max_rot=None, pause_on_warn=True): #pylint: disable=too-many-positional-arguments from mrtrix3 import app, run, utils #pylint: disable=no-name-in-module, import-outside-toplevel if max_rot is None: max_rot = 2 * math.pi @@ -195,10 +195,10 @@ def aggregate(inputs, output, contrast_idx, mode, force=True): elif mode == 'weighted_mean': weights = [inp.aggregation_weight for inp in inputs] assert not any(w is None for w in weights), weights - wsum = sum([float(w) for w in weights]) - cmd = ['mrcalc'] + wsum = sum(map(float, weights)) if wsum <= 0: raise MRtrixError("the sum of aggregetion weights has to be positive") + cmd = ['mrcalc'] for weight, image in zip(weights, images): if float(weight) != 0: cmd += [image, weight, '-mult'] + (['-add'] if len(cmd) > 1 else []) @@ -385,7 +385,7 @@ class Input(object): copy files into folders in current working directory. modifies _local_ims and _local_msk """ - def __init__(self, uid, filenames, directories, contrasts, mask_filename='', mask_directory=''): + def __init__(self, uid, filenames, directories, contrasts, mask_filename='', mask_directory=''): #pylint: disable=too-many-positional-arguments self.contrasts = contrasts self.uid = uid @@ -558,19 +558,17 @@ def parse_input_files(in_files, mask_files, contrasts, f_agg_weight=None, whites import csv # pylint: disable=import-outside-toplevel try: with open(f_agg_weight, 'r') as fweights: - agg_weights = dict((row[0].lstrip().rstrip(), row[1]) for row in csv.reader(fweights, delimiter=',', quotechar='#')) + agg_weights = dict((row[0].strip(), row[1].strip()) for row in csv.reader(fweights, delimiter=',', quotechar='#')) except UnicodeDecodeError: with open(f_agg_weight, 'r') as fweights: reader = csv.reader(fweights.read().decode('utf-8', errors='replace'), delimiter=',', quotechar='#') - agg_weights = dict((row[0].lstrip().rstrip(), row[1]) for row in reader) + agg_weights = dict((row[0].strip(), row[1].strip()) for row in reader) pref = '^' + re.escape(get_common_prefix(list(agg_weights.keys()))) suff = re.escape(get_common_postfix(list(agg_weights.keys()))) + '$' - for key in agg_weights.keys(): - agg_weights[re.sub(suff, '', re.sub(pref, '', key))] = agg_weights.pop(key).strip() - + agg_weights = {re.sub(suff, '', re.sub(pref, '', item[0])):item[1] for item in agg_weights.items()} for inp in inputs: if inp.uid not in agg_weights: - raise MRtrixError('aggregation weight not found for %s' % inp.uid) + raise MRtrixError('aggregation weight not found for input "%s"' % inp.uid) inp.aggregation_weight = agg_weights[inp.uid] app.console('Using aggregation weights ' + f_agg_weight) weights = [float(inp.aggregation_weight) for inp in inputs if inp.aggregation_weight is not None] @@ -925,7 +923,7 @@ def execute(): #pylint: disable=unused-variable if use_masks: path.make_dir('mask_transformed') - write_log = (app.VERBOSITY >= 2) + write_log = app.VERBOSITY >= 2 if write_log: path.make_dir('log') diff --git a/bin/responsemean b/bin/responsemean index cd1024ebd1..76f94bceaf 100755 --- a/bin/responsemean +++ b/bin/responsemean @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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,7 +56,7 @@ def execute(): #pylint: disable=unused-variable # New approach: Calculate a multiplier to use for each subject, based on the geometric mean # scaling factor required to bring the subject toward the group mean l=0 terms (across shells) - mean_lzero_terms = [ sum([ subject[row][0] for subject in data ])/len(data) for row in range(len(data[0])) ] + mean_lzero_terms = [ sum(subject[row][0] for subject in data)/len(data) for row in range(len(data[0])) ] app.debug('Mean l=0 terms: ' + str(mean_lzero_terms)) weighted_sum_coeffs = [[0.0] * len(data[0][0]) for _ in range(len(data[0]))] #pylint: disable=unused-variable diff --git a/build b/build index 6b5a63bf9a..6294b31268 100755 --- a/build +++ b/build @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -868,7 +868,10 @@ class Entry(object): return self.timestamp == float("inf") or self.timestamp < self.dep_timestamp def display (self, indent=''): - show_rebuild = lambda x: x+' [REBUILD]' if todo[x].need_rebuild() else x + def show_rebuild(x): + if not todo[x].need_rebuild(): + return x + return x+' [REBUILD]' msg = indent + '[' + self.action + '] ' + show_rebuild (self.name) + ':\n' msg += indent + ' timestamp: ' + str(self.timestamp) if self.deps: diff --git a/check_syntax b/check_syntax index fa4d9bf440..4679a3f02c 100755 --- a/check_syntax +++ b/check_syntax @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 10039e7f99..470ebc8c68 100644 --- a/cmd/5tt2gmwmi.cpp +++ b/cmd/5tt2gmwmi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 c087467edf..418fff46e8 100644 --- a/cmd/5tt2vis.cpp +++ b/cmd/5tt2vis.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 11512c8661..297283dc24 100644 --- a/cmd/5ttcheck.cpp +++ b/cmd/5ttcheck.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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 @@ void run () } } - const std::string vox_option_suggestion = get_options ("masks").size() ? (" (suggest checking " + std::string(argument.size() > 1 ? "outputs from" : "output of") + " -masks option)") : " (suggest re-running using the -masks option to see voxels where tissue fractions do not sum to 1.0)"; + const std::string vox_option_suggestion = get_options ("voxels").size() ? (" (suggest checking " + std::string(argument.size() > 1 ? "outputs from" : "output of") + " -voxels option)") : " (suggest re-running using the -voxels option to see voxels where tissue fractions do not sum to 1.0)"; if (major_error_count) { if (argument.size() > 1) diff --git a/cmd/5ttedit.cpp b/cmd/5ttedit.cpp index 7add640452..9948b66350 100644 --- a/cmd/5ttedit.cpp +++ b/cmd/5ttedit.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 e71c344601..c615a2be0e 100644 --- a/cmd/afdconnectivity.cpp +++ b/cmd/afdconnectivity.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 39f37139a9..fe47afe598 100644 --- a/cmd/amp2response.cpp +++ b/cmd/amp2response.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/amp2sh.cpp b/cmd/amp2sh.cpp index ab7bf04796..d24f51824f 100644 --- a/cmd/amp2sh.cpp +++ b/cmd/amp2sh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 b9809c750a..46b2de9b59 100644 --- a/cmd/connectome2tck.cpp +++ b/cmd/connectome2tck.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 a2d9f7e290..fe5e6325a8 100644 --- a/cmd/connectomeedit.cpp +++ b/cmd/connectomeedit.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 8075a6cec0..76fbbb4fe0 100644 --- a/cmd/connectomestats.cpp +++ b/cmd/connectomestats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/dcmedit.cpp b/cmd/dcmedit.cpp index 191085dffa..c98bac62a4 100644 --- a/cmd/dcmedit.cpp +++ b/cmd/dcmedit.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 9cf719fe6e..d3734bc310 100644 --- a/cmd/dcminfo.cpp +++ b/cmd/dcminfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 86b53dc448..8354e68862 100644 --- a/cmd/dirflip.cpp +++ b/cmd/dirflip.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 bbce94ae44..826b5ed9c9 100644 --- a/cmd/dirgen.cpp +++ b/cmd/dirgen.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 d449303572..35154cf428 100644 --- a/cmd/dirmerge.cpp +++ b/cmd/dirmerge.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 294d18f362..76bc1c47c0 100644 --- a/cmd/dirorder.cpp +++ b/cmd/dirorder.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 d112bb309b..9c151298b0 100644 --- a/cmd/dirsplit.cpp +++ b/cmd/dirsplit.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 ffa885169d..9da312c96f 100644 --- a/cmd/dirstat.cpp +++ b/cmd/dirstat.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 5f122b453d..3aa4cf2a89 100644 --- a/cmd/dwi2adc.cpp +++ b/cmd/dwi2adc.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 b9fb4662ce..325096947b 100644 --- a/cmd/dwi2fod.cpp +++ b/cmd/dwi2fod.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 b7c929263f..dcc237739b 100644 --- a/cmd/dwi2mask.cpp +++ b/cmd/dwi2mask.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 ebd357cb02..6b140aaac5 100644 --- a/cmd/dwi2tensor.cpp +++ b/cmd/dwi2tensor.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 +149,7 @@ class Processor { MEMALIGN(Processor) work.setZero(); work.selfadjointView().rankUpdate (b.transpose()*w.asDiagonal()); p = llt.compute (work.selfadjointView()).solve(b.transpose()*w.asDiagonal()*w.asDiagonal()*dwi); - if (maxit > 1) + if (it < maxit) w = (b*p).array().exp(); } @@ -220,7 +220,6 @@ void run () Header header (dwi); header.datatype() = DataType::Float32; header.ndim() = 4; - DWI::stash_DW_scheme (header, grad); PhaseEncoding::clear_scheme (header); Image predict; @@ -228,6 +227,7 @@ void run () if (opt.size()) predict = Image::create (opt[0][0], header); + DWI::stash_DW_scheme (header, grad); header.size(3) = 6; auto dt = Image::create (argument[1], header); diff --git a/cmd/dwidenoise.cpp b/cmd/dwidenoise.cpp index 60abbee463..6234fba2ff 100644 --- a/cmd/dwidenoise.cpp +++ b/cmd/dwidenoise.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 9c384ec24b..3031e4b67f 100644 --- a/cmd/dwiextract.cpp +++ b/cmd/dwiextract.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/fixel2peaks.cpp b/cmd/fixel2peaks.cpp index 31731f6f93..b749bd028f 100644 --- a/cmd/fixel2peaks.cpp +++ b/cmd/fixel2peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 ef8ccef11d..32c622c31b 100644 --- a/cmd/fixel2sh.cpp +++ b/cmd/fixel2sh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 5dd7a9ef1d..6efb2ee9d6 100644 --- a/cmd/fixel2tsf.cpp +++ b/cmd/fixel2tsf.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/fixel2voxel.cpp b/cmd/fixel2voxel.cpp index 3683c5a402..21160706c6 100644 --- a/cmd/fixel2voxel.cpp +++ b/cmd/fixel2voxel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/fixelcfestats.cpp b/cmd/fixelcfestats.cpp index 6cd158504c..b7b0d88731 100644 --- a/cmd/fixelcfestats.cpp +++ b/cmd/fixelcfestats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 b75d2745c9..a7e16286d6 100644 --- a/cmd/fixelconnectivity.cpp +++ b/cmd/fixelconnectivity.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 4b5ab85c38..a683b5fe45 100644 --- a/cmd/fixelconvert.cpp +++ b/cmd/fixelconvert.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 ce5cbd25a0..2ae594778e 100644 --- a/cmd/fixelcorrespondence.cpp +++ b/cmd/fixelcorrespondence.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 8a05850f4d..7835a55fcf 100644 --- a/cmd/fixelcrop.cpp +++ b/cmd/fixelcrop.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 9123b25c8b..2a2123ad40 100644 --- a/cmd/fixelfilter.cpp +++ b/cmd/fixelfilter.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 b48ea40dbd..cbf72e19e0 100644 --- a/cmd/fixelreorient.cpp +++ b/cmd/fixelreorient.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 00ee59b968..8696b333e5 100644 --- a/cmd/fod2dec.cpp +++ b/cmd/fod2dec.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 cf515938f6..b1f73eab5b 100644 --- a/cmd/fod2fixel.cpp +++ b/cmd/fod2fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -236,9 +236,7 @@ void Segmented_FOD_receiver::commit () Fixel::check_fixel_size (*index_image, *disp_image); } - size_t offset (0), lobe_index (0); - - + size_t offset (0); for (const auto& vox_fixels : lobes) { size_t n_vox_fixels = vox_fixels.size(); @@ -279,7 +277,6 @@ void Segmented_FOD_receiver::commit () } offset += n_vox_fixels; - lobe_index ++; } assert (offset == fixel_count); diff --git a/cmd/label2colour.cpp b/cmd/label2colour.cpp index bfe0364abe..c251a08b53 100644 --- a/cmd/label2colour.cpp +++ b/cmd/label2colour.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 cb57a06b62..d4f46e1d37 100644 --- a/cmd/label2mesh.cpp +++ b/cmd/label2mesh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 46b7791f94..4330415b70 100644 --- a/cmd/labelconvert.cpp +++ b/cmd/labelconvert.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/labelstats.cpp b/cmd/labelstats.cpp index 728f9e5550..3cde24a8ef 100644 --- a/cmd/labelstats.cpp +++ b/cmd/labelstats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/maskdump.cpp b/cmd/maskdump.cpp index 8da01c7c0e..a45bed35c0 100644 --- a/cmd/maskdump.cpp +++ b/cmd/maskdump.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 aaff1a4d09..8c10eddccf 100644 --- a/cmd/maskfilter.cpp +++ b/cmd/maskfilter.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 1112f2453b..066d770f88 100644 --- a/cmd/mesh2voxel.cpp +++ b/cmd/mesh2voxel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 74a7074260..6980382fc4 100644 --- a/cmd/meshconvert.cpp +++ b/cmd/meshconvert.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 d52955c8bd..d3023ae0b4 100644 --- a/cmd/meshfilter.cpp +++ b/cmd/meshfilter.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 ac6bea6766..c01ed51785 100644 --- a/cmd/mraverageheader.cpp +++ b/cmd/mraverageheader.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 cfb8a41346..d8dbfb4a7d 100644 --- a/cmd/mrcalc.cpp +++ b/cmd/mrcalc.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -911,6 +911,7 @@ void run () { else if (opt->is ("nthreads")) ++n; else if (opt->is ("force") || opt->is ("info") || opt->is ("debug") || opt->is ("quiet")) continue; + else if (opt->is ("config")) n+=2; #define SECTION 3 #include "mrcalc.cpp" diff --git a/cmd/mrcat.cpp b/cmd/mrcat.cpp index c7359bc1df..42e0ee5586 100644 --- a/cmd/mrcat.cpp +++ b/cmd/mrcat.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 39fe144c15..559475fd0f 100644 --- a/cmd/mrcentroid.cpp +++ b/cmd/mrcentroid.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/mrcheckerboardmask.cpp b/cmd/mrcheckerboardmask.cpp index 42a546009f..c90433ca60 100644 --- a/cmd/mrcheckerboardmask.cpp +++ b/cmd/mrcheckerboardmask.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 a0f75a0ed4..9a514ea012 100644 --- a/cmd/mrclusterstats.cpp +++ b/cmd/mrclusterstats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/mrcolour.cpp b/cmd/mrcolour.cpp index e36636e0f1..0316495ccf 100644 --- a/cmd/mrcolour.cpp +++ b/cmd/mrcolour.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/mrconvert.cpp b/cmd/mrconvert.cpp index 71df4dd43e..089ba2ca43 100644 --- a/cmd/mrconvert.cpp +++ b/cmd/mrconvert.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/mrdegibbs.cpp b/cmd/mrdegibbs.cpp index b474463ffa..72af039959 100644 --- a/cmd/mrdegibbs.cpp +++ b/cmd/mrdegibbs.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -20,6 +20,7 @@ #include "command.h" #include "image.h" #include "progressbar.h" +#include "types.h" #include "algo/threaded_loop.h" #include @@ -42,11 +43,17 @@ void usage () "you should run denoising before this command to not alter the noise structure, " "which would impact on dwidenoise's performance." + + "For best results, any form of filtering performed by the scanner should be disabled, whether " + "performed in the image domain or k-space. This includes elliptic filtering and other filters that " + "are often applied to reduce Gibbs ringing artifacts. While this method can still safely be applied " + "to such data, some residual ringing artefacts may still be present in the output." + + "Note that this method is designed to work on images acquired with full k-space coverage. " - "Running this method on partial Fourier ('half-scan') data may lead to suboptimal and/or biased " - "results, as noted in the original reference below. There is currently no means of dealing with this; " - "users should exercise caution when using this method on partial Fourier data, and inspect its output " - "for any obvious artefacts. "; + "If this method is executed on data acquired with partial Fourier (eg. \"half-scan\") acceleration, " + "it may not fully remove all ringing artifacts, " + "and you may observe residuals of the original artifact in the partial Fourier direction. " + "Nonetheless, application of the method is still considered safe and worthwhile. " + "Users are however encouraged to acquired full-Fourier data where possible."; ARGUMENTS @@ -202,15 +209,15 @@ class ComputeSlice const int numlines = eig.cols(); shifted.resize (n, 2*nsh+1); - int shifts [2*nsh+1]; + vector shifts(2*nsh+1); shifts[0] = 0; for (int j = 0; j < nsh; j++) { shifts[j+1] = j+1; shifts[1+nsh+j] = -(j+1); } - double TV1arr[2*nsh+1]; - double TV2arr[2*nsh+1]; + vector TV1arr(2*nsh+1); + vector TV2arr(2*nsh+1); for (int k = 0; k < numlines; k++) { shifted.col(0) = eig.col(k); diff --git a/cmd/mrdump.cpp b/cmd/mrdump.cpp index 9c4b357c85..67bd716fa8 100644 --- a/cmd/mrdump.cpp +++ b/cmd/mrdump.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 609c7add8b..ca5b385273 100644 --- a/cmd/mredit.cpp +++ b/cmd/mredit.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/mrfilter.cpp b/cmd/mrfilter.cpp index 5d8d97177c..c8fd8f1c21 100644 --- a/cmd/mrfilter.cpp +++ b/cmd/mrfilter.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 8decf2f89d..6c2183d5e3 100644 --- a/cmd/mrgrid.cpp +++ b/cmd/mrgrid.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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 @@ void usage () + OptionGroup ("Pad and crop options (no image interpolation is performed, header transformation is adjusted)") + Option ("as", "pad or crop the input image on the upper bound to match the specified reference image grid. " "This operation ignores differences in image transformation between input and reference image.") - + Argument ("reference image").type_image_in () + + Argument ("reference_image").type_image_in () + Option ("uniform", "pad or crop the input image by a uniform number of voxels on all sides") + Argument ("number").type_integer () diff --git a/cmd/mrhistmatch.cpp b/cmd/mrhistmatch.cpp index d66a3e82cd..9f9f1de243 100644 --- a/cmd/mrhistmatch.cpp +++ b/cmd/mrhistmatch.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 bbc832ff61..51c9d30034 100644 --- a/cmd/mrhistogram.cpp +++ b/cmd/mrhistogram.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 7cb54e1526..8e0f8c66cd 100644 --- a/cmd/mrinfo.cpp +++ b/cmd/mrinfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 +52,7 @@ const OptionGroup FieldExportOptions = OptionGroup ("Options for exporting image void usage () { - AUTHOR = "J-Donald Tournier (d.tournier@brain.org.au) and Robert E. Smith (robert.smith@florey.edu.au)"; + AUTHOR = "J-Donald Tournier (jdtournier@gmail.com) and Robert E. Smith (robert.smith@florey.edu.au)"; SYNOPSIS = "Display image header information, or extract specific information from the header"; diff --git a/cmd/mrmath.cpp b/cmd/mrmath.cpp index a159c2a0c7..c1fb5d9758 100644 --- a/cmd/mrmath.cpp +++ b/cmd/mrmath.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 5f714836f8..087f70ede7 100644 --- a/cmd/mrmetric.cpp +++ b/cmd/mrmetric.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 df9001abad..31f0d11dd2 100644 --- a/cmd/mrregister.cpp +++ b/cmd/mrregister.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/mrstats.cpp b/cmd/mrstats.cpp index 70716be7b7..5ec54cfe21 100644 --- a/cmd/mrstats.cpp +++ b/cmd/mrstats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 0da754d81a..345d087d9e 100644 --- a/cmd/mrthreshold.cpp +++ b/cmd/mrthreshold.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 9fddb9f227..ae4b522aee 100644 --- a/cmd/mrtransform.cpp +++ b/cmd/mrtransform.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/mrview.cpp b/cmd/mrview.cpp index d9b890a037..2c2e32cd5f 100644 --- a/cmd/mrview.cpp +++ b/cmd/mrview.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 374454fba9..13f73f34f9 100644 --- a/cmd/mtnormalise.cpp +++ b/cmd/mtnormalise.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/peaks2amp.cpp b/cmd/peaks2amp.cpp index b1b3ee1d04..93d5fc0ce9 100644 --- a/cmd/peaks2amp.cpp +++ b/cmd/peaks2amp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 5b2cd8f3d9..4dea90780a 100644 --- a/cmd/peaks2fixel.cpp +++ b/cmd/peaks2fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/sh2amp.cpp b/cmd/sh2amp.cpp index 86de9e27d7..27ee8d2074 100644 --- a/cmd/sh2amp.cpp +++ b/cmd/sh2amp.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 c824be6d43..d76c7bd3d9 100644 --- a/cmd/sh2peaks.cpp +++ b/cmd/sh2peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 0a73652b69..a71100c18f 100644 --- a/cmd/sh2power.cpp +++ b/cmd/sh2power.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 cef8d5ffe3..ad04479910 100644 --- a/cmd/sh2response.cpp +++ b/cmd/sh2response.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 dfb474cab7..bfc97a1f4e 100644 --- a/cmd/shbasis.cpp +++ b/cmd/shbasis.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -128,6 +128,7 @@ void check_and_update (Header& H, const conv_t conversion) } } } + INFO (str(voxel_count) + " voxels to be included in calculations"); // Get sums independently for each l diff --git a/cmd/shconv.cpp b/cmd/shconv.cpp index 558c892aae..0939e0a7c6 100644 --- a/cmd/shconv.cpp +++ b/cmd/shconv.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 f0b15f8539..21c2839f8d 100644 --- a/cmd/shview.cpp +++ b/cmd/shview.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 d130431f35..2ad1c358d1 100644 --- a/cmd/tck2connectome.cpp +++ b/cmd/tck2connectome.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 920fd5621f..2e8ce20aee 100644 --- a/cmd/tck2fixel.cpp +++ b/cmd/tck2fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/tckconvert.cpp b/cmd/tckconvert.cpp index 3e3be3c241..61451ca004 100644 --- a/cmd/tckconvert.cpp +++ b/cmd/tckconvert.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/tckdfc.cpp b/cmd/tckdfc.cpp index cd2183d476..1ec170105c 100644 --- a/cmd/tckdfc.cpp +++ b/cmd/tckdfc.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 b482c2c5e2..5d8f2691ac 100644 --- a/cmd/tckedit.cpp +++ b/cmd/tckedit.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/tckgen.cpp b/cmd/tckgen.cpp index 6ace7e0715..fb56fb93d0 100644 --- a/cmd/tckgen.cpp +++ b/cmd/tckgen.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 155227df63..939c567fe3 100644 --- a/cmd/tckglobal.cpp +++ b/cmd/tckglobal.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 4b7d233801..641c668abd 100644 --- a/cmd/tckinfo.cpp +++ b/cmd/tckinfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 93b0609a6f..711ca114fb 100644 --- a/cmd/tckmap.cpp +++ b/cmd/tckmap.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 231bc02fd4..60c5c0856e 100644 --- a/cmd/tckresample.cpp +++ b/cmd/tckresample.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 2a124498ef..5ce5085e3a 100644 --- a/cmd/tcksample.cpp +++ b/cmd/tcksample.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 d34d49083d..75ddaef4dc 100644 --- a/cmd/tcksift.cpp +++ b/cmd/tcksift.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 a2e74ad4ae..46a73bdf62 100644 --- a/cmd/tcksift2.cpp +++ b/cmd/tcksift2.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 e909a500f9..9d4dc1ae0d 100644 --- a/cmd/tckstats.cpp +++ b/cmd/tckstats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 d14fe6f92b..cb165f6af4 100644 --- a/cmd/tcktransform.cpp +++ b/cmd/tcktransform.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 135015bf1a..a04973a60b 100644 --- a/cmd/tensor2metric.cpp +++ b/cmd/tensor2metric.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/transformcalc.cpp b/cmd/transformcalc.cpp index 39bf67da82..9bdfcf6287 100644 --- a/cmd/transformcalc.cpp +++ b/cmd/transformcalc.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 c080e3f7bf..7502db2cb2 100644 --- a/cmd/transformcompose.cpp +++ b/cmd/transformcompose.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/transformconvert.cpp b/cmd/transformconvert.cpp index a57daebeb6..9d4289fd71 100644 --- a/cmd/transformconvert.cpp +++ b/cmd/transformconvert.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 8366cf4c76..1c08d22234 100644 --- a/cmd/tsfdivide.cpp +++ b/cmd/tsfdivide.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 6828b7a676..dd12e1d6d2 100644 --- a/cmd/tsfinfo.cpp +++ b/cmd/tsfinfo.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 5ef0caa932..546074c9d0 100644 --- a/cmd/tsfmult.cpp +++ b/cmd/tsfmult.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 50dfa231fd..dbd288d136 100644 --- a/cmd/tsfsmooth.cpp +++ b/cmd/tsfsmooth.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 13a142133a..e7dfad5b94 100644 --- a/cmd/tsfthreshold.cpp +++ b/cmd/tsfthreshold.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 dc8497d418..fbb015dc45 100644 --- a/cmd/tsfvalidate.cpp +++ b/cmd/tsfvalidate.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 4a1971de2a..fa34754f2a 100644 --- a/cmd/vectorstats.cpp +++ b/cmd/vectorstats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 7752c5cd98..24ffd9e31c 100644 --- a/cmd/voxel2fixel.cpp +++ b/cmd/voxel2fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 f87983087b..1ff2d367dd 100644 --- a/cmd/voxel2mesh.cpp +++ b/cmd/voxel2mesh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -70,8 +70,10 @@ void run () Surface::Algo::image2mesh_blocky (input, mesh); } else { + auto input = Image::open (argument[0]); - const default_type threshold = get_option_value ("threshold", Filter::estimate_optimal_threshold (input)); + auto opt = get_options("threshold"); + const default_type threshold = opt.empty() ? Filter::estimate_optimal_threshold (input) : opt[0][0]; Surface::Algo::image2mesh_mc (input, mesh, threshold); } diff --git a/cmd/warp2metric.cpp b/cmd/warp2metric.cpp index 5c2db7f316..47547f3a63 100644 --- a/cmd/warp2metric.cpp +++ b/cmd/warp2metric.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/warpconvert.cpp b/cmd/warpconvert.cpp index 404d10abd3..285710347d 100644 --- a/cmd/warpconvert.cpp +++ b/cmd/warpconvert.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 48e4744832..36be989c1e 100644 --- a/cmd/warpcorrect.cpp +++ b/cmd/warpcorrect.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 1de90fd400..3011950612 100644 --- a/cmd/warpinit.cpp +++ b/cmd/warpinit.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/warpinvert.cpp b/cmd/warpinvert.cpp index 898c478817..b2e74394fd 100644 --- a/cmd/warpinvert.cpp +++ b/cmd/warpinvert.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 aaf494be38..c42d5c31cf 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -73,6 +73,9 @@ OPTIONS -conda prevent stripping anaconda/miniconda from the PATH (only use if you intend building with the conda toolchain - not recommended) + -fsl prevent stripping FSL from the PATH (only use if you intend + building with the FSL toolchain - not recommended) + ENVIRONMENT VARIABLES @@ -194,6 +197,7 @@ R_module = False openmp = False dev = False conda = False +fsl = False optimlevel = 3 @@ -227,6 +231,8 @@ for arg in sys.argv[1:]: openmp = True elif '-conda'.startswith (arg): conda = True + elif '-fsl'.startswith (arg): + fsl = True else: sys.stdout.write (usage_string) sys.exit (1) @@ -292,7 +298,7 @@ if conda: else: path = [] for entry in os.environ['PATH'].split(os.pathsep): - if 'conda' in entry: + if 'conda' in entry.lower(): report ('WARNING: anaconda/miniconda detected in PATH ("' + entry + '") - removed to avoid conflicts\n') issue_conda_warning = True else: @@ -300,7 +306,22 @@ else: path = os.pathsep.join(path) os.environ['PATH'] = path -log ('PATH set to: ' + path) +# if not using FSL, remove any mention of FSL from PATH: +issue_fsl_warning = False +if fsl: + path = os.environ['PATH'] +else: + path = [] + for entry in os.environ['PATH'].split(os.pathsep): + if 'fsl' in entry.lower(): + report ('WARNING: FSL detected in PATH ("' + entry + '") - removed to avoid conflicts\n') + issue_fsl_warning = True + else: + path += [ entry ] + path = os.pathsep.join(path) + os.environ['PATH'] = path + +log ('\nPATH set to: ' + path) @@ -572,7 +593,7 @@ def get_flags (default=None, env=None, pkg_config_flags=None): flags = [] for flag in shlex.split (execute ([ 'pkg-config' ] + pkg_config_flags.split(), RunError)[1]): if flag.startswith ('-I'): - flags += [ '-idirafter', flag[2:] ] + flags += [ '-isystem', flag[2:] ] else: flags += [ flag ] return flags @@ -585,7 +606,7 @@ def get_flags (default=None, env=None, pkg_config_flags=None): -def compile_test (name, cflags, ldflags, code, on_success='ok', on_failure='not found'): +def compile_test (name, cflags, ldflags, code, on_success='ok', on_failure='not found'): #pylint: disable=too-many-positional-arguments """Tests whether the code given compiles, links, and runs. This returns True if successful, and False for any type of failure. It will @@ -614,7 +635,7 @@ def compile_test (name, cflags, ldflags, code, on_success='ok', on_failure='not -def compile_check (full_name, name, cflags, ldflags, code, cflags_env=None, cflags_hint=None, ldflags_env=None, ldflags_hint=None, on_success='ok'): +def compile_check (full_name, name, cflags, ldflags, code, cflags_env=None, cflags_hint=None, ldflags_env=None, ldflags_hint=None, on_success='ok'): #pylint: disable=too-many-positional-arguments """Checks whether the code given compiles, links, and runs. This is intended to check for required dependencies, and will cause @@ -709,7 +730,8 @@ elif system == 'darwin': ld_lib_flags += [ '-dynamiclib', '-install_name', '@rpath/LIBNAME' ] runpath = '-Wl,-rpath,@loader_path/' lib_suffix = '.dylib' - +else: + assert False, 'Unknown OS' @@ -741,7 +763,10 @@ if 'LINKLIB_ARGS' in os.environ.keys(): if issue_conda_warning: - report ('\nNOTE: if you intend to build with anaconda/miniconda (not recommended), pass the -conda flag to ./configure\n\n') + report ('NOTE: if you intend to build with anaconda/miniconda (not recommended), pass the -conda flag to ./configure\n') +if issue_fsl_warning: + report ('NOTE: if you intend to build with the FSL toolchain (not recommended), pass the -fsl flag to ./configure\n') +report ('\n') @@ -1318,7 +1343,7 @@ int main() { Foo f; } if entry[0] != '$' and not entry == '-I.': entry = entry.replace('\"','').replace("'",'') if entry.startswith('-I'): - qt_cflags += [ '-idirafter', entry[2:] ] + qt_cflags += [ '-isystem', entry[2:] ] else: qt_cflags += [ entry ] diff --git a/core/adapter/base.h b/core/adapter/base.h index 888fba2e21..f35aade787 100644 --- a/core/adapter/base.h +++ b/core/adapter/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7e60b47398..8840fb2e3e 100644 --- a/core/adapter/extract.h +++ b/core/adapter/extract.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a3eb5dba69..673e270587 100644 --- a/core/adapter/gaussian1D.h +++ b/core/adapter/gaussian1D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6347b67b0e..9fbe22d9a6 100644 --- a/core/adapter/gradient1D.h +++ b/core/adapter/gradient1D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c1f78fa771..698968b133 100644 --- a/core/adapter/gradient3D.h +++ b/core/adapter/gradient3D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 527cc23540..4824223eef 100644 --- a/core/adapter/jacobian.h +++ b/core/adapter/jacobian.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9b37bce071..e994bee53c 100644 --- a/core/adapter/median.h +++ b/core/adapter/median.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e45d6a3a7e..6e29ca5aa1 100644 --- a/core/adapter/neighbourhood3D.h +++ b/core/adapter/neighbourhood3D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7287d198b0..8273f66bc6 100644 --- a/core/adapter/normalise3D.h +++ b/core/adapter/normalise3D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 bbe115d6a4..d796fd85d8 100644 --- a/core/adapter/permute_axes.h +++ b/core/adapter/permute_axes.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 01b3a7d304..caedee6a1f 100644 --- a/core/adapter/regrid.h +++ b/core/adapter/regrid.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 336c6c6245..5472662b0d 100644 --- a/core/adapter/replicate.h +++ b/core/adapter/replicate.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3a0d3d4d71..4fcff9162b 100644 --- a/core/adapter/reslice.cpp +++ b/core/adapter/reslice.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6430949cf3..b9e3269a45 100644 --- a/core/adapter/reslice.h +++ b/core/adapter/reslice.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -51,12 +51,23 @@ namespace MR return value_type(std::round (sum*norm)); } - template - typename std::enable_if::value, value_type>::type - inline normalise (const default_type sum, const default_type norm) + // Standard implementation for floating point (either real or complex) + template + typename std::enable_if::value && !std::is_integral::value, value_type>::type + inline normalise (const summing_type sum, const default_type norm) { - return (sum * norm); + return value_type (sum * norm); } + + // If summing complex numbers, use double precision complex; + // otherwise, use double precision real + template struct summing_type { NOMEMALIGN + using type = double; + }; + template struct summing_type> { NOMEMALIGN + using type = std::complex; + }; + } @@ -114,7 +125,6 @@ namespace MR using value_type = typename ImageType::value_type; - template Reslice (const ImageType& original, const HeaderType& reference, @@ -195,7 +205,7 @@ namespace MR using namespace Eigen; if (oversampling) { Vector3d d (x[0]+from[0], x[1]+from[1], x[2]+from[2]); - default_type sum (0.0); + typename summing_type::type sum (0); Vector3d s; for (uint32_t z = 0; z < OS[2]; ++z) { s[2] = d[2] + z*inc[2]; diff --git a/core/adapter/subset.h b/core/adapter/subset.h index 48bd437720..dbf40a40aa 100644 --- a/core/adapter/subset.h +++ b/core/adapter/subset.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f80b898738..f09fc0bd24 100644 --- a/core/adapter/warp.h +++ b/core/adapter/warp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/copy.h b/core/algo/copy.h index 12c64af401..714b49c9dd 100644 --- a/core/algo/copy.h +++ b/core/algo/copy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0b1f145fb4..8f9eea94ea 100644 --- a/core/algo/histogram.cpp +++ b/core/algo/histogram.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9bdd181769..9876649035 100644 --- a/core/algo/histogram.h +++ b/core/algo/histogram.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b268839286..797b8e5666 100644 --- a/core/algo/iterator.h +++ b/core/algo/iterator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2488d4a2ad..6cf79c1dd4 100644 --- a/core/algo/loop.h +++ b/core/algo/loop.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 fe258e179a..346e86fac3 100644 --- a/core/algo/min_max.h +++ b/core/algo/min_max.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 96bce166d4..516d908d31 100644 --- a/core/algo/neighbourhooditerator.h +++ b/core/algo/neighbourhooditerator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7d260aab84..5eb45e2e7d 100644 --- a/core/algo/random_loop.h +++ b/core/algo/random_loop.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 bec2fb7b60..a9a823add1 100644 --- a/core/algo/random_threaded_loop.h +++ b/core/algo/random_threaded_loop.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c3220d6903..84535af4ee 100644 --- a/core/algo/stochastic_threaded_loop.h +++ b/core/algo/stochastic_threaded_loop.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 efc682aa62..646290d34b 100644 --- a/core/algo/threaded_copy.h +++ b/core/algo/threaded_copy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3e97863d40..c2a12ac5c3 100644 --- a/core/algo/threaded_loop.h +++ b/core/algo/threaded_loop.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0561070797..e5035db799 100644 --- a/core/app.cpp +++ b/core/app.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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-2023 the MRtrix3 contributors.\n" + "Copyright (c) 2008-2025 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" @@ -128,7 +128,7 @@ namespace MR inline void get_matches (vector& candidates, const OptionGroup& group, const std::string& stub) { for (size_t i = 0; i < group.size(); ++i) { - if (stub.compare (0, stub.size(), group[i].id, stub.size()) == 0) + if (stub.compare (0, stub.size(), std::string(group[i].id), 0, stub.size()) == 0) candidates.push_back (&group[i]); } } @@ -212,6 +212,8 @@ namespace MR const char* argtype_description (ArgType type) { switch (type) { + case Boolean: + return ("boolean"); case Integer: return ("integer"); case Float: @@ -503,6 +505,9 @@ namespace MR case Undefined: assert (0); break; + case Boolean: + stream << "BOOL"; + break; case Integer: stream << "INT " << limits.i.min << " " << limits.i.max; break; @@ -1071,12 +1076,11 @@ namespace MR throw 0; } - size_t num_args_required = 0, num_command_arguments = 0; + size_t num_args_required = 0; size_t num_optional_arguments = 0; ArgFlags flags = None; for (size_t i = 0; i < ARGUMENTS.size(); ++i) { - ++num_command_arguments; if (ARGUMENTS[i].flags) { if (flags && flags != ARGUMENTS[i].flags) throw Exception ("FIXME: all arguments declared optional() or allow_multiple() should have matching flags in command-line syntax"); diff --git a/core/app.h b/core/app.h index f425e8ec5b..ff821def8c 100644 --- a/core/app.h +++ b/core/app.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 49c2d564ab..c6e3522f79 100644 --- a/core/apply.h +++ b/core/apply.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0654de4b75..1d0d614551 100644 --- a/core/axes.cpp +++ b/core/axes.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/core/axes.h index 12efdffeca..6f1902852b 100644 --- a/core/axes.h +++ b/core/axes.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/core/cmdline_option.h b/core/cmdline_option.h index 837e6ca204..35cd26a0b4 100644 --- a/core/cmdline_option.h +++ b/core/cmdline_option.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 be5681fe42..e20c1a387e 100644 --- a/core/command.h +++ b/core/command.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3c2acc0207..bd128c2950 100644 --- a/core/datatype.cpp +++ b/core/datatype.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2d5125fc0c..bb5efe2563 100644 --- a/core/datatype.h +++ b/core/datatype.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ac3807a505..f98f53af33 100644 --- a/core/debug.h +++ b/core/debug.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4f13e36f9a..51bcfdda72 100644 --- a/core/dwi/gradient.cpp +++ b/core/dwi/gradient.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/core/dwi/gradient.h index f9ac5cca9a..818fb872fa 100644 --- a/core/dwi/gradient.h +++ b/core/dwi/gradient.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 40678ef0c3..ac3a9bb984 100644 --- a/core/dwi/shells.cpp +++ b/core/dwi/shells.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ec642922f7..b51abc1cc0 100644 --- a/core/dwi/shells.h +++ b/core/dwi/shells.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2f25ca5a3f..e9d0d75ec5 100644 --- a/core/eigen_plugins/array.h +++ b/core/eigen_plugins/array.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 461900f7f3..5137263d96 100644 --- a/core/eigen_plugins/dense_base.h +++ b/core/eigen_plugins/dense_base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/matrix.h b/core/eigen_plugins/matrix.h index aa6d9f49fe..a8b080aecc 100644 --- a/core/eigen_plugins/matrix.h +++ b/core/eigen_plugins/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.cpp b/core/exception.cpp index f1cb092b2f..55f5e95270 100644 --- a/core/exception.cpp +++ b/core/exception.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d0db01b3c9..b3d02dbb03 100644 --- a/core/exception.h +++ b/core/exception.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 02dc71e8f0..d767209bb4 100644 --- a/core/file/config.cpp +++ b/core/file/config.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d333e7e35f..bc6c7124c3 100644 --- a/core/file/config.h +++ b/core/file/config.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d33fb4424f..84e0d1862f 100644 --- a/core/file/copy.h +++ b/core/file/copy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a360cab36b..d206cd6875 100644 --- a/core/file/dicom/csa_entry.h +++ b/core/file/dicom/csa_entry.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6880bf2028..228a8fcc36 100644 --- a/core/file/dicom/definitions.h +++ b/core/file/dicom/definitions.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 958df256a5..01607d3bcb 100644 --- a/core/file/dicom/dict.cpp +++ b/core/file/dicom/dict.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/element.cpp b/core/file/dicom/element.cpp index 34ad441f07..48af2f930e 100644 --- a/core/file/dicom/element.cpp +++ b/core/file/dicom/element.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -228,10 +228,15 @@ namespace MR { - if (parents.size()) - if ((parents.back().end && data > parents.back().end) || - (group == GROUP_SEQUENCE && element == ELEMENT_SEQUENCE_DELIMITATION_ITEM)) + if (parents.size()) { + if (group == GROUP_SEQUENCE && element == ELEMENT_SEQUENCE_DELIMITATION_ITEM) { parents.pop_back(); + } + else { // Undefined length encoding: + while (parents.size() && parents.back().end && data > parents.back().end) + parents.pop_back(); + } + } if (is_new_sequence()) { if (size == LENGTH_UNDEFINED) diff --git a/core/file/dicom/element.h b/core/file/dicom/element.h index 6ad38b3613..b37300d4d5 100644 --- a/core/file/dicom/element.h +++ b/core/file/dicom/element.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/image.cpp b/core/file/dicom/image.cpp index c5ee2bdfb9..0267b2f84e 100644 --- a/core/file/dicom/image.cpp +++ b/core/file/dicom/image.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/image.h b/core/file/dicom/image.h index 4533cfc156..bd1c862aac 100644 --- a/core/file/dicom/image.h +++ b/core/file/dicom/image.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/mapper.cpp b/core/file/dicom/mapper.cpp index 8b31c0effe..fc932b4011 100644 --- a/core/file/dicom/mapper.cpp +++ b/core/file/dicom/mapper.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 @@ #include "header.h" #include "phase_encoding.h" +#include "image_io/null.h" #include "image_io/default.h" #include "image_io/mosaic.h" #include "image_io/variable_scaling.h" @@ -68,6 +69,8 @@ namespace MR { // build up sorted list of frames: vector frames; + bool transfer_syntax_supported = true; + // loop over series list: for (const auto& series_it : series) { try { @@ -82,13 +85,9 @@ namespace MR { // loop over images in each series: for (auto image_it : *series_it) { - if (!image_it->transfer_syntax_supported) { - Exception E ("unsupported transfer syntax found in DICOM data"); - E.push_back ("consider using third-party tools to convert your data to standard uncompressed encoding"); - E.push_back ("See the MRtrix3 documentation on DICOM handling for details:"); - E.push_back (" http://mrtrix.readthedocs.io/en/latest/tips_and_tricks/dicom_handling.html#error-unsupported-transfer-syntax"); - throw E; - } + if (!image_it->transfer_syntax_supported) + transfer_syntax_supported = false; + // if multi-frame, loop over frames in image: if (image_it->frames.size()) { std::sort (image_it->frames.begin(), image_it->frames.end(), compare_ptr_contents()); @@ -209,7 +208,7 @@ namespace MR { } size_t nchannels = image.samples_per_pixel; - if (nchannels == 1 && !image.frames.size()) { + if (nchannels == 1 && !image.frames.size() && transfer_syntax_supported) { // 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)); @@ -363,6 +362,17 @@ namespace MR { } + if (!transfer_syntax_supported) { + WARN ("unsupported transfer syntax found in DICOM data"); + WARN ("header information is accessible, but commands requiring access to image intensity data will fail"); + WARN ("consider using third-party tools to convert your data to standard uncompressed encoding"); + WARN ("See the MRtrix3 documentation on DICOM handling for details:"); + WARN (" http://mrtrix.readthedocs.io/en/latest/tips_and_tricks/dicom_handling.html#error-unsupported-transfer-syntax"); + + io_handler.reset (new MR::ImageIO::Null (H)); + return io_handler; + } + if (image.images_in_mosaic) { INFO ("DICOM image \"" + H.name() + "\" is in mosaic format"); diff --git a/core/file/dicom/mapper.h b/core/file/dicom/mapper.h index e1d11ae69d..731cba8195 100644 --- a/core/file/dicom/mapper.h +++ b/core/file/dicom/mapper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c32161f00d..083194d683 100644 --- a/core/file/dicom/patient.cpp +++ b/core/file/dicom/patient.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/core/file/dicom/patient.h index 9b26b8f247..dec18cc6a1 100644 --- a/core/file/dicom/patient.h +++ b/core/file/dicom/patient.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/quick_scan.cpp b/core/file/dicom/quick_scan.cpp index 7454b3284a..6583bfdf4e 100644 --- a/core/file/dicom/quick_scan.cpp +++ b/core/file/dicom/quick_scan.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/quick_scan.h b/core/file/dicom/quick_scan.h index 4a853babaa..7fd541c9d2 100644 --- a/core/file/dicom/quick_scan.h +++ b/core/file/dicom/quick_scan.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/select_cmdline.cpp b/core/file/dicom/select_cmdline.cpp index 87d3b6420e..cc815d07fd 100644 --- a/core/file/dicom/select_cmdline.cpp +++ b/core/file/dicom/select_cmdline.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -105,7 +105,7 @@ namespace MR { } std::cerr << "? "; std::cin >> buf; - if (buf[0] == 'q' || buf[0] == 'Q') + if (!std::cin || buf[0] == 'q' || buf[0] == 'Q') throw CancelException(); if (isdigit (buf[0])) { int n = to(buf) - 1; @@ -145,7 +145,7 @@ namespace MR { } std::cerr << "? "; std::cin >> buf; - if (buf[0] == 'q' || buf[0] == 'Q') + if (!std::cin || buf[0] == 'q' || buf[0] == 'Q') throw CancelException(); if (isdigit (buf[0])) { int n = to(buf) - 1; @@ -188,7 +188,7 @@ namespace MR { } std::cerr << "? "; std::cin >> buf; - if (buf[0] == 'q' || buf[0] == 'Q') + if (!std::cin || buf[0] == 'q' || buf[0] == 'Q') throw CancelException(); if (isdigit (buf[0])) { vector seq; diff --git a/core/file/dicom/series.cpp b/core/file/dicom/series.cpp index 871c8ac15b..eeb2eaa89a 100644 --- a/core/file/dicom/series.cpp +++ b/core/file/dicom/series.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 00b81ef092..b0e5e3cecc 100644 --- a/core/file/dicom/series.h +++ b/core/file/dicom/series.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/study.cpp b/core/file/dicom/study.cpp index 8e549dcbb0..3ccd42883a 100644 --- a/core/file/dicom/study.cpp +++ b/core/file/dicom/study.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/study.h b/core/file/dicom/study.h index 7459a250fa..7cf6f562b6 100644 --- a/core/file/dicom/study.h +++ b/core/file/dicom/study.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/tree.cpp b/core/file/dicom/tree.cpp index 6223143efc..9c53cf812c 100644 --- a/core/file/dicom/tree.cpp +++ b/core/file/dicom/tree.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/tree.h b/core/file/dicom/tree.h index e2acbd7446..4278dc2792 100644 --- a/core/file/dicom/tree.h +++ b/core/file/dicom/tree.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/entry.h b/core/file/entry.h index 79136bf403..3af0ea56ea 100644 --- a/core/file/entry.h +++ b/core/file/entry.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8668f6b94e..f852a6e8d0 100644 --- a/core/file/gz.h +++ b/core/file/gz.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 80c8fe2813..89d7e4f339 100644 --- a/core/file/json_utils.cpp +++ b/core/file/json_utils.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/core/file/json_utils.h index d8c5884c01..2adaad3be7 100644 --- a/core/file/json_utils.h +++ b/core/file/json_utils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3c86974874..0191db1819 100644 --- a/core/file/key_value.cpp +++ b/core/file/key_value.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5975e3349c..9de8f930c0 100644 --- a/core/file/key_value.h +++ b/core/file/key_value.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 55a2c61906..6a09d43ca1 100644 --- a/core/file/mgh.cpp +++ b/core/file/mgh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5a7a066f10..37de204f11 100644 --- a/core/file/mgh.h +++ b/core/file/mgh.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,6 +21,7 @@ #include "header.h" #include "raw.h" +#include "types.h" #include "file/gz.h" #include "file/nifti_utils.h" @@ -378,7 +379,7 @@ namespace MR const int64_t fend = in.tellg(); const int64_t empty_space_len = len - (fend - fstart); if (empty_space_len > 0) { - char buffer[empty_space_len]; + VLA(buffer, char, empty_space_len); in.read (buffer, empty_space_len); } @@ -806,7 +807,7 @@ namespace MR const int64_t fend = out.tellp(); const int64_t extra_space_len = len - (fend - fstart); if (extra_space_len > 0) { - char buffer[extra_space_len]; + VLA(buffer, char, extra_space_len); memset (buffer, 0x00, extra_space_len); out.write (buffer, extra_space_len); } diff --git a/core/file/mmap.cpp b/core/file/mmap.cpp index e5fa13062e..cfdff3f780 100644 --- a/core/file/mmap.cpp +++ b/core/file/mmap.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -112,9 +112,10 @@ namespace MR delayed_writeback = true; } - if (fsbuf.f_type == 0xff534d42 /* CIFS */|| fsbuf.f_type == 0x6969 /* NFS */ || - fsbuf.f_type == 0x65735546 /* FUSE */ || fsbuf.f_type == 0x517b /* SMB */ || - fsbuf.f_type == 0x47504653 /* GPFS */ || fsbuf.f_type == 0xbd00bd0 /* LUSTRE */ + if (fsbuf.f_type == 0xff534d42 /* CIFS */ || fsbuf.f_type == 0x6969 /* NFS */ || + fsbuf.f_type == 0x65735546 /* FUSE */ || fsbuf.f_type == 0x517b /* SMB */ || + fsbuf.f_type == 0x47504653 /* GPFS */ || fsbuf.f_type == 0xbd00bd0 /* LUSTRE */ || + fsbuf.f_type == 0x1021997 /* 9P (WSL) */ #ifdef MRTRIX_MACOSX || fsbuf.f_type == 0x0017 /* OSXFUSE */ diff --git a/core/file/mmap.h b/core/file/mmap.h index fff199b36a..bfdbac426d 100644 --- a/core/file/mmap.h +++ b/core/file/mmap.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 de34aab17b..b6fedfa3c4 100644 --- a/core/file/name_parser.cpp +++ b/core/file/name_parser.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8ccbea6111..4eab83c10d 100644 --- a/core/file/name_parser.h +++ b/core/file/name_parser.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ba20aa63ff..eea222693f 100644 --- a/core/file/nifti2.h +++ b/core/file/nifti2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2e831caabc..6eebcd9ebd 100644 --- a/core/file/nifti_utils.cpp +++ b/core/file/nifti_utils.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 302c4fa7df..25de06225f 100644 --- a/core/file/nifti_utils.h +++ b/core/file/nifti_utils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4579191750..915bc74809 100644 --- a/core/file/ofstream.cpp +++ b/core/file/ofstream.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 43e3ff7312..a24acdd06e 100644 --- a/core/file/ofstream.h +++ b/core/file/ofstream.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f888bb7003..4a611f80c6 100644 --- a/core/file/path.h +++ b/core/file/path.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8785f7f19e..8332c583f8 100644 --- a/core/file/png.cpp +++ b/core/file/png.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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 Reader::Reader (const std::string& filename) : + infile (fopen (filename.c_str(), "rb")), png_ptr (NULL), info_ptr (NULL), width (0), @@ -46,7 +47,6 @@ namespace MR color_type (0), channels (0) { - FILE* infile = fopen (filename.c_str(), "rb"); unsigned char sig[8]; if (fread (sig, 1, 8, infile) < 8) throw Exception ("error reading from PNG file \"" + filename + "\""); @@ -130,6 +130,10 @@ namespace MR png_ptr = NULL; info_ptr = NULL; } + if (infile) { + fclose(infile); + infile = NULL; + } } @@ -183,6 +187,7 @@ namespace MR bit_depth (0), filename (filename), data_type (H.datatype()), + multiplier (1.0), outfile (NULL) { if (Path::exists (filename) && !App::overwrite_files) @@ -196,6 +201,8 @@ namespace MR throw Exception ("Unable to set jump buffer for PNG structure for image \"" + filename + "\""); } outfile = fopen (filename.c_str(), "wb"); + if (!outfile) + throw Exception ("Unable to open PNG file for writing for image \"" + filename + "\": " + strerror (errno)); png_init_io (png_ptr, outfile); png_set_compression_level (png_ptr, Z_DEFAULT_COMPRESSION); switch (H.ndim()) { @@ -231,17 +238,23 @@ namespace MR png_destroy_write_struct (&png_ptr, &info_ptr); throw Exception ("Undefined data type in image \"" + H.name() + "\" for PNG writer"); case DataType::Bit: - bit_depth = 1; + assert (false); break; case DataType::UInt8: + bit_depth = 8; + break; case DataType::Float32: bit_depth = 8; + multiplier = std::numeric_limits::max(); break; break; case DataType::UInt16: case DataType::UInt32: case DataType::UInt64: + bit_depth = 16; + break; case DataType::Float64: bit_depth = 16; + multiplier = std::numeric_limits::max(); break; break; } // Detect cases where one axis has a size of 1, and hence represents the image plane @@ -302,6 +315,10 @@ namespace MR png_ptr = NULL; info_ptr = NULL; } + if (outfile) { + fclose(outfile); + outfile = NULL; + } } @@ -323,13 +340,14 @@ namespace MR row_pointers[row] = to_write + row * row_bytes; png_write_image (png_ptr, row_pointers); png_write_end (png_ptr, info_ptr); + delete [] row_pointers; }; - if (bit_depth == 1 || data_type == DataType::UInt8 || data_type == DataType::UInt16BE) { + if (data_type == DataType::UInt8 || data_type == DataType::UInt16BE) { finish (data); } else { - uint8_t scratch[row_bytes * height]; + VLA(scratch, uint8_t, row_bytes * height); // Convert from "data" into "scratch" // This may include changes to fundamental type, changes to bit depth, changes to endianness uint8_t* in_ptr = data, *out_ptr = scratch; diff --git a/core/file/png.h b/core/file/png.h index 7a1d6b59ec..0c04626741 100644 --- a/core/file/png.h +++ b/core/file/png.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -54,6 +54,7 @@ namespace MR void load (uint8_t*); private: + FILE* infile; png_structp png_ptr; png_infop info_ptr; png_uint_32 width, height; @@ -83,6 +84,7 @@ namespace MR int color_type, bit_depth; std::string filename; DataType data_type; + default_type multiplier; FILE* outfile; static void error_handler (png_struct_def*, const char*); @@ -100,16 +102,8 @@ namespace MR std::function fetch_func; std::function store_func; __set_fetch_store_functions (fetch_func, store_func, data_type); - default_type multiplier = 1.0; - switch (data_type() & DataType::Type) { - case DataType::Float32: multiplier = std::numeric_limits::max(); break; - case DataType::Float64: multiplier = std::numeric_limits::max(); break; - } - for (size_t i = 0; i != num_elements; ++i) { - Raw::store_BE (std::min (default_type(std::numeric_limits::max()), std::max (0.0, std::round(multiplier * fetch_func (in_ptr, 0, 0.0, 1.0)))), out_ptr); - in_ptr += data_type.bytes(); - out_ptr += sizeof(T); - } + for (size_t i = 0; i != num_elements; ++i) + Raw::store_BE (std::min (default_type(std::numeric_limits::max()), std::max (0.0, std::round(multiplier * fetch_func (in_ptr, i, 0.0, 1.0)))), out_ptr, i); }; diff --git a/core/file/tiff.cpp b/core/file/tiff.cpp index fa95b0680b..289ce3da85 100644 --- a/core/file/tiff.cpp +++ b/core/file/tiff.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3004dde05f..8d8b02f885 100644 --- a/core/file/tiff.h +++ b/core/file/tiff.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c1c3bf0fd0..d0ed0c8dce 100644 --- a/core/file/utils.h +++ b/core/file/utils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9f0b12b8cd..4783021fcc 100644 --- a/core/filter/base.h +++ b/core/filter/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 502a85691d..1853da952f 100644 --- a/core/filter/connected_components.cpp +++ b/core/filter/connected_components.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a6c639df6c..9d884f6d70 100644 --- a/core/filter/connected_components.h +++ b/core/filter/connected_components.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 889d82f99f..bb26a10d6c 100644 --- a/core/filter/dilate.h +++ b/core/filter/dilate.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a354277b93..24a7c0a2a2 100644 --- a/core/filter/dwi_brain_mask.h +++ b/core/filter/dwi_brain_mask.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 87692bcaae..5754f6193c 100644 --- a/core/filter/erode.h +++ b/core/filter/erode.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1811605097..c5fe7bb5aa 100644 --- a/core/filter/fft.h +++ b/core/filter/fft.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d547ec33e9..6fe81305fe 100644 --- a/core/filter/gradient.h +++ b/core/filter/gradient.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/mask_clean.h b/core/filter/mask_clean.h index b4e87595e6..6e47669e4e 100644 --- a/core/filter/mask_clean.h +++ b/core/filter/mask_clean.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3895597cbb..5f1196fada 100644 --- a/core/filter/median.h +++ b/core/filter/median.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a693bdbd58..5fe6ad5f1b 100644 --- a/core/filter/normalise.h +++ b/core/filter/normalise.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ab6ace80bb..00f664ea08 100644 --- a/core/filter/optimal_threshold.h +++ b/core/filter/optimal_threshold.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 59b374d4e0..a1248bbfd6 100644 --- a/core/filter/resize.h +++ b/core/filter/resize.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/reslice.h b/core/filter/reslice.h index 6213af879c..d499eeb708 100644 --- a/core/filter/reslice.h +++ b/core/filter/reslice.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7b88101c42..1b655b4e93 100644 --- a/core/filter/smooth.h +++ b/core/filter/smooth.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b9bcfd2e38..f39aa0da2e 100644 --- a/core/filter/warp.h +++ b/core/filter/warp.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0a248c5932..1a3a8eb48b 100644 --- a/core/filter/zclean.h +++ b/core/filter/zclean.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 93ea2145c6..746408e918 100644 --- a/core/fixel/helpers.h +++ b/core/fixel/helpers.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 79733c3798..615f4ebc42 100644 --- a/core/fixel/keys.h +++ b/core/fixel/keys.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 38ed624a31..a5ac493024 100644 --- a/core/fixel/legacy/fixel_metric.h +++ b/core/fixel/legacy/fixel_metric.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3a43c963f0..f1401e0213 100644 --- a/core/fixel/legacy/image.h +++ b/core/fixel/legacy/image.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1fa4a74f42..a9541af6ca 100644 --- a/core/fixel/legacy/keys.h +++ b/core/fixel/legacy/keys.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5c558cde18..582d093d13 100644 --- a/core/fixel/loop.h +++ b/core/fixel/loop.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a17d8199ab..60a9de7706 100644 --- a/core/fixel/types.h +++ b/core/fixel/types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e61096fc9c..a5ed1e8eaa 100644 --- a/core/formats/dicom.cpp +++ b/core/formats/dicom.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 73a55b5e8d..ad0219060c 100644 --- a/core/formats/list.cpp +++ b/core/formats/list.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7d262d16b3..71dd5962bf 100644 --- a/core/formats/list.h +++ b/core/formats/list.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9fe8f27e68..289f5afea6 100644 --- a/core/formats/mgh.cpp +++ b/core/formats/mgh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 84ffe5afb3..fc0f049815 100644 --- a/core/formats/mgz.cpp +++ b/core/formats/mgz.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d775fd27b0..2d300668b0 100644 --- a/core/formats/mri.cpp +++ b/core/formats/mri.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 41ce5b4040..e609b54c0b 100644 --- a/core/formats/mrtrix.cpp +++ b/core/formats/mrtrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 49a5d11e11..5e420b77d9 100644 --- a/core/formats/mrtrix_gz.cpp +++ b/core/formats/mrtrix_gz.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9de925651b..d5ecda9fa1 100644 --- a/core/formats/mrtrix_sparse_legacy.cpp +++ b/core/formats/mrtrix_sparse_legacy.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 bd0c2fb497..d06e024704 100644 --- a/core/formats/mrtrix_utils.cpp +++ b/core/formats/mrtrix_utils.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1d3e916d42..865a94f118 100644 --- a/core/formats/mrtrix_utils.h +++ b/core/formats/mrtrix_utils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6c8823a815..dd1094a852 100644 --- a/core/formats/nifti1.cpp +++ b/core/formats/nifti1.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 56ed625e11..bcbbefec2d 100644 --- a/core/formats/nifti1_gz.cpp +++ b/core/formats/nifti1_gz.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9635b99398..dde6527a3e 100644 --- a/core/formats/nifti2.cpp +++ b/core/formats/nifti2.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5ea4886c96..09d10a1166 100644 --- a/core/formats/nifti2_gz.cpp +++ b/core/formats/nifti2_gz.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e35ace8f47..f4f9610b76 100644 --- a/core/formats/par.cpp +++ b/core/formats/par.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 efa1ffea84..85ea4a2bda 100644 --- a/core/formats/pipe.cpp +++ b/core/formats/pipe.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -64,7 +64,7 @@ namespace MR return false; if (isatty (STDOUT_FILENO)) - throw Exception ("attempt to pipe image to standard output (this will leave temporary files behind)"); + throw Exception ("cannot create output piped image: no command connected at other end of pipe to receive that image"); H.name() = File::create_tempfile (0, "mif"); diff --git a/core/formats/png.cpp b/core/formats/png.cpp index 43313e219a..18b4b09c3a 100644 --- a/core/formats/png.cpp +++ b/core/formats/png.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -70,16 +70,16 @@ namespace MR } H.size(0) = png.get_width(); - H.stride(0) = -3; + H.stride(0) = -2; H.size(1) = png.get_height(); - H.stride(1) = -4; + H.stride(1) = -3; H.size(2) = 1; - H.stride(2) = 1; + H.stride(2) = 4; if (H.ndim() == 4) - H.stride(3) = 2; + H.stride(3) = 1; H.spacing (0) = H.spacing (1) = H.spacing (2) = 1.0; H.transform().setIdentity(); @@ -132,14 +132,14 @@ 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, + // 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; + size_t nonunity_axes = 0; for (size_t axis = 0; axis != H.ndim(); ++axis) { - if (H.size (axis) == 1) - ++unity_axes; + if (H.size (axis) > 1) + ++nonunity_axes; } - if (unity_axes - (H.ndim() - num_axes) < 2) + if (nonunity_axes - (H.ndim() - num_axes) < 2) throw Exception ("Too few (non-unity) image axes to support PNG export"); // For 4D images, can support: @@ -149,7 +149,7 @@ namespace MR // - 4 volumes (save as RGBA) // This needs to be compatible with NameParser used in Header::create(): // "num_axes" subtracts from H.ndim() however many instances of [] there are - size_t width_axis = 0, axis_to_zero = 3; + size_t axis_to_zero = 3; if (H.ndim() - num_axes > 1) throw Exception ("Cannot nominate more than one axis using square-bracket notation for PNG format"); switch (num_axes) { @@ -170,7 +170,6 @@ namespace MR axis_to_zero = 1; } else if (H.size(0) == 1) { axis_to_zero = 0; - width_axis = 1; } else { // If image is 3D, and all three axes have size greater than one, and we // haven't used the square-bracket notation, we can't export genuine 3D data @@ -192,8 +191,6 @@ namespace MR } if (axis < 0) throw Exception ("Cannot export 4D image to PNG format if all three spatial axes have size greater than 1 and square-bracket notation is not used"); - if (!axis_to_zero) - width_axis = 1; break; default: throw Exception ("Cannot generate PNG file(s) from image with more than 4 axes"); @@ -209,7 +206,7 @@ namespace MR H.stride(1) = -3; H.spacing(1) = 1.0; if (H.ndim() > 2) { - H.stride(2) = 4; + H.stride(2) = -4; H.spacing(2) = 1.0; } if (H.ndim() > 3) { @@ -223,9 +220,10 @@ namespace MR H.transform().setIdentity(); - if (H.datatype() == DataType::Bit && H.size (width_axis) % 8) { - WARN ("Cannot write bitwise PNG image with width not a factor of 8; will instead write with 8-bit depth"); + if (H.datatype() == DataType::Bit) { + WARN ("Cannot write bitwise PNG images; will instead write with 8-bit depth"); H.datatype() = DataType::UInt8; + H.intensity_scale() = 1.0 / 255.0; } return true; diff --git a/core/formats/ram.cpp b/core/formats/ram.cpp index 12141d7f0f..990d35e7c6 100644 --- a/core/formats/ram.cpp +++ b/core/formats/ram.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5e1484fc77..db3074a543 100644 --- a/core/formats/tiff.cpp +++ b/core/formats/tiff.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 feb53e2932..1044dd72a1 100644 --- a/core/formats/xds.cpp +++ b/core/formats/xds.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ad5b49acf8..a76d87a0fe 100644 --- a/core/header.cpp +++ b/core/header.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -785,12 +785,13 @@ namespace MR Header result (headers[0]); if (axis_to_concat >= result.ndim()) { + Stride::symbolise (result); result.ndim() = axis_to_concat + 1; result.size(axis_to_concat) = 1; + result.stride(axis_to_concat) = axis_to_concat+1; + Stride::actualise (result); } - result.stride (axis_to_concat) = result.ndim()+1; - for (size_t axis = 0; axis != result.ndim(); ++axis) { if (axis != axis_to_concat && result.size (axis) <= 1) { for (const auto& H : headers) { diff --git a/core/header.h b/core/header.h index 7e179b0d32..f27ca20e65 100644 --- a/core/header.h +++ b/core/header.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9a0b34aa9f..4691261cc2 100644 --- a/core/image.h +++ b/core/image.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 003295e96a..0575eec0c9 100644 --- a/core/image_diff.h +++ b/core/image_diff.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7fc648e90f..e64295d7cd 100644 --- a/core/image_helpers.h +++ b/core/image_helpers.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.cpp b/core/image_io/base.cpp index 1e2a99d3a5..4f4487bc0c 100644 --- a/core/image_io/base.cpp +++ b/core/image_io/base.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4cfd875572..a7ab137caf 100644 --- a/core/image_io/base.h +++ b/core/image_io/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b4cabc1b4e..a8eb663369 100644 --- a/core/image_io/default.cpp +++ b/core/image_io/default.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9d87adc5a1..4bb4eb3814 100644 --- a/core/image_io/default.h +++ b/core/image_io/default.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f2ff0d0b2c..1d0264d845 100644 --- a/core/image_io/fetch_store.cpp +++ b/core/image_io/fetch_store.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 19c6239be6..d80da7e20d 100644 --- a/core/image_io/fetch_store.h +++ b/core/image_io/fetch_store.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 726cbbc518..3ebafcbb8a 100644 --- a/core/image_io/gz.cpp +++ b/core/image_io/gz.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 decac58e13..6b27a4c02e 100644 --- a/core/image_io/gz.h +++ b/core/image_io/gz.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 068dc40677..d0c653938a 100644 --- a/core/image_io/mosaic.cpp +++ b/core/image_io/mosaic.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 63c0e54300..27396b1a44 100644 --- a/core/image_io/mosaic.h +++ b/core/image_io/mosaic.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/null.cpp b/core/image_io/null.cpp new file mode 100644 index 0000000000..6be05a05f2 --- /dev/null +++ b/core/image_io/null.cpp @@ -0,0 +1,34 @@ +/* Copyright (c) 2008-2025 the MRtrix3 contributors. + * + * This Source Code Form 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/. + */ + +#include "image_io/null.h" +#include "header.h" + +namespace MR { + namespace ImageIO { + + void Null::load(const Header &header, size_t) { + throw Exception("No suitable handler to access data in \"" + header.name() + + "\""); + } + + void Null::unload(const Header &header) { + throw Exception("No suitable handler to access data in \"" + header.name() + + "\""); + } + + } // namespace ImageIO +} // namespace MR diff --git a/src/gui/mrview/colourmap_menu.h b/core/image_io/null.h similarity index 51% rename from src/gui/mrview/colourmap_menu.h rename to core/image_io/null.h index 3fe4d16b34..3c163c3b67 100644 --- a/src/gui/mrview/colourmap_menu.h +++ b/core/image_io/null.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -14,36 +14,25 @@ * For more details, see http://www.mrtrix.org/. */ -#ifndef __gui_mrview_colourmap_menu_h__ -#define __gui_mrview_colourmap_menu_h__ +#ifndef __image_io_null_h__ +#define __image_io_null_h__ -#include "colourmap.h" -#include "gui/opengl/gl.h" +#include "image_io/base.h" -namespace MR -{ - namespace GUI - { - namespace MRView - { +namespace MR { + namespace ImageIO { + class Null : public Base { + NOMEMALIGN + public: + Null(const Header &header) : Base(header) {} + protected: + virtual void load(const Header &, size_t); + virtual void unload(const Header &); + }; - void create_colourmap_menu (QWidget* parent, - QActionGroup*& group, - QMenu* menu, - QAction** & actions, - bool create_shortcuts = false, - bool use_special = true); - - - - } - } -} + } // namespace ImageIO +} // namespace MR #endif - - - - diff --git a/core/image_io/pipe.cpp b/core/image_io/pipe.cpp index 3ef3e50d3e..af9e8501d4 100644 --- a/core/image_io/pipe.cpp +++ b/core/image_io/pipe.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 86d2c2482b..9146a6655a 100644 --- a/core/image_io/pipe.h +++ b/core/image_io/pipe.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d295d2112b..dde6f25965 100644 --- a/core/image_io/png.cpp +++ b/core/image_io/png.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,17 +29,14 @@ namespace MR void PNG::load (const Header& header, size_t) { - segsize = header.datatype().bytes() * voxel_count (header) * files.size(); + DEBUG (std::string("loading PNG image") + (files.size() > 1 ? "s" : "") + " \"" + header.name() + "\""); addresses.resize (1); - addresses[0].reset (new uint8_t [segsize]); + segsize = (header.datatype().bits() * voxel_count (header) + 7) / 8; + addresses[0].reset (new uint8_t[segsize]); if (is_new) { memset (addresses[0].get(), 0x00, segsize); - DEBUG ("allocated memory for PNG image \"" + header.name() + "\""); } else { - DEBUG (std::string("loading PNG image") + (files.size() > 1 ? "s" : "") + " \"" + header.name() + "\""); - size_t slice_bytes = (header.datatype().bits() * header.size(0) * header.size(1) + 7) / 8; - if (header.ndim() == 4) - slice_bytes *= header.size (3); + const size_t slice_bytes = (header.datatype().bits() * header.size(0) * header.size(1) * (header.ndim() == 4 ? header.size(3) : 1) + 7) / 8; for (size_t i = 0; i != files.size(); ++i) { File::PNG::Reader png (files[i].name); if (png.get_width() != header.size(0) || @@ -59,19 +56,15 @@ namespace MR void PNG::unload (const Header& header) { - if (addresses.size()) { - if (writable) { - size_t slice_bytes = (header.datatype().bits() * header.size(0) * header.size(1) + 7) / 8; - if (header.ndim() == 4) - slice_bytes *= header.size (3); - for (size_t i = 0; i != files.size(); i++) { - File::PNG::Writer png (header, files[i].name); - png.save (addresses[0].get() + (i * slice_bytes)); - } + assert (addresses.size() == 1); + if (writable) { + const size_t slice_bytes = (header.datatype().bits() * header.size(0) * header.size(1) * (header.ndim() == 4 ? header.size(3) : 1) + 7) / 8; + for (size_t i = 0; i != files.size(); i++) { + File::PNG::Writer png (header, files[i].name); + png.save (addresses[0].get() + (i * slice_bytes)); } - DEBUG ("deleting buffer for PNG image \"" + header.name() + "\"..."); - addresses[0].release(); } + delete[] addresses[0].release(); } } diff --git a/core/image_io/png.h b/core/image_io/png.h index ec8ebd69de..85b8d7bd0d 100644 --- a/core/image_io/png.h +++ b/core/image_io/png.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 acd3b01868..ec65d1bcdf 100644 --- a/core/image_io/ram.cpp +++ b/core/image_io/ram.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,14 +36,6 @@ namespace MR } - void RAM::unload (const Header& header) - { - if (addresses.size()) { - DEBUG ("deleting RAM buffer for image \"" + header.name() + "\"..."); - delete [] addresses[0]; - } - } - } } diff --git a/core/image_io/ram.h b/core/image_io/ram.h index 87dac3245e..963518b2a6 100644 --- a/core/image_io/ram.h +++ b/core/image_io/ram.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 +32,7 @@ namespace MR protected: virtual void load (const Header&, size_t); - virtual void unload (const Header&); + virtual void unload (const Header&) { } }; } diff --git a/core/image_io/scratch.cpp b/core/image_io/scratch.cpp index 7f5b8809aa..d7b5bfc5db 100644 --- a/core/image_io/scratch.cpp +++ b/core/image_io/scratch.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,15 +38,6 @@ namespace MR } } - - void Scratch::unload (const Header& header) - { - if (addresses.size()) { - DEBUG ("deleting scratch buffer for image \"" + header.name() + "\"..."); - addresses[0].reset(); - } - } - } } diff --git a/core/image_io/scratch.h b/core/image_io/scratch.h index 59cc7610cd..04ca1dff2c 100644 --- a/core/image_io/scratch.h +++ b/core/image_io/scratch.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 +34,7 @@ namespace MR protected: virtual void load (const Header&, size_t); - virtual void unload (const Header&); + virtual void unload (const Header&) { } }; } diff --git a/core/image_io/sparse.cpp b/core/image_io/sparse.cpp index 1396e7d234..1367506a43 100644 --- a/core/image_io/sparse.cpp +++ b/core/image_io/sparse.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 252ac388b4..6f7a00a79a 100644 --- a/core/image_io/sparse.h +++ b/core/image_io/sparse.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7246567722..ea8c0df68f 100644 --- a/core/image_io/tiff.cpp +++ b/core/image_io/tiff.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -63,15 +63,6 @@ namespace MR } - - void TIFF::unload (const Header& header) - { - if (addresses.size()) { - DEBUG ("deleting buffer for TIFF image \"" + header.name() + "\"..."); - addresses[0].release(); - } - } - } } diff --git a/core/image_io/tiff.h b/core/image_io/tiff.h index 2b5a67760d..d4479905ee 100644 --- a/core/image_io/tiff.h +++ b/core/image_io/tiff.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -30,11 +30,11 @@ namespace MR class TIFF : public Base { MEMALIGN (TIFF) public: - TIFF (const Header& header) : Base (header) { } + TIFF (const Header& header) : Base (header) { } protected: virtual void load (const Header&, size_t); - virtual void unload (const Header&); + virtual void unload (const Header&) { } }; } diff --git a/core/image_io/variable_scaling.cpp b/core/image_io/variable_scaling.cpp index 24fc0fa96a..f4fa615fec 100644 --- a/core/image_io/variable_scaling.cpp +++ b/core/image_io/variable_scaling.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,8 +61,6 @@ namespace MR } - void VariableScaling::unload (const Header& header) { } - } } diff --git a/core/image_io/variable_scaling.h b/core/image_io/variable_scaling.h index 871cb666e4..007a8673d7 100644 --- a/core/image_io/variable_scaling.h +++ b/core/image_io/variable_scaling.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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 @@ namespace MR protected: virtual void load (const Header&, size_t); - virtual void unload (const Header&); + virtual void unload (const Header&) { } }; } diff --git a/core/interp/base.h b/core/interp/base.h index a295d38214..eca2699c3c 100644 --- a/core/interp/base.h +++ b/core/interp/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/cubic.h b/core/interp/cubic.h index 80a4cd21d9..ebaf1bd420 100644 --- a/core/interp/cubic.h +++ b/core/interp/cubic.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/linear.h b/core/interp/linear.h index 06fd7fd7e2..151974c755 100644 --- a/core/interp/linear.h +++ b/core/interp/linear.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/masked.h b/core/interp/masked.h index 5c3e6a0c95..1e2b5825c5 100644 --- a/core/interp/masked.h +++ b/core/interp/masked.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 caf57615fe..54efdadcfd 100644 --- a/core/interp/nearest.h +++ b/core/interp/nearest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3f352d9c30..f386d6d95d 100644 --- a/core/interp/sinc.h +++ b/core/interp/sinc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e8f5aefb82..c9330b6bd1 100644 --- a/core/math/SH.cpp +++ b/core/math/SH.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9d9541c2fd..dc8bc96b87 100644 --- a/core/math/SH.h +++ b/core/math/SH.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4e8d7a79ec..f9c0f28086 100644 --- a/core/math/Sn_scale_estimator.h +++ b/core/math/Sn_scale_estimator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f6ab224c9c..d0af9cf490 100644 --- a/core/math/ZSH.h +++ b/core/math/ZSH.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 bc0e43f40c..48d10cb5aa 100644 --- a/core/math/average_space.cpp +++ b/core/math/average_space.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 40e0c79011..ef8cf7c0e3 100644 --- a/core/math/average_space.h +++ b/core/math/average_space.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0481c7bccf..58fee9befe 100644 --- a/core/math/bessel.cpp +++ b/core/math/bessel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6ebe28af73..7d6643a1e6 100644 --- a/core/math/bessel.h +++ b/core/math/bessel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 115f00d49d..3c29058115 100644 --- a/core/math/betainc.cpp +++ b/core/math/betainc.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1589a250a4..505b2d1346 100644 --- a/core/math/betainc.h +++ b/core/math/betainc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0c9ac3a3dc..41355527ea 100644 --- a/core/math/cauchy.h +++ b/core/math/cauchy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 797e35d8a1..5bfd39fb28 100644 --- a/core/math/chebyshev.h +++ b/core/math/chebyshev.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3722b62ef5..e45c8b7035 100644 --- a/core/math/check_gradient.h +++ b/core/math/check_gradient.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d274bbf38f..ae1fe615e7 100644 --- a/core/math/condition_number.h +++ b/core/math/condition_number.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ac0ff36ac5..2e8ed5cb96 100644 --- a/core/math/constrained_least_squares.h +++ b/core/math/constrained_least_squares.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4d8cc9dc92..8db3e2a67a 100644 --- a/core/math/cubic_spline.h +++ b/core/math/cubic_spline.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 097f0b6e06..6c9c5f89ec 100644 --- a/core/math/erfinv.cpp +++ b/core/math/erfinv.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3f99084d88..5e818fcaa4 100644 --- a/core/math/erfinv.h +++ b/core/math/erfinv.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f0c6bcf1b7..825366f712 100644 --- a/core/math/factorial.h +++ b/core/math/factorial.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1212801888..ebd7271d35 100644 --- a/core/math/gaussian.h +++ b/core/math/gaussian.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 399c312a74..48109e3738 100644 --- a/core/math/golden_section_search.h +++ b/core/math/golden_section_search.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ef3c906acb..825db9c649 100644 --- a/core/math/gradient_descent.h +++ b/core/math/gradient_descent.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 912fa040e5..4b21f1e583 100644 --- a/core/math/gradient_descent_bb.h +++ b/core/math/gradient_descent_bb.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4e6ed2c51f..6b1ac70957 100644 --- a/core/math/hermite.h +++ b/core/math/hermite.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b3ad589838..e8fcd9698e 100644 --- a/core/math/least_squares.h +++ b/core/math/least_squares.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 53267e0aef..01106cbdd2 100644 --- a/core/math/legendre.h +++ b/core/math/legendre.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 519c090f76..ed24a06808 100644 --- a/core/math/math.h +++ b/core/math/math.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7624f8699f..4c6464e91e 100644 --- a/core/math/median.h +++ b/core/math/median.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 db83214eaf..22774d4b3f 100644 --- a/core/math/polynomial.h +++ b/core/math/polynomial.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b36ac428ff..fc577d2d32 100644 --- a/core/math/quadratic_line_search.h +++ b/core/math/quadratic_line_search.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0bd55465af..aec23fc91b 100644 --- a/core/math/rician.h +++ b/core/math/rician.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0b22aa5160..5b280b46a9 100644 --- a/core/math/rng.h +++ b/core/math/rng.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 23591be91b..ae4810130c 100644 --- a/core/math/sech.h +++ b/core/math/sech.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1a701d724a..7471d2df18 100644 --- a/core/math/sinc.h +++ b/core/math/sinc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 86438b4baf..62bbc8f1ad 100644 --- a/core/math/sphere.h +++ b/core/math/sphere.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 50c915b7bd..823461f309 100644 --- a/core/math/stats/fwe.cpp +++ b/core/math/stats/fwe.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2dfc8c0e7c..eafcd2a64b 100644 --- a/core/math/stats/fwe.h +++ b/core/math/stats/fwe.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8ac831c73d..71ea0b4bde 100644 --- a/core/math/stats/glm.cpp +++ b/core/math/stats/glm.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6ed86c64cc..41b1f2137c 100644 --- a/core/math/stats/glm.h +++ b/core/math/stats/glm.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 55f1210127..3ccf5e3873 100644 --- a/core/math/stats/import.cpp +++ b/core/math/stats/import.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 01b6dc463c..aaa43882fc 100644 --- a/core/math/stats/import.h +++ b/core/math/stats/import.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3f83f14519..ef9b347a03 100644 --- a/core/math/stats/shuffle.cpp +++ b/core/math/stats/shuffle.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c6db74d4e5..d6dbe3b0a0 100644 --- a/core/math/stats/shuffle.h +++ b/core/math/stats/shuffle.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9b510a431f..c770394014 100644 --- a/core/math/stats/typedefs.h +++ b/core/math/stats/typedefs.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6b42ad5378..4e1eaaeb93 100644 --- a/core/math/welch_satterthwaite.h +++ b/core/math/welch_satterthwaite.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 59b75ef4cf..406333608a 100644 --- a/core/math/zstatistic.cpp +++ b/core/math/zstatistic.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6dccaaf77a..cae1d89975 100644 --- a/core/math/zstatistic.h +++ b/core/math/zstatistic.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 dbf12d3add..1e95280f2e 100644 --- a/core/memory.h +++ b/core/memory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 817847a10d..79d746cb74 100644 --- a/core/misc/bitset.cpp +++ b/core/misc/bitset.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 cff0413fff..05e37207fc 100644 --- a/core/misc/bitset.h +++ b/core/misc/bitset.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c7b5986ac8..9338953d71 100644 --- a/core/misc/voxel2vector.h +++ b/core/misc/voxel2vector.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 40bfd810f7..d66661967f 100644 --- a/core/mrtrix.cpp +++ b/core/mrtrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 53332bb023..ccd18a2afe 100644 --- a/core/mrtrix.h +++ b/core/mrtrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a72cc72e92..f10ff5b794 100644 --- a/core/ordered_thread_queue.h +++ b/core/ordered_thread_queue.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f5b284f5ff..f4da805ee9 100644 --- a/core/phase_encoding.cpp +++ b/core/phase_encoding.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9f97b42a63..110e36d64b 100644 --- a/core/phase_encoding.h +++ b/core/phase_encoding.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.cpp b/core/progressbar.cpp index fe567a2819..06235a1a68 100644 --- a/core/progressbar.cpp +++ b/core/progressbar.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -188,7 +188,7 @@ namespace MR // unable to determine nature of stderr; assuming socket stderr_to_file = false; else - stderr_to_file = S_ISREG (buf.st_mode); + stderr_to_file = S_ISREG (buf.st_mode) || S_ISFIFO (buf.st_mode); diff --git a/core/progressbar.h b/core/progressbar.h index b9c18f1d66..c63718139a 100644 --- a/core/progressbar.h +++ b/core/progressbar.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 fc830e3680..474254d03f 100644 --- a/core/raw.h +++ b/core/raw.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 51f782a361..ff89061b33 100644 --- a/core/signal_handler.cpp +++ b/core/signal_handler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ed78a3fc4f..7b06b70651 100644 --- a/core/signal_handler.h +++ b/core/signal_handler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1d574ed9e7..7d048b8065 100644 --- a/core/signals.h +++ b/core/signals.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 45b0c60837..c467a28ef6 100644 --- a/core/stats.cpp +++ b/core/stats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7f878cab8e..803a861d21 100644 --- a/core/stats.h +++ b/core/stats.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 889038e663..b425fdd241 100644 --- a/core/stride.cpp +++ b/core/stride.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ecc3108507..4cc238d253 100644 --- a/core/stride.h +++ b/core/stride.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8a1e0aa9a5..b0d604faac 100644 --- a/core/thread.cpp +++ b/core/thread.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2697d985d3..f0f7a8acbd 100644 --- a/core/thread.h +++ b/core/thread.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 29c15008a0..1a0e9fcb10 100644 --- a/core/thread_queue.h +++ b/core/thread_queue.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 743d3c90b1..0e638a7aba 100644 --- a/core/timer.h +++ b/core/timer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 339cdf7a13..4a0832a3ae 100644 --- a/core/transform.h +++ b/core/transform.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 30f56f12ad..ba39a6fd7d 100644 --- a/core/types.h +++ b/core/types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/Makefile b/docs/Makefile index df09aec2b1..d4bb2cbb9e 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,216 +1,20 @@ -# Makefile for Sphinx documentation +# Minimal makefile for Sphinx documentation # -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . BUILDDIR = _build -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help +# Put it first so that "make" without argument is like "make help". help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - -.PHONY: clean -clean: - rm -rf $(BUILDDIR)/* - -.PHONY: html -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: dirhtml -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -.PHONY: singlehtml -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -.PHONY: pickle -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/MRtrix.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/MRtrix.qhc" - -.PHONY: applehelp -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -.PHONY: devhelp -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/MRtrix" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/MRtrix" - @echo "# devhelp" - -.PHONY: epub -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: latex -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: latexpdfja -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -.PHONY: linkcheck -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -.PHONY: doctest -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -.PHONY: coverage -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -.PHONY: xml -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." +.PHONY: help Makefile -.PHONY: pseudoxml -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/concepts/mrview_lock_axes/lockoff_nointerp.gif b/docs/concepts/mrview_lock_axes/lockoff_nointerp.gif new file mode 100644 index 0000000000..b66f3b09b1 Binary files /dev/null and b/docs/concepts/mrview_lock_axes/lockoff_nointerp.gif differ diff --git a/docs/concepts/mrview_lock_axes/lockoff_withinterp.gif b/docs/concepts/mrview_lock_axes/lockoff_withinterp.gif new file mode 100644 index 0000000000..b7fc97c53b Binary files /dev/null and b/docs/concepts/mrview_lock_axes/lockoff_withinterp.gif differ diff --git a/docs/concepts/mrview_lock_axes/lockon_nohighlight.gif b/docs/concepts/mrview_lock_axes/lockon_nohighlight.gif new file mode 100644 index 0000000000..4cf092139d Binary files /dev/null and b/docs/concepts/mrview_lock_axes/lockon_nohighlight.gif differ diff --git a/docs/concepts/mrview_lock_axes/lockon_withhighlight.gif b/docs/concepts/mrview_lock_axes/lockon_withhighlight.gif new file mode 100644 index 0000000000..7109fead28 Binary files /dev/null and b/docs/concepts/mrview_lock_axes/lockon_withhighlight.gif differ diff --git a/docs/concepts/mrview_lock_axes/mrview_lock_axes.rst b/docs/concepts/mrview_lock_axes/mrview_lock_axes.rst new file mode 100644 index 0000000000..d58e820b1d --- /dev/null +++ b/docs/concepts/mrview_lock_axes/mrview_lock_axes.rst @@ -0,0 +1,181 @@ +.. _mrview_lock_to_axes: + +``mrview``'s "Lock To Image Axes" +================================= + +In the GUI command ``mrview``, +there is a particular functionality regarding alignment between viewport camera and main image, +which under default behaviour can mislead users if not properly understood. +The aim of this documentation page is to demonstrate how this works under default and alternate behaviour, +explain why it is designed in the way that it is, +and demonstrate the preferable visualisation approach to use when assessing alignment between images. + +The "main image" +---------------- + +While the ``mrview`` command can be executed with one or more input images specified at the command-line, +and/or one or more images can be opened from within the GUI environment, +only one of this set of images is ever displayed at any one time. +Here, that solitary image being displayed is referred to as the "*main image*", +distinguishing it from other image data that may be being displayed through the use of toolbars. + +Evaluating image alignment +-------------------------- + +The specific confusion here relates to attempts to evaluate the alignment between two images +by switching the main image back and forth between them. +This is demonstrated here evaluating differences between a T1-weighted image +and a mean *b* = 0 image as computed from a pre-processed DWI series. +Both of these images have been grossly downsampled +in order to better highlight the alignments of their respective voxel grids. + +Default: Lock To Image Axes *on* +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In this first example, +``mrview`` is shown switching back and forth between these two images. +The focus point +(faint horizontal & vertical yellow lines) +has been placed at the posterior edge of the left ventricle. +By switching between the two images, +it seems as though there may be a gross misalignment between them. +In the sagittal plane, there appears to be an erroneous rotation between the two images; +in the axial plane, the frontal lobe is present in the DWI but absent in the T1-weighted image. + +.. figure:: lockon_nohighlight.gif + :alt: MRView switching between two images with Lock To Image Axes On + +Based on this visualiation, +one may be prone to conclude that these two images have not been appropriately coregistered. + +Such would however be an *erroneous inference* in this case. + +What's actually happening here is as follows. +When a main image is loaded into ``mrview``, +it wants to be able to display a single 2D slice of image data +with the two in-place image axes corresponding to the horizontal and vertical directions on the screen +(among other things, this makes initial execution of ``mrview`` very fast, +as it does not need to load the entire input image into memory, +just a single slice of it). +It therefore calculates the appropriate orientation of a virtual camera in three-dimensional space +that satisfies this criterion. +A single two-dimensional slice is therefore displayed, +but it is nevertheless *appropriately located* within three-dimensional space. + +Now consider what happens when ``mrview`` switches from one main image to another. +It still wants to be able to load data for, and display, +just a single two-dimensional slice of image data. +It therefore, by default, +*realigns* the camera in order to conform to the voxel grid of the *new* main image. +This is in no way guaranteed to be aligned with the previous main image. + +Here is the same two images as before, +switching from one to the other as the ``mrview`` main image, +highlighting the GUI control corresponding to this axis-locking functionality, +and with the crucial "orientation labels" visual aides shown and highlighted: + +.. figure:: lockon_withhighlight.gif + :alt: MRView with Lock To Image Axes On and highlighted indicators of camera movement + +With the orientations in scanner space shown, +it becomes very clear that switching ``mrview`` between these two main images +is not a faithful way to assess the alignment of two images that are defined on different voxel grids. +Notably though, the biological structure underlying the focus point, +originally placed at the posterior edge of the left ventricle, +does appear to be consistent between the two images. +This occurs for two reasons: + +1. When ``mrview`` performs the calculations to realign the camera with the new main image, + it does so in such a way that preserves the location of the focus point. + +2. These two images *are* actually well aligned in "real" / "scanner" space. + The focus point is technically placed not on a specific voxel of a specific image, + but in a three-dimensional coordinate in real space. + As long as that location in real space samples image data that corresponds to the same anatomy, + the images are considered to be well aligned with one another, + even if those image data are stored on completely different voxel grids. + +Opposite: Lock To Image Axes *off* +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +It is possible to manually override this behaviour, +and instruct ``mrview`` to *not* lock the camera to the axes of the main image. +This however has other consequences for visualisation. +The animations below show the location of this control, +and what the window looks like when switching between the two images. + +.. figure:: lockoff_nointerp.gif + :alt: MRView with Lock To Image Axes Off and no interpolation + +- Unlike the previous example with Lock To Image Axes turned on, + there now appears to be good alignment between these two images. + This will be the case not only for visualisation, + but also for any computations that interpret these image data with respect to their real space positions. + +- Notably in these animations, + the orientation indicators *do not move* as the viewer switches from one image to the other. + This is the primary consequence of disabling the "lock to image axes" functionality. + +- Because in this case the camera position was initially set based on the T1w image, + there is still correspondence between the within-place axes of that image and the horizontal & vertical directions on the screen. + For the DWI mean *b* = 0 image however, + the axis orientations do *not* correspond to the vertical and horizontal screen directions, + and therefore the image pixels do not appear as aligned squares, + but are rather rotated on the screen. + +- In addition to the tilted pixels, + there are also "shear lines" visible in the mean *b* = 0 image. + This is because the misalignment between camera position and image axes occurs + not only for the two image axes closest to the screen horizontal & vertical directions, + but also for the third image axis closest to the through-screen direction. + What is shown on the screen is effectively a two-dimensional slice through three-dimensional image data; + as the depth of that slice cuts from one image slice to the next, + the pixel intensities displayed within that slice switch from sampling data from one slice to the next, + producing these shear lines. + +The visual manifestations of misalignment between image axes and camera axes +can be mitigated by activating image interpolation for the ``mrview`` main image. +In this case, the T1-weighted and mean *b* = 0 image have comparable appearances on the screen, +despite the fact that the camera position is aligned to one but not the other +(though the angulation of the visible outer edge of the mean *b* = 0 image FoV gives a strong clue). + +.. figure:: lockoff_withinterp.gif + :alt: MRView with Lock To Image Axes Off and with interpolation + +It is important to note however, +this is *not* simply producing a two-dimensional image slice to be presented on the screen +and then performing bilinear interpolation on that image to smooth its edges. +What is actually happening here is a *three-dimensional interpolation*: +the camera position defines an arbitrary two-dimensional place through three-dimensional space, +and for each displayed pixel within that plane, +trilinear interpolation is performed to produce an intensity from the underlying image data. + +This caveat also highlights one of the reasons why the Lock To Image Axes feature is on by default. +By guaranteeing that the data of the main image being displayed is precisely one two-dimensional slice of data, +only the data corresponding to that one slice needs to be loaded into memory. +Where this feature is disabled, +it is necessary to immediately load data for the entire three-dimensional volume into GPU memory, +as an arbitrary camera plane could require sampling of data from any location within that three-dimensional volume. +Some users may have experienced a noticeable pause in command responsiveness +when initially making use of the ability to rotate the camera; +this is because performing a camera rotation by necessity disables the Lock To Image Axes button, +and therefore upon that first initial rotation the entire three-dimensional volume must be loaded into memory. + +Alternative: Using the Overlay tool +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +As demonstrated above, +evaluating the relative alignment of two images by switching between them is prone to being misled. +An arguably more robust technique for performing such evaluation is to make use of ``mrview``'s Overlay Tool. +In the example below, +The T1-weighted image has been preserved as the ``mrview`` main image, +but had its colour map switched from "gray" to "cool". +The mean *b* = 0 image has then been loaded into the Overlay tool, +had the "hot" colour map applied, +and its opacity set to approximately 50%. +This means that both images are visible simultaneously throughout the entire viewing plane. +Using this mechanism it is clear that there is good alignment between image data from the two modalities. + +.. figure:: overlay.png + :alt: MRView using the Overlay tool to assess image alignment + diff --git a/docs/concepts/mrview_lock_axes/overlay.png b/docs/concepts/mrview_lock_axes/overlay.png new file mode 100644 index 0000000000..12592025fa Binary files /dev/null and b/docs/concepts/mrview_lock_axes/overlay.png differ diff --git a/docs/conf.py b/docs/conf.py index e1a923d8f5..666529d6b2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,112 +1,32 @@ -# -*- coding: utf-8 -*- +# Configuration file for the Sphinx documentation builder. # -# MRtrix documentation build configuration file, created by -# sphinx-quickstart on Fri Jan 29 15:02:17 2016. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. +# For the full list of built-in configuration values, see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html -import sys -import os +# -- Project information ----------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -#sys.path.insert(0, os.path.abspath('.')) +project = 'MRtrix3' +copyright = '2023, MRtrix contributors' +author = 'MRtrix contributors' +release = '3.0' -# -- General configuration ------------------------------------------------ +# -- General configuration --------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -# If your documentation needs a minimal Sphinx version, state it here. -#needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. extensions = [ 'sphinx.ext.mathjax', 'notfound.extension' ] -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# source_suffix = ['.rst', '.md'] -from recommonmark.parser import CommonMarkParser - -source_parsers = { - '.md': CommonMarkParser, -} - -source_suffix = '.rst' #['.md', '.rst'] - -# The encoding of source files. -#source_encoding = 'utf-8-sig' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'MRtrix' -copyright = u'2017, MRtrix contributors' -author = u'MRtrix contributors' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = u'3.0' -# The full version, including alpha/beta/rc tags. -release = u'3.0' - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# There are two options for replacing |today|: either, you set today to some -# non-false value, then it is used: -#today = '' -# Else, today_fmt is used as the format for a strftime call. -#today_fmt = '%B %d, %Y' - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -exclude_patterns = ['_build', 'README.md'] - -# The reST default role (used for this markup: `text`) to use for all -# documents. -#default_role = None - -# If true, '()' will be appended to :func: etc. cross-reference text. -#add_function_parentheses = True - -# If true, the current module name will be prepended to all description -# unit titles (such as .. function::). -#add_module_names = True -# If true, sectionauthor and moduleauthor directives will be shown in the -# output. They are ignored by default. -#show_authors = False +templates_path = ['_templates'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' -# A list of ignored prefixes for module index sorting. -#modindex_common_prefix = [] -# If true, keep warnings as "system message" paragraphs in the built documents. -#keep_warnings = False +# -- Options for HTML output ------------------------------------------------- +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False +html_theme = 'sphinx_rtd_theme' +html_static_path = ['_static'] rst_prolog = """ .. |br| raw:: html @@ -114,215 +34,3 @@
""" - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -#html_theme = 'alabaster' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} - -# Add any paths that contain custom themes here, relative to this directory. -#html_theme_path = [] - -# The name for this set of Sphinx documents. If None, it defaults to -# " v documentation". -#html_title = None - -# A shorter title for the navigation bar. Default is the same as html_title. -#html_short_title = None - -# The name of an image file (relative to this directory) to place at the top -# of the sidebar. -#html_logo = None - -# The name of an image file (within the static path) to use as favicon of the -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 -# pixels large. -#html_favicon = None - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". - -html_static_path = ['_static'] - -# Add any extra paths that contain custom files (such as robots.txt or -# .htaccess) here, relative to this directory. These files are copied -# directly to the root of the documentation. -#html_extra_path = [] - -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, -# using the given strftime format. -#html_last_updated_fmt = '%b %d, %Y' - -# If true, SmartyPants will be used to convert quotes and dashes to -# typographically correct entities. -#html_use_smartypants = True - -# Custom sidebar templates, maps document names to template names. -#html_sidebars = {} - -# Additional templates that should be rendered to pages, maps page names to -# template names. -#html_additional_pages = {} - -# If false, no module index is generated. -#html_domain_indices = True - -# If false, no index is generated. -#html_use_index = True - -# If true, the index is split into individual pages for each letter. -#html_split_index = False - -# If true, links to the reST sources are added to the pages. -#html_show_sourcelink = True - -# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. -#html_show_sphinx = True - -# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. -#html_show_copyright = True - -# If true, an OpenSearch description file will be output, and all pages will -# contain a tag referring to it. The value of this option must be the -# base URL from which the finished HTML is served. -#html_use_opensearch = '' - -# This is the file name suffix for HTML files (e.g. ".xhtml"). -#html_file_suffix = None - -# Language to be used for generating the HTML full-text search index. -# Sphinx supports the following languages: -# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' -# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' -#html_search_language = 'en' - -# A dictionary with options for the search language support, empty by default. -# Now only 'ja' uses this config value -#html_search_options = {'type': 'default'} - -# The name of a javascript file (relative to the configuration directory) that -# implements a search results scorer. If empty, the default will be used. -#html_search_scorer = 'scorer.js' - -# Output file base name for HTML help builder. -htmlhelp_basename = 'MRtrixdoc' - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', - -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', - -# Additional stuff for the LaTeX preamble. -#'preamble': '', - -# Latex figure (float) alignment -#'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'MRtrix.tex', u'MRtrix Documentation', - u'MRtrix contributors', 'manual'), -] - -# The name of an image file (relative to this directory) to place at the top of -# the title page. -#latex_logo = None - -# For "manual" documents, if this is true, then toplevel headings are parts, -# not chapters. -#latex_use_parts = False - -# If true, show page references after internal links. -#latex_show_pagerefs = False - -# If true, show URL addresses after external links. -#latex_show_urls = False - -# Documents to append as an appendix to all manuals. -#latex_appendices = [] - -# If false, no module index is generated. -#latex_domain_indices = True - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'mrtrix', u'MRtrix Documentation', - [author], 1) -] - -# If true, show URL addresses after external links. -#man_show_urls = False - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'MRtrix', u'MRtrix Documentation', - author, 'MRtrix', 'One line description of project.', - 'Miscellaneous'), -] - -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' -if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme - html_theme = 'sphinx_rtd_theme' - html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - html_style = 'css/custom.css' -else: - html_context = { - 'css_files': [ - 'https://media.readthedocs.org/css/sphinx_rtd_theme.css', - 'https://media.readthedocs.org/css/readthedocs-doc-embed.css', - '_static/css/custom.css', - ], - } -# Documents to append as an appendix to all manuals. -#texinfo_appendices = [] - -# If false, no module index is generated. -#texinfo_domain_indices = True - -# How to display URL addresses: 'footnote', 'no', or 'inline'. -#texinfo_show_urls = 'footnote' - -# If true, do not generate a @detailmenu in the "Top" node's menu. -#texinfo_no_detailmenu = False - - -# --- options for 404 sphinx-notfound-page - -notfound_context = {'title': 'Page not found', 'body': ''' -

Page not found

-

-This page does not exist in the documentation for this version of MRtrix3. -This is likely to be due to updates we make every so often to the way the documentation is organised. -

-

-To find the page you're looking for, make sure to select the relevant version, by clicking on the green version string at the bottom of the menu. To figure out which version of MRtrix3 you're currently using, use the -version option with any MRtrix3 command, for example: mrinfo -version. -

-

-Alternatively, if you want to find the corresponding section in this version of the documentation, use the search functionality at the top left of the page. -

-'''} - diff --git a/docs/format_config_options b/docs/format_config_options index 6425ec92a5..32a4d985ad 100755 --- a/docs/format_config_options +++ b/docs/format_config_options @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 f87dad409a..79e4b7d06a 100755 --- a/docs/format_environment_variables +++ b/docs/format_environment_variables @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 def26968af..3a009f0d6f 100755 --- a/docs/generate_user_docs.sh +++ b/docs/generate_user_docs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/index.rst b/docs/index.rst index 6598b33120..67030878d9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -207,6 +207,7 @@ Table of Contents concepts/sh_basis_lmax concepts/fixels_dixels concepts/afd_connectivity + concepts/mrview_lock_axes/mrview_lock_axes .. toctree:: :maxdepth: 1 diff --git a/docs/installation/using_containers.rst b/docs/installation/using_containers.rst index 6bce0f31cf..5439d5ba34 100644 --- a/docs/installation/using_containers.rst +++ b/docs/installation/using_containers.rst @@ -105,6 +105,10 @@ The following basic usage has been shown to work on Linux:: singularity run -B /run MRtrix3.sif mrview +If you have NVidia graphics drivers, you may need to instead use the `--nv` option:: + + singularity run --nv /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 diff --git a/docs/make.bat b/docs/make.bat index 4bd46bdbef..32bb24529f 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -1,62 +1,16 @@ @ECHO OFF +pushd %~dp0 + REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) +set SOURCEDIR=. set BUILDDIR=_build -set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . -set I18NSPHINXOPTS=%SPHINXOPTS% . -if NOT "%PAPER%" == "" ( - set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% - set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% -) - -if "%1" == "" goto help - -if "%1" == "help" ( - :help - echo.Please use `make ^` where ^ is one of - echo. html to make standalone HTML files - echo. dirhtml to make HTML files named index.html in directories - echo. singlehtml to make a single large HTML file - echo. pickle to make pickle files - echo. json to make JSON files - echo. htmlhelp to make HTML files and a HTML help project - echo. qthelp to make HTML files and a qthelp project - echo. devhelp to make HTML files and a Devhelp project - echo. epub to make an epub - echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter - echo. text to make text files - echo. man to make manual pages - echo. texinfo to make Texinfo files - echo. gettext to make PO message catalogs - echo. changes to make an overview over all changed/added/deprecated items - echo. xml to make Docutils-native XML files - echo. pseudoxml to make pseudoxml-XML files for display purposes - echo. linkcheck to check all external links for integrity - echo. doctest to run all doctests embedded in the documentation if enabled - echo. coverage to run coverage check of the documentation if enabled - goto end -) - -if "%1" == "clean" ( - for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i - del /q /s %BUILDDIR%\* - goto end -) - - -REM Check if sphinx-build is available and fallback to Python version if any -%SPHINXBUILD% 1>NUL 2>NUL -if errorlevel 9009 goto sphinx_python -goto sphinx_ok -:sphinx_python - -set SPHINXBUILD=python -m sphinx.__init__ -%SPHINXBUILD% 2> nul +%SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx @@ -65,199 +19,17 @@ if errorlevel 9009 ( echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ + echo.https://www.sphinx-doc.org/ exit /b 1 ) -:sphinx_ok - - -if "%1" == "html" ( - %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/html. - goto end -) - -if "%1" == "dirhtml" ( - %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. - goto end -) - -if "%1" == "singlehtml" ( - %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. - goto end -) - -if "%1" == "pickle" ( - %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the pickle files. - goto end -) - -if "%1" == "json" ( - %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can process the JSON files. - goto end -) - -if "%1" == "htmlhelp" ( - %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run HTML Help Workshop with the ^ -.hhp project file in %BUILDDIR%/htmlhelp. - goto end -) - -if "%1" == "qthelp" ( - %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; now you can run "qcollectiongenerator" with the ^ -.qhcp project file in %BUILDDIR%/qthelp, like this: - echo.^> qcollectiongenerator %BUILDDIR%\qthelp\MRtrix.qhcp - echo.To view the help file: - echo.^> assistant -collectionFile %BUILDDIR%\qthelp\MRtrix.ghc - goto end -) - -if "%1" == "devhelp" ( - %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. - goto end -) - -if "%1" == "epub" ( - %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The epub file is in %BUILDDIR%/epub. - goto end -) - -if "%1" == "latex" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - if errorlevel 1 exit /b 1 - echo. - echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdf" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf - cd %~dp0 - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "latexpdfja" ( - %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex - cd %BUILDDIR%/latex - make all-pdf-ja - cd %~dp0 - echo. - echo.Build finished; the PDF files are in %BUILDDIR%/latex. - goto end -) - -if "%1" == "text" ( - %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The text files are in %BUILDDIR%/text. - goto end -) - -if "%1" == "man" ( - %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The manual pages are in %BUILDDIR%/man. - goto end -) - -if "%1" == "texinfo" ( - %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. - goto end -) - -if "%1" == "gettext" ( - %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The message catalogs are in %BUILDDIR%/locale. - goto end -) - -if "%1" == "changes" ( - %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes - if errorlevel 1 exit /b 1 - echo. - echo.The overview file is in %BUILDDIR%/changes. - goto end -) - -if "%1" == "linkcheck" ( - %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck - if errorlevel 1 exit /b 1 - echo. - echo.Link check complete; look for any errors in the above output ^ -or in %BUILDDIR%/linkcheck/output.txt. - goto end -) - -if "%1" == "doctest" ( - %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest - if errorlevel 1 exit /b 1 - echo. - echo.Testing of doctests in the sources finished, look at the ^ -results in %BUILDDIR%/doctest/output.txt. - goto end -) +if "%1" == "" goto help -if "%1" == "coverage" ( - %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage - if errorlevel 1 exit /b 1 - echo. - echo.Testing of coverage in the sources finished, look at the ^ -results in %BUILDDIR%/coverage/python.txt. - goto end -) +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end -if "%1" == "xml" ( - %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The XML files are in %BUILDDIR%/xml. - goto end -) - -if "%1" == "pseudoxml" ( - %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml - if errorlevel 1 exit /b 1 - echo. - echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. - goto end -) +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% :end +popd diff --git a/docs/reference/commands/5tt2gmwmi.rst b/docs/reference/commands/5tt2gmwmi.rst index e2b1488d16..d36634dbfe 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 3249459dba..5efafff289 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 9b33842b00..2c6ed8b914 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 3664d5ef32..34b908ac2e 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 7b124209c6..5fcd8a38b6 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this @@ -399,7 +399,7 @@ Options - **-thalami** Select method to be used for thalamic segmentation; options are: nuclei,first,aseg -- **-white_stem** Classify the brainstem as white matter +- **-white_stem** Classify the brainstem as white matter; streamlines will not be permitted to terminate within this region Options common to all 5ttgen algorithms ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 c1f8b31d2a..2d627cd637 100644 --- a/docs/reference/commands/afdconnectivity.rst +++ b/docs/reference/commands/afdconnectivity.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 a46e265112..a08fcb0b31 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 2bc644122e..54fd77d347 100644 --- a/docs/reference/commands/amp2sh.rst +++ b/docs/reference/commands/amp2sh.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 92b7d2cbbb..b64678f68d 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 5c061bfadd..316b2d481b 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 53c59b4625..5de67f9b35 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 846b326c60..7aee5b8e01 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 a261e3ec2f..7731ee13ca 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 f3cf22de93..9a44f539d9 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 bab1733320..f87006b2f8 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 f7a37fb1c6..c3a5b3a406 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 9195d8bf11..66a8b25345 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 55eda01d48..acfe67e035 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e5ffc11d03..0f5c7cdf2d 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 b1d3af224b..200f122d27 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 5d5c134c35..592a38a32e 100644 --- a/docs/reference/commands/dwi2fod.rst +++ b/docs/reference/commands/dwi2fod.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 721da98fc9..4c89b40727 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e4e4714431..e48c2eae6f 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this @@ -205,7 +205,7 @@ Tournier, J.-D.; Smith, R. E.; Raffelt, D.; Tabbara, R.; Dhollander, T.; Pietsch **Author:** Thijs Dhollander (thijs.dhollander@gmail.com) -**Copyright:** Copyright (c) 2008-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this @@ -311,7 +311,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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this @@ -412,7 +412,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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this @@ -525,7 +525,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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this @@ -631,7 +631,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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this @@ -739,7 +739,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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 c3bb1e4122..8e7c40c48b 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 64ad64784a..682701dac5 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 1c1a354e55..17cd674794 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 5c335af78b..5de14d892a 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e2f0706557..7349813012 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 1af9a3f13d..4e226b9a11 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 a228bb5df9..79ed65fdeb 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 ed8830669c..9128e882a0 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e4b41a7bfe..c8b8c61d0c 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e3104474ef..398c40561b 100644 --- a/docs/reference/commands/fixel2sh.rst +++ b/docs/reference/commands/fixel2sh.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 13bda78e9b..88d8656cbc 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 6f8d29d918..e4be214e7d 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 c3a11e4e8f..a9d1ba1d51 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 7933fb2800..7ce760a1b2 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 441b6536e8..d0982f2114 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 6cf09c27c5..47ae5346e3 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 6c11bed08a..b11c85821f 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 ae510eb1aa..cc480a8ae0 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 f12edc085d..50430cfd2f 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 a4fd13bbe9..49f413666f 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 19049a5923..ae10c047be 100644 --- a/docs/reference/commands/for_each.rst +++ b/docs/reference/commands/for_each.rst @@ -61,6 +61,12 @@ Example usages By specifying the -test option, the script will print to the terminal the results of text substitutions for all of the specified inputs, but will not actually execute those commands. It can therefore be used to verify that the script is receiving the intended set of inputs, and that the text substitutions on those inputs lead to the intended command strings. +- *Utilising shell operators within the command substitution*:: + + $ for_each * : tensor2metric IN/dwi.mif - "|" tensor2metric - -fa IN/fa.mif + + In this example, if the double-quotes were NOT placed around the pipe operator, then the shell would take the sum total output of the for_each script and pipe that to a single invocation of the tensor2metric command. Since in this example it is instead desired for the pipe operator to be a part of the command string that is executed multiple times by the for_each script, it must be escaped using double-quotes. + Options ------- @@ -107,7 +113,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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 d526c2a0e3..1edbc99278 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 543f786025..bcf090979d 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 499837c69c..1971871c4a 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 2151928a32..6bc0a516a5 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 20a7ab2b22..1c92ba78dc 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 c4ac2c63e4..ade59aa92c 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 553104220e..e56283a670 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 40dfe5beca..6b45207662 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 925aa9fea0..a65808976b 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 c527eafe10..99522daccf 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 6bd8b71757..6bbe8ae3fa 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 17a36b844b..7e1f38c92f 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 7826118072..ff400e6758 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 b793d7f52a..acb2038194 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 5eb647b9e6..11bcf5292a 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 3992d1765a..cbda289e04 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 02f09e8fd0..401ff4adf4 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e44791dff1..d9540a88bb 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 ca492b5b2a..4e4e7fdc20 100644 --- a/docs/reference/commands/mrdegibbs.rst +++ b/docs/reference/commands/mrdegibbs.rst @@ -25,7 +25,9 @@ This application attempts to remove Gibbs ringing artefacts from MRI images usin This command is designed to run on data directly after it has been reconstructed by the scanner, before any interpolation of any kind has taken place. You should not run this command after any form of motion correction (e.g. not after dwifslpreproc). Similarly, if you intend running dwidenoise, you should run denoising before this command to not alter the noise structure, which would impact on dwidenoise's performance. -Note that this method is designed to work on images acquired with full k-space coverage. Running this method on partial Fourier ('half-scan') data may lead to suboptimal and/or biased results, as noted in the original reference below. There is currently no means of dealing with this; users should exercise caution when using this method on partial Fourier data, and inspect its output for any obvious artefacts. +For best results, any form of filtering performed by the scanner should be disabled, whether performed in the image domain or k-space. This includes elliptic filtering and other filters that are often applied to reduce Gibbs ringing artifacts. While this method can still safely be applied to such data, some residual ringing artefacts may still be present in the output. + +Note that this method is designed to work on images acquired with full k-space coverage. If this method is executed on data acquired with partial Fourier (eg. "half-scan") acceleration, it may not fully remove all ringing artifacts, and you may observe residuals of the original artifact in the partial Fourier direction. Nonetheless, application of the method is still considered safe and worthwhile. Users are however encouraged to acquired full-Fourier data where possible. Options ------- @@ -75,7 +77,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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e2ab6ece10..41c2939a1d 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 37b9b28dbc..6ac4f0ba48 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 2dd196278c..224b102d5a 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 9b0116add1..f2ad3d7dec 100644 --- a/docs/reference/commands/mrgrid.rst +++ b/docs/reference/commands/mrgrid.rst @@ -72,7 +72,7 @@ Regridding options (involves image interpolation, applied to spatial axes only) Pad and crop options (no image interpolation is performed, header transformation is adjusted) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -- **-as reference image** pad or crop the input image on the upper bound to match the specified reference image grid. This operation ignores differences in image transformation between input and reference image. +- **-as reference_image** pad or crop the input image on the upper bound to match the specified reference image grid. This operation ignores differences in image transformation between input and reference image. - **-uniform number** pad or crop the input image by a uniform number of voxels on all sides @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e014671cca..19b5938550 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 fc328fe2a5..9d8f1c07f0 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 ad3740d775..b540d125be 100644 --- a/docs/reference/commands/mrinfo.rst +++ b/docs/reference/commands/mrinfo.rst @@ -130,9 +130,9 @@ 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) +**Author:** J-Donald Tournier (jdtournier@gmail.com) and Robert E. Smith (robert.smith@florey.edu.au) -**Copyright:** Copyright (c) 2008-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e649602fc0..1e69607112 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 7ed122fc4c..efee9bdcf7 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 ec2052b0ec..da2cc3d751 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 3aefb04419..cf18af7e82 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 3822a9b8e3..9fc0226008 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 1dc4392c57..e78bb58f73 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 cfeb5ffd03..9374339ab2 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 5cfc207cb3..6ab3c6912c 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 f873897f80..29ff944e84 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 43e21e1664..9dd02a0465 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 dd221e1fc4..c6632c8ec3 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 2aff92ae54..d8cd714ca6 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 4df64f678b..1d5f4bfc76 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 18627bb2f2..4bc26213ad 100644 --- a/docs/reference/commands/sh2amp.rst +++ b/docs/reference/commands/sh2amp.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 af69b539ef..b491316dd9 100644 --- a/docs/reference/commands/sh2peaks.rst +++ b/docs/reference/commands/sh2peaks.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 7370a3ff35..fd9aac3f7c 100644 --- a/docs/reference/commands/sh2power.rst +++ b/docs/reference/commands/sh2power.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 508554a721..d047d8fccf 100644 --- a/docs/reference/commands/sh2response.rst +++ b/docs/reference/commands/sh2response.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 e6dee8fb0f..3d9b12adb2 100644 --- a/docs/reference/commands/shbasis.rst +++ b/docs/reference/commands/shbasis.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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 efcc0574d2..f7151274ae 100644 --- a/docs/reference/commands/shconv.rst +++ b/docs/reference/commands/shconv.rst @@ -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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 17173758db..a8156eaa3e 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 b447fdf707..123c6172f7 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 7599403580..551c67265c 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 ecddaf8dcb..2f00580298 100644 --- a/docs/reference/commands/tckconvert.rst +++ b/docs/reference/commands/tckconvert.rst @@ -94,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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 327fb39404..1c54aef823 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 aca8d5bddd..3f8307144e 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 c59a1520d2..140bd314a2 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 33c08d88a8..a7a979283b 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 7b9a9d3eee..15b0e804f1 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 48f399e2e2..fed4759aa9 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 1a81e5a6bc..d681341801 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 cd5335e16b..6b160e9ff5 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 964cf9a83c..adfc2a0619 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 a045308e80..81fdc8ffa5 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 28da1e5d23..fd92f679b1 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 ee3a9c3bfe..6ce219f7b3 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 6d6813efb2..5d2f2b5482 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 42b56dbdb9..2366fda805 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 59f5a09f93..2fcc27a0b5 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 16bad54fca..991fd4319f 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 1d7625f7d7..efe8ff7167 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 364be27e54..fd2cc1fca3 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 8c033185c1..aeb893f0e7 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 faaa8c01f8..ab2916567b 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 2df9697367..17bf22a0be 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 5f477821e4..b17aeaab6e 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 c948aa0bd6..61fdd18ccf 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 47705f59d9..49a0e657eb 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 4c21bb18b3..50e20128d5 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 bcdd6f78e2..684228f83c 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 c51497a61f..7c559963a5 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 dab5309938..69e1bd163b 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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 be00fa18b5..abdaba29b2 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-2023 the MRtrix3 contributors. +**Copyright:** Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form is subject to 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/requirements.txt b/docs/requirements.txt index 474be88b4d..ecb3208cf9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1 +1,3 @@ +sphinx-rtd-theme sphinx-notfound-page + diff --git a/docs/tips_and_tricks/dicom_handling.rst b/docs/tips_and_tricks/dicom_handling.rst index af9ff389b5..a9c7cee3d9 100644 --- a/docs/tips_and_tricks/dicom_handling.rst +++ b/docs/tips_and_tricks/dicom_handling.rst @@ -375,44 +375,71 @@ these are: - Explicit VR Big Endian (``1.2.840.10008.1.2.2``) -Any other transfer syntax will be flagged as unsupported, and *MRtrix3* will be -unable to read the data, providing an error message similar to this: +Any other transfer syntax will be flagged as unsupported. When this occurs, +whether or not the *MRtrix3* command can proceed will depend on whether that +command requires access to the underlying image data: + +- If *only header information* is required, then the command will be able to proceed, + albeit with a warning issued: .. code-block:: console - $ mrinfo DICOM - mrinfo: [done] scanning DICOM folder "DICOM" - mrinfo: [ERROR] unable to read DICOM images in "DICOM": - mrinfo: [ERROR] unsupported transfer syntax found in DICOM data - mrinfo: [ERROR] consider using third-party tools to convert your data to standard uncompressed encoding - mrinfo: [ERROR] See the MRtrix3 documentation on DICOM handling for details: - mrinfo: [ERROR] http://mrtrix.readthedocs.io/en/latest/tips_and_tricks/dicom_handling.html#error-unsupported-transfer-syntax - mrinfo: [ERROR] error opening image "DICOM" - -Thankfully, other tools exist that should be able to convert the data to a -format that *MRtrix3* (and other DICOM tools) will read. The `dcmtk -`__ DICOM toolkit in particular provides -the ``dcmdjpeg`` command to decompress data stored using JPEG transfer syntax. -On Linux, a directory of such files can be decompressed as follows (amend the -various ``PATH`` as required for your system): + $ mrinfo DICOM/ + mrinfo: [done] scanning folder "DICOM/" for DICOM data + mrinfo: [100%] Reading DICOM series "SeriesDescription" + mrinfo: [WARNING] unable to read DICOM images in "DICOM/": + mrinfo: [WARNING] unsupported transfer syntax found in DICOM data + mrinfo: [WARNING] consider using third-party tools to convert your data to standard uncompressed encoding + mrinfo: [WARNING] See the MRtrix3 documentation on DICOM handling for details: + mrinfo: [WARNING] http://mrtrix.readthedocs.io/en/latest/tips_and_tricks/dicom_handling.html#error-unsupported-transfer-syntax + ************************************************ + Image name: "SURNAME^FIRSTNAME [MR] SeriesDescription" + ************************************************ + Dimensions: 96 x 96 x 60 x 7 + Voxel size: 2.5 x 2.5 x 2.5 x ? + Data strides: [ -1 -2 3 4 ] + .... + +- If however a command requires *access to the underlying image intensities*, + then *MRtrix3* will be unable to read from such: + .. code-block:: console + + $ mrconvert DICOM/ data.mif + mrconvert: [done] scanning folder "DICOM/" for DICOM data + mrconvert: [100%] Reading DICOM series "SeriesDescription" + mrconvert: [WARNING] unable to read DICOM images in "DICOM/": + mrconvert: [WARNING] unsupported transfer syntax found in DICOM data + mrconvert: [WARNING] consider using third-party tools to convert your data to standard uncompressed encoding + mrconvert: [WARNING] See the MRtrix3 documentation on DICOM handling for details: + mrconvert: [WARNING] http://mrtrix.readthedocs.io/en/latest/tips_and_tricks/dicom_handling.html#error-unsupported-transfer-syntax + mrconvert: [ERROR] No suitable handler to access data in "SURNAME^FIRSTNAME [MR] SeriesDescription" + + Thankfully, other tools exist that should be able to convert the data to a + format that *MRtrix3* (and other DICOM tools) will read. The `dcmtk + `__ DICOM toolkit in particular provides + the ``dcmdjpeg`` command to decompress data stored using JPEG transfer syntax. + On Linux, a directory of such files can be decompressed as follows (amend the + various ``PATH`` as required for your system): + + .. code-block:: console - $ export PATH=/opt/dcmtk/bin:$PATH - $ export DCMDICTPATH=/opt/dcmtk/share/dcmtk/dicom.dic + $ export PATH=/opt/dcmtk/bin:$PATH + $ export DCMDICTPATH=/opt/dcmtk/share/dcmtk/dicom.dic - $ for img in dcmdir/* - > do - > dcmdjpeg $img ${img}.tmp - > mv ${img}.tmp $img - > done + $ for img in dcmdir/* + > do + > dcmdjpeg $img ${img}.tmp + > mv ${img}.tmp $img + > done -*MRtrix3* commands should now be able to read the directory successfully: + *MRtrix3* commands should now be able to read the directory successfully: -.. code-block:: console + .. code-block:: console - $ mrinfo dcmdir - mrinfo: [done] scanning DICOM folder "data/driss/t1" - mrinfo: [100%] reading DICOM series "AX FSPGR 3D ASSET C+" - ... + $ mrinfo dcmdir + mrinfo: [done] scanning DICOM folder "data/driss/t1" + mrinfo: [100%] reading DICOM series "AX FSPGR 3D ASSET C+" + ... diff --git a/doxygen b/doxygen index bc269a2397..a3e5dad247 100755 --- a/doxygen +++ b/doxygen @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 c837d60538..9e427b8691 100755 --- a/generate_bash_completion.py +++ b/generate_bash_completion.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 ea605158ec..7969774fe4 100755 --- a/install_mime_types.sh +++ b/install_mime_types.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/freesurfer.py b/lib/mrtrix3/_5ttgen/freesurfer.py index cdfbed3717..0b68d083d3 100644 --- a/lib/mrtrix3/_5ttgen/freesurfer.py +++ b/lib/mrtrix3/_5ttgen/freesurfer.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 b93afac803..a027d0f8ae 100644 --- a/lib/mrtrix3/_5ttgen/fsl.py +++ b/lib/mrtrix3/_5ttgen/fsl.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -14,7 +14,10 @@ # For more details, see http://www.mrtrix.org/. import math, os -from distutils.spawn import find_executable +try: + from shutil import which as find_executable +except ImportError: + from distutils.spawn import find_executable # pylint: disable=deprecated-module from mrtrix3 import MRtrixError from mrtrix3 import app, fsl, image, path, run, utils diff --git a/lib/mrtrix3/_5ttgen/gif.py b/lib/mrtrix3/_5ttgen/gif.py index 36b4faf699..00f71bb1f0 100644 --- a/lib/mrtrix3/_5ttgen/gif.py +++ b/lib/mrtrix3/_5ttgen/gif.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 dd6be3df48..7c93c6b904 100644 --- a/lib/mrtrix3/_5ttgen/hsvs.py +++ b/lib/mrtrix3/_5ttgen/hsvs.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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,10 @@ import glob, os, re -from distutils.spawn import find_executable +try: + from shutil import which as find_executable +except ImportError: + from distutils.spawn import find_executable # pylint: disable=deprecated-module from mrtrix3 import MRtrixError from mrtrix3 import app, fsl, image, path, run @@ -43,7 +46,7 @@ def usage(base_parser, subparsers): #pylint: disable=unused-variable parser.add_argument('-template', help='Provide an image that will form the template for the generated 5TT image') parser.add_argument('-hippocampi', choices=HIPPOCAMPI_CHOICES, help='Select method to be used for hippocampi (& amygdalae) segmentation; options are: ' + ','.join(HIPPOCAMPI_CHOICES)) parser.add_argument('-thalami', choices=THALAMI_CHOICES, help='Select method to be used for thalamic segmentation; options are: ' + ','.join(THALAMI_CHOICES)) - parser.add_argument('-white_stem', action='store_true', help='Classify the brainstem as white matter') + parser.add_argument('-white_stem', action='store_true', help='Classify the brainstem as white matter; streamlines will not be permitted to terminate within this region') parser.add_citation('Smith, R.; Skoch, A.; Bajada, C.; Caspers, S.; Connelly, A. Hybrid Surface-Volume Segmentation for improved Anatomically-Constrained Tractography. In Proc OHBM 2020') parser.add_citation('Fischl, B. Freesurfer. NeuroImage, 2012, 62(2), 774-781', is_external=True) parser.add_citation('Iglesias, J.E.; Augustinack, J.C.; Nguyen, K.; Player, C.M.; Player, A.; Wright, M.; Roy, N.; Frosch, M.P.; Mc Kee, A.C.; Wald, L.L.; Fischl, B.; and Van Leemput, K. A computational atlas of the hippocampal formation using ex vivo, ultra-high resolution MRI: Application to adaptive segmentation of in vivo MRI. NeuroImage, 2015, 115, 117-137', condition='If FreeSurfer hippocampal subfields module is utilised', is_external=True) @@ -437,7 +440,7 @@ def execute(): #pylint: disable=unused-variable run.command('mesh2voxel ' + bs_smoothed_mesh_path + ' ' + template_image + ' brain_stem.mif') app.cleanup(bs_smoothed_mesh_path) progress.increment() - fourthventricle_zmin = min([ int(line.split()[2]) for line in run.command('maskdump 4th-Ventricle.mif')[0].splitlines() ]) + fourthventricle_zmin = min(int(line.split()[2]) for line in run.command('maskdump 4th-Ventricle.mif')[0].splitlines()) if fourthventricle_zmin: bs_cropmask_path = 'brain_stem_crop.mif' run.command('mredit brain_stem.mif - ' + ' '.join([ '-plane 2 ' + str(index) + ' 0' for index in range(0, fourthventricle_zmin) ]) + ' | ' diff --git a/lib/mrtrix3/__init__.py b/lib/mrtrix3/__init__.py index 3c32013dc1..310c063cac 100644 --- a/lib/mrtrix3/__init__.py +++ b/lib/mrtrix3/__init__.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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 @@ try: from shlex import quote except ImportError: - from pipes import quote + from pipes import quote #pylint: disable=deprecated-module from mrtrix3._version import __version__ diff --git a/lib/mrtrix3/algorithm.py b/lib/mrtrix3/algorithm.py index 88386e2acc..bf01fe8276 100644 --- a/lib/mrtrix3/algorithm.py +++ b/lib/mrtrix3/algorithm.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 2d13c69021..348dd11564 100644 --- a/lib/mrtrix3/app.py +++ b/lib/mrtrix3/app.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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,7 +59,7 @@ _DEFAULT_COPYRIGHT = \ -'''Copyright (c) 2008-2023 the MRtrix3 contributors. +'''Copyright (c) 2008-2025 the MRtrix3 contributors. This Source Code Form 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,8 +293,7 @@ def make_scratch_dir(): #pylint: disable=unused-variable if CONTINUE_OPTION: debug('Skipping scratch directory creation due to use of -continue option') return - if SCRATCH_DIR: - raise Exception('Cannot use multiple scratch directories') + assert not SCRATCH_DIR, 'Cannot use multiple scratch directories' if hasattr(ARGS, 'scratch') and ARGS.scratch: dir_path = os.path.abspath(ARGS.scratch) else: @@ -320,8 +319,7 @@ def make_scratch_dir(): #pylint: disable=unused-variable def goto_scratch_dir(): #pylint: disable=unused-variable - if not SCRATCH_DIR: - raise Exception('No scratch directory location set') + assert SCRATCH_DIR, 'No scratch directory location set' if VERBOSITY: console('Changing to scratch directory (' + SCRATCH_DIR + ')') os.chdir(SCRATCH_DIR) @@ -632,15 +630,13 @@ def set_copyright(self, text): #pylint: disable=unused-variable # Mutually exclusive options need to be added before the command-line input is parsed def flag_mutually_exclusive_options(self, options, required=False): #pylint: disable=unused-variable - if not isinstance(options, list) or not isinstance(options[0], utils.STRING_TYPES): - raise Exception('Parser.flagMutuallyExclusiveOptions() only accepts a list of strings') + assert isinstance(options, list) and isinstance(options[0], utils.STRING_TYPES), \ + 'Parser.flagMutuallyExclusiveOptions() only accepts a list of strings' self._mutually_exclusive_option_groups.append( (options, required) ) def parse_args(self): - if not self._author: - raise Exception('Script author MUST be set in script\'s usage() function') - if not self._synopsis: - raise Exception('Script synopsis MUST be set in script\'s usage() function') + assert self._author, 'Script author MUST be set in script\'s usage() function' + assert self._synopsis, 'Script synopsis MUST be set in script\'s usage() function' if '-version' in sys.argv: self.print_version() sys.exit(0) diff --git a/lib/mrtrix3/dwi2response/dhollander.py b/lib/mrtrix3/dwi2response/dhollander.py index f313382d46..9a7817a6af 100644 --- a/lib/mrtrix3/dwi2response/dhollander.py +++ b/lib/mrtrix3/dwi2response/dhollander.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwi2response/fa.py b/lib/mrtrix3/dwi2response/fa.py index 5de851ac12..4488dd0f35 100644 --- a/lib/mrtrix3/dwi2response/fa.py +++ b/lib/mrtrix3/dwi2response/fa.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwi2response/manual.py b/lib/mrtrix3/dwi2response/manual.py index 0d69b56f12..65f8d32dc8 100644 --- a/lib/mrtrix3/dwi2response/manual.py +++ b/lib/mrtrix3/dwi2response/manual.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwi2response/msmt_5tt.py b/lib/mrtrix3/dwi2response/msmt_5tt.py index 4e769b9837..c07ec94e76 100644 --- a/lib/mrtrix3/dwi2response/msmt_5tt.py +++ b/lib/mrtrix3/dwi2response/msmt_5tt.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwi2response/tax.py b/lib/mrtrix3/dwi2response/tax.py index e15507d21b..fa90fc1d0d 100644 --- a/lib/mrtrix3/dwi2response/tax.py +++ b/lib/mrtrix3/dwi2response/tax.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwi2response/tournier.py b/lib/mrtrix3/dwi2response/tournier.py index 3bdfdf0040..69ecdcc82f 100644 --- a/lib/mrtrix3/dwi2response/tournier.py +++ b/lib/mrtrix3/dwi2response/tournier.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/dwibiascorrect/ants.py b/lib/mrtrix3/dwibiascorrect/ants.py index a36c762093..66e4490d26 100644 --- a/lib/mrtrix3/dwibiascorrect/ants.py +++ b/lib/mrtrix3/dwibiascorrect/ants.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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,7 +16,10 @@ # 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 +try: + from shutil import which as find_executable +except ImportError: + from distutils.spawn import find_executable # pylint: disable=deprecated-module 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 c82ce84707..9b4e3e92e9 100644 --- a/lib/mrtrix3/dwibiascorrect/fsl.py +++ b/lib/mrtrix3/dwibiascorrect/fsl.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 ef6df7edc3..65832b4349 100644 --- a/lib/mrtrix3/dwinormalise/group.py +++ b/lib/mrtrix3/dwinormalise/group.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 5ac0500d41..1ba632ecb7 100644 --- a/lib/mrtrix3/dwinormalise/individual.py +++ b/lib/mrtrix3/dwinormalise/individual.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 764206e234..019f3fecd6 100644 --- a/lib/mrtrix3/fsl.py +++ b/lib/mrtrix3/fsl.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this @@ -14,7 +14,10 @@ # For more details, see http://www.mrtrix.org/. import os -from distutils.spawn import find_executable +try: + from shutil import which as find_executable +except ImportError: + from distutils.spawn import find_executable # pylint: disable=deprecated-module from mrtrix3 import MRtrixError @@ -32,7 +35,7 @@ def check_first(prefix, structures): #pylint: disable=unused-variable from mrtrix3 import app, path #pylint: disable=import-outside-toplevel vtk_files = [ prefix + '-' + struct + '_first.vtk' for struct in structures ] - existing_file_count = sum([ os.path.exists(filename) for filename in vtk_files ]) + existing_file_count = sum(os.path.exists(filename) for filename in vtk_files) if existing_file_count != len(vtk_files): if 'SGE_ROOT' in os.environ and os.environ['SGE_ROOT']: app.console('FSL FIRST job may have been run via SGE; awaiting completion') diff --git a/lib/mrtrix3/image.py b/lib/mrtrix3/image.py index 94d7e21128..2a621a02c2 100644 --- a/lib/mrtrix3/image.py +++ b/lib/mrtrix3/image.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/matrix.py b/lib/mrtrix3/matrix.py index 6afdbf4695..2494a04167 100644 --- a/lib/mrtrix3/matrix.py +++ b/lib/mrtrix3/matrix.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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 @@ def dot(input_a, input_b): #pylint: disable=unused-variable raise MRtrixError('Both inputs must be either 1D vectors or 2D matrices') if len(input_a) != len(input_b): raise MRtrixError('Dimension mismatch (' + str(len(input_a)) + ' vs. ' + str(len(input_b)) + ')') - return sum([ x*y for x,y in zip(input_a, input_b) ]) + return sum(x*y for x,y in zip(input_a, input_b)) diff --git a/lib/mrtrix3/path.py b/lib/mrtrix3/path.py index 3ba7c31764..531d944093 100644 --- a/lib/mrtrix3/path.py +++ b/lib/mrtrix3/path.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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,13 +21,18 @@ import ctypes, errno, inspect, os, random, string, subprocess, time -from distutils.spawn import find_executable # Function can be used in isolation if potentially needing to place quotation marks around a # filesystem path that is to be included as part of a command string try: from shlex import quote except ImportError: - from pipes import quote + from pipes import quote #pylint: disable=deprecated-module +# Distutils removed in 3.12, but shutil.which not available in 2.7 +try: + from shutil import which as find_executable +except ImportError: + from distutils.spawn import find_executable # pylint: disable=deprecated-module + from mrtrix3 import CONFIG from mrtrix3.utils import STRING_TYPES @@ -212,7 +217,7 @@ def in_use(path): # A fatal error will result in a non-zero code -> in_use() = False, so wait_for() can return return not subprocess.call(['fuser', '-s', path], shell=False, stdin=None, stdout=None, stderr=None) - def num_exit(data): + def num_exist(data): count = 0 for entry in data: if os.path.exists(entry): @@ -244,21 +249,25 @@ def num_in_use(data): app.debug(str(paths)) # Wait until all files exist - num_exist = num_exit(paths) - if num_exist != len(paths): - progress = app.ProgressBar('Waiting for creation of ' + (('new item \"' + paths[0] + '\"') if len(paths) == 1 else (str(len(paths)) + ' new items')), len(paths)) - for _ in range(num_exist): + current_num_exist = num_exist(paths) + if current_num_exist != len(paths): + progress = app.ProgressBar('Waiting for creation of ' \ + + (('new item \"' + paths[0] + '\"') \ + if len(paths) == 1 \ + else (str(len(paths)) + ' new items')), + len(paths)) + for _ in range(current_num_exist): progress.increment() delay = 1.0/1024.0 - while not num_exist == len(paths): + while not current_num_exist == len(paths): time.sleep(delay) - new_num_exist = num_exit(paths) - if new_num_exist == num_exist: - delay = max(60.0, delay*2.0) - elif new_num_exist > num_exist: - for _ in range(new_num_exist - num_exist): + new_num_exist = num_exist(paths) + if new_num_exist == current_num_exist: + delay = min(60.0, delay*2.0) + elif new_num_exist > current_num_exist: + for _ in range(new_num_exist - current_num_exist): progress.increment() - num_exist = new_num_exist + current_num_exist = new_num_exist delay = 1.0/1024.0 progress.done() else: @@ -275,28 +284,31 @@ def num_in_use(data): return # Can we query the in-use status of any of these paths - num_in_use = num_in_use(paths) - if num_in_use is None: + current_num_in_use = num_in_use(paths) + if current_num_in_use is None: app.debug('Unable to test for finalization of new files') return # Wait until all files are not in use - if not num_in_use: + if not current_num_in_use: app.debug('Item' + ('s' if len(paths) > 1 else '') + ' immediately ready') return - progress = app.ProgressBar('Waiting for finalization of ' + (('new file \"' + paths[0] + '\"') if len(paths) == 1 else (str(len(paths)) + ' new files'))) - for _ in range(len(paths) - num_in_use): + progress = app.ProgressBar('Waiting for finalization of ' + + (('new file \"' + paths[0] + '\"') \ + if len(paths) == 1 \ + else (str(len(paths)) + ' new files'))) + for _ in range(len(paths) - current_num_in_use): progress.increment() delay = 1.0/1024.0 - while num_in_use: + while current_num_in_use: time.sleep(delay) new_num_in_use = num_in_use(paths) - if new_num_in_use == num_in_use: - delay = max(60.0, delay*2.0) - elif new_num_in_use < num_in_use: - for _ in range(num_in_use - new_num_in_use): + if new_num_in_use == current_num_in_use: + delay = min(60.0, delay*2.0) + elif new_num_in_use < current_num_in_use: + for _ in range(current_num_in_use - new_num_in_use): progress.increment() - num_in_use = new_num_in_use + current_num_in_use = new_num_in_use delay = 1.0/1024.0 progress.done() diff --git a/lib/mrtrix3/phaseencoding.py b/lib/mrtrix3/phaseencoding.py index 09b5b7ce68..8e2ddc7769 100644 --- a/lib/mrtrix3/phaseencoding.py +++ b/lib/mrtrix3/phaseencoding.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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,7 +32,7 @@ def direction(string): #pylint: disable=unused-variable pe_axis = abs(int(string)) if pe_axis > 2: raise MRtrixError('When specified as a number, phase encode axis must be either 0, 1 or 2 (positive or negative)') - reverse = (string.contains('-')) # Allow -0 + reverse = string.contains('-') # Allow -0 pe_dir = [0,0,0] if reverse: pe_dir[pe_axis] = -1 diff --git a/lib/mrtrix3/run.py b/lib/mrtrix3/run.py index 2d6eb425c7..5ab594e1b1 100644 --- a/lib/mrtrix3/run.py +++ b/lib/mrtrix3/run.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form 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,10 +17,15 @@ # 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 from mrtrix3.utils import STRING_TYPES +# Distutils removed in 3.12, but shutil.which not available in 2.7 +try: + from shutil import which as find_executable +except ImportError: + from distutils.spawn import find_executable # pylint: disable=deprecated-module + IOStream = collections.namedtuple('IOStream', 'handle filename') @@ -473,7 +478,7 @@ def finalise_temp_file(iostream): if shared.get_scratch_dir(): with shared.lock: with open(os.path.join(shared.get_scratch_dir(), 'log.txt'), 'a') as outfile: - outfile.write(cmdstring + '\n') + outfile.write(' '.join(cmdsplit) + '\n') return CommandReturn(return_stdout, return_stderr) diff --git a/lib/mrtrix3/sh.py b/lib/mrtrix3/sh.py index b99fdf209b..bd3e92dd18 100644 --- a/lib/mrtrix3/sh.py +++ b/lib/mrtrix3/sh.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 91ee2c92d9..58c6aec5b3 100644 --- a/lib/mrtrix3/utils.py +++ b/lib/mrtrix3/utils.py @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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/private/add_field.m b/matlab/private/add_field.m index 78d99f30fe..c58028b7f3 100644 --- a/matlab/private/add_field.m +++ b/matlab/private/add_field.m @@ -1,4 +1,4 @@ -% Copyright (c) 2008-2023 the MRtrix3 contributors. +% Copyright (c) 2008-2025 the MRtrix3 contributors. % % This Source Code Form is subject to 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 fd2ff8052e..5cf28b6bbe 100644 --- a/matlab/read_mrtrix.m +++ b/matlab/read_mrtrix.m @@ -1,4 +1,4 @@ -% Copyright (c) 2008-2023 the MRtrix3 contributors. +% Copyright (c) 2008-2025 the MRtrix3 contributors. % % This Source Code Form is subject to 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 1553b717da..cd009c647b 100644 --- a/matlab/read_mrtrix_tracks.m +++ b/matlab/read_mrtrix_tracks.m @@ -1,4 +1,4 @@ -% Copyright (c) 2008-2023 the MRtrix3 contributors. +% Copyright (c) 2008-2025 the MRtrix3 contributors. % % This Source Code Form is subject to 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 a216206918..29105efa73 100644 --- a/matlab/read_mrtrix_tsf.m +++ b/matlab/read_mrtrix_tsf.m @@ -1,4 +1,4 @@ -% Copyright (c) 2008-2023 the MRtrix3 contributors. +% Copyright (c) 2008-2025 the MRtrix3 contributors. % % This Source Code Form is subject to 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 f123f4977f..a12667ca16 100644 --- a/matlab/write_mrtrix.m +++ b/matlab/write_mrtrix.m @@ -1,4 +1,4 @@ -% Copyright (c) 2008-2023 the MRtrix3 contributors. +% Copyright (c) 2008-2025 the MRtrix3 contributors. % % This Source Code Form 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,8 @@ function write_mrtrix (image, filename) fprintf (fid, '\nfile: '); -if strcmp(filename(end-3:end), '.mif') +[filepath,basename,ext] = fileparts(filename); +if strcmp(ext, '.mif') dataoffset = ftell (fid) + 18; dataoffset = dataoffset + mod((4 - mod(dataoffset, 4)), 4); s = sprintf ('. %d\nEND\n ', dataoffset); @@ -139,14 +140,14 @@ function write_mrtrix (image, filename) fprintf (fid, s); fclose (fid); fid = fopen (filename, 'a+', byteorder); -elseif strcmp(filename(end-3:end), '.mih') - datafile = [ filename(1:end-4) '.dat' ]; +elseif strcmp(ext, '.mih') + datafile = fullfile(filepath, strcat(basename,'.dat')); fprintf (fid, '%s 0\nEND\n', datafile); fclose(fid); fid = fopen (datafile, 'w', byteorder); else fclose(fid); - error('unknown file suffix - aborting'); + error('unknown file suffix "%s" - aborting', ext); end if isstruct(image) diff --git a/matlab/write_mrtrix_tracks.m b/matlab/write_mrtrix_tracks.m index de32253ddc..bbd3d75986 100644 --- a/matlab/write_mrtrix_tracks.m +++ b/matlab/write_mrtrix_tracks.m @@ -1,4 +1,4 @@ -% Copyright (c) 2008-2023 the MRtrix3 contributors. +% Copyright (c) 2008-2025 the MRtrix3 contributors. % % This Source Code Form is subject to 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_tsf.m b/matlab/write_mrtrix_tsf.m index b3c34a2f95..f7a0079198 100644 --- a/matlab/write_mrtrix_tsf.m +++ b/matlab/write_mrtrix_tsf.m @@ -1,4 +1,4 @@ -% Copyright (c) 2008-2023 the MRtrix3 contributors. +% Copyright (c) 2008-2025 the MRtrix3 contributors. % % This Source Code Form is subject to the terms of the Mozilla Public % License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/mrview.desktop b/mrview.desktop index 990a78ae68..e1fc508aa6 100644 --- a/mrview.desktop +++ b/mrview.desktop @@ -1,6 +1,6 @@ #!/usr/bin/env xdg-open -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/package_mrtrix b/package_mrtrix index cf9a7624df..38de013e26 100755 --- a/package_mrtrix +++ b/package_mrtrix @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 86261d6e0d..e8581c68aa 100755 --- a/run_pylint +++ b/run_pylint @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 3cb38f83c2..3fb7af950f 100755 --- a/run_tests +++ b/run_tests @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 f9c44ad290..0dfc059592 100755 --- a/set_path +++ b/set_path @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 71d0ca5496..a27f948e70 100644 --- a/share/mrtrix3/_5ttgen/FreeSurfer2ACT.txt +++ b/share/mrtrix3/_5ttgen/FreeSurfer2ACT.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 9c67b51e60..a3c1686f55 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-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 0d0d577a6a..3ff6a23a02 100644 --- a/share/mrtrix3/_5ttgen/hsvs/AmygSubfields.txt +++ b/share/mrtrix3/_5ttgen/hsvs/AmygSubfields.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 3a14879754..c2b05c7e5f 100644 --- a/share/mrtrix3/_5ttgen/hsvs/HippSubfields.txt +++ b/share/mrtrix3/_5ttgen/hsvs/HippSubfields.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 4682de351a..1746a3d167 100644 --- a/share/mrtrix3/labelconvert/aal.txt +++ b/share/mrtrix3/labelconvert/aal.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 d5427d56dc..ad72a41960 100644 --- a/share/mrtrix3/labelconvert/aal2.txt +++ b/share/mrtrix3/labelconvert/aal2.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 7fb7bbda35..5e039ead88 100644 --- a/share/mrtrix3/labelconvert/fs2lobes_cinginc_convert.txt +++ b/share/mrtrix3/labelconvert/fs2lobes_cinginc_convert.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 1ea4368d7d..4fe7fb3656 100644 --- a/share/mrtrix3/labelconvert/fs2lobes_cinginc_labels.txt +++ b/share/mrtrix3/labelconvert/fs2lobes_cinginc_labels.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 d2c992a097..ee6c9acc5f 100644 --- a/share/mrtrix3/labelconvert/fs2lobes_cingsep_convert.txt +++ b/share/mrtrix3/labelconvert/fs2lobes_cingsep_convert.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 17c0051be9..455b0943a1 100644 --- a/share/mrtrix3/labelconvert/fs2lobes_cingsep_labels.txt +++ b/share/mrtrix3/labelconvert/fs2lobes_cingsep_labels.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 27c03bb400..f8ff10806d 100644 --- a/share/mrtrix3/labelconvert/fs_a2009s.txt +++ b/share/mrtrix3/labelconvert/fs_a2009s.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 9f0ffb9a67..048a75effc 100644 --- a/share/mrtrix3/labelconvert/fs_default.txt +++ b/share/mrtrix3/labelconvert/fs_default.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 4f79a42a9b..a23347f2f8 100644 --- a/share/mrtrix3/labelconvert/hcpmmp1_ordered.txt +++ b/share/mrtrix3/labelconvert/hcpmmp1_ordered.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 c8ad5d3232..5910da27fb 100644 --- a/share/mrtrix3/labelconvert/hcpmmp1_original.txt +++ b/share/mrtrix3/labelconvert/hcpmmp1_original.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 dcb1fabae8..0a6f0acc3d 100644 --- a/share/mrtrix3/labelconvert/lpba40.txt +++ b/share/mrtrix3/labelconvert/lpba40.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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 747c007ff4..964f197344 100644 --- a/share/mrtrix3/labelsgmfix/FreeSurferSGM.txt +++ b/share/mrtrix3/labelsgmfix/FreeSurferSGM.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the 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 58cfac37c7..a3747553d9 100644 --- a/src/colourmap.cpp +++ b/src/colourmap.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c7a547e92f..b25a53e3a4 100644 --- a/src/colourmap.h +++ b/src/colourmap.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b758f8ab16..fd9bc32d0a 100644 --- a/src/connectome/connectome.cpp +++ b/src/connectome/connectome.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7878c7b698..490bc9bf4d 100644 --- a/src/connectome/connectome.h +++ b/src/connectome/connectome.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7563bfc00a..fe75642950 100644 --- a/src/connectome/enhance.cpp +++ b/src/connectome/enhance.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 91357432d4..9861c489ad 100644 --- a/src/connectome/enhance.h +++ b/src/connectome/enhance.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2f0ef71af5..50cb4a3b48 100644 --- a/src/connectome/lut.cpp +++ b/src/connectome/lut.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d59438683e..74d815e928 100644 --- a/src/connectome/lut.h +++ b/src/connectome/lut.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 fe189ca7e7..988b4ed5f1 100644 --- a/src/connectome/mat2vec.h +++ b/src/connectome/mat2vec.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 348f9dbbc8..bb2867cdb7 100644 --- a/src/dwi/bootstrap.h +++ b/src/dwi/bootstrap.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 e520ed0967..4bc1b85c58 100644 --- a/src/dwi/directions/file.cpp +++ b/src/dwi/directions/file.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 cac86bf767..2ff482555b 100644 --- a/src/dwi/directions/file.h +++ b/src/dwi/directions/file.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 c615f995c7..7807b1f64b 100644 --- a/src/dwi/directions/mask.cpp +++ b/src/dwi/directions/mask.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 7fce482de9..e587e031dd 100644 --- a/src/dwi/directions/mask.h +++ b/src/dwi/directions/mask.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 c597142f18..045a7c699b 100644 --- a/src/dwi/directions/predefined.cpp +++ b/src/dwi/directions/predefined.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 f924b3e8f4..b9a8921088 100644 --- a/src/dwi/directions/predefined.h +++ b/src/dwi/directions/predefined.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 1ef17a5b2e..61dfa63b86 100644 --- a/src/dwi/directions/set.cpp +++ b/src/dwi/directions/set.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -211,7 +211,9 @@ namespace MR { assigned[base_plane.indices[1]] = true; assigned[base_plane.indices[2]] = true; assigned[fourth_point] = true; +#ifndef NDEBUG size_t assigned_counter = 4; +#endif while (planes.size()) { Plane current (planes.back()); @@ -279,10 +281,13 @@ namespace MR { // This point no longer needs to be tested assigned[max_index] = true; +#ifndef NDEBUG ++assigned_counter; +#endif } } + assert (assigned_counter == 2 * size()); for (auto& current : hull) { // Each of these three directions is adjacent diff --git a/src/dwi/directions/set.h b/src/dwi/directions/set.h index dbd432b31b..10874669ae 100644 --- a/src/dwi/directions/set.h +++ b/src/dwi/directions/set.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/dwi/fixel_map.h b/src/dwi/fixel_map.h index 825c2d12ac..8c8ddee762 100644 --- a/src/dwi/fixel_map.h +++ b/src/dwi/fixel_map.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 1212fc7a9f..79b3bf266a 100644 --- a/src/dwi/fmls.cpp +++ b/src/dwi/fmls.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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 @@ namespace MR { } } - opt = get_options ("fmls_merge_ratio"); + opt = get_options ("fmls_lobe_merge_ratio"); if (opt.size()) segmenter.set_lobe_merge_ratio (default_type(opt[0][0])); diff --git a/src/dwi/fmls.h b/src/dwi/fmls.h index ce4cee04bc..c70b560d3e 100644 --- a/src/dwi/fmls.h +++ b/src/dwi/fmls.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this diff --git a/src/dwi/noise_estimator.h b/src/dwi/noise_estimator.h index c0ae00c3e8..729161b855 100644 --- a/src/dwi/noise_estimator.h +++ b/src/dwi/noise_estimator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 f84890f52d..eae9df238a 100644 --- a/src/dwi/sdeconv/csd.cpp +++ b/src/dwi/sdeconv/csd.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 4adafae2e8..19b12f3d6f 100644 --- a/src/dwi/sdeconv/csd.h +++ b/src/dwi/sdeconv/csd.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 58e29c3b5f..4f36a946aa 100644 --- a/src/dwi/sdeconv/msmt_csd.cpp +++ b/src/dwi/sdeconv/msmt_csd.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 1f7dfea6ce..394d35742d 100644 --- a/src/dwi/sdeconv/msmt_csd.h +++ b/src/dwi/sdeconv/msmt_csd.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms 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 d7a82408e9..d617193f80 100644 --- a/src/dwi/tensor.h +++ b/src/dwi/tensor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 88eb448edb..6a426bcce8 100644 --- a/src/dwi/tractography/ACT/act.cpp +++ b/src/dwi/tractography/ACT/act.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 5543d12566..6902cd4450 100644 --- a/src/dwi/tractography/ACT/act.h +++ b/src/dwi/tractography/ACT/act.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 f2db1169cf..20cfe710d8 100644 --- a/src/dwi/tractography/ACT/gmwmi.cpp +++ b/src/dwi/tractography/ACT/gmwmi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 81f7e14710..6a938d0fe2 100644 --- a/src/dwi/tractography/ACT/gmwmi.h +++ b/src/dwi/tractography/ACT/gmwmi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 6f12220314..94a05b0ea3 100644 --- a/src/dwi/tractography/ACT/method.h +++ b/src/dwi/tractography/ACT/method.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 cdfdea39b6..ba29a1b7d5 100644 --- a/src/dwi/tractography/ACT/shared.h +++ b/src/dwi/tractography/ACT/shared.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4db407b677..4beb45cb2c 100644 --- a/src/dwi/tractography/ACT/tissues.h +++ b/src/dwi/tractography/ACT/tissues.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 17daa2f5b5..0d7fcd90dc 100644 --- a/src/dwi/tractography/GT/energy.h +++ b/src/dwi/tractography/GT/energy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 840b1dfd44..f5d5424132 100644 --- a/src/dwi/tractography/GT/externalenergy.cpp +++ b/src/dwi/tractography/GT/externalenergy.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 cc93b91ea2..70ac8bb741 100644 --- a/src/dwi/tractography/GT/externalenergy.h +++ b/src/dwi/tractography/GT/externalenergy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 9320b1c488..957fe0c331 100644 --- a/src/dwi/tractography/GT/gt.cpp +++ b/src/dwi/tractography/GT/gt.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 186e83e92f..5f9af4ba79 100644 --- a/src/dwi/tractography/GT/gt.h +++ b/src/dwi/tractography/GT/gt.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 59450772e2..f52288d2bc 100644 --- a/src/dwi/tractography/GT/internalenergy.cpp +++ b/src/dwi/tractography/GT/internalenergy.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 5ce88e1e2d..6c81189283 100644 --- a/src/dwi/tractography/GT/internalenergy.h +++ b/src/dwi/tractography/GT/internalenergy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 7932bf00a8..9a342516de 100644 --- a/src/dwi/tractography/GT/mhsampler.cpp +++ b/src/dwi/tractography/GT/mhsampler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4eb21374d9..f79de46ede 100644 --- a/src/dwi/tractography/GT/mhsampler.h +++ b/src/dwi/tractography/GT/mhsampler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 84f14b0840..84409ce9e9 100644 --- a/src/dwi/tractography/GT/particle.cpp +++ b/src/dwi/tractography/GT/particle.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 ddceb0796f..eb6e733d76 100644 --- a/src/dwi/tractography/GT/particle.h +++ b/src/dwi/tractography/GT/particle.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 92266bd444..c2f2fd329c 100644 --- a/src/dwi/tractography/GT/particlegrid.cpp +++ b/src/dwi/tractography/GT/particlegrid.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 94f697e38a..fc8f4df867 100644 --- a/src/dwi/tractography/GT/particlegrid.h +++ b/src/dwi/tractography/GT/particlegrid.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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/particlepool.h b/src/dwi/tractography/GT/particlepool.h index dbecee9e6f..e58c6f3fdd 100644 --- a/src/dwi/tractography/GT/particlepool.h +++ b/src/dwi/tractography/GT/particlepool.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 be22352495..7046e8cb2b 100644 --- a/src/dwi/tractography/GT/spatiallock.h +++ b/src/dwi/tractography/GT/spatiallock.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 9db622e90a..15ade40333 100644 --- a/src/dwi/tractography/SIFT/fixel.h +++ b/src/dwi/tractography/SIFT/fixel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 a77a1f168b..ffb63262d5 100644 --- a/src/dwi/tractography/SIFT/gradient_sort.cpp +++ b/src/dwi/tractography/SIFT/gradient_sort.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 03096b26a2..1e631ea574 100644 --- a/src/dwi/tractography/SIFT/gradient_sort.h +++ b/src/dwi/tractography/SIFT/gradient_sort.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 3f826f8c2b..5085aa5c42 100644 --- a/src/dwi/tractography/SIFT/model.h +++ b/src/dwi/tractography/SIFT/model.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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_base.h b/src/dwi/tractography/SIFT/model_base.h index 1fc441e6a4..4d9e7a6f7a 100644 --- a/src/dwi/tractography/SIFT/model_base.h +++ b/src/dwi/tractography/SIFT/model_base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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/output.h b/src/dwi/tractography/SIFT/output.h index 64826b8a7d..eb1db92142 100644 --- a/src/dwi/tractography/SIFT/output.h +++ b/src/dwi/tractography/SIFT/output.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 258ba8d4ca..a82ba1414e 100644 --- a/src/dwi/tractography/SIFT/proc_mask.cpp +++ b/src/dwi/tractography/SIFT/proc_mask.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 97c586542f..4d229ab92e 100644 --- a/src/dwi/tractography/SIFT/proc_mask.h +++ b/src/dwi/tractography/SIFT/proc_mask.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 551cb9186a..455fb4bc7d 100644 --- a/src/dwi/tractography/SIFT/sift.cpp +++ b/src/dwi/tractography/SIFT/sift.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 b62458dc05..d672e9aa93 100644 --- a/src/dwi/tractography/SIFT/sift.h +++ b/src/dwi/tractography/SIFT/sift.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 82982d0ad1..3a6ef92e96 100644 --- a/src/dwi/tractography/SIFT/sifter.cpp +++ b/src/dwi/tractography/SIFT/sifter.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 c32aedf546..25b8d6da00 100644 --- a/src/dwi/tractography/SIFT/sifter.h +++ b/src/dwi/tractography/SIFT/sifter.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 90e60c260b..0b96495da6 100644 --- a/src/dwi/tractography/SIFT/track_contribution.cpp +++ b/src/dwi/tractography/SIFT/track_contribution.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4028cb6b87..b990fea4dc 100644 --- a/src/dwi/tractography/SIFT/track_contribution.h +++ b/src/dwi/tractography/SIFT/track_contribution.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 dfb4dccec0..9e926456c5 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 ad34a1bbce..2bc10e5954 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4db534c886..1d37b00ae2 100644 --- a/src/dwi/tractography/SIFT/types.h +++ b/src/dwi/tractography/SIFT/types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 b73dcc297a..63c79ebf14 100644 --- a/src/dwi/tractography/SIFT2/coeff_optimiser.cpp +++ b/src/dwi/tractography/SIFT2/coeff_optimiser.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 09ed00132f..5afeb19c21 100644 --- a/src/dwi/tractography/SIFT2/coeff_optimiser.h +++ b/src/dwi/tractography/SIFT2/coeff_optimiser.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 fe64395d77..b226deffc6 100644 --- a/src/dwi/tractography/SIFT2/fixel.h +++ b/src/dwi/tractography/SIFT2/fixel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 780ed6b553..d810709ba9 100644 --- a/src/dwi/tractography/SIFT2/fixel_updater.cpp +++ b/src/dwi/tractography/SIFT2/fixel_updater.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 81f40493dd..3401717b51 100644 --- a/src/dwi/tractography/SIFT2/fixel_updater.h +++ b/src/dwi/tractography/SIFT2/fixel_updater.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 85bfa0d202..faffd44731 100644 --- a/src/dwi/tractography/SIFT2/line_search.cpp +++ b/src/dwi/tractography/SIFT2/line_search.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 330d6b15d1..ad81bd6ddb 100644 --- a/src/dwi/tractography/SIFT2/line_search.h +++ b/src/dwi/tractography/SIFT2/line_search.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 0e86774f2d..84a7ce606e 100644 --- a/src/dwi/tractography/SIFT2/reg_calculator.cpp +++ b/src/dwi/tractography/SIFT2/reg_calculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 10c0cef978..d8f1ded8fa 100644 --- a/src/dwi/tractography/SIFT2/reg_calculator.h +++ b/src/dwi/tractography/SIFT2/reg_calculator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 850098baba..b401b2ed28 100644 --- a/src/dwi/tractography/SIFT2/regularisation.h +++ b/src/dwi/tractography/SIFT2/regularisation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 c6834cbbf8..100636eca6 100644 --- a/src/dwi/tractography/SIFT2/streamline_stats.cpp +++ b/src/dwi/tractography/SIFT2/streamline_stats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 84741f04ec..4c8ea17a05 100644 --- a/src/dwi/tractography/SIFT2/streamline_stats.h +++ b/src/dwi/tractography/SIFT2/streamline_stats.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 0375cb5cf2..e2b8f927d0 100644 --- a/src/dwi/tractography/SIFT2/tckfactor.cpp +++ b/src/dwi/tractography/SIFT2/tckfactor.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -344,19 +344,22 @@ namespace MR { { if (size_t(coefficients.size()) != contributions.size()) throw Exception ("Cannot output weighting factors if they have not first been estimated!"); + decltype(coefficients) weights; try { - decltype(coefficients) weights (coefficients.size()); - for (SIFT::track_t i = 0; i != num_tracks(); ++i) - weights[i] = (coefficients[i] == min_coeff || !std::isfinite(coefficients[i])) ? - 0.0 : - std::exp (coefficients[i]); - save_vector (weights, path); + weights.resize (coefficients.size()); } catch (...) { WARN ("Unable to assign memory for output factor file: \"" + Path::basename(path) + "\" not created"); + return; } + for (SIFT::track_t i = 0; i != num_tracks(); ++i) + weights[i] = (coefficients[i] == min_coeff || !std::isfinite(coefficients[i])) ? + 0.0 : + std::exp (coefficients[i]); + save_vector (weights, path); } + void TckFactor::output_coefficients (const std::string& path) const { save_vector (coefficients, path); diff --git a/src/dwi/tractography/SIFT2/tckfactor.h b/src/dwi/tractography/SIFT2/tckfactor.h index be2609b0ef..ff4f72af4e 100644 --- a/src/dwi/tractography/SIFT2/tckfactor.h +++ b/src/dwi/tractography/SIFT2/tckfactor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 80c05baecb..46c87e9c4e 100644 --- a/src/dwi/tractography/algorithms/calibrator.h +++ b/src/dwi/tractography/algorithms/calibrator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 6a3a76a669..2b880f4c7c 100644 --- a/src/dwi/tractography/algorithms/fact.h +++ b/src/dwi/tractography/algorithms/fact.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 b6a3a61784..f70e6c8195 100644 --- a/src/dwi/tractography/algorithms/iFOD1.cpp +++ b/src/dwi/tractography/algorithms/iFOD1.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 0aa24c3ca7..bb2840eeb7 100644 --- a/src/dwi/tractography/algorithms/iFOD1.h +++ b/src/dwi/tractography/algorithms/iFOD1.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 75c602c1fe..97a18bbd7c 100644 --- a/src/dwi/tractography/algorithms/iFOD2.cpp +++ b/src/dwi/tractography/algorithms/iFOD2.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 e54e9a1b93..109f14a5a3 100644 --- a/src/dwi/tractography/algorithms/iFOD2.h +++ b/src/dwi/tractography/algorithms/iFOD2.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 079dee2144..fa572e9ac5 100644 --- a/src/dwi/tractography/algorithms/nulldist.h +++ b/src/dwi/tractography/algorithms/nulldist.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 8a471e1056..343590e230 100644 --- a/src/dwi/tractography/algorithms/sd_stream.h +++ b/src/dwi/tractography/algorithms/sd_stream.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 28d6945eb4..9770682ac5 100644 --- a/src/dwi/tractography/algorithms/seedtest.h +++ b/src/dwi/tractography/algorithms/seedtest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 66f8948280..a4b8c817e0 100644 --- a/src/dwi/tractography/algorithms/tensor_det.h +++ b/src/dwi/tractography/algorithms/tensor_det.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 ece29df7de..1156b26367 100644 --- a/src/dwi/tractography/algorithms/tensor_prob.h +++ b/src/dwi/tractography/algorithms/tensor_prob.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 95af748c5c..b1a81af421 100644 --- a/src/dwi/tractography/connectome/connectome.cpp +++ b/src/dwi/tractography/connectome/connectome.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 1b337a56cf..e50cea7415 100644 --- a/src/dwi/tractography/connectome/connectome.h +++ b/src/dwi/tractography/connectome/connectome.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 a171d18ed3..a87a26220d 100644 --- a/src/dwi/tractography/connectome/exemplar.cpp +++ b/src/dwi/tractography/connectome/exemplar.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 cb37837cd2..21c6b3158d 100644 --- a/src/dwi/tractography/connectome/exemplar.h +++ b/src/dwi/tractography/connectome/exemplar.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 038c4b1a46..71a68fc9cf 100644 --- a/src/dwi/tractography/connectome/extract.cpp +++ b/src/dwi/tractography/connectome/extract.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 77e78aadca..8960e5e7bf 100644 --- a/src/dwi/tractography/connectome/extract.h +++ b/src/dwi/tractography/connectome/extract.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 75a45d923c..a6eb466b0e 100644 --- a/src/dwi/tractography/connectome/mapped_track.h +++ b/src/dwi/tractography/connectome/mapped_track.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 1324b18fea..9025226545 100644 --- a/src/dwi/tractography/connectome/mapper.h +++ b/src/dwi/tractography/connectome/mapper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 76bd20238f..b582714bbe 100644 --- a/src/dwi/tractography/connectome/matrix.cpp +++ b/src/dwi/tractography/connectome/matrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 99fb65e907..7915ae7387 100644 --- a/src/dwi/tractography/connectome/matrix.h +++ b/src/dwi/tractography/connectome/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 35ce309d0b..fe1f228f29 100644 --- a/src/dwi/tractography/connectome/metric.h +++ b/src/dwi/tractography/connectome/metric.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 9425ebbc89..80f9a1caa3 100644 --- a/src/dwi/tractography/connectome/streamline.h +++ b/src/dwi/tractography/connectome/streamline.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4f8b287d6f..c8df977af7 100644 --- a/src/dwi/tractography/connectome/tck2nodes.cpp +++ b/src/dwi/tractography/connectome/tck2nodes.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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.h b/src/dwi/tractography/connectome/tck2nodes.h index 543dd8f96b..c08b81597d 100644 --- a/src/dwi/tractography/connectome/tck2nodes.h +++ b/src/dwi/tractography/connectome/tck2nodes.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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.cpp b/src/dwi/tractography/editing/editing.cpp index dc7b7f4b1a..2ad624aab4 100644 --- a/src/dwi/tractography/editing/editing.cpp +++ b/src/dwi/tractography/editing/editing.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 7f7ca3882a..75412cb1c6 100644 --- a/src/dwi/tractography/editing/editing.h +++ b/src/dwi/tractography/editing/editing.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 02cecd7b5b..8dbe748b90 100644 --- a/src/dwi/tractography/editing/loader.h +++ b/src/dwi/tractography/editing/loader.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 2123b43452..0b0a0748cb 100644 --- a/src/dwi/tractography/editing/receiver.cpp +++ b/src/dwi/tractography/editing/receiver.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 c5aeeac1e6..6f84f06575 100644 --- a/src/dwi/tractography/editing/receiver.h +++ b/src/dwi/tractography/editing/receiver.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 d47ffa0e4b..2827ac60e8 100644 --- a/src/dwi/tractography/editing/worker.cpp +++ b/src/dwi/tractography/editing/worker.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 7d0949bad0..1c16c412f1 100644 --- a/src/dwi/tractography/editing/worker.h +++ b/src/dwi/tractography/editing/worker.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 c7ac331c84..e8f138ca72 100644 --- a/src/dwi/tractography/file.h +++ b/src/dwi/tractography/file.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 fbb6f27ca9..30b7fbc388 100644 --- a/src/dwi/tractography/file_base.cpp +++ b/src/dwi/tractography/file_base.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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.h b/src/dwi/tractography/file_base.h index 1f6937d14f..925e93407e 100644 --- a/src/dwi/tractography/file_base.h +++ b/src/dwi/tractography/file_base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 8830416cfd..bf857b50e3 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 48e3101156..f1dc5fcb19 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 f3985daa11..6d79cce316 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 12a21ec057..7bb13beb42 100644 --- a/src/dwi/tractography/mapping/gaussian/mapper.cpp +++ b/src/dwi/tractography/mapping/gaussian/mapper.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 94fb3401b6..609bc25179 100644 --- a/src/dwi/tractography/mapping/gaussian/mapper.h +++ b/src/dwi/tractography/mapping/gaussian/mapper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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/voxel.h b/src/dwi/tractography/mapping/gaussian/voxel.h index 2cfd866c4a..f83763f7f9 100644 --- a/src/dwi/tractography/mapping/gaussian/voxel.h +++ b/src/dwi/tractography/mapping/gaussian/voxel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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/loader.h b/src/dwi/tractography/mapping/loader.h index c306af2b44..8bfb20d292 100644 --- a/src/dwi/tractography/mapping/loader.h +++ b/src/dwi/tractography/mapping/loader.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 f9f655424e..d86430bc5d 100644 --- a/src/dwi/tractography/mapping/mapper.cpp +++ b/src/dwi/tractography/mapping/mapper.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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.h b/src/dwi/tractography/mapping/mapper.h index 0106542860..45ea99c852 100644 --- a/src/dwi/tractography/mapping/mapper.h +++ b/src/dwi/tractography/mapping/mapper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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_plugins.cpp b/src/dwi/tractography/mapping/mapper_plugins.cpp index 633a2dfddf..e975577420 100644 --- a/src/dwi/tractography/mapping/mapper_plugins.cpp +++ b/src/dwi/tractography/mapping/mapper_plugins.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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_plugins.h b/src/dwi/tractography/mapping/mapper_plugins.h index 41777ecfe2..fa97b1dac7 100644 --- a/src/dwi/tractography/mapping/mapper_plugins.h +++ b/src/dwi/tractography/mapping/mapper_plugins.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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.cpp b/src/dwi/tractography/mapping/mapping.cpp index 745ca3b38a..ba50fbbfdc 100644 --- a/src/dwi/tractography/mapping/mapping.cpp +++ b/src/dwi/tractography/mapping/mapping.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 0c03a6bc06..9dfe29241d 100644 --- a/src/dwi/tractography/mapping/mapping.h +++ b/src/dwi/tractography/mapping/mapping.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 d033c9e165..4064573295 100644 --- a/src/dwi/tractography/mapping/twi_stats.cpp +++ b/src/dwi/tractography/mapping/twi_stats.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 426a1b2af0..6b9c611a16 100644 --- a/src/dwi/tractography/mapping/twi_stats.h +++ b/src/dwi/tractography/mapping/twi_stats.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 7938c8eb7a..c748594c10 100644 --- a/src/dwi/tractography/mapping/voxel.cpp +++ b/src/dwi/tractography/mapping/voxel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 01e33e4c24..d37281b8e3 100644 --- a/src/dwi/tractography/mapping/voxel.h +++ b/src/dwi/tractography/mapping/voxel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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.cpp b/src/dwi/tractography/mapping/writer.cpp index db45226545..c95a2c6ae2 100644 --- a/src/dwi/tractography/mapping/writer.cpp +++ b/src/dwi/tractography/mapping/writer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 0e5508fd40..f7ecac8d4b 100644 --- a/src/dwi/tractography/mapping/writer.h +++ b/src/dwi/tractography/mapping/writer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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.cpp b/src/dwi/tractography/properties.cpp index d2eaaaacfc..4a6a77ee7a 100644 --- a/src/dwi/tractography/properties.cpp +++ b/src/dwi/tractography/properties.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 bf8aac581c..50b737fd82 100644 --- a/src/dwi/tractography/properties.h +++ b/src/dwi/tractography/properties.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 cf00c60a4b..88daf7bdd2 100644 --- a/src/dwi/tractography/resampling/arc.cpp +++ b/src/dwi/tractography/resampling/arc.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 a7ffbcb181..9978fb146b 100644 --- a/src/dwi/tractography/resampling/arc.h +++ b/src/dwi/tractography/resampling/arc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 a90d253408..c58b8e6d1c 100644 --- a/src/dwi/tractography/resampling/downsampler.cpp +++ b/src/dwi/tractography/resampling/downsampler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 99eddefc9c..12e669be98 100644 --- a/src/dwi/tractography/resampling/downsampler.h +++ b/src/dwi/tractography/resampling/downsampler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 3a4e7ba5cd..70e76d5442 100644 --- a/src/dwi/tractography/resampling/endpoints.cpp +++ b/src/dwi/tractography/resampling/endpoints.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4e8da3c7b9..f57bb5ab00 100644 --- a/src/dwi/tractography/resampling/endpoints.h +++ b/src/dwi/tractography/resampling/endpoints.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 9606d4c50a..86cc7783e5 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 c94be1481a..6f5cedd4f7 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 34780c4a95..288879119b 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 fe62ec38e8..2bb443a23f 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 0b604f9f46..91e28d186f 100644 --- a/src/dwi/tractography/resampling/resampling.cpp +++ b/src/dwi/tractography/resampling/resampling.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 e1703a9512..b05bd46243 100644 --- a/src/dwi/tractography/resampling/resampling.h +++ b/src/dwi/tractography/resampling/resampling.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4e2145ff89..66e1411307 100644 --- a/src/dwi/tractography/resampling/upsampler.cpp +++ b/src/dwi/tractography/resampling/upsampler.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 1a329a7951..91688478ee 100644 --- a/src/dwi/tractography/resampling/upsampler.h +++ b/src/dwi/tractography/resampling/upsampler.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 3fbb86732b..16c4ecd8c8 100644 --- a/src/dwi/tractography/rng.cpp +++ b/src/dwi/tractography/rng.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 1795c62517..1a94904e78 100644 --- a/src/dwi/tractography/rng.h +++ b/src/dwi/tractography/rng.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 7b491bb825..c2f3978ded 100644 --- a/src/dwi/tractography/roi.cpp +++ b/src/dwi/tractography/roi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 34b094e81f..7720ea0c29 100644 --- a/src/dwi/tractography/roi.h +++ b/src/dwi/tractography/roi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 3cfd55ba36..773af4e510 100644 --- a/src/dwi/tractography/scalar_file.h +++ b/src/dwi/tractography/scalar_file.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 30faf86a7a..a8acb5497a 100644 --- a/src/dwi/tractography/seeding/base.h +++ b/src/dwi/tractography/seeding/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 a97acc7a16..24fd9f6131 100644 --- a/src/dwi/tractography/seeding/basic.cpp +++ b/src/dwi/tractography/seeding/basic.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 325f62387b..d4425ab225 100644 --- a/src/dwi/tractography/seeding/basic.h +++ b/src/dwi/tractography/seeding/basic.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 d30e022e3f..6b29e71700 100644 --- a/src/dwi/tractography/seeding/dynamic.cpp +++ b/src/dwi/tractography/seeding/dynamic.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 ca1c46ef47..ac0d1b8c73 100644 --- a/src/dwi/tractography/seeding/dynamic.h +++ b/src/dwi/tractography/seeding/dynamic.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 385af3b4ed..60ca353b27 100644 --- a/src/dwi/tractography/seeding/gmwmi.cpp +++ b/src/dwi/tractography/seeding/gmwmi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 eeaabd089d..8988158ff4 100644 --- a/src/dwi/tractography/seeding/gmwmi.h +++ b/src/dwi/tractography/seeding/gmwmi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4bb11b0dbe..17414dd66d 100644 --- a/src/dwi/tractography/seeding/list.cpp +++ b/src/dwi/tractography/seeding/list.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 2e1c722ced..cd56373bf8 100644 --- a/src/dwi/tractography/seeding/list.h +++ b/src/dwi/tractography/seeding/list.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 b00765b7e5..a26e006704 100644 --- a/src/dwi/tractography/seeding/seeding.cpp +++ b/src/dwi/tractography/seeding/seeding.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4049218fc1..2b71e64ddf 100644 --- a/src/dwi/tractography/seeding/seeding.h +++ b/src/dwi/tractography/seeding/seeding.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 1e5b0de482..856d73c645 100644 --- a/src/dwi/tractography/streamline.h +++ b/src/dwi/tractography/streamline.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 42c09f0965..c0b75d7d77 100644 --- a/src/dwi/tractography/tracking/early_exit.cpp +++ b/src/dwi/tractography/tracking/early_exit.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 b5047cecb3..fedb34da3d 100644 --- a/src/dwi/tractography/tracking/early_exit.h +++ b/src/dwi/tractography/tracking/early_exit.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 24edc176ae..8068c33d5e 100644 --- a/src/dwi/tractography/tracking/exec.h +++ b/src/dwi/tractography/tracking/exec.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 4e15c78092..59af08be58 100644 --- a/src/dwi/tractography/tracking/generated_track.h +++ b/src/dwi/tractography/tracking/generated_track.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 cf49a5f0a6..b1156bc56b 100644 --- a/src/dwi/tractography/tracking/method.cpp +++ b/src/dwi/tractography/tracking/method.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 d62f715526..3ee87ef9d5 100644 --- a/src/dwi/tractography/tracking/method.h +++ b/src/dwi/tractography/tracking/method.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 02ab815dc7..8b1302db3b 100644 --- a/src/dwi/tractography/tracking/shared.cpp +++ b/src/dwi/tractography/tracking/shared.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 5a1334691a..5174f83d35 100644 --- a/src/dwi/tractography/tracking/shared.h +++ b/src/dwi/tractography/tracking/shared.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 1ddaa473d4..3e883b805a 100644 --- a/src/dwi/tractography/tracking/tractography.cpp +++ b/src/dwi/tractography/tracking/tractography.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 fd7db1e2da..ffd7b9cc59 100644 --- a/src/dwi/tractography/tracking/tractography.h +++ b/src/dwi/tractography/tracking/tractography.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 3bdec30b49..66e84046c5 100644 --- a/src/dwi/tractography/tracking/types.h +++ b/src/dwi/tractography/tracking/types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 438ff8c1c3..455fb9b7fb 100644 --- a/src/dwi/tractography/tracking/write_kernel.cpp +++ b/src/dwi/tractography/tracking/write_kernel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 1e31610d3c..a06eec3a59 100644 --- a/src/dwi/tractography/tracking/write_kernel.h +++ b/src/dwi/tractography/tracking/write_kernel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 14690d1aa6..86adab180e 100644 --- a/src/dwi/tractography/weights.cpp +++ b/src/dwi/tractography/weights.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of 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 8fcaa243d2..974a4e1790 100644 --- a/src/dwi/tractography/weights.h +++ b/src/dwi/tractography/weights.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b7cf716a83..cf1a8f6093 100644 --- a/src/exec_version.h +++ b/src/exec_version.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ccd13aaf1a..aeab02777e 100644 --- a/src/fixel/filter/base.h +++ b/src/fixel/filter/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 77595de388..03d4c77d86 100644 --- a/src/fixel/filter/connect.cpp +++ b/src/fixel/filter/connect.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3368cb2bb5..1bd761f03f 100644 --- a/src/fixel/filter/connect.h +++ b/src/fixel/filter/connect.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 cba90f5e96..009f16fba6 100644 --- a/src/fixel/filter/smooth.cpp +++ b/src/fixel/filter/smooth.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/fixel/filter/smooth.h index eccba9b12a..092a0a1107 100644 --- a/src/fixel/filter/smooth.h +++ b/src/fixel/filter/smooth.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4fe9367e4e..a23c001a8a 100644 --- a/src/fixel/index_remapper.cpp +++ b/src/fixel/index_remapper.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5b06a02f37..3e99810d8f 100644 --- a/src/fixel/index_remapper.h +++ b/src/fixel/index_remapper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 fb1f94fdb7..fb973a51fc 100644 --- a/src/fixel/matrix.cpp +++ b/src/fixel/matrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/fixel/matrix.h index 4c9a403bd7..24592f0664 100644 --- a/src/fixel/matrix.h +++ b/src/fixel/matrix.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1d08be8ba5..d053ee6efc 100644 --- a/src/gui/color_button.cpp +++ b/src/gui/color_button.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ba48d798cd..c4ab89a43c 100644 --- a/src/gui/color_button.h +++ b/src/gui/color_button.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9b347b1f43..4af8713e4a 100644 --- a/src/gui/crosshair.cpp +++ b/src/gui/crosshair.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b44f205278..acaabffc03 100644 --- a/src/gui/crosshair.h +++ b/src/gui/crosshair.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 940584e916..5d3c8d85f2 100644 --- a/src/gui/cursor.cpp +++ b/src/gui/cursor.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b65bf9564b..92927ebed0 100644 --- a/src/gui/cursor.h +++ b/src/gui/cursor.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b43800bb78..02c0e682cd 100644 --- a/src/gui/dialog/dialog.cpp +++ b/src/gui/dialog/dialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 811beb42db..a9b519c61e 100644 --- a/src/gui/dialog/dialog.h +++ b/src/gui/dialog/dialog.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7a54c4d864..c4a5cfebc3 100644 --- a/src/gui/dialog/dicom.cpp +++ b/src/gui/dialog/dicom.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 599fd034d7..dd466ac298 100644 --- a/src/gui/dialog/dicom.h +++ b/src/gui/dialog/dicom.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ee33e088c5..4894621c7e 100644 --- a/src/gui/dialog/file.cpp +++ b/src/gui/dialog/file.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4dfe415c85..e1f52c0e29 100644 --- a/src/gui/dialog/file.h +++ b/src/gui/dialog/file.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 fa7fe4436b..e6347158d8 100644 --- a/src/gui/dialog/image_properties.cpp +++ b/src/gui/dialog/image_properties.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3f606f4315..60ea23e64d 100644 --- a/src/gui/dialog/image_properties.h +++ b/src/gui/dialog/image_properties.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c8de3a6574..9002cc18f9 100644 --- a/src/gui/dialog/list.cpp +++ b/src/gui/dialog/list.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d25d268a2c..65e555a86f 100644 --- a/src/gui/dialog/list.h +++ b/src/gui/dialog/list.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5f88cb2351..7b36c0abac 100644 --- a/src/gui/dialog/opengl.cpp +++ b/src/gui/dialog/opengl.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 cb555a3fd3..17221216b6 100644 --- a/src/gui/dialog/opengl.h +++ b/src/gui/dialog/opengl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d8a6dc25ab..0f40bfb35b 100644 --- a/src/gui/dialog/progress.cpp +++ b/src/gui/dialog/progress.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6a9e03bd5f..015d0ce24a 100644 --- a/src/gui/dialog/progress.h +++ b/src/gui/dialog/progress.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b707cf3ea2..05994d29bd 100644 --- a/src/gui/dialog/report_exception.cpp +++ b/src/gui/dialog/report_exception.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 29d2e4e239..dbe75726ed 100644 --- a/src/gui/dialog/report_exception.h +++ b/src/gui/dialog/report_exception.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 efb1ec2966..577f7a7a50 100644 --- a/src/gui/dwi/render_frame.cpp +++ b/src/gui/dwi/render_frame.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7068ff184e..3d34bbd588 100644 --- a/src/gui/dwi/render_frame.h +++ b/src/gui/dwi/render_frame.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5b12700c33..7455ceb08e 100644 --- a/src/gui/dwi/renderer.cpp +++ b/src/gui/dwi/renderer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/gui/dwi/renderer.h index b7d523886e..9e7dddeb7a 100644 --- a/src/gui/dwi/renderer.h +++ b/src/gui/dwi/renderer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 983f35dbbf..586267317f 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 600cbfbd9b..781aa5a3a9 100644 --- a/src/gui/gui.h +++ b/src/gui/gui.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a86a8cb382..db2910bf09 100644 --- a/src/gui/lighting_dock.cpp +++ b/src/gui/lighting_dock.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 55a6eee21f..98c0734bf0 100644 --- a/src/gui/lighting_dock.h +++ b/src/gui/lighting_dock.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6b21ea9bfb..4c9b24a8e7 100644 --- a/src/gui/mrview/adjust_button.cpp +++ b/src/gui/mrview/adjust_button.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d5852601d0..6418fd41a0 100644 --- a/src/gui/mrview/adjust_button.h +++ b/src/gui/mrview/adjust_button.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9f7a8fdeed..8d99a4a0a2 100644 --- a/src/gui/mrview/colourbars.cpp +++ b/src/gui/mrview/colourbars.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5a0ff2254f..255e970f92 100644 --- a/src/gui/mrview/colourbars.h +++ b/src/gui/mrview/colourbars.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 14988cf309..24f174cc57 100644 --- a/src/gui/mrview/colourmap_button.cpp +++ b/src/gui/mrview/colourmap_button.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,10 +118,10 @@ void ColourMapButton::init_special_colour_menu_items(bool create_shortcuts) void ColourMapButton::init_customise_state_menu_items() { - auto show_colour_bar = colourmap_menu->addAction(tr("Show colour bar"), this, SLOT(show_colour_bar_slot(bool))); - show_colour_bar->setCheckable(true); - show_colour_bar->setChecked(true); - addAction(show_colour_bar); + show_colour_bar_action = colourmap_menu->addAction(tr("Show colour bar"), this, SLOT(show_colour_bar_slot(bool))); + show_colour_bar_action->setCheckable(true); + show_colour_bar_action->setChecked(true); + addAction(show_colour_bar_action); invert_scale_action = colourmap_menu->addAction(tr("Invert"), this, SLOT(invert_colourmap_slot(bool))); invert_scale_action->setCheckable(true); @@ -163,12 +163,18 @@ void ColourMapButton::set_colourmap_index(size_t index) } } -void ColourMapButton::set_scale_inverted(bool yesno) +void ColourMapButton::set_scale_inverted (bool yesno) { assert (invert_scale_action != nullptr); invert_scale_action->setChecked (yesno); } +void ColourMapButton::set_show_colourbar (bool yesno) +{ + assert (invert_scale_action != nullptr); + show_colour_bar_action->setChecked (yesno); +} + void ColourMapButton::set_fixed_colour() { diff --git a/src/gui/mrview/colourmap_button.h b/src/gui/mrview/colourmap_button.h index 871654e72d..96f0c46f14 100644 --- a/src/gui/mrview/colourmap_button.h +++ b/src/gui/mrview/colourmap_button.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,11 +34,11 @@ class ColourMapButton; class ColourMapButtonObserver { NOMEMALIGN public: - virtual void selected_colourmap(size_t, const ColourMapButton&) {} - virtual void selected_custom_colour(const QColor&, const ColourMapButton&) {} - virtual void toggle_show_colour_bar(bool, const ColourMapButton&) {} - virtual void toggle_invert_colourmap(bool, const ColourMapButton&) {} - virtual void reset_colourmap(const ColourMapButton&) {} + virtual void selected_colourmap (size_t, const ColourMapButton&) {} + virtual void selected_custom_colour (const QColor&, const ColourMapButton&) {} + virtual void toggle_show_colour_bar (bool, const ColourMapButton&) {} + virtual void toggle_invert_colourmap (bool, const ColourMapButton&) {} + virtual void reset_colourmap (const ColourMapButton&) {} }; @@ -46,12 +46,13 @@ class ColourMapButton : public QToolButton { MEMALIGN(ColourMapButton) Q_OBJECT public: - ColourMapButton(QWidget* parent, ColourMapButtonObserver& obs, + ColourMapButton (QWidget* parent, ColourMapButtonObserver& obs, bool use_shortcuts = false, bool use_special_colourmaps = true, bool use_customise_state_items = true); - void set_colourmap_index(size_t index); - void set_scale_inverted(bool yesno); + void set_colourmap_index (size_t index); + void set_scale_inverted (bool yesno); + void set_show_colourbar (bool yesno); void set_fixed_colour(); vector colourmap_actions; void open_menu (const QPoint& p) { colourmap_menu->exec (p); } @@ -71,6 +72,7 @@ class ColourMapButton : public QToolButton QMenu* colourmap_menu; QAction* custom_colour_action; QAction* invert_scale_action; + QAction* show_colour_bar_action; size_t fixed_colour_index; diff --git a/src/gui/mrview/colourmap_menu.cpp b/src/gui/mrview/colourmap_menu.cpp deleted file mode 100644 index 814d4b8ce0..0000000000 --- a/src/gui/mrview/colourmap_menu.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. - * - * This Source Code Form 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/. - */ - -#include "gui/gui.h" -#include "gui/mrview/colourmap_menu.h" - -namespace MR -{ - namespace GUI - { - namespace MRView - { - - - - void create_colourmap_menu (QWidget* parent, QActionGroup*& group, - QMenu* menu, QAction** & actions, - bool create_shortcuts, bool use_special) - { - group = new QActionGroup (parent); - group->setExclusive (true); - actions = new QAction* [ColourMap::num()]; - bool in_scalar_section = true; - - for (size_t n = 0; ColourMap::maps[n].name; ++n) { - if (ColourMap::maps[n].special && !use_special) - continue; - QAction* action = new QAction (ColourMap::maps[n].name, parent); - action->setCheckable (true); - group->addAction (action); - - if (ColourMap::maps[n].special && in_scalar_section) { - menu->addSeparator(); - in_scalar_section = false; - } - - menu->addAction (action); - parent->addAction (action); - - if (create_shortcuts) - action->setShortcut (qstr ("Ctrl+" + str (n+1))); - - actions[n] = action; - } - - actions[0]->setChecked (true); - } - - - - } - } -} - diff --git a/src/gui/mrview/combo_box_error.cpp b/src/gui/mrview/combo_box_error.cpp index 08ce1a73cb..32d615c65a 100644 --- a/src/gui/mrview/combo_box_error.cpp +++ b/src/gui/mrview/combo_box_error.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 be7cdb0cb5..f17331cfc7 100644 --- a/src/gui/mrview/combo_box_error.h +++ b/src/gui/mrview/combo_box_error.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6333ded04d..af240e119b 100644 --- a/src/gui/mrview/displayable.cpp +++ b/src/gui/mrview/displayable.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2c65d1dff9..e70e3d8474 100644 --- a/src/gui/mrview/displayable.h +++ b/src/gui/mrview/displayable.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -138,10 +138,16 @@ namespace MR flags_ = cmap; } - void set_colour (std::array &c) { + void set_colour (const std::array &c) { colour = c; } + void set_colour (const QColor &c) { + colour[0] = c.red(); + colour[1] = c.green(); + colour[2] = c.blue(); + } + void set_use_discard_lower (bool yesno) { if (!discard_lower_enabled()) return; set_bit (DiscardLower, yesno); diff --git a/src/gui/mrview/file_open.cpp b/src/gui/mrview/file_open.cpp index dde4497a69..69a08b9dda 100644 --- a/src/gui/mrview/file_open.cpp +++ b/src/gui/mrview/file_open.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5adc378bef..9efe55926a 100644 --- a/src/gui/mrview/file_open.h +++ b/src/gui/mrview/file_open.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 66d9dadc3c..7979b95bd9 100644 --- a/src/gui/mrview/gui_image.cpp +++ b/src/gui/mrview/gui_image.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9cc9aceb8a..905a32b935 100644 --- a/src/gui/mrview/gui_image.h +++ b/src/gui/mrview/gui_image.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0edda36996..c059b18622 100644 --- a/src/gui/mrview/icons.h +++ b/src/gui/mrview/icons.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d8c603cb76..3fc99c38b4 100644 --- a/src/gui/mrview/mode/base.cpp +++ b/src/gui/mrview/mode/base.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3ea6b735f7..5ab63413c5 100644 --- a/src/gui/mrview/mode/base.h +++ b/src/gui/mrview/mode/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2e32a8db6d..92ef5ff34a 100644 --- a/src/gui/mrview/mode/lightbox.cpp +++ b/src/gui/mrview/mode/lightbox.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,6 +16,8 @@ #include "gui/mrview/mode/lightbox.h" +#include "types.h" + namespace MR { namespace GUI @@ -259,7 +261,7 @@ namespace MR gl::EnableVertexAttribArray (0); gl::VertexAttribPointer (0, 2, gl::FLOAT, gl::FALSE_, 0, (void*)0); - GLfloat data[num_points]; + VLA(data, GLfloat, num_points); // Grid line stride float x_inc = 2.f / n_cols; diff --git a/src/gui/mrview/mode/lightbox.h b/src/gui/mrview/mode/lightbox.h index 7d390faf71..7c34b6a01c 100644 --- a/src/gui/mrview/mode/lightbox.h +++ b/src/gui/mrview/mode/lightbox.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 27622bdf9b..5d56e71947 100644 --- a/src/gui/mrview/mode/lightbox_gui.h +++ b/src/gui/mrview/mode/lightbox_gui.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 644db9d493..bb3254408a 100644 --- a/src/gui/mrview/mode/list.h +++ b/src/gui/mrview/mode/list.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8a685769ba..ab12e75bbe 100644 --- a/src/gui/mrview/mode/ortho.cpp +++ b/src/gui/mrview/mode/ortho.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 16645d15d5..b2d4a04323 100644 --- a/src/gui/mrview/mode/ortho.h +++ b/src/gui/mrview/mode/ortho.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 afc01b43da..4375b2d666 100644 --- a/src/gui/mrview/mode/slice.cpp +++ b/src/gui/mrview/mode/slice.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7ce7d27eb2..b5e8f8b657 100644 --- a/src/gui/mrview/mode/slice.h +++ b/src/gui/mrview/mode/slice.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4e67ce8234..b6e8eb898e 100644 --- a/src/gui/mrview/mode/volume.cpp +++ b/src/gui/mrview/mode/volume.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7452b5551d..bc06a79f3c 100644 --- a/src/gui/mrview/mode/volume.h +++ b/src/gui/mrview/mode/volume.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c2b607db70..6b9605d3fc 100644 --- a/src/gui/mrview/spin_box.h +++ b/src/gui/mrview/spin_box.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9a9758aa53..365fed92bd 100644 --- a/src/gui/mrview/sync/client.cpp +++ b/src/gui/mrview/sync/client.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e46bb1a722..9630cc94af 100644 --- a/src/gui/mrview/sync/client.h +++ b/src/gui/mrview/sync/client.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 83c37f5159..6bbdc222df 100644 --- a/src/gui/mrview/sync/enums.h +++ b/src/gui/mrview/sync/enums.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1957c9a166..68c3440455 100644 --- a/src/gui/mrview/sync/interprocesscommunicator.cpp +++ b/src/gui/mrview/sync/interprocesscommunicator.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 359bef8e4d..8fa38638c1 100644 --- a/src/gui/mrview/sync/interprocesscommunicator.h +++ b/src/gui/mrview/sync/interprocesscommunicator.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 88d2bbfc8b..ab7fbd7a47 100644 --- a/src/gui/mrview/sync/localsocketreader.cpp +++ b/src/gui/mrview/sync/localsocketreader.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 @@ */ #include "exception.h" +#include "types.h" #include "gui/mrview/sync/localsocketreader.h" namespace MR @@ -74,7 +75,7 @@ namespace MR } //Read delivered data - char read[sizeOfMessage]; + VLA(read, char, sizeOfMessage); socket->read(read, sizeOfMessage); std::shared_ptr readData = std::shared_ptr(new QByteArray()); readData->insert(0, read, sizeOfMessage); diff --git a/src/gui/mrview/sync/localsocketreader.h b/src/gui/mrview/sync/localsocketreader.h index e41614e0eb..eaf939d0cb 100644 --- a/src/gui/mrview/sync/localsocketreader.h +++ b/src/gui/mrview/sync/localsocketreader.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 287abeb2e5..8c8d4d3138 100644 --- a/src/gui/mrview/sync/processlock.cpp +++ b/src/gui/mrview/sync/processlock.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8beb70342e..c2938d34fa 100644 --- a/src/gui/mrview/sync/processlock.h +++ b/src/gui/mrview/sync/processlock.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a7921bc5b0..d47924bd51 100644 --- a/src/gui/mrview/sync/syncmanager.cpp +++ b/src/gui/mrview/sync/syncmanager.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d1b2072a36..ead80740a1 100644 --- a/src/gui/mrview/sync/syncmanager.h +++ b/src/gui/mrview/sync/syncmanager.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8729dfd2fe..a16d651586 100644 --- a/src/gui/mrview/tool/base.cpp +++ b/src/gui/mrview/tool/base.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1883c76816..a005b2f715 100644 --- a/src/gui/mrview/tool/base.h +++ b/src/gui/mrview/tool/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8433f865fd..504b022c1a 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ee2ee1d3de..3f70843d57 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8cc3982d93..668df0c705 100644 --- a/src/gui/mrview/tool/connectome/connectome.cpp +++ b/src/gui/mrview/tool/connectome/connectome.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/gui/mrview/tool/connectome/connectome.h index c8ef270e94..2c3f5cc55f 100644 --- a/src/gui/mrview/tool/connectome/connectome.h +++ b/src/gui/mrview/tool/connectome/connectome.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 063f972405..b690795f35 100644 --- a/src/gui/mrview/tool/connectome/edge.cpp +++ b/src/gui/mrview/tool/connectome/edge.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 bdec144c1f..145870a022 100644 --- a/src/gui/mrview/tool/connectome/edge.h +++ b/src/gui/mrview/tool/connectome/edge.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6d8c3bd4ce..19770e2954 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ff537e0e71..881e9bfb8c 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a086d49572..4d19c1bc92 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 43b6f6782c..ecf7cc4e7e 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 fad1939678..731e07335a 100644 --- a/src/gui/mrview/tool/connectome/node.cpp +++ b/src/gui/mrview/tool/connectome/node.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 efa4bb973f..a1a3f68335 100644 --- a/src/gui/mrview/tool/connectome/node.h +++ b/src/gui/mrview/tool/connectome/node.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0c3e15a650..f2c6ef3981 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7d44de8f82..cfcbc6d4d8 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b0f661abc1..b4d47aa687 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ad0f8c4bf5..02eaf992a0 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 915eaa94d4..2d47e39e18 100644 --- a/src/gui/mrview/tool/connectome/selection.cpp +++ b/src/gui/mrview/tool/connectome/selection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 118f30fc6a..1035d26ef7 100644 --- a/src/gui/mrview/tool/connectome/selection.h +++ b/src/gui/mrview/tool/connectome/selection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 032688fb9e..2a58c4dc3e 100644 --- a/src/gui/mrview/tool/connectome/shaders.cpp +++ b/src/gui/mrview/tool/connectome/shaders.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d68fa537b8..d8e860d207 100644 --- a/src/gui/mrview/tool/connectome/shaders.h +++ b/src/gui/mrview/tool/connectome/shaders.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 78931001da..bd26f5c33e 100644 --- a/src/gui/mrview/tool/connectome/types.h +++ b/src/gui/mrview/tool/connectome/types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3cb09bc3c2..415548f517 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 67a261e33b..2c2a3e5566 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 cb369e6ed3..71198cbb8f 100644 --- a/src/gui/mrview/tool/fixel/directory.cpp +++ b/src/gui/mrview/tool/fixel/directory.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2cd799c148..8130f3e98d 100644 --- a/src/gui/mrview/tool/fixel/directory.h +++ b/src/gui/mrview/tool/fixel/directory.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8b665a0e0c..f6692554f5 100644 --- a/src/gui/mrview/tool/fixel/fixel.cpp +++ b/src/gui/mrview/tool/fixel/fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/gui/mrview/tool/fixel/fixel.h index 1fdbc84a89..23e3aae618 100644 --- a/src/gui/mrview/tool/fixel/fixel.h +++ b/src/gui/mrview/tool/fixel/fixel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 cfaee14b1e..29527367f3 100644 --- a/src/gui/mrview/tool/fixel/image4D.cpp +++ b/src/gui/mrview/tool/fixel/image4D.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 37584a4a9c..c0c3360b6e 100644 --- a/src/gui/mrview/tool/fixel/image4D.h +++ b/src/gui/mrview/tool/fixel/image4D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2d597dadd9..aaf22e8286 100644 --- a/src/gui/mrview/tool/fixel/legacy.cpp +++ b/src/gui/mrview/tool/fixel/legacy.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 705414a15f..d51802314d 100644 --- a/src/gui/mrview/tool/fixel/legacy.h +++ b/src/gui/mrview/tool/fixel/legacy.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a5ca99aee1..5e3f07b78b 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a48f0ec9d9..8d3196b557 100644 --- a/src/gui/mrview/tool/list.h +++ b/src/gui/mrview/tool/list.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d930d3047d..d5f698b559 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 cfb1075cb3..70a0abeed8 100644 --- a/src/gui/mrview/tool/odf/item.cpp +++ b/src/gui/mrview/tool/odf/item.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 3d62a8cfd9..a3776f8320 100644 --- a/src/gui/mrview/tool/odf/item.h +++ b/src/gui/mrview/tool/odf/item.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f2d989844f..ec52032b6b 100644 --- a/src/gui/mrview/tool/odf/model.cpp +++ b/src/gui/mrview/tool/odf/model.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e74fed2dcf..406d945f8e 100644 --- a/src/gui/mrview/tool/odf/model.h +++ b/src/gui/mrview/tool/odf/model.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e3dd699de7..5383073e28 100644 --- a/src/gui/mrview/tool/odf/odf.cpp +++ b/src/gui/mrview/tool/odf/odf.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/gui/mrview/tool/odf/odf.h index 7ae63efa01..a2650c1661 100644 --- a/src/gui/mrview/tool/odf/odf.h +++ b/src/gui/mrview/tool/odf/odf.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7d3acf4724..d9137c5f91 100644 --- a/src/gui/mrview/tool/odf/preview.cpp +++ b/src/gui/mrview/tool/odf/preview.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 01212a18b3..eca4b1145b 100644 --- a/src/gui/mrview/tool/odf/preview.h +++ b/src/gui/mrview/tool/odf/preview.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1281d57b7f..3f96ca90a5 100644 --- a/src/gui/mrview/tool/odf/type.h +++ b/src/gui/mrview/tool/odf/type.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 dfcfe137bd..17769d05c4 100644 --- a/src/gui/mrview/tool/overlay.cpp +++ b/src/gui/mrview/tool/overlay.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -631,7 +631,7 @@ namespace MR if (colourmap_index == -2) colourmap_index = overlay->colourmap; else - colourmap_index = -1; + colourmap_index = -1; } num_inverted += overlay->scale_inverted(); rate += overlay->scaling_rate(); diff --git a/src/gui/mrview/tool/overlay.h b/src/gui/mrview/tool/overlay.h index fcfb66e0f7..b23c52226b 100644 --- a/src/gui/mrview/tool/overlay.h +++ b/src/gui/mrview/tool/overlay.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4a2a4f4421..778e03d80f 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9e03604aa5..7dbc720249 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9183cc53b4..b329f64f96 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d4d80039a5..367d310626 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 43e84e8e9c..c427a010f4 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5341c63cae..fdb288d4b1 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 11fcba4295..f78a5aa40a 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 935960f9b2..acde681766 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 10a6acf409..2bde1ac707 100644 --- a/src/gui/mrview/tool/screen_capture.cpp +++ b/src/gui/mrview/tool/screen_capture.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d3b7d89eb4..1eba0e9a1d 100644 --- a/src/gui/mrview/tool/screen_capture.h +++ b/src/gui/mrview/tool/screen_capture.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 dad1f5a948..3cf6b4d6c2 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 +17,6 @@ #include "gui/mrview/tool/tractography/track_scalar_file.h" #include "gui/dialog/file.h" -#include "gui/mrview/colourmap_menu.h" #include "gui/mrview/tool/tractography/tractogram.h" @@ -52,34 +51,7 @@ namespace MR connect (intensity_file_button, SIGNAL (clicked()), this, SLOT (open_intensity_track_scalar_file_slot ())); hlayout->addWidget (intensity_file_button); - // Colourmap menu: - colourmap_menu = new QMenu (tr ("Colourmap menu"), this); - - MRView::create_colourmap_menu (this, colourmap_group, colourmap_menu, colourmap_actions, false, false); - connect (colourmap_group, SIGNAL (triggered (QAction*)), this, SLOT (select_colourmap_slot())); - colourmap_actions[1]->setChecked (true); - - colourmap_menu->addSeparator(); - - show_colour_bar = colourmap_menu->addAction (tr ("Show colour bar"), this, SLOT (show_colour_bar_slot())); - show_colour_bar->setCheckable (true); - show_colour_bar->setChecked (true); - addAction (show_colour_bar); - - invert_scale = colourmap_menu->addAction (tr ("Invert"), this, SLOT (invert_colourmap_slot())); - invert_scale->setCheckable (true); - addAction (invert_scale); - - colourmap_menu->addSeparator(); - - QAction* reset_intensity = colourmap_menu->addAction (tr ("Reset intensity"), this, SLOT (reset_intensity_slot())); - addAction (reset_intensity); - - colourmap_button = new QToolButton (this); - colourmap_button->setToolTip (tr ("Colourmap menu")); - colourmap_button->setIcon (QIcon (":/colourmap.svg")); - colourmap_button->setPopupMode (QToolButton::InstantPopup); - colourmap_button->setMenu (colourmap_menu); + colourmap_button = new ColourMapButton(this, *this, false, false, true); hlayout->addWidget (colourmap_button); vlayout->addLayout (hlayout); @@ -159,7 +131,8 @@ namespace MR window().colourbar_renderer.render (tractogram.colourmap, tractogram.scale_inverted(), min_value, max_value, - tractogram.scaling_min(), tractogram.display_range, tractogram.colour); + tractogram.scaling_min(), tractogram.display_range, + { tractogram.colour[0]/255.0f, tractogram.colour[1]/255.0f, tractogram.colour[2]/255.0f }); } @@ -180,10 +153,10 @@ namespace MR min_entry->setValue (tractogram->scaling_min()); max_entry->setValue (tractogram->scaling_max()); - colourmap_menu->setEnabled (true); - colourmap_actions[tractogram->colourmap]->setChecked (true); - show_colour_bar->setChecked (tractogram->show_colour_bar); - invert_scale->setChecked (tractogram->scale_inverted()); + colourmap_button->setEnabled (true); + colourmap_button->set_colourmap_index(tractogram->colourmap); + colourmap_button->set_scale_inverted (tractogram->scale_inverted()); + colourmap_button->set_show_colourbar (tractogram->show_colour_bar); assert (tractogram->intensity_scalar_filename.length()); intensity_file_button->setText (qstr (shorten (Path::basename (tractogram->intensity_scalar_filename), 35, 0))); @@ -259,28 +232,30 @@ namespace MR return scalar_file.size(); } - void TrackScalarFileOptions::show_colour_bar_slot () + void TrackScalarFileOptions::toggle_show_colour_bar(bool show_colour_bar, const ColourMapButton&) { if (tractogram) { - tractogram->show_colour_bar = show_colour_bar->isChecked(); + tractogram->show_colour_bar = show_colour_bar; window().updateGL(); } } - void TrackScalarFileOptions::select_colourmap_slot () + void TrackScalarFileOptions::selected_colourmap (size_t cmap, const ColourMapButton&) { if (tractogram) { - QAction* action = colourmap_group->checkedAction(); - size_t n = 0; - while (action != colourmap_actions[n]) - ++n; - tractogram->colourmap = n; + tractogram->colourmap = cmap; window().updateGL(); } } - + void TrackScalarFileOptions::selected_custom_colour (const QColor& c, const ColourMapButton&) + { + if (tractogram) { + tractogram->set_colour (c); + window().updateGL(); + } + } void TrackScalarFileOptions::set_threshold(GUI::MRView::Tool::TrackThresholdType dataSource, default_type min, default_type max)//TrackThresholdType dataSource { @@ -429,7 +404,7 @@ namespace MR } - void TrackScalarFileOptions::reset_intensity_slot () + void TrackScalarFileOptions::reset_colourmap (const ColourMapButton&) { if (tractogram) { tractogram->reset_windowing(); @@ -439,19 +414,10 @@ namespace MR } - void TrackScalarFileOptions::invert_colourmap_slot () + void TrackScalarFileOptions::toggle_invert_colourmap (bool invert, const ColourMapButton&) { if (tractogram) { - tractogram->set_invert_scale (invert_scale->isChecked()); - window().updateGL(); - } - } - - void TrackScalarFileOptions::set_colourmap (int colourmap_index) - { - if (tractogram) { - tractogram->colourmap = colourmap_index; - update_UI(); + tractogram->set_invert_scale (invert); window().updateGL(); } } diff --git a/src/gui/mrview/tool/tractography/track_scalar_file.h b/src/gui/mrview/tool/tractography/track_scalar_file.h index 1dae8dba89..baf7a431f9 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 @@ #define __gui_mrtrix_tools_tractography_scalar_file_options_h__ #include "gui/mrview/adjust_button.h" +#include "gui/mrview/colourmap_button.h" #include "gui/mrview/displayable.h" #include "gui/mrview/tool/base.h" #include "gui/mrview/tool/tractography/tractogram_enums.h" @@ -36,7 +37,7 @@ namespace MR class Tractogram; class Tractography; - class TrackScalarFileOptions : public QGroupBox, public DisplayableVisitor + class TrackScalarFileOptions : public QGroupBox, public ColourMapButtonObserver, public DisplayableVisitor { MEMALIGN(TrackScalarFileOptions) Q_OBJECT @@ -51,7 +52,13 @@ namespace MR void update_UI(); void set_scaling(default_type min, default_type max); void set_threshold(GUI::MRView::Tool::TrackThresholdType dataSource, default_type min, default_type max); - void set_colourmap (int colourmap_index); + void set_colourmap (int colourmap_index) { colourmap_button->set_colourmap_index (colourmap_index); } + + void selected_colourmap (size_t, const ColourMapButton&) override; + void selected_custom_colour (const QColor&, const ColourMapButton&) override; + void toggle_show_colour_bar (bool, const ColourMapButton&) override; + void toggle_invert_colourmap (bool, const ColourMapButton&) override; + void reset_colourmap (const ColourMapButton&) override; public slots: bool open_intensity_track_scalar_file_slot (); @@ -59,17 +66,13 @@ namespace MR private slots: - void show_colour_bar_slot(); - void select_colourmap_slot (); void on_set_scaling_slot (); bool threshold_scalar_file_slot (int); void threshold_lower_changed (int unused); void threshold_upper_changed (int unused); void threshold_lower_value_changed (); void threshold_upper_value_changed (); - void invert_colourmap_slot (); - void reset_intensity_slot (); - + protected: Tractography* tool; @@ -78,10 +81,7 @@ namespace MR QGroupBox *colour_groupbox; QAction *show_colour_bar; QAction *invert_scale; - QMenu *colourmap_menu; - QAction **colourmap_actions; - QActionGroup *colourmap_group; - QToolButton *colourmap_button; + ColourMapButton* colourmap_button; QPushButton *intensity_file_button; AdjustButton *max_entry, *min_entry; QComboBox *threshold_file_combobox; diff --git a/src/gui/mrview/tool/tractography/tractogram.cpp b/src/gui/mrview/tool/tractography/tractogram.cpp index 5749e542a7..a8f6905364 100644 --- a/src/gui/mrview/tool/tractography/tractogram.cpp +++ b/src/gui/mrview/tool/tractography/tractogram.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,7 @@ namespace MR "uniform float slab_width;\n" "uniform float offset, scale;\n" "uniform float scale_x, scale_y;\n" + "uniform vec3 colourmap_colour;\n" "out vec3 v_tangent;\n" "out vec2 v_end;\n"; @@ -220,7 +221,7 @@ namespace MR std::string source = "uniform float lower, upper;\n" - "uniform vec3 const_colour;\n" + "uniform vec3 colourmap_colour;\n" "uniform mat4 MV;\n" "out vec3 colour;\n"; @@ -282,7 +283,7 @@ namespace MR : " colour = v_colour;\n"; break; case TrackColourType::Manual: - source += " colour = const_colour;\n"; + source += " colour = colourmap_colour;\n"; } if (use_lighting && (using_geom || using_points)) { @@ -429,7 +430,8 @@ namespace MR } if (color_type == TrackColourType::Manual) - gl::Uniform3fv (gl::GetUniformLocation (track_shader, "const_colour"), 1, colour.data()); + gl::Uniform3f (gl::GetUniformLocation (track_shader, "colourmap_colour"), + colour[0]/255.0, colour[1]/255.0, colour[2]/255.0); if (color_type == TrackColourType::ScalarFile) { gl::Uniform1f (gl::GetUniformLocation (track_shader, "offset"), display_midpoint - 0.5f * display_range); diff --git a/src/gui/mrview/tool/tractography/tractogram.h b/src/gui/mrview/tool/tractography/tractogram.h index 40e9610ca0..b6ecd9e002 100644 --- a/src/gui/mrview/tool/tractography/tractogram.h +++ b/src/gui/mrview/tool/tractography/tractogram.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -69,8 +69,6 @@ namespace MR TrackThresholdType get_threshold_type() const { return threshold_type; } TrackGeometryType get_geometry_type() const { return geometry_type; } - void set_colour (float c[3]) { colour = { c[0], c[1], c[2] }; } - float get_threshold_rate() const { switch (threshold_type) { case TrackThresholdType::None: return NaN; @@ -90,7 +88,6 @@ namespace MR bool scalarfile_by_direction; bool show_colour_bar; bool should_update_stride; - Eigen::Array3f colour; float original_fov; float line_thickness; std::string intensity_scalar_filename; diff --git a/src/gui/mrview/tool/tractography/tractogram_enums.h b/src/gui/mrview/tool/tractography/tractogram_enums.h index 63a8436aaa..4481144017 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e5d1e2bdde..3f5d063321 100644 --- a/src/gui/mrview/tool/tractography/tractography.cpp +++ b/src/gui/mrview/tool/tractography/tractography.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -564,11 +564,12 @@ namespace MR colour[2] = rng(); } while (colour[0] < 0.5 && colour[1] < 0.5 && colour[2] < 0.5); tractogram->set_color_type (TrackColourType::Manual); - tractogram->set_colour (colour); + QColor c (colour[0]*255.0f, colour[1]*255.0f, colour[2]*255.0f); + tractogram->set_colour (c); if (tractogram->get_threshold_type() == TrackThresholdType::UseColourFile) tractogram->set_threshold_type (TrackThresholdType::None); if (!i) - colour_button->setColor (QColor (colour[0]*255.0f, colour[1]*255.0f, colour[2]*255.0f)); + colour_button->setColor (c); } colour_combobox->blockSignals (true); colour_combobox->setCurrentIndex (2); @@ -584,13 +585,12 @@ namespace MR { QColor color; color = QColorDialog::getColor(Qt::red, this, "Select Color", QColorDialog::DontUseNativeDialog); - float colour[] = {float(color.redF()), float(color.greenF()), float(color.blueF())}; if (color.isValid()) { QModelIndexList indices = tractogram_list_view->selectionModel()->selectedIndexes(); for (int i = 0; i < indices.size(); ++i) { Tractogram* tractogram = tractogram_list_model->get_tractogram (indices[i]); tractogram->set_color_type (TrackColourType::Manual); - tractogram->set_colour (colour); + tractogram->set_colour (color); if (tractogram->get_threshold_type() == TrackThresholdType::UseColourFile) tractogram->set_threshold_type (TrackThresholdType::None); } @@ -599,7 +599,7 @@ namespace MR colour_combobox->clearError(); colour_combobox->blockSignals (false); colour_button->setEnabled (true); - colour_button->setColor (QColor (colour[0]*255.0f, colour[1]*255.0f, colour[2]*255.0f)); + colour_button->setColor (color); update_scalar_options(); } window().updateGL(); @@ -668,9 +668,8 @@ namespace MR const QColor color = colour_button->color(); if (color.isValid()) { QModelIndexList indices = tractogram_list_view->selectionModel()->selectedIndexes(); - float c[3] = { color.red()/255.0f, color.green()/255.0f, color.blue()/255.0f }; for (int i = 0; i < indices.size(); ++i) - tractogram_list_model->get_tractogram (indices[i])->set_colour (c); + tractogram_list_model->get_tractogram (indices[i])->set_colour (color); colour_combobox->blockSignals (true); colour_combobox->setCurrentIndex (3); // In case it was on random colour_combobox->clearError(); @@ -717,7 +716,7 @@ namespace MR const Tractogram* first_tractogram = tractogram_list_model->get_tractogram (indices[0]); TrackColourType color_type = first_tractogram->get_color_type(); - Eigen::Array3f color = first_tractogram->colour; + QColor color (first_tractogram->colour[0], first_tractogram->colour[1], first_tractogram->colour[2]); TrackGeometryType geom_type = first_tractogram->get_geometry_type(); bool color_type_consistent = true, geometry_type_consistent = true; float mean_thickness = first_tractogram->line_thickness; @@ -743,7 +742,7 @@ namespace MR case TrackColourType::Manual: colour_combobox->setCurrentIndex (3); colour_button->setEnabled (true); - colour_button->setColor (QColor (color[0]*255.0f, color[1]*255.0f, color[2]*255.0f)); + colour_button->setColor (color); break; case TrackColourType::ScalarFile: colour_combobox->setCurrentIndex (4); @@ -988,16 +987,10 @@ namespace MR const float max_value = std::max ({ values[0], values[1], values[2] }); if (std::min ({ values[0], values[1], values[2] }) < 0.0 || max_value > 255) throw Exception ("values provided to -tractogram.colour must be either between 0.0 and 1.0, or between 0 and 255"); - const float multiplier = max_value <= 1.0 ? 1.0 : 1.0/255.0; + const float multiplier = max_value <= 1.0 ? 255.0 : 1.0; //input need to be a float * - float colour_input[3] = { - multiplier * float (values[0]), - multiplier * float (values[1]), - multiplier * float (values[2]) - }; - - QColor colour (int(values[0]*255.0), int(values[1]*255.0), int(values[2]*255.0)); + QColor colour (multiplier*values[0], multiplier*values[1], multiplier*values[2]); QModelIndexList indices = tractogram_list_view->selectionModel()->selectedIndexes(); @@ -1008,7 +1001,7 @@ namespace MR // set the color tractogram->set_color_type (TrackColourType::Manual); - tractogram->set_colour (colour_input); + tractogram->set_colour (colour); // update_color_type_gui colour_combobox->setCurrentIndex (3); diff --git a/src/gui/mrview/tool/tractography/tractography.h b/src/gui/mrview/tool/tractography/tractography.h index f90f56719a..e46eafa1e7 100644 --- a/src/gui/mrview/tool/tractography/tractography.h +++ b/src/gui/mrview/tool/tractography/tractography.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4e4136f513..aad877e429 100644 --- a/src/gui/mrview/tool/transform.cpp +++ b/src/gui/mrview/tool/transform.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 34024a2fff..e182ac8286 100644 --- a/src/gui/mrview/tool/transform.h +++ b/src/gui/mrview/tool/transform.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 16dc4efe25..9bb8451f67 100644 --- a/src/gui/mrview/tool/view.cpp +++ b/src/gui/mrview/tool/view.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 15652f9bf1..c521e919a4 100644 --- a/src/gui/mrview/tool/view.h +++ b/src/gui/mrview/tool/view.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ce24eb58d9..b188370301 100644 --- a/src/gui/mrview/volume.cpp +++ b/src/gui/mrview/volume.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 140bea8d53..31a9ef0ee1 100644 --- a/src/gui/mrview/volume.h +++ b/src/gui/mrview/volume.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7bfcb5374c..b0a16f1067 100644 --- a/src/gui/mrview/window.cpp +++ b/src/gui/mrview/window.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 943e60b2ee..2e4299ba6d 100644 --- a/src/gui/mrview/window.h +++ b/src/gui/mrview/window.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a9ed230d51..2a704935d8 100644 --- a/src/gui/opengl/font.cpp +++ b/src/gui/opengl/font.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 fc37b3e2a0..4ba25c5c04 100644 --- a/src/gui/opengl/font.h +++ b/src/gui/opengl/font.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8f8be71dbb..59cd6df1e2 100644 --- a/src/gui/opengl/gl.cpp +++ b/src/gui/opengl/gl.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 79854aac0f..c5866b2a73 100644 --- a/src/gui/opengl/gl.h +++ b/src/gui/opengl/gl.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 637ec79746..03a36d8e13 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e3e240690c..25750172d8 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4098c80e23..af05d1b729 100644 --- a/src/gui/opengl/lighting.cpp +++ b/src/gui/opengl/lighting.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 116997a6dd..2764ba7bf4 100644 --- a/src/gui/opengl/lighting.h +++ b/src/gui/opengl/lighting.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 718d98c84d..fbf3378883 100644 --- a/src/gui/opengl/shader.cpp +++ b/src/gui/opengl/shader.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 acb6f22ee2..37a9d7f9ae 100644 --- a/src/gui/opengl/shader.h +++ b/src/gui/opengl/shader.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 acdc35435b..db17d2b0e5 100644 --- a/src/gui/opengl/transformation.h +++ b/src/gui/opengl/transformation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5c829c64c6..7bec0e2118 100644 --- a/src/gui/projection.cpp +++ b/src/gui/projection.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1b28a4960f..a0c37cf374 100644 --- a/src/gui/projection.h +++ b/src/gui/projection.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 31c11461ee..38e8f1338d 100644 --- a/src/gui/shapes/cube.cpp +++ b/src/gui/shapes/cube.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 b69af0c1e5..ad1138d444 100644 --- a/src/gui/shapes/cube.h +++ b/src/gui/shapes/cube.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5b45e7c537..3b00256427 100644 --- a/src/gui/shapes/cylinder.cpp +++ b/src/gui/shapes/cylinder.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d1e1b64f10..d40fe667cc 100644 --- a/src/gui/shapes/cylinder.h +++ b/src/gui/shapes/cylinder.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ebc3b9965e..bfa5b2a9a7 100644 --- a/src/gui/shapes/halfsphere.cpp +++ b/src/gui/shapes/halfsphere.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6b7b74af7a..e7c4b1f716 100644 --- a/src/gui/shapes/halfsphere.h +++ b/src/gui/shapes/halfsphere.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 1871a8be76..56f18efb33 100644 --- a/src/gui/shapes/sphere.cpp +++ b/src/gui/shapes/sphere.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a95d29b33f..2d00387d2e 100644 --- a/src/gui/shapes/sphere.h +++ b/src/gui/shapes/sphere.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2b8180a614..415881883c 100644 --- a/src/gui/shview/file_open.cpp +++ b/src/gui/shview/file_open.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 5adc378bef..9efe55926a 100644 --- a/src/gui/shview/file_open.h +++ b/src/gui/shview/file_open.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c060ed28db..fd3485bddb 100644 --- a/src/gui/shview/icons.h +++ b/src/gui/shview/icons.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 89f37e904e..a0ccf5eed9 100644 --- a/src/gui/shview/render_window.cpp +++ b/src/gui/shview/render_window.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 955e239a5d..f126302e2a 100644 --- a/src/gui/shview/render_window.h +++ b/src/gui/shview/render_window.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 48eb1e3988..9b131edfc0 100644 --- a/src/min_mem_array.h +++ b/src/min_mem_array.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e0bb24790a..635653d1f2 100644 --- a/src/registration/linear.cpp +++ b/src/registration/linear.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a158da2502..77776f550f 100644 --- a/src/registration/linear.h +++ b/src/registration/linear.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/cc_helper.h b/src/registration/metric/cc_helper.h index a4b2f89772..7e45998b65 100644 --- a/src/registration/metric/cc_helper.h +++ b/src/registration/metric/cc_helper.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/cross_correlation.h b/src/registration/metric/cross_correlation.h index 56fb0b9289..67b5f47f8a 100644 --- a/src/registration/metric/cross_correlation.h +++ b/src/registration/metric/cross_correlation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/registration/metric/demons.h index 1217a9f24d..3f1cf075bd 100644 --- a/src/registration/metric/demons.h +++ b/src/registration/metric/demons.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/demons4D.h b/src/registration/metric/demons4D.h index dca953cc29..b793d98a8b 100644 --- a/src/registration/metric/demons4D.h +++ b/src/registration/metric/demons4D.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7ba36c4c28..d7ab3e4b7e 100644 --- a/src/registration/metric/demons_cc.h +++ b/src/registration/metric/demons_cc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f0c417fb97..99aaeed4f4 100644 --- a/src/registration/metric/difference_robust.h +++ b/src/registration/metric/difference_robust.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/evaluate.h b/src/registration/metric/evaluate.h index 013536569b..5374715da1 100644 --- a/src/registration/metric/evaluate.h +++ b/src/registration/metric/evaluate.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ee01357a0f..ef44528f04 100644 --- a/src/registration/metric/linear_base.h +++ b/src/registration/metric/linear_base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/local_cross_correlation.h b/src/registration/metric/local_cross_correlation.h index ce16fa6041..d82d006713 100644 --- a/src/registration/metric/local_cross_correlation.h +++ b/src/registration/metric/local_cross_correlation.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/mean_squared.h b/src/registration/metric/mean_squared.h index 7e5e34e980..d30123d607 100644 --- a/src/registration/metric/mean_squared.h +++ b/src/registration/metric/mean_squared.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/params.h b/src/registration/metric/params.h index 5334599c7a..49f538867e 100644 --- a/src/registration/metric/params.h +++ b/src/registration/metric/params.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/robust_estimators.h b/src/registration/metric/robust_estimators.h index f008d16455..9dea9fc5a5 100644 --- a/src/registration/metric/robust_estimators.h +++ b/src/registration/metric/robust_estimators.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 eaaec0267b..c8db531b12 100644 --- a/src/registration/metric/thread_kernel.h +++ b/src/registration/metric/thread_kernel.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.cpp b/src/registration/multi_contrast.cpp index b96f0e54fd..a60425c011 100644 --- a/src/registration/multi_contrast.cpp +++ b/src/registration/multi_contrast.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 59f8db3fe1..0790d5dc98 100644 --- a/src/registration/multi_contrast.h +++ b/src/registration/multi_contrast.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 46303d4fc8..a0c0c2de07 100644 --- a/src/registration/multi_resolution_lmax.h +++ b/src/registration/multi_resolution_lmax.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9b2f2a0052..99426e174f 100644 --- a/src/registration/nonlinear.cpp +++ b/src/registration/nonlinear.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d31ee8edf3..a45debada7 100644 --- a/src/registration/nonlinear.h +++ b/src/registration/nonlinear.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0c40f2a475..2478189c1a 100644 --- a/src/registration/shared.h +++ b/src/registration/shared.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 c8f5ba28a8..9073184ac3 100644 --- a/src/registration/transform/affine.cpp +++ b/src/registration/transform/affine.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/registration/transform/affine.h index bac5de9aa8..82b07cd1dc 100644 --- a/src/registration/transform/affine.h +++ b/src/registration/transform/affine.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/base.h b/src/registration/transform/base.h index 9466e5321f..b2ca52bd42 100644 --- a/src/registration/transform/base.h +++ b/src/registration/transform/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.cpp b/src/registration/transform/convergence_check.cpp index e78009c211..06bfa02398 100644 --- a/src/registration/transform/convergence_check.cpp +++ b/src/registration/transform/convergence_check.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 4758c484c9..45cb54fad8 100644 --- a/src/registration/transform/convergence_check.h +++ b/src/registration/transform/convergence_check.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 aaaf187689..521b1a4604 100644 --- a/src/registration/transform/initialiser.cpp +++ b/src/registration/transform/initialiser.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/registration/transform/initialiser.h index 3a283f7099..6fd7ad38aa 100644 --- a/src/registration/transform/initialiser.h +++ b/src/registration/transform/initialiser.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7f8b5d4c9f..99db6e5cae 100644 --- a/src/registration/transform/initialiser_helpers.cpp +++ b/src/registration/transform/initialiser_helpers.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/registration/transform/initialiser_helpers.h index 0d03502791..166fd15372 100644 --- a/src/registration/transform/initialiser_helpers.h +++ b/src/registration/transform/initialiser_helpers.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/reorient.h b/src/registration/transform/reorient.h index a7df1ed4bf..925cf8a547 100644 --- a/src/registration/transform/reorient.h +++ b/src/registration/transform/reorient.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8ed535fa92..e798834f0c 100644 --- a/src/registration/transform/rigid.cpp +++ b/src/registration/transform/rigid.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/registration/transform/rigid.h index 8e30222eb9..924be55388 100644 --- a/src/registration/transform/rigid.h +++ b/src/registration/transform/rigid.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/robust.cpp b/src/registration/transform/robust.cpp index 4c77e00180..1749bf2413 100644 --- a/src/registration/transform/robust.cpp +++ b/src/registration/transform/robust.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a3334f1c80..7abbe5b04d 100644 --- a/src/registration/transform/search.h +++ b/src/registration/transform/search.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 d9dae6ea67..b0d130d2d7 100644 --- a/src/registration/warp/compose.h +++ b/src/registration/warp/compose.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/convert.h b/src/registration/warp/convert.h index caddb16873..a8989cc468 100644 --- a/src/registration/warp/convert.h +++ b/src/registration/warp/convert.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/helpers.h b/src/registration/warp/helpers.h index c335b57de0..150cfa1e77 100644 --- a/src/registration/warp/helpers.h +++ b/src/registration/warp/helpers.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e326c7acb1..4b25c50e9f 100644 --- a/src/registration/warp/invert.h +++ b/src/registration/warp/invert.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.cpp b/src/stats/cfe.cpp index 60600da2be..f088f2830b 100644 --- a/src/stats/cfe.cpp +++ b/src/stats/cfe.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 2bb434974f..fe5eb884d0 100644 --- a/src/stats/cfe.h +++ b/src/stats/cfe.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 63cf0b91c7..a081f2af28 100644 --- a/src/stats/cluster.cpp +++ b/src/stats/cluster.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f35a07fa59..70222c7dcc 100644 --- a/src/stats/cluster.h +++ b/src/stats/cluster.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 22808003ab..b510670bd1 100644 --- a/src/stats/enhance.h +++ b/src/stats/enhance.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 88149bb1b0..03d12dc1ec 100644 --- a/src/stats/permstack.cpp +++ b/src/stats/permstack.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 26557858f2..848973f5ca 100644 --- a/src/stats/permstack.h +++ b/src/stats/permstack.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 7b053a920f..c0ec64ebb1 100644 --- a/src/stats/permtest.cpp +++ b/src/stats/permtest.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 03e144ff98..798ed7391d 100644 --- a/src/stats/permtest.h +++ b/src/stats/permtest.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 0a6a3ee359..3a11dac40d 100644 --- a/src/stats/tfce.cpp +++ b/src/stats/tfce.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e1d99ffbb9..861bfff0ed 100644 --- a/src/stats/tfce.h +++ b/src/stats/tfce.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 625b868dfb..3768406717 100644 --- a/src/surface/algo/image2mesh.h +++ b/src/surface/algo/image2mesh.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,6 +122,7 @@ namespace MR const auto existing = vox2vertindex.find (voxels[in_vertex]); if (existing == vox2vertindex.end()) { triangle_vertices[out_vertex] = vertices.size(); + vox2vertindex.insert(std::make_pair(voxels[in_vertex], vertices.size())); 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 { diff --git a/src/surface/algo/mesh2image.cpp b/src/surface/algo/mesh2image.cpp index d41372060e..49fb1bae2b 100644 --- a/src/surface/algo/mesh2image.cpp +++ b/src/surface/algo/mesh2image.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/mesh2image.h b/src/surface/algo/mesh2image.h index d782c70983..5161bc916b 100644 --- a/src/surface/algo/mesh2image.h +++ b/src/surface/algo/mesh2image.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 6750633d43..e386dc0017 100644 --- a/src/surface/filter/base.cpp +++ b/src/surface/filter/base.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9dd5cc2209..a7608d7331 100644 --- a/src/surface/filter/base.h +++ b/src/surface/filter/base.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 35b9b5520c..2f90d71859 100644 --- a/src/surface/filter/smooth.cpp +++ b/src/surface/filter/smooth.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 dd5288e760..8724650136 100644 --- a/src/surface/filter/smooth.h +++ b/src/surface/filter/smooth.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 bd9b490646..1cc6b7f985 100644 --- a/src/surface/filter/vertex_transform.cpp +++ b/src/surface/filter/vertex_transform.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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.h b/src/surface/filter/vertex_transform.h index bfa2e4c06e..f8f08e1903 100644 --- a/src/surface/filter/vertex_transform.h +++ b/src/surface/filter/vertex_transform.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 bea6525f65..be4f92f4ae 100644 --- a/src/surface/freesurfer.cpp +++ b/src/surface/freesurfer.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 e2d8a5c3bc..d47c8325b0 100644 --- a/src/surface/freesurfer.h +++ b/src/surface/freesurfer.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 51fc4008ba..601d158578 100644 --- a/src/surface/mesh.cpp +++ b/src/surface/mesh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,18 +92,32 @@ namespace MR + namespace { + template + void load_vtk_points_binary (std::ifstream& in, const size_t num_vertices, vector>& out) + { + out.reserve (num_vertices); + Eigen::Matrix v; + for (size_t i = 0; i != num_vertices; ++i) { + in.read (reinterpret_cast(v.data()), 3 * sizeof (T)); + out.push_back (v); + } + } + } + + void Mesh::load_vtk (const std::string& path) { - std::ifstream in (path.c_str(), std::ios_base::in); + std::ifstream in (path.c_str(), std::ios_base::binary); if (!in) throw Exception ("Error opening input file!"); std::string line; // First line: VTK version ID - std::getline (in, line); + MR::getline (in, line); // Strip the version numbers line[23] = line[25] = 'x'; // Verify that the line is correct @@ -111,10 +125,10 @@ namespace MR throw Exception ("Incorrect first line of .vtk file"); // Second line: identifier - std::getline (in, line); + MR::getline (in, line); // Third line: format of data - std::getline (in, line); + MR::getline (in, line); bool is_ascii = false; if (line == "ASCII") is_ascii = true; @@ -122,26 +136,26 @@ namespace MR throw Exception ("unknown data format in .vtk data"); // Fourth line: Data set type - std::getline (in, line); + MR::getline (in, line); if (line.substr(0, 7) != "DATASET") throw Exception ("Error in definition of .vtk dataset"); line = line.substr (8); if (line == "STRUCTURED_POINTS" || line == "STRUCTURED_GRID" || line == "UNSTRUCTURED_GRID" || line == "RECTILINEAR_GRID" || line == "FIELD") throw Exception ("Unsupported dataset type (" + line + ") in .vtk file"); - if (!is_ascii) { - const std::streampos offset = in.tellg(); - in.close(); - in.open (path.c_str(), std::ios_base::in | std::ios_base::binary); - in.seekg (offset); - } + // Won't know endianness of file when the vertex positions are read, + // only when the polygon information is encountered; + bool change_endianness = false; + + // If both float and big-endian, need to store natively as floats and swap endianness later + vector> vertices_float; // From here, don't necessarily know which parts of the data will come first while (!in.eof()) { // Need to read line in either ASCII mode or in raw binary if (is_ascii) { - std::getline (in, line); + MR::getline (in, line); } else { line.clear(); char c = 0; @@ -166,25 +180,22 @@ namespace MR throw Exception ("Error in reading binary .vtk file: Unsupported datatype (\"" + line + "\""); vertices.reserve (num_vertices); - for (int i = 0; i != num_vertices; ++i) { + if (!is_double) + vertices_float.reserve (num_vertices); - Vertex v; - if (is_ascii) { - std::getline (in, line); + Vertex v; + Eigen::Matrix v_float; + + if (is_ascii) { + for (int i = 0; i != num_vertices; ++i) { + MR::getline (in, line); sscanf (line.c_str(), "%lf %lf %lf", &v[0], &v[1], &v[2]); - } else { - if (is_double) { - double data[3]; - in.read (reinterpret_cast(&data[0]), 3 * sizeof (double)); - v = { data[0], data[1], data[2] }; - } else { - float data[3]; - in.read (reinterpret_cast(&data[0]), 3 * sizeof (float)); - v = { data[0], data[1], data[2] }; - } + vertices.push_back (v); } - vertices.push_back (v); - + } else if (is_double) { + load_vtk_points_binary (in, num_vertices, vertices); + } else { + load_vtk_points_binary (in, num_vertices, vertices_float); } } else if (line.substr (0, 8) == "POLYGONS") { @@ -200,14 +211,22 @@ namespace MR int vertex_count; if (is_ascii) { - std::getline (in, line); + MR::getline (in, line); sscanf (line.c_str(), "%u", &vertex_count); } else { in.read (reinterpret_cast(&vertex_count), sizeof (int)); } + if (!is_ascii) { + if (change_endianness) { + vertex_count = ByteOrder::swap (vertex_count); + } else if (vertex_count != 3 && vertex_count != 4) { + vertex_count = ByteOrder::swap (vertex_count); + change_endianness = true; + } + } if (vertex_count != 3 && vertex_count != 4) - throw Exception ("Could not parse file \"" + path + "\"; only suppport 3- and 4-vertex polygons"); + throw Exception ("Could not parse file \"" + path + "\": only support 3- and 4-vertex polygons"); vector t (vertex_count, 0); @@ -237,17 +256,52 @@ namespace MR } } - // TODO If reading a binary file, may want to test endianness of data - // There's no explicit flag for this, but just calculating the standard - // deviations of all vertex positions may be adequate - // (likely to be huge if the endianness is wrong) - // Alternatively, just test the polygon indices: if there's at least one that exceeds the - // number of vertices, it may be saved in big-endian format, so try flipping everything - // Actually, should pop up at the first polygon read: number of points in polygon won't be 3 or 4 + if (!is_ascii) { +#if MRTRIX_IS_BIG_ENDIAN + if (change_endianness) { + WARN("File \"" + path + "\" is little-endian, so is not format-compliant (may have been generated using an older MRtrix3 version); " + "imported contents will be converted to system big-endian"); + } else { + INFO("File \"" + path + "\" is big-endian; no format conversion required as executing on big-endian system"); + } +#else + if (change_endianness) { + INFO("Converting imported contents of file \"" + path + "\" to native little-endian"); + } else { + WARN("File \"" + path + "\" already in native little-endian format, so no endianness conversion required; " + "but file is therefore not format-compliant (may have been generated using an older MRtrix3 version)"); + } +#endif + } + + if (change_endianness) { + for (auto& v : vertices) { + for (size_t i = 0; i != 3; ++i) + v[i] = ByteOrder::swap (v[i]); + } + for (auto& v : vertices_float) { + for (size_t i = 0; i != 3; ++i) + v[i] = ByteOrder::swap (v[i]); + } + for (auto& t : triangles) { + for (size_t i = 0; i != 3; ++i) + t[i] = ByteOrder::swap (t[i]); + } + for (auto& q : quads) { + for (size_t i = 0; i != 4; ++i) + q[i] = ByteOrder::swap (q[i]); + } + } + + if (vertices_float.size()) { + assert (!vertices.size()); + for (const auto& v : vertices_float) + vertices.emplace_back (Vertex (v.cast())); + } try { verify_data(); - } catch(Exception& e) { + } catch (Exception& e) { throw Exception (e, "Error verifying surface data from VTK file \"" + path + "\""); } } @@ -634,66 +688,49 @@ namespace MR ProgressBar progress ("writing mesh to file", vertices.size() + triangles.size() + quads.size()); if (binary) { - // FIXME Binary VTK output _still_ not working (crashes ParaView) - // Can however export as binary then -reconvert to ASCII and al is well...? - // Changed to big-endian output, doesn't seem to have fixed... - out.close(); out.open (path, std::ios_base::out | std::ios_base::app | std::ios_base::binary); - const bool is_double = (sizeof(default_type) == 8); - const std::string str_datatype = is_double ? "double" : "float"; - const std::string points_header ("POINTS " + str(vertices.size()) + " " + str_datatype + "\n"); + const std::string points_header ("POINTS " + str(vertices.size()) + " float\n"); out.write (points_header.c_str(), points_header.size()); - for (VertexList::const_iterator i = vertices.begin(); i != vertices.end(); ++i) { - //float temp[3]; - //for (size_t id = 0; id != 3; ++id) - // MR::putBE ((*i)[id], &temp[id]); - if (is_double) { - const double temp[3] { double((*i)[0]), double((*i)[1]), double((*i)[2]) }; - out.write (reinterpret_cast(temp), 3 * sizeof(double)); - } else { - const float temp[3] { float((*i)[0]), float((*i)[1]), float((*i)[2]) }; - out.write (reinterpret_cast(temp), 3 * sizeof(float)); - } + std::array temp_vertex; + for (const auto& v : vertices) { + temp_vertex = { ByteOrder::BE (float(v[0])), ByteOrder::BE (float(v[1])), ByteOrder::BE (float(v[2])) }; + out.write (reinterpret_cast(&temp_vertex), 3 * sizeof(float)); ++progress; } const std::string polygons_header ("POLYGONS " + str(triangles.size() + quads.size()) + " " + str(4*triangles.size() + 5*quads.size()) + "\n"); out.write (polygons_header.c_str(), polygons_header.size()); - const uint32_t num_points_triangle = 3; - for (TriangleList::const_iterator i = triangles.begin(); i != triangles.end(); ++i) { + const uint32_t num_points_triangle = ByteOrder::BE (uint32_t(3)); + std::array temp_triangle; + for (const auto& t : triangles) { out.write (reinterpret_cast(&num_points_triangle), sizeof(uint32_t)); - //uint32_t temp[3]; - //for (size_t id = 0; id != 3; ++id) - // MR::putBE ((*i)[id], &temp[id]); - const uint32_t temp[3] { (*i)[0], (*i)[1], (*i)[2] }; - out.write (reinterpret_cast(temp), 3 * sizeof(uint32_t)); + temp_triangle = { ByteOrder::BE (t[0]), ByteOrder::BE (t[1]), ByteOrder::BE (t[2]) }; + out.write (reinterpret_cast(&temp_triangle), 3 * sizeof(uint32_t)); ++progress; } - const uint32_t num_points_quad = 4; - for (QuadList::const_iterator i = quads.begin(); i != quads.end(); ++i) { + const uint32_t num_points_quad = ByteOrder::BE (uint32_t(4)); + std::array temp_quad; + for (const auto& q : quads) { out.write (reinterpret_cast(&num_points_quad), sizeof(uint32_t)); - //uint32_t temp[4]; - //for (size_t id = 0; id != 4; ++id) - // MR::putBE ((*i)[id], &temp[id]); - const uint32_t temp[4] { (*i)[0], (*i)[1], (*i)[2], (*i)[3] }; - out.write (reinterpret_cast(temp), 4 * sizeof(uint32_t)); + temp_quad = { ByteOrder::BE (q[0]), ByteOrder::BE (q[1]), ByteOrder::BE (q[2]), ByteOrder::BE (q[3]) }; + out.write (reinterpret_cast(&temp_quad), 4 * sizeof(uint32_t)); ++progress; } } else { out << "POINTS " << str(vertices.size()) << " float\n"; - for (VertexList::const_iterator i = vertices.begin(); i != vertices.end(); ++i) { - out << str((*i)[0]) << " " << str((*i)[1]) << " " << str((*i)[2]) << "\n"; + for (const auto& v : vertices) { + out << str(v[0]) << " " << str(v[1]) << " " << str(v[2]) << "\n"; ++progress; } out << "POLYGONS " + str(triangles.size() + quads.size()) + " " + str(4*triangles.size() + 5*quads.size()) + "\n"; - for (TriangleList::const_iterator i = triangles.begin(); i != triangles.end(); ++i) { - out << "3 " << str((*i)[0]) << " " << str((*i)[1]) << " " << str((*i)[2]) << "\n"; + for (const auto& t : triangles) { + out << "3 " << str(t[0]) << " " << str(t[1]) << " " << str(t[2]) << "\n"; ++progress; } - for (QuadList::const_iterator i = quads.begin(); i != quads.end(); ++i) { - out << "4 " << str((*i)[0]) << " " << str((*i)[1]) << " " << str((*i)[2]) << " " << str((*i)[3]) << "\n"; + for (const auto& q : quads) { + out << "4 " << str(q[0]) << " " << str(q[1]) << " " << str(q[2]) << " " << str(q[3]) << "\n"; ++progress; } diff --git a/src/surface/mesh.h b/src/surface/mesh.h index b40ee721d9..29008090d2 100644 --- a/src/surface/mesh.h +++ b/src/surface/mesh.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 937a049366..598cf1656c 100644 --- a/src/surface/mesh_multi.cpp +++ b/src/surface/mesh_multi.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 ffe204d90f..7ecb7ae56f 100644 --- a/src/surface/mesh_multi.h +++ b/src/surface/mesh_multi.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 f3c842ffab..fcfc71a48e 100644 --- a/src/surface/polygon.cpp +++ b/src/surface/polygon.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 54413f9466..6b00150c9a 100644 --- a/src/surface/polygon.h +++ b/src/surface/polygon.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 a6517d1798..d2df5189b9 100644 --- a/src/surface/scalar.cpp +++ b/src/surface/scalar.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 9136c0e68a..e28f9718da 100644 --- a/src/surface/scalar.h +++ b/src/surface/scalar.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 29033ca5bc..3faadd0372 100644 --- a/src/surface/types.h +++ b/src/surface/types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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/utils.h b/src/surface/utils.h index e00d7425f1..14ca550be4 100644 --- a/src/surface/utils.h +++ b/src/surface/utils.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to the 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 8d168cbc4b..a59a6cca45 100644 --- a/src/wrap_r.h +++ b/src/wrap_r.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/data b/testing/binaries/data index 26b8e57335..7965b150f1 160000 --- a/testing/binaries/data +++ b/testing/binaries/data @@ -1 +1 @@ -Subproject commit 26b8e573353e30e1283d5446495391eaacdd1cf1 +Subproject commit 7965b150f1021a1ad2d1b2ca531c190a7da4173e diff --git a/testing/binaries/tests/dwidenoise b/testing/binaries/tests/dwidenoise index ec3b242eb3..71620b98e3 100644 --- a/testing/binaries/tests/dwidenoise +++ b/testing/binaries/tests/dwidenoise @@ -1,8 +1,8 @@ -dwidenoise dwi.mif - | testing_diff_image - dwidenoise/denoised.mif -voxel 1e-4 -dwidenoise dwi.mif -mask mask.mif - | testing_diff_image - dwidenoise/masked.mif -voxel 1e-4 -dwidenoise dwi.mif -extent 3 - | testing_diff_image - dwidenoise/extent3.mif -voxel 1e-4 -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 - | testing_diff_image - dwidenoise/denoised.mif -voxel 2e-4 +dwidenoise dwi.mif -mask mask.mif - | testing_diff_image - dwidenoise/masked.mif -voxel 2e-4 +dwidenoise dwi.mif -extent 3 - | testing_diff_image - dwidenoise/extent3.mif -voxel 2e-4 +dwidenoise dwi.mif -extent 5,3,1 - | testing_diff_image - dwidenoise/extent531.mif -voxel 2e-4 +dwidenoise dwi.mif -noise tmp-noise.mif - | testing_diff_image - dwidenoise/denoised.mif -voxel 2e-4 && testing_diff_image tmp-noise.mif dwidenoise/noise.mif -image $(mrcalc dwi_mean.mif -abs 2e-4 -mult - | mrfilter - smooth -) +dwidenoise dwi.mif -extent 3 -noise tmp-noise3.mif - | testing_diff_image - dwidenoise/extent3.mif -voxel 2e-4 && testing_diff_image tmp-noise3.mif dwidenoise/noise3.mif -image $(mrcalc dwi_mean.mif -abs 2e-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 -) +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 2e-4 -mult - | mrfilter - smooth -) diff --git a/testing/binaries/tests/mesh2voxel b/testing/binaries/tests/mesh2voxel index fe419fbb18..c893b8c318 100644 --- a/testing/binaries/tests/mesh2voxel +++ b/testing/binaries/tests/mesh2voxel @@ -1 +1 @@ -mesh2voxel meshconvert/in.vtk meshconvert/image.mif.gz - | testing_diff_image - mesh2voxel/out.mif.gz -abs 1.5e-3 +mesh2voxel meshconvert/in_ascii.vtk meshconvert/image.mif.gz - | testing_diff_image - mesh2voxel/out.mif.gz -abs 1.5e-3 diff --git a/testing/binaries/tests/meshconvert b/testing/binaries/tests/meshconvert index 2a762d25bf..38683a4686 100644 --- a/testing/binaries/tests/meshconvert +++ b/testing/binaries/tests/meshconvert @@ -1,10 +1,12 @@ -meshconvert meshconvert/in.vtk tmp.vtk -force && testing_diff_mesh tmp.vtk meshconvert/in.vtk 0.001 -meshconvert meshconvert/in.vtk tmp.vtk -binary -force && testing_diff_mesh tmp.vtk meshconvert/in.vtk 0.001 -meshconvert meshconvert/in.vtk tmp.obj -force && testing_diff_mesh tmp.obj meshconvert/in.vtk 0.001 -meshconvert meshconvert/in.vtk tmp.obj -binary -force && testing_diff_mesh tmp.obj meshconvert/in.vtk 0.001 -meshconvert meshconvert/in.vtk tmp.stl -force && testing_diff_mesh tmp.stl meshconvert/in.vtk 0.001 -meshconvert meshconvert/in.vtk tmp.stl -binary -force && testing_diff_mesh tmp.stl meshconvert/in.vtk 0.001 -meshconvert meshconvert/in.vtk tmp.vtk -transform real2first meshconvert/image.mif.gz -force && testing_diff_mesh tmp.vtk meshconvert/first.vtk 0.001 -meshconvert meshconvert/first.vtk tmp.vtk -transform first2real meshconvert/image.mif.gz -force && testing_diff_mesh tmp.vtk meshconvert/in.vtk 0.001 -meshconvert meshconvert/in.vtk tmp.vtk -transform real2voxel meshconvert/image.mif.gz -force && testing_diff_mesh tmp.vtk meshconvert/voxel.vtk 0.001 -meshconvert meshconvert/voxel.vtk tmp.vtk -transform voxel2real meshconvert/image.mif.gz -force && testing_diff_mesh tmp.vtk meshconvert/in.vtk 0.001 +meshconvert meshconvert/in_ascii.vtk tmp.vtk -force && testing_diff_mesh tmp.vtk meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_ascii.vtk tmp.vtk -binary -force && testing_diff_mesh tmp.vtk meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_ascii.vtk tmp.obj -force && testing_diff_mesh tmp.obj meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_ascii.vtk tmp.obj -binary -force && testing_diff_mesh tmp.obj meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_ascii.vtk tmp.stl -force && testing_diff_mesh tmp.stl meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_ascii.vtk tmp.stl -binary -force && testing_diff_mesh tmp.stl meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_ascii.vtk tmp.vtk -transform real2first meshconvert/image.mif.gz -force && testing_diff_mesh tmp.vtk meshconvert/first.vtk 0.001 +meshconvert meshconvert/first.vtk tmp.vtk -transform first2real meshconvert/image.mif.gz -force && testing_diff_mesh tmp.vtk meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_ascii.vtk tmp.vtk -transform real2voxel meshconvert/image.mif.gz -force && testing_diff_mesh tmp.vtk meshconvert/voxel.vtk 0.001 +meshconvert meshconvert/voxel.vtk tmp.vtk -transform voxel2real meshconvert/image.mif.gz -force && testing_diff_mesh tmp.vtk meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_le.vtk tmp.vtk -force && testing_diff_mesh tmp.vtk meshconvert/in_ascii.vtk 0.001 +meshconvert meshconvert/in_be.vtk tmp.vtk -force && testing_diff_mesh tmp.vtk meshconvert/in_ascii.vtk 0.001 diff --git a/testing/binaries/tests/mrcolour b/testing/binaries/tests/mrcolour index 76fce69c59..fbeb758fc3 100644 --- a/testing/binaries/tests/mrcolour +++ b/testing/binaries/tests/mrcolour @@ -1,11 +1,11 @@ -mrcolour dwi_mean.mif gray - -lower 0.0 | testing_diff_image - $(mrcalc dwi_mean.mif $(mrstats dwi_mean.mif -output max) -div tmp1.mif -force && mrcat tmp1.mif tmp1.mif tmp1.mif -axis 3 -) -frac 1e-5 -mrcolour dwi_mean.mif gray - | testing_diff_image - mrcolour/gray.mif -mrcolour dwi_mean.mif hot - | testing_diff_image - mrcolour/hot.mif -mrcolour dwi_mean.mif cool - | testing_diff_image - mrcolour/cool.mif -mrcolour dwi_mean.mif jet - | testing_diff_image - mrcolour/jet.mif -mrcolour dwi_mean.mif inferno - | testing_diff_image - mrcolour/inferno.mif -mrcolour dwi_mean.mif viridis - | testing_diff_image - mrcolour/viridis.mif -mrcolour dwi_mean.mif pet - | testing_diff_image - mrcolour/pet.mif -mrcolour unit_warp.mif rgb - | testing_diff_image - $(mrcalc unit_warp.mif $(mrstats unit_warp.mif -output max -allvolumes) -div -) -frac 1e-6 -mrcolour dwi_mean.mif gray -upper 80 - | testing_diff_image - mrcolour/upper.mif -mrcolour dwi_mean.mif gray -lower 40 -upper 80 - | testing_diff_image - mrcolour/bothlimits.mif +mrcolour dwi_mean.mif gray - -lower 0.0 | testing_diff_image - $(mrcalc dwi_mean.mif $(mrstats dwi_mean.mif -output max) -div tmp1.mif -force && mrcat tmp1.mif tmp1.mif tmp1.mif -axis 3 -) -abs 1e-5 +mrcolour dwi_mean.mif gray - | testing_diff_image - mrcolour/gray.mif -abs 1e-5 +mrcolour dwi_mean.mif hot - | testing_diff_image - mrcolour/hot.mif -abs 1e-5 +mrcolour dwi_mean.mif cool - | testing_diff_image - mrcolour/cool.mif -abs 1e-5 +mrcolour dwi_mean.mif jet - | testing_diff_image - mrcolour/jet.mif -abs 1e-5 +mrcolour dwi_mean.mif inferno - | testing_diff_image - mrcolour/inferno.mif -abs 1e-5 +mrcolour dwi_mean.mif viridis - | testing_diff_image - mrcolour/viridis.mif -abs 1e-5 +mrcolour dwi_mean.mif pet - | testing_diff_image - mrcolour/pet.mif -abs 1e-5 +mrcolour unit_warp.mif rgb - | testing_diff_image - $(mrcalc unit_warp.mif $(mrstats unit_warp.mif -output max -allvolumes) -div -) -abs 1e-5 +mrcolour dwi_mean.mif gray -upper 80 - | testing_diff_image - mrcolour/upper.mif -abs 1e-5 +mrcolour dwi_mean.mif gray -lower 40 -upper 80 - | testing_diff_image - mrcolour/bothlimits.mif -abs 1e-5 diff --git a/testing/binaries/tests/mrconvert b/testing/binaries/tests/mrconvert index 8d3f6d2f96..e012f18e92 100644 --- a/testing/binaries/tests/mrconvert +++ b/testing/binaries/tests/mrconvert @@ -8,12 +8,22 @@ mrconvert mrconvert/in.mif tmp.nii && testing_diff_image tmp.nii mrconvert/in.m mrconvert mrconvert/in.mif -datatype float32 tmp.nii.gz -force && testing_diff_image tmp.nii.gz mrconvert/in.mif mrconvert mrconvert/in.mif -strides 3,2,1 tmp.mgh && testing_diff_image tmp.mgh mrconvert/in.mif mrconvert mrconvert/in.mif -strides 1,3,2 -datatype int16 tmp.mgz && testing_diff_image tmp.mgz mrconvert/in.mif -mrconvert mrconvert/in.mif tmp-[].png && echo -e "1 0 0 0\n0 1 0 0\n0 0 1 0\n" > tmp.txt && testing_diff_image tmp-[].png $(mrcalc mrconvert/in.mif 0 -max - | mrtransform - -replace tmp.txt -) -mrconvert unit_warp.mif tmp-[].png -datatype uint8 -force && echo -e "1 0 0 0\n0 1 0 0\n0 0 1 0\n" > tmp.txt && testing_diff_image tmp-[].png $(mrcalc unit_warp.mif 0 -max -round - | mrtransform - -replace tmp.txt - | mrconvert - -vox 1,1,1 -) +rm -f tmp-*.png && mrconvert mrconvert/in.mif tmp-[].png && testing_diff_image tmp-[].png $(mrcalc mrconvert/in.mif 0 -max - | mrtransform - -replace identity.txt -) +rm -f tmp-*.png && mrconvert unit_warp.mif tmp-[].png -datatype uint8 && testing_diff_image tmp-[].png $(mrcalc unit_warp.mif 0 -max -round - | mrtransform - -replace identity.txt - | mrconvert - -vox 1,1,1 -) mrconvert dwi.mif tmp-[].mif -force && testing_diff_image dwi.mif tmp-[].mif mrconvert dwi.mif -coord 3 0:2:end tmp1.mif -force && mrconvert tmp-[0:2:66].mif tmp2.mif && testing_diff_header -keyval tmp1.mif tmp2.mif && testing_diff_image tmp1.mif tmp2.mif mrconvert mrcat/voxel[].mih - | testing_diff_header -keyval - mrcat/all_axis0.mif mrconvert mrcat/all_axis3.mif tmp-[].mif -force && testing_diff_header -keyval tmp-0.mif mrcat/voxel1.mih && testing_diff_header -keyval tmp-1.mif mrcat/voxel2.mih && testing_diff_header -keyval tmp-2.mif mrcat/voxel3.mih && testing_diff_header -keyval tmp-3.mif mrcat/voxel4.mih && testing_diff_header -keyval tmp-4.mif mrcat/voxel5.mih && testing_diff_header -keyval tmp-5.mif mrcat/voxel6.mih mrconvert dwi.mif tmp-[]-[].mif -force && testing_diff_image dwi.mif tmp-[]-[].mif mrconvert dwi.mif -coord 3 1:2:end -axes 0:2,-1,3 - | testing_diff_image - mrconvert/dwi_select_axes.mif - +mrinfo template.mif.gz -transform > tmp.txt && mrconvert template.mif.gz tmp[].png -force && mrconvert tmp[].png -vox 2.5 - | mrtransform - -replace tmp.txt - | mrcalc - 255 -div - | testing_diff_image - $(mrcalc template.mif.gz 1.0 -min -) -abs 0.002 +rm -f tmpaxial*.png && mrconvert template.mif.gz -coord 2 9,19,29,39,49 tmpaxial[].png && testing_diff_image tmpaxial[].png mrconvert/pngaxial[].png +mrconvert mrconvert/pngaxial[].png - | testing_diff_image - mrconvert/pngaxial.mif.gz +rm -f tmpcoronal*.png && mrconvert template.mif.gz -coord 1 17,32,47,62,77 -axes 0,2,1 tmpcoronal[].png && testing_diff_image tmpcoronal[].png mrconvert/pngcoronal[].png +mrconvert mrconvert/pngcoronal[].png - | testing_diff_image - $(mrconvert mrconvert/pngcoronal.mif.gz -axes 0,2,1 -) +rm -f tmpsagittal*.png && mrconvert template.mif.gz -coord 0 27,47,67 -axes 1,2,0 tmpsagittal[].png && testing_diff_image tmpsagittal[].png mrconvert/pngsagittal[].png +mrconvert mrconvert/pngsagittal[].png - | testing_diff_image - $(mrconvert mrconvert/pngsagittal.mif.gz -axes 1,2,0 -) +rm -f tmpmask*.png && mrconvert mask.mif tmpmask[].png && testing_diff_image tmpmask[].png mrconvert/pngmask[].png +mrconvert mrconvert/pngmask[].png - | testing_diff_image - mrconvert/pngmask.mif.gz +rm -f tmptissues*.png && mrconvert dwi2fod/msmt/tissues.mif tmprgb[].png && testing_diff_image tmprgb[].png mrconvert/pngrgb[].png +mrconvert mrconvert/pngrgb[].png - | testing_diff_image - $(mrconvert dwi2fod/msmt/tissues.mif -vox 1,1,1 - | mrtransform - -replace identity.txt - | mrcalc - 255 -mult -round 255 -min -) diff --git a/testing/binaries/tests/tckresample b/testing/binaries/tests/tckresample index c902b93c67..0aa0857079 100644 --- a/testing/binaries/tests/tckresample +++ b/testing/binaries/tests/tckresample @@ -1,5 +1,5 @@ tckresample tracks.tck tmp.tck -upsample 2 -force && testing_diff_tck tmp.tck tckresample/upsample.tck tckresample tracks.tck tmp.tck -downsample 2 -force && testing_diff_tck tmp.tck tckresample/downsample.tck -tckresample tracks.tck tmp.tck -step_size 0.9 -force && testing_diff_tck tmp.tck tckresample/stepsize.tck -tckresample tracks.tck tmp.tck -num_points 10 -force && testing_diff_tck tmp.tck tckresample/numpoints.tck +tckresample tracks.tck tmp.tck -step_size 0.9 -force && testing_diff_tck tmp.tck tckresample/stepsize.tck -distance 2e-3 +tckresample tracks.tck tmp.tck -num_points 10 -force && testing_diff_tck tmp.tck tckresample/numpoints.tck -distance 1e-3 tckresample tracks.tck tmp.tck -endpoints -force && testing_diff_tck tmp.tck tckresample/endpoints.tck diff --git a/testing/binaries/tests/vectorstats b/testing/binaries/tests/vectorstats index 4c0c8678c7..1499f630db 100644 --- a/testing/binaries/tests/vectorstats +++ b/testing/binaries/tests/vectorstats @@ -1,7 +1,7 @@ #N=16 SNR=5 vectorstats/gen0.py && vectorstats tmpsubjects.txt tmpdesign.csv tmpcontrast.csv tmpout -ftests tmpftests.csv -force && vectorstats/test0.py vectorstats vectorstats/0/subjects.txt vectorstats/0/design.csv vectorstats/0/contrast.csv tmpout -ftests vectorstats/0/ftests.csv -force && testing_diff_matrix tmpoutFvalue_F1.csv vectorstats/0/outFvalue_F1.csv -frac 1e-6 && testing_diff_matrix tmpoutFvalue_F2.csv vectorstats/0/outFvalue_F2.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_F1.csv vectorstats/0/outZstat_F1.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_F2.csv vectorstats/0/outZstat_F2.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t1.csv vectorstats/0/outZstat_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t2.csv vectorstats/0/outZstat_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t3.csv vectorstats/0/outZstat_t3.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t1.csv vectorstats/0/outabs_effect_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t2.csv vectorstats/0/outabs_effect_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t3.csv vectorstats/0/outabs_effect_t3.csv -frac 1e-6 && testing_diff_matrix tmpoutbetas.csv vectorstats/0/outbetas.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_dev.csv vectorstats/0/outstd_dev.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t1.csv vectorstats/0/outstd_effect_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t2.csv vectorstats/0/outstd_effect_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t3.csv vectorstats/0/outstd_effect_t3.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t1.csv vectorstats/0/outtvalue_t1.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t2.csv vectorstats/0/outtvalue_t2.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t3.csv vectorstats/0/outtvalue_t3.csv -frac 1e-6 && vectorstats/test0.py #N=16 SNR=5 vectorstats/gen1.py && vectorstats tmpsubjects.txt tmpdesign.csv tmpcontrast.csv tmpout -errors ise -force && && vectorstats/test1.py -vectorstats vectorstats/1/subjects.txt vectorstats/1/design.csv vectorstats/1/contrast.csv tmpout -errors ise -force && testing_diff_matrix tmpoutZstat_t1.csv vectorstats/1/outZstat_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t2.csv vectorstats/1/outZstat_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t1.csv vectorstats/1/outabs_effect_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t2.csv vectorstats/1/outabs_effect_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutbetas.csv vectorstats/1/outbetas.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_dev.csv vectorstats/1/outstd_dev.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t1.csv vectorstats/1/outstd_effect_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t2.csv vectorstats/1/outstd_effect_t2.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t1.csv vectorstats/1/outtvalue_t1.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t2.csv vectorstats/1/outtvalue_t2.csv && vectorstats/test1.py +vectorstats vectorstats/1/subjects.txt vectorstats/1/design.csv vectorstats/1/contrast.csv tmpout -errors ise -force && testing_diff_matrix tmpoutZstat_t1.csv vectorstats/1/outZstat_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t2.csv vectorstats/1/outZstat_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t1.csv vectorstats/1/outabs_effect_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t2.csv vectorstats/1/outabs_effect_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutbetas.csv vectorstats/1/outbetas.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_dev.csv vectorstats/1/outstd_dev.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t1.csv vectorstats/1/outstd_effect_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t2.csv vectorstats/1/outstd_effect_t2.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t1.csv vectorstats/1/outtvalue_t1.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t2.csv vectorstats/1/outtvalue_t2.csv -frac 1e-6 && vectorstats/test1.py #N=16 SNR=5 vectorstats/gen2.py && vectorstats tmpsubjects.txt tmpdesign.csv tmpcontrast.csv tmpout -column tmpcolumn.txt -ftests tmpftests.csv -force && vectorstats/test2.py vectorstats vectorstats/2/subjects.txt vectorstats/2/design.csv vectorstats/2/contrast.csv tmpout -column vectorstats/2/column.txt -ftests vectorstats/2/ftests.csv -force && testing_diff_matrix tmpoutFvalue_F1.csv vectorstats/2/outFvalue_F1.csv -frac 1e-6 && testing_diff_matrix tmpoutFvalue_F2.csv vectorstats/2/outFvalue_F2.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_F1.csv vectorstats/2/outZstat_F1.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_F2.csv vectorstats/2/outZstat_F2.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t1.csv vectorstats/2/outZstat_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t2.csv vectorstats/2/outZstat_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t3.csv vectorstats/2/outZstat_t3.csv -frac 1e-6 && testing_diff_matrix tmpoutZstat_t4.csv vectorstats/2/outZstat_t4.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t1.csv vectorstats/2/outabs_effect_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t2.csv vectorstats/2/outabs_effect_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t3.csv vectorstats/2/outabs_effect_t3.csv -frac 1e-6 && testing_diff_matrix tmpoutabs_effect_t4.csv vectorstats/2/outabs_effect_t4.csv -frac 1e-6 && testing_diff_matrix tmpoutbetas.csv vectorstats/2/outbetas.csv -frac 1e-6 && testing_diff_matrix tmpoutcond.csv vectorstats/2/outcond.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_dev.csv vectorstats/2/outstd_dev.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t1.csv vectorstats/2/outstd_effect_t1.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t2.csv vectorstats/2/outstd_effect_t2.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t3.csv vectorstats/2/outstd_effect_t3.csv -frac 1e-6 && testing_diff_matrix tmpoutstd_effect_t4.csv vectorstats/2/outstd_effect_t4.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t1.csv vectorstats/2/outtvalue_t1.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t2.csv vectorstats/2/outtvalue_t2.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t3.csv vectorstats/2/outtvalue_t3.csv -frac 1e-6 && testing_diff_matrix tmpouttvalue_t4.csv vectorstats/2/outtvalue_t4.csv -frac 1e-6 && vectorstats/test2.py #N=16 SNR=5 vectorstats/gen3.py && vectorstats tmpsubjects.txt tmpdesign.csv tmpcontrast.csv tmpout -errors ise -force && vectorstats/test3.py diff --git a/testing/cmd/testing_diff_dir.cpp b/testing/cmd/testing_diff_dir.cpp index 1e0b4070d5..56d5938cc2 100644 --- a/testing/cmd/testing_diff_dir.cpp +++ b/testing/cmd/testing_diff_dir.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 56ef766f22..558d79b968 100644 --- a/testing/cmd/testing_diff_fixel.cpp +++ b/testing/cmd/testing_diff_fixel.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 b14422f1d5..a047cbf364 100644 --- a/testing/cmd/testing_diff_fixel_old.cpp +++ b/testing/cmd/testing_diff_fixel_old.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 7a3a354610..70dfd784a9 100644 --- a/testing/cmd/testing_diff_header.cpp +++ b/testing/cmd/testing_diff_header.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 0e6f56681a..6dc0f84a41 100644 --- a/testing/cmd/testing_diff_image.cpp +++ b/testing/cmd/testing_diff_image.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 e563c08d75..a888a334af 100644 --- a/testing/cmd/testing_diff_matrix.cpp +++ b/testing/cmd/testing_diff_matrix.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 dadaa36507..49d757a28d 100644 --- a/testing/cmd/testing_diff_mesh.cpp +++ b/testing/cmd/testing_diff_mesh.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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_peaks.cpp b/testing/cmd/testing_diff_peaks.cpp index 7fcbfc6e8b..1e1c69519a 100644 --- a/testing/cmd/testing_diff_peaks.cpp +++ b/testing/cmd/testing_diff_peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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_tck.cpp b/testing/cmd/testing_diff_tck.cpp index 33e37837ac..9a85beb690 100644 --- a/testing/cmd/testing_diff_tck.cpp +++ b/testing/cmd/testing_diff_tck.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form 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,8 +49,8 @@ void usage () "distance to the nearest streamline in the second file compared against the threshold."; ARGUMENTS - + Argument ("tck1", "the file from which all tracks will be checked.").type_file_in () - + Argument ("tck2", "the reference track file").type_file_in (); + + Argument ("tck1", "the file from which all tracks will be checked.").type_tracks_in () + + Argument ("tck2", "the reference track file").type_tracks_in (); OPTIONS + Option ("distance", "maximum permissible Hausdorff distance in mm (default: " + str(DEFAULT_HAUSDORFF) + "mm)") diff --git a/testing/cmd/testing_diff_tsf.cpp b/testing/cmd/testing_diff_tsf.cpp index 17ffe8378f..4bbd19c643 100644 --- a/testing/cmd/testing_diff_tsf.cpp +++ b/testing/cmd/testing_diff_tsf.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 61e6d9e903..1db88d11ea 100644 --- a/testing/cmd/testing_gen_data.cpp +++ b/testing/cmd/testing_gen_data.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 738965a3c1..0fb0be9d47 100644 --- a/testing/cmd/testing_unit_tests_bitset.cpp +++ b/testing/cmd/testing_unit_tests_bitset.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 0e8316a91b..5b9cdf1cd7 100644 --- a/testing/cmd/testing_unit_tests_erfinv.cpp +++ b/testing/cmd/testing_unit_tests_erfinv.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 9580811036..6ea900e525 100644 --- a/testing/cmd/testing_unit_tests_icls.cpp +++ b/testing/cmd/testing_unit_tests_icls.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 082136e7dd..1a39b4f4a3 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 33cb9cffa5..6f03a0916e 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 1547a1df54..00cb2f7318 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 8d0d366556..fd5ef95833 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 e014b1133e..d4f6751098 100644 --- a/testing/cmd/testing_unit_tests_shuffle.cpp +++ b/testing/cmd/testing_unit_tests_shuffle.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 fe9abfe15e..d75a43bafe 100644 --- a/testing/cmd/testing_unit_tests_to.cpp +++ b/testing/cmd/testing_unit_tests_to.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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/pylint.rc b/testing/pylint.rc index e076678b98..3a2ecd6d68 100644 --- a/testing/pylint.rc +++ b/testing/pylint.rc @@ -173,14 +173,14 @@ missing-member-max-choices=1 [BASIC] -# Naming hint for argument names -argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ +# Naming style for argument names +argument-naming-style=snake_case # Regular expression matching correct argument names argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ -# Naming hint for attribute names -attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ +# Naming style for attribute names +attr-naming-style=snake_case # Regular expression matching correct attribute names attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ @@ -188,20 +188,20 @@ attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ # Bad variable names which should always be refused, separated by a comma bad-names=foo,bar,baz,toto,tutu,tata -# Naming hint for class attribute names -class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ +# Naming style for class attribute names +class-attribute-naming-style=any # Regular expression matching correct class attribute names class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ -# Naming hint for class names -class-name-hint=[A-Z_][a-zA-Z0-9]+$ +# Naming style for class names +class-naming-style=PascalCase # Regular expression matching correct class names class-rgx=[A-Z_][a-zA-Z0-9]+$ -# Naming hint for constant names -const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ +# Naming style for constant names +const-naming-style=UPPER_CASE # Regular expression matching correct constant names const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ @@ -210,8 +210,8 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ # ones are exempt. docstring-min-length=-1 -# Naming hint for function names -function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ +# Naming style for function names +function-naming-style=snake_case # Regular expression matching correct function names function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ @@ -222,20 +222,20 @@ good-names=i,j,k,ex,Run,_ # Include a hint for the correct naming format with invalid-name include-naming-hint=no -# Naming hint for inline iteration names -inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ +# Naming style for inline iteration names +inlinevar-naming-style=any # Regular expression matching correct inline iteration names inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ -# Naming hint for method names -method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ +# Naming style for method names +method-naming-style=snake_case # Regular expression matching correct method names method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ -# Naming hint for module names -module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ +# Naming style for module names +module-naming-style=snake_case # Regular expression matching correct module names # Note: Required modification in order to accept "5ttgen" @@ -254,8 +254,8 @@ no-docstring-rgx=^_ # to this list to register other decorators that produce valid properties. property-classes=abc.abstractproperty -# Naming hint for variable names -variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ +# Naming style for variable names +variable-naming-style=snake_case # Regular expression matching correct variable names variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ @@ -323,7 +323,8 @@ max-module-lines=1000 # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. # `trailing-comma` allows a space between comma and closing bracket: (a, ). # `empty-line` allows space-only lines. -no-space-check=trailing-comma,dict-separator +# Deprecated in Pylint 2.6 +#no-space-check=trailing-comma,dict-separator # Allow the body of a class to be on the same line as the declaration if body # contains single statement. @@ -420,4 +421,4 @@ known-third-party=enchant # Exceptions that will emit a warning when being caught. Defaults to # "Exception" -overgeneral-exceptions=Exception +overgeneral-exceptions=builtins.Exception diff --git a/testing/scripts/tests/dwifslpreproc b/testing/scripts/tests/dwifslpreproc index fa3a742d3c..dbc9f3cf58 100644 --- a/testing/scripts/tests/dwifslpreproc +++ b/testing/scripts/tests/dwifslpreproc @@ -1,4 +1,5 @@ mkdir -p ../tmp/dwifslpreproc && mrconvert BIDS/sub-04/dwi/sub-04_dwi.nii.gz -fslgrad BIDS/sub-04/dwi/sub-04_dwi.bvec BIDS/sub-04/dwi/sub-04_dwi.bval -json_import BIDS/sub-04/dwi/sub-04_dwi.json tmp-sub-04_dwi.mif -export_grad_mrtrix tmp-sub-04_dwi.b -strides 0,0,0,1 && dwifslpreproc tmp-sub-04_dwi.mif ../tmp/dwifslpreproc/rpenone_default.mif -pe_dir ap -readout_time 0.1 -rpe_none -force && testing_diff_header ../tmp/dwifslpreproc/rpenone_default.mif dwifslpreproc/rpenone_default.mif.gz +mrconvert tmp-sub-04_dwi.mif -clear_property TotalReadoutTime tmp-sub-04_trt-none_dwi.mif && dwifslpreproc tmp-sub-04_trt-none ../tmp/dwifslpreproc/no_trt_header.mif -pe_dir ap -readout_time 0.1 -force dwifslpreproc BIDS/sub-04/dwi/sub-04_dwi.nii.gz -fslgrad BIDS/sub-04/dwi/sub-04_dwi.bvec BIDS/sub-04/dwi/sub-04_dwi.bval ../tmp/dwifslpreproc/fslgrad.mif -export_grad_fsl ../tmp/dwifslpreproc/fslgrad.bvec ../tmp/dwifslpreproc/fslgrad.bval -pe_dir ap -readout_time 0.1 -rpe_none -force && testing_diff_header ../tmp/dwifslpreproc/fslgrad.mif dwifslpreproc/rpenone_default.mif.gz && testing_diff_matrix ../tmp/dwifslpreproc/fslgrad.bvec dwifslpreproc/rpenone_default.bvec -abs 1e-2 && testing_diff_matrix ../tmp/dwifslpreproc/fslgrad.bval dwifslpreproc/rpenone_default.bval dwifslpreproc BIDS/sub-04/dwi/sub-04_dwi.nii.gz -grad tmp-sub-04_dwi.b ../tmp/dwifslpreproc/grad.mif -export_grad_mrtrix ../tmp/dwifslpreproc/grad.b -pe_dir ap -readout_time 0.1 -rpe_none -force && testing_diff_header ../tmp/dwifslpreproc/grad.mif dwifslpreproc/rpenone_default.mif.gz && testing_diff_matrix ../tmp/dwifslpreproc/grad.b dwifslpreproc/rpenone_default.b -abs 1e-2 mrconvert BIDS/sub-04/fmap/sub-04_dir-1_epi.nii.gz -json_import BIDS/sub-04/fmap/sub-04_dir-1_epi.json tmp-sub-04_dir-1_epi.mif -force && mrconvert BIDS/sub-04/fmap/sub-04_dir-2_epi.nii.gz -json_import BIDS/sub-04/fmap/sub-04_dir-2_epi.json tmp-sub-04_dir-2_epi.mif -force && mrcat tmp-sub-04_dir-1_epi.mif tmp-sub-04_dir-2_epi.mif tmp-sub-04_dir-all_epi.mif -axis 3 -force && dwifslpreproc tmp-sub-04_dwi.mif ../tmp/dwifslpreproc/rpepair_default.mif -pe_dir ap -readout_time 0.1 -rpe_pair -se_epi tmp-sub-04_dir-all_epi.mif -force && testing_diff_header ../tmp/dwifslpreproc/rpepair_default.mif dwifslpreproc/rpepair_default.mif.gz diff --git a/testing/src/diff_images.h b/testing/src/diff_images.h index 654766c330..e60f5da1dc 100644 --- a/testing/src/diff_images.h +++ b/testing/src/diff_images.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 aca3cfb469..1deaa2702a 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-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 d05b5ce898..0e7640b1bd 100644 --- a/testing/src/unit_tests/unit_test.h +++ b/testing/src/unit_tests/unit_test.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2008-2023 the MRtrix3 contributors. +/* Copyright (c) 2008-2025 the MRtrix3 contributors. * * This Source Code Form is subject to 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 626719eccc..d777df0a73 100755 --- a/update_copyright +++ b/update_copyright @@ -1,6 +1,6 @@ #!/usr/bin/env python -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to 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_dev_doc b/update_dev_doc index 519bba9e8a..ce68e6e6d4 100755 --- a/update_dev_doc +++ b/update_dev_doc @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright (c) 2008-2023 the MRtrix3 contributors. +# Copyright (c) 2008-2025 the MRtrix3 contributors. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this