Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
b855539
5ttcheck: Fix terminal message RE: -voxels option
Lestropie Dec 3, 2021
e1c372d
Fix for mrview / singularity / NVIDIA
celstark Jan 10, 2023
ddca256
-export_grad_fsl: Clamp some b-values to zero
Lestropie Mar 14, 2023
ba633f8
Added file / changes missing from ddca2562
Lestropie Mar 14, 2023
0703abe
fsl.check_first(): Second attempt at refinement
Lestropie Mar 22, 2023
18e5910
fsl.check_first() fixes
Lestropie Mar 22, 2023
f8477aa
fsl.check_first(): Use dummy fsl_sub job to detect completion
Lestropie Mar 24, 2023
7a661ad
fsl.check_first(): pylint fixes
Lestropie Mar 27, 2023
039277f
fod2fixel: Fix -fmls_lobe_merge_ratio
Lestropie May 21, 2023
5326435
Docs: Fix missing boolean types in full usage
Lestropie Aug 11, 2023
ba177bd
mrinfo: Update author email
Lestropie Aug 29, 2023
692ee90
for_each: Add example usage demonstrating shell operator escape
Lestropie Sep 25, 2023
fb1ce4f
configure: strip FSL from PATH
jdtournier Oct 11, 2023
30bf591
DICOM: add null imageIO handler to allow parsing of DICOM data even w…
jdtournier Dec 4, 2023
aef44bb
Fix indentation in core/file/dicom/mapper.cpp
jdtournier Dec 5, 2023
f97d3ca
Reslice adapter: allow use with complex numbers
jdtournier Dec 13, 2023
ed9462b
Adapter::Reslice: Alternative resolution of complex summation
Lestropie Jan 23, 2024
57c0579
DICOM: Improve documentation RE unsupported transfer syntaxes
Lestropie Jan 23, 2024
4e6c6cf
Merge remote-tracking branch 'origin/master' into allow_DICOM_header_…
Lestropie Jan 23, 2024
1e71049
Update copyright to 2024 for new files in #2767
MRtrixBot Jan 23, 2024
3732dbc
dwifslpreproc: Fix for PE direction, but not readout time, in header
Lestropie Jan 29, 2024
c7e5de4
mrgrid: Fix help for -as option
Lestropie Jan 31, 2024
de90863
run.command(): Do not hide list inputs
Lestropie Feb 13, 2024
7f1d7ea
Merge branch 'master' into allow_DICOM_header_read_with_unsupported_t…
jdtournier Mar 5, 2024
f55a1ed
Add nightly checks with sanitizers
daljit46 Nov 30, 2023
88c9367
Merge pull request #2785 from MRtrix3/reslice_complex_alternative
jdtournier May 2, 2024
45871d5
Merge branch 'master' into fix_reslice_adapter_for_complex
jdtournier May 2, 2024
4e87c73
Change schedule to weekly
daljit46 Jan 26, 2024
1ca89c9
Change sanitizers workflow name
daljit46 May 9, 2024
c52504b
Merge pull request #2768 from MRtrix3/fix_reslice_adapter_for_complex
Lestropie May 9, 2024
fb4dd43
Merge pull request #2763 from MRtrix3/san_checks
Lestropie May 9, 2024
ca55d14
-json_export: Fix slice encoding direction sign
Lestropie May 13, 2024
bd4d011
Merge pull request #2794 from MRtrix3/mrgrid_docs_fix
bjeurissen May 15, 2024
64ca1e4
Merge pull request #2803 from MRtrix3/script_logs_no_list_collapse
bjeurissen May 15, 2024
4c0fd18
Merge pull request #2721 from MRtrix3/foreach_shell_escape_example
bjeurissen May 15, 2024
48f5773
Merge pull request #2698 from MRtrix3/mrinfo_author
bjeurissen May 15, 2024
8b2f58f
Merge pull request #2638 from MRtrix3/fod2fixel_merge_option
bjeurissen May 15, 2024
eae81d5
Update sanitizers workflow following testing changes
daljit46 May 15, 2024
3f285b0
Merge pull request #2904 from MRtrix3/fix_san_checks
Lestropie May 15, 2024
ce2832d
DICOM command-line selection: abort on error reading from std::cin
jdtournier May 15, 2024
66b33fb
mrcalc: Support -config option
Lestropie May 20, 2024
eefb9ac
Merge pull request #2910 from MRtrix3/mrcalc_config
jdtournier May 20, 2024
ad46893
First DWI metadata reimplementation passing all private tests
Lestropie May 28, 2024
0c0f192
New namespace MR::Metadata
Lestropie May 28, 2024
b4ad5ab
Metadata: New source file for slice encoding
Lestropie May 29, 2024
11a4439
Changes to header realignment handling
Lestropie May 29, 2024
2fc1047
Multiple changes for altered metadata handling
Lestropie May 29, 2024
e38570c
Metadata::PhaseEncoding: Reduce unnecessary templating
Lestropie May 29, 2024
54968cf
Metadata: Make use of realignment transform matrix
Lestropie May 29, 2024
e411e32
transformconvert flirt_import: Use on-disk transform
Lestropie Jun 8, 2024
5aaec61
meshconvert -transform fs2real: Use on-disk transform
Lestropie Jun 8, 2024
269bbf9
Fixes to containers FSL dependency
Lestropie Jun 19, 2024
15e558f
mrdegibbs: update doc to soften warning about partial Fourier
jdtournier Jun 19, 2024
d0c3cce
Update cmd/mrdegibbs.cpp
jdtournier Jun 20, 2024
3c97a26
mrdegibbs: update RST docs following previous changes
jdtournier Jun 20, 2024
a53279c
Merge pull request #2923 from MRtrix3/mrdegibbs_update_doc
Lestropie Jun 20, 2024
01a8a9e
Don't corrupt LD_LIBRARY_PATH with FSL content
Lestropie Jun 24, 2024
a63d6fa
ProgressBar: Simple update method where stderr is pipe
Lestropie Jun 27, 2024
5c788a7
Merge pull request #2935 from MRtrix3/fix_progressbar_when_piping
jdtournier Jun 27, 2024
6ef1584
New workflow for releases
daljit46 Jun 25, 2024
cd4efe8
Clone Windows source using Github Actions
daljit46 Jun 27, 2024
f3c96e0
Remove extension from artefact names
daljit46 Jul 1, 2024
69ee9cc
Merge pull request #2933 from MRtrix3/releases
daljit46 Jul 10, 2024
bfa00fc
Deprecated distutils module in Python 3.12
Lestropie Jul 30, 2024
e7f540b
Merge pull request #2948 from MRtrix3/no_distutils
Lestropie Jul 31, 2024
f3ea8cf
dwi2tensor: Preserve dw_scheme for -predicted_signal
Lestropie Aug 5, 2024
b84625a
Windows: Delayed writeback to host
Lestropie Aug 14, 2024
7935966
Merge pull request #2962 from MRtrix3/wsl_disable_mmap
Lestropie Aug 15, 2024
9ad39a8
mrtrix3.path.wait_for(): Fix variable ghosting
Lestropie Aug 17, 2024
e866aa4
mrtrix3.path.wait_for(): Fix sleep timing
Lestropie Aug 17, 2024
b0c66b5
Pipe image format: Revise error message
Lestropie Mar 14, 2023
fb66ec3
Merge pull request #2600 from MRtrix3/output_pipe_error_message
Lestropie Sep 16, 2024
ccbb9a4
population_template: Fix aggregation weights import
Lestropie Sep 17, 2024
1927d79
population_template: pylint fix
Lestropie Sep 18, 2024
53a84e3
Python: Pylint fix consider-using-generator
Lestropie Sep 18, 2024
a5a76ad
-export_grad_fsl fix for highly non-RAS acquisitions
Lestropie May 21, 2024
339ea0c
DWI metadata fixes
Lestropie Sep 19, 2024
7dfb6ec
JSON export: More exclusion of gradient table
Lestropie Sep 19, 2024
b160d21
JSON import: Preserve precision of numerical types
Lestropie Sep 19, 2024
01a09b8
Merge remote-tracking branch 'origin/master' into dwi_metadata_master
Lestropie Sep 19, 2024
2be257c
Fixes to bvecs import
Lestropie Sep 22, 2024
b1caea0
Minor tweaks to DWI metadata handling changes
Lestropie Oct 3, 2024
2991bed
Tolerance for dw_scheme differences on header merge
Lestropie Oct 22, 2024
79c4ba4
Fixes to new transform realignment handling
Lestropie Nov 16, 2024
fc0e8f1
Handle inconsistent phase encoding on non-volume concatenation
Lestropie Nov 16, 2024
a8cb9c1
update dockerfile without slim and eddyqc fix
arnaudbore Nov 20, 2024
6231541
Merge pull request #2955 from MRtrix3/dwi2tensor_predicted_dwscheme
Lestropie Nov 20, 2024
d258268
Merge pull request #2908 from MRtrix3/dicom_cmdline_selector_abort_on…
Lestropie Nov 20, 2024
89dd8cb
check_syntax fix for #3027
Lestropie Nov 20, 2024
9f522eb
Update docs/installation/using_containers.rst
bjeurissen Nov 20, 2024
50a5e04
Merge pull request #3001 from MRtrix3/population_template_aggweights
Lestropie Nov 20, 2024
5c45774
Merge pull request #3005 from MRtrix3/python_generators
Lestropie Nov 20, 2024
58c1e6b
Merge pull request #2693 from MRtrix3/bool_args_documentation
Lestropie Nov 20, 2024
9511d7e
Merge branch 'master' into update_docker
arnaudbore Nov 20, 2024
3106ae1
Merge branch 'master' into 5ttcheck_voxels_option
Lestropie Nov 21, 2024
c852831
Merge pull request #2713 from MRtrix3/png_axes_fix
Lestropie Nov 21, 2024
13884ec
Merge pull request #2411 from MRtrix3/5ttcheck_voxels_option
Lestropie Nov 21, 2024
6249ad2
restore slim version and add procps
arnaudbore Nov 21, 2024
e8ca0be
Merge pull request #2729 from MRtrix3/strip_fsl_from_path
Lestropie Nov 23, 2024
05d7f1a
Dockerfile: Fix capitalisation
Lestropie Nov 23, 2024
58da147
Added info about consequences of using -white_stem in 5ttgen hsvs
Nov 23, 2024
c9bdac0
Merge pull request #2559 from celstark/celstark-patch-1
bjeurissen Nov 24, 2024
4fbef98
Merge pull request #2929 from MRtrix3/container_eddyqc_fix
jdtournier Nov 26, 2024
04699ce
merge master
arnaudbore Nov 26, 2024
35dc21e
Merge pull request #3039 from arnaudbore/update_docker
jdtournier Nov 26, 2024
f148613
DICOM: ignore image positioning tags if nested within Philips private…
jdtournier Nov 26, 2024
ca0276b
voxel2mesh: No threshold optimisation message if manually specified
Lestropie Dec 2, 2024
f666c76
voxel2mesh -blocky: Fix triangulation
Lestropie Dec 2, 2024
fc5eca5
Pylint fixes for master branch
Lestropie Dec 26, 2024
ac3436a
Multiple pylint fixes for master
Lestropie Dec 26, 2024
8aa714c
pylint: Disable detection of "pipes" deprecated module
Lestropie Dec 26, 2024
d79d72a
CI: Disable Python2 compatibility checks
Lestropie Dec 26, 2024
f062cd9
Fix compilation where VLA is not available
Lestropie Dec 27, 2024
abe2a43
CI: Install libpng on Linux for mrconvert tests
Lestropie Dec 27, 2024
049bf05
Update copyright to 2025
MRtrixBot Jan 7, 2025
4040c17
Merge pull request #3054 from MRtrix3/pylint_master
Lestropie Jan 7, 2025
81fb692
Merge pull request #3042 from MRtrix3/5ttgen_hsvs_whitestem_description
Lestropie Feb 5, 2025
ebbed77
Merge pull request #2722 from MRtrix3/dwifslpreproc_no_readouttime_in…
Lestropie Feb 5, 2025
ff2dedf
Merge pull request #2968 from MRtrix3/path_waitfor_ghosting
Lestropie Feb 5, 2025
45d970a
Merge pull request #3049 from MRtrix3/voxel2mesh_fixes
Lestropie Feb 6, 2025
0f1504e
Merge remote-tracking branch 'origin/master' into check_first_taketwo
Lestropie Feb 6, 2025
be4bdaa
dwi2tensor: Fix weights recalculation
Lestropie Dec 30, 2024
2e54543
Import fixed test data for dwi2tensor with -iter 1
Lestropie Feb 7, 2025
818a542
Merge pull request #3056 from MRtrix3/dwi2tensor_iter1_fix
Lestropie Feb 7, 2025
6d13f42
Merge remote-tracking branch 'origin/master' into allow_DICOM_header_…
Lestropie Feb 9, 2025
6b9957a
Copyright update for #2767
MRtrixBot Feb 9, 2025
5c3d62d
Merge pull request #2767 from MRtrix3/allow_DICOM_header_read_with_un…
Lestropie Feb 10, 2025
4bcc570
Merge remote-tracking branch 'origin/master' into bval_clamp_zero
Lestropie Feb 11, 2025
ecaacef
Fix CI tests for #2602
Lestropie Feb 12, 2025
f95eb89
Merge pull request #3027 from MRtrix3/header_merge_dwscheme
jdtournier Feb 12, 2025
3af4fe8
Merge pull request #3047 from MRtrix3/fix_philips_enhanced_dicom_posi…
Lestropie Feb 13, 2025
44c48a4
Fix tck writer when a single streamline exceed the buffer size
jdtournier Mar 10, 2025
70da007
Merge pull request #3071 from MRtrix3/fix_tck_writer_large_streamline
Lestropie Mar 13, 2025
d4df543
Merge remote-tracking branch 'github/master' into dwi_metadata_master
jdtournier Apr 2, 2025
880d398
minor fixes following metadata changeset
jdtournier Apr 2, 2025
4756c56
Copyright update for #3011
MRtrixBot Apr 2, 2025
a932e7e
Merge pull request #3011 from MRtrix3/dwi_metadata_master
daljit46 Apr 3, 2025
cf7e637
Merge remote-tracking branch 'github/master' into bval_clamp_zero
jdtournier Apr 7, 2025
955e4ab
remove redundant core/dwi/dwi.h, and fix typo in macro
jdtournier Apr 7, 2025
52f07f0
Merge branch 'master' into check_first_taketwo
jdtournier Apr 8, 2025
c5d9bce
Merge pull request #2609 from MRtrix3/check_first_taketwo
jdtournier Apr 8, 2025
b489bef
Merge branch 'master' into bval_clamp_zero
jdtournier Apr 8, 2025
7843bfc
Merge pull request #2602 from MRtrix3/bval_clamp_zero
daljit46 Apr 9, 2025
0795ee2
Fix MacOS anaconda packaging script
daljit46 Apr 9, 2025
b0a19cb
Fix MSYS2 packaging script
daljit46 Apr 9, 2025
332a91c
Explicitly add OpenGL linker flags for msys2
daljit46 Apr 11, 2025
6f7b53d
No sudo for macos anaconda package
daljit46 Apr 11, 2025
10818dc
Use Qt 5.15.2 for macos native build
daljit46 Apr 11, 2025
b7e8627
Change artefact extension .tar.xz -> .tar.zst
daljit46 Apr 11, 2025
c80eec1
Change artefact extension .tar.bz2 -> .conda
daljit46 Apr 11, 2025
f88d2ce
Symlink Python3 in workspace directory
daljit46 Apr 24, 2025
dcb6e0a
Build using Qt 5.15.16
daljit46 Apr 24, 2025
bb36e36
Merge pull request #3086 from daljit46/fix_master_packaging
jdtournier Apr 25, 2025
42baf5e
Install conda-build from conda-forge
daljit46 May 8, 2025
b2f5504
Update conda artefact extensions
daljit46 May 7, 2025
bf43ffe
Merge pull request #3091 from daljit46/final_fixes_305
jdtournier May 8, 2025
3ee549f
updated version information
jdtournier May 8, 2025
e919e65
updated documentation to match version change
jdtournier May 8, 2025
c4b94c4
Revert container recipes to pull master
MRtrixBot May 8, 2025
bb0eb37
Merge remote-tracking branch 'origin/dev' into dwi_metadata
Lestropie May 21, 2025
fbeaf7f
Merge tag '3.0.5' into 305_to_dev
Lestropie May 21, 2025
5253723
Merge commit 'c4b94c437a7955d25265f46ace48afd4ad2d5f66' into 305_to_dev
Lestropie Jun 2, 2025
fb51e46
Merge branch 'dev' into 305_to_dev
Lestropie Sep 2, 2025
1ebdb39
Resolve multiple merge failures for #3101
Lestropie Sep 3, 2025
a695a33
Fix compilation #3101
Lestropie Sep 3, 2025
c18f29a
DICOM: ignore image positioning tags if nested within Philips private…
Lestropie Sep 3, 2025
bf65999
Fix issues identified by CI tests #3101
Lestropie Sep 3, 2025
30b5d7c
Update copyright headers #3101
MRtrixBot Sep 3, 2025
73ed93d
Add local disables of clang-format
Lestropie Sep 3, 2025
e61f3bd
Update documentation to reflect tag 3.0.5
MRtrixBot Sep 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/package-linux-anaconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:

- name: install conda-build # and anaconda-client
run: $CONDA/bin/conda install -y conda-build #anaconda-client
run: $CONDA/bin/conda install -c conda-forge -y conda-build #anaconda-client

- name: fetch recipe
run: |
Expand All @@ -28,6 +28,6 @@ jobs:
- name: Upload package to GitHub Release
uses: AButler/[email protected]
with:
files: '*.tar.bz2'
files: '*.conda*'
repo-token: ${{ secrets.GITHUB_TOKEN }}

55 changes: 28 additions & 27 deletions .github/workflows/package-macos-anaconda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,34 @@ on:

jobs:
package:

runs-on: macos-latest

steps:

- name: fetch MacOSX 10.11 SDK
run: curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/MacOSX10.11.sdk/MacOSX10.11.sdk.tar.xz | sudo tar xf - -C /opt/

- name: install conda-build # and anaconda-client
run: sudo $CONDA/bin/conda install -y conda-build # anaconda-client

- name: fetch recipe
run: |
git clone https://github.com/MRtrix3/conda-build.git
mv conda-build/* .
{ echo "CONDA_BUILD_SYSROOT:"; echo " - /opt/MacOSX10.11.sdk # [osx]"; } > conda_build_config.yaml

- name: build package
run: sudo CONDA="$CONDA" ./run.sh ${GITHUB_REF#refs/*/} ${GITHUB_REPOSITORY%/*} conda-macos

# - name: upload package
# run: $CONDA/bin/anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u MRtrix3 $(sudo $CONDA/bin/conda build conda-build/ --output)

- name: Upload package to GitHub Release
uses: AButler/[email protected]
with:
files: '*.tar.bz2'
repo-token: ${{ secrets.GITHUB_TOKEN }}


- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"

- name: Install conda-build
run: conda install -c conda-forge -y conda-build

- name: fetch MacOSX 10.11 SDK
run: curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/MacOSX10.11.sdk/MacOSX10.11.sdk.tar.xz | sudo tar xf - -C /opt/

- name: fetch recipe
run: |
git clone https://github.com/MRtrix3/conda-build.git
mv conda-build/* .
{ echo "CONDA_BUILD_SYSROOT:"; echo " - /opt/MacOSX10.11.sdk # [osx]"; } > conda_build_config.yaml

- name: build package
run: CONDA="$CONDA" ./run.sh ${GITHUB_REF#refs/*/} ${GITHUB_REPOSITORY%/*} conda-macos

# - name: upload package
# run: $CONDA/bin/anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload -u MRtrix3 $(sudo $CONDA/bin/conda build conda-build/ --output)

- name: Upload package to GitHub Release
uses: AButler/[email protected]
with:
files: "*.conda*"
repo-token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 6 additions & 1 deletion .github/workflows/package-macos-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ jobs:

steps:

- name: Symlink Python3
run: |
mkdir -p python_dir
ln -s $(which python3) python_dir/python

- name: fetch recipe
run: git clone https://github.com/MRtrix3/macos-installer.git

- name: build packages
run: ./build ${GITHUB_REF#refs/*/}
run: ./build ${GITHUB_REF#refs/*/} 5.15.16 ${{ github.workspace }}/python_dir
working-directory: ./macos-installer

- name: Upload package to GitHub Release
Expand Down
56 changes: 32 additions & 24 deletions .github/workflows/package-windows-msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,45 @@ on:
release:
types: [created]


jobs:
package:

runs-on: windows-latest
defaults:
run:
shell: msys2 {0}

env:
MSYSTEM: MINGW64
MSYSCON: defterm
CHERE_INVOKING: enabled_from_arguments
MSYS2_NOSTART: yes
MINGW_PACKAGE_PREFIX: mingw-w64-x86_64

steps:

- name: fetch and install MSYS2
run: bash -c 'curl -sL https://github.com/MRtrix3/MinGW/releases/download/1.0/msys2.tar.{0,1} | tar xf -'

- name: run qtbinpatcher
shell: cmd
run: msys64\msys2_shell.cmd -c "qtbinpatcher --qt-dir=$(dirname $(which qmake))"

- name: fetch PKGBUILD
shell: cmd
run: msys64\msys2_shell.cmd -c "git clone https://github.com/MRtrix3/MinGW.git && mv MinGW/* ."

- name: run makepkg
shell: cmd
run: msys64\msys2_shell.cmd -c "./run.sh ${GITHUB_REF#refs/*/} ${GITHUB_REPOSITORY%%/*}"

- name: Upload package to GitHub Release
uses: AButler/[email protected]
with:
files: '*.tar.xz'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: |
git
pkg-config
python
${{env.MINGW_PACKAGE_PREFIX}}-bc
${{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}}-qt5-base
${{env.MINGW_PACKAGE_PREFIX}}-qt5-svg
${{env.MINGW_PACKAGE_PREFIX}}-zlib

- name: fetch PKGBUILD
run: git clone https://github.com/MRtrix3/MinGW.git && mv MinGW/* .

- name: run makepkg
run: LINKFLAGS=-lopengl32 ./run.sh ${GITHUB_REF#refs/*/} ${GITHUB_REPOSITORY%%/*}

- name: Upload package to GitHub Release
uses: AButler/[email protected]
with:
files: "*.tar.zst"
repo-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)

set(CMAKE_OSX_DEPLOYMENT_TARGET 11.00 CACHE STRING "")
project(mrtrix3 LANGUAGES CXX VERSION 3.0.4)
project(mrtrix3 LANGUAGES CXX VERSION 3.0.5)

if(NOT CMAKE_GENERATOR STREQUAL "Ninja")
message(WARNING "It is recommended to use the Ninja generator to build MRtrix3. "
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN apt-get -qq update \
libqt5opengl5-dev \
libqt5svg5-dev \
libtiff5-dev \
python3 \
qtbase5-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
Expand Down
28 changes: 15 additions & 13 deletions cpp/cmd/amp2sh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "file/matrix.h"
#include "image.h"
#include "math/SH.h"
#include "phase_encoding.h"
#include "metadata/phase_encoding.h"
#include "progressbar.h"

using namespace MR;
Expand Down Expand Up @@ -183,8 +183,9 @@ class Amp2SH {
};

void run() {
auto amp = Image<value_type>::open(argument[0]).with_direct_io(3);
Header header(amp);
Header header_in(Header::open(argument[0]));
Header header_out(header_in);
header_out.datatype() = DataType::Float32;

std::vector<size_t> bzeros, dwis;
Eigen::MatrixXd dirs;
Expand All @@ -194,8 +195,8 @@ void run() {
if (dirs.cols() == 3)
dirs = Math::Sphere::cartesian2spherical(dirs);
} else {
auto hit = header.keyval().find("directions");
if (hit != header.keyval().end()) {
auto hit = header_in.keyval().find("directions");
if (hit != header_in.keyval().end()) {
std::vector<default_type> dir_vector;
for (auto line : split_lines(hit->second)) {
auto v = parse_floats(line);
Expand All @@ -206,32 +207,33 @@ void run() {
dirs(i / 2, 0) = dir_vector[i];
dirs(i / 2, 1) = dir_vector[i + 1];
}
header.keyval()["basis_directions"] = hit->second;
header.keyval().erase(hit);
header_out.keyval()["basis_directions"] = hit->second;
header_out.keyval().erase(hit);
} else {
auto grad = DWI::get_DW_scheme(amp);
auto grad = DWI::get_DW_scheme(header_in);
DWI::Shells shells(grad);
shells.select_shells(true, false, false);
if (shells.smallest().is_bzero())
bzeros = shells.smallest().get_volumes();
dwis = shells.largest().get_volumes();
dirs = DWI::gen_direction_matrix(grad, dwis);
DWI::stash_DW_scheme(header, grad);
DWI::stash_DW_scheme(header_out, grad);
}
}
PhaseEncoding::clear_scheme(header);
Metadata::PhaseEncoding::clear_scheme(header_out.keyval());

auto sh2amp = DWI::compute_SH2amp_mapping(dirs, true, 8);

const bool normalise = !get_options("normalise").empty();
if (normalise && bzeros.empty())
throw Exception("the normalise option is only available if the input data contains b=0 images.");

header.size(3) = sh2amp.cols();
Stride::set_from_command_line(header);
auto SH = Image<value_type>::create(argument[1], header);
header_out.size(3) = sh2amp.cols();
Stride::set_from_command_line(header_out);

Amp2SHCommon common(sh2amp, bzeros, dwis, normalise);
auto amp = header_in.get_image<value_type>().with_direct_io(3);
auto SH = Image<value_type>::create(argument[1], header_out);

opt = get_options("rician");
if (!opt.empty()) {
Expand Down
29 changes: 15 additions & 14 deletions cpp/cmd/dwi2adc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "dwi/gradient.h"
#include "image.h"
#include "math/least_squares.h"
#include "phase_encoding.h"
#include "metadata/phase_encoding.h"
#include "progressbar.h"

using namespace MR;
Expand All @@ -44,7 +44,7 @@ void usage ()
"adopts a 2-stage fitting strategy, in which the ADC is first estimated based on "
"the DWI data with b > cutoff, and the other parameters are estimated subsequently. "
"The output consists of 4 volumes, respectively S(0), D, f, and D'."

+ "Note that this command ignores the gradient orientation entirely. This approach is "
"therefore only suited for mean DWI (trace-weighted) images or for DWI data collected "
"with isotropically-distributed gradient directions.";
Expand All @@ -60,12 +60,12 @@ void usage ()
+ Argument ("bval").type_integer (0, 1000)

+ DWI::GradImportOptions();

REFERENCES
+ "Le Bihan, D.; Breton, E.; Lallemand, D.; Aubin, M.L.; Vignaud, J.; Laval-Jeantet, M. "
"Separation of diffusion and perfusion in intravoxel incoherent motion MR imaging. "
"Radiology, 1988, 168, 497–505."

+ "Jalnefjord, O.; Andersson, M.; Montelius; M.; Starck, G.; Elf, A.; Johanson, V.; Svensson, J.; Ljungberg, M. "
"Comparison of methods for estimation of the intravoxel incoherent motion (IVIM) "
"diffusion coefficient (D) and perfusion fraction (f). "
Expand Down Expand Up @@ -144,26 +144,27 @@ class DWI2ADC {
};

void run() {
auto dwi = Header::open(argument[0]).get_image<value_type>();
auto grad = DWI::get_DW_scheme(dwi);
auto header_in = Header::open(argument[0]);
auto grad = DWI::get_DW_scheme(header_in);

size_t dwi_axis = 3;
while (dwi.size(dwi_axis) < 2)
while (header_in.size(dwi_axis) < 2)
++dwi_axis;
INFO("assuming DW images are stored along axis " + str(dwi_axis));

auto opt = get_options("ivim");
bool ivim = opt.size();
int bmin = get_option_value("cutoff", 120);

Header header(dwi);
header.datatype() = DataType::Float32;
DWI::stash_DW_scheme(header, grad);
PhaseEncoding::clear_scheme(header);
header.ndim() = 4;
header.size(3) = ivim ? 4 : 2;
Header header_out(header_in);
header_out.datatype() = DataType::Float32;
DWI::stash_DW_scheme(header_out, grad);
Metadata::PhaseEncoding::clear_scheme(header_out.keyval());
header_out.ndim() = 4;
header_out.size(3) = ivim ? 4 : 2;

auto adc = Image<value_type>::create(argument[1], header);
auto dwi = header_in.get_image<value_type>();
auto adc = Image<value_type>::create(argument[1], header_out);

ThreadedLoop("computing ADC values", dwi, 0, 3).run(DWI2ADC(grad.col(3), dwi_axis, ivim, bmin), dwi, adc);
}
4 changes: 2 additions & 2 deletions cpp/cmd/dwi2fod.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "header.h"
#include "image.h"
#include "math/SH.h"
#include "phase_encoding.h"
#include "metadata/phase_encoding.h"

#include "dwi/sdeconv/csd.h"
#include "dwi/sdeconv/msmt_csd.h"
Expand Down Expand Up @@ -258,7 +258,7 @@ void run() {
shared.init();

DWI::stash_DW_scheme(header_out, shared.grad);
PhaseEncoding::clear_scheme(header_out);
Metadata::PhaseEncoding::clear_scheme(header_out.keyval());

header_out.size(3) = shared.nSH();
auto fod = Image<float>::create(argument[3], header_out);
Expand Down
Loading
Loading