Skip to content

5TTmsmt: inclusion of -sgm_amyg_hipp option#3401

Open
arkiev wants to merge 432 commits into
MRtrix3:5TTmsmtfrom
arkiev:5TTmsmt
Open

5TTmsmt: inclusion of -sgm_amyg_hipp option#3401
arkiev wants to merge 432 commits into
MRtrix3:5TTmsmtfrom
arkiev:5TTmsmt

Conversation

@arkiev

@arkiev arkiev commented Jun 12, 2026

Copy link
Copy Markdown

This PR adds a new msmt algorithm to 5ttgen, which derives a 5TT image directly from multi-shell multi-tissue (MSMT) ODF images (odf_wm, odf_gm, odf_csf) rather than relying on a T1-weighted image.

Default pipeline (no FSL required):
ODF l=0 terms are extracted, normalised to sum to 1.0, and assembled into a 5TT image. A brain mask is generated from the ODF volume sum using a morphological pipeline (threshold → clean → connect-largest → dilate×3 → erode×3). A CSF-fill step ensures tissue fractions sum to exactly 1.0 in all brain voxels.

Optional sub-cortical GM segmentation via -sgm_amyg_hipp:
When this flag is passed, FSL FIRST is used to segment sub-cortical GM structures (including amygdala and hippocampus), and FSL FAST is used for intensity-guided tissue refinement. A vis image derived from the initial 5TT (via 5tt2vis) is used as a T1-surrogate for both tools. Availability of FSL tools is checked at runtime, with fallback and warnings if tools are missing.

Target branch: dev

Lestropie and others added 30 commits February 6, 2025 23:21
- Previously, if -iter 1 was specified, the weights were not recomputed, and so results were identical to that with -iter 0.
- Do not unnecessarily recompute weights at completion of the final iteration.
…with_unsupported_transfer_syntax

DICOM: add null imageIO handler to allow parsing of DICOM data even with unsupported transfer syntax
Tolerance for dw_scheme differences on header merge
…om_position

DICOM: ignore image positioning tags if nested within Philips private sequence
For consistency and to avoid potential conflicts in external projects.
This addresses an issue raised on the forum, and is due to our use of a
write-back buffer (to prevent file segmentation) with a default size of
16MB. This is ample for regular streamlines, but clearly not enough in
all cases...

Original issue:
https://community.mrtrix.org/t/tckgen-seed-point-visualization/8271/2
…dling

dwi2mask hdbet: Fix exception handling
- Fix progress bar for when FSL FAST is not used for the cerebellum, and the FreeSurfer segmentations of the cerebellar hemispheres are propagated to the 5TT image.
- New option -freesurfer_lut, for manually specifying the location of the FreeSurfer lookup table file; this permits utilisation of the script without environment variable FREESURFER_HOME being set, or indeed even the FreeSurfer software being present (related to MRtrix3#3073).
- Add missing citations to help page documentation.
5ttgen hsvs: Multiple changes / fixes
Erroneous omission from f99f80e.
…eamline

Fix tck writer when a single streamline exceed the buffer size
FIX: don't build gui subdirectory with BUILD_GUI=OFF
Re-applies changes in MRtrix3#3056 that were lost on dev branch as a consequence of MRtrix3#3061.
Update clang-tidy-review action to v0.20.1
…pply

dwi2tensor: Fix operation with -iter 1 (re-apply)
Conflicts:
	testing/CMakeLists.txt
Lestropie and others added 30 commits September 15, 2025 17:01
Conflicts:
	testing/CMakeLists.txt
Conflicts:
	cmd/dirflip.cpp
	cmd/dirgen.cpp
	cpp/cmd/dirorder.cpp
This keeps the command-line option name consistent with the similar functionality in the dirflip command.
Includes thos functionalities relating to the preservation of directions at the head of direction sets, but also adds tests for default functionality of dirflip and dirorder not yet present.
Conflicts:
	cpp/cmd/mrcalc.cpp
	cpp/cmd/peaksconvert.cpp
	cpp/core/file/nifti_utils.h
dir* command modifications for fixed direction handling
This reference frame appears to be an intrinsic feature of the FSL software and not specific to the encoding of diffusion MRI sensitisation directions in the .bvec format.
- All calculations observed throughout the code base that relate to relationships between cartesian and spherical coordinates, as well as spherical harmonics, make reference to the cosine of the second angle as its component relative to the zenith. This would make that angle an inclination rather than an elevation.
Resolves original implementation created in MRtrix3#2918 against post-cmake Python changes.
Option facilitates nominating which references axis set the input dataset is expected a priori to conform to; the terminal feedback & command error code are modulated accordingly.
New commands: peaksconvert, peakscheck
Conflicts:
	docs/reference/commands/5ttgen.rst
	python/mrtrix3/commands/5ttgen/__init__.py
	testing/CMakeLists.txt
Default run (steps 1-4) uses ODF-derived tissue fractions directly with
masking and CSF fill to guarantee sum=1. FSL FIRST (sub-cortical GM) and
FAST (intensity-guided tissue refinement) now only execute when the user
passes -sgm_amyg_hipp.
…e from masking. no harm in filling SGM structures, so leave as is. this commit uses different masking strategy (volsum > 0)
…l (invert → connect-largest → invert) → dilate ×3 → erode ×3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants