Skip to content

Conversation

@Lestropie
Copy link
Member

Supersedes #2393 (didn't want to suddenly start pushing to an external master branch).

This really needs test data. But it looks like access is pretty locked down.
@jdtournier @mblesac @paola-g: Is anyone able to provide an example dataset? Hopefully if I downsample a dataset prior to uploading to script_test_data, it won't offend anybody...
I also note that there's reference to BIDS layout in more recent data releases, to which the current code bears no resemblance. I'm guessing that different data releases have used different storage conventions?

mblesac2 and others added 19 commits November 8, 2021 14:54
Co-authored-by: Manuel Blesa Cabez <mblesac@gmail.com>
Co-authored-by: Paola Galdi <paola.galdi@gmail.com>
Co-authored-by: Manuel Blesa <mblesac@gmail.com>
Co-authored-by: Paola Galdi <paola.galdi@gmail.com>
Co-authored-by: Manuel Blesa <mblesac@gmail.com>
Co-authored-by: Paola Galdi <paola.galdi@gmail.com>
Co-authored-by: Manuel Blesa <mblesac@gmail.com>
Co-authored-by: Paola Galdi <paola.galdi@gmail.com>
Co-authored-by: Manuel Blesa <mblesac@gmail.com>
Co-authored-by: Paola Galdi <paola.galdi@gmail.com>
…put)

Manuel Blesa <mblesac@gmail.com>
Paola Galdi <paola.galdi@gmail.com>
…atal algorithms

Co-authored-by: Manuel Blesa <mblesac@gmail.com>
Co-authored-by: Paola Galdi <paola.galdi@gmail.com>
- Ensure that input files are unique and unambiguous.
- Remove redundant logic across get_inputs() and execute() regarding use of hard segmentation.
- Simplify logic of primary conversion loop.
- Generate sub-cortical grey matter image from M-CRIB only once, rather than once per tissue; this should facilitate code execution without using the -force option.
Conflicts:
	docs/reference/commands/5ttgen.rst
	python/mrtrix3/commands/5ttgen/dhcp.py
	python/mrtrix3/commands/5ttgen/mcrib.py
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

clang-tidy review says "All clean, LGTM! 👍"

@mblesac
Copy link

mblesac commented Oct 17, 2025

Hi @Lestropie , several things have changed and I think some things in the algorithm should be edited to make it applicable to most datasets. Let me get back to you after ISMRM deadline, then I'll have time to work on this. One quick question, what are your thought about including docker/apptainer in the scripts?

@mblesac
Copy link

mblesac commented Oct 20, 2025

Hi @Lestropie , I found a way to access some neonatal data to test the algorithm, I'll send you an email with the detailed instructions

@Lestropie
Copy link
Member Author

Thanks @mblesac, will work my way through the data and produce something for CI.

One quick question, what are your thought about including docker/apptainer in the scripts?

Generally I would prefer to avoid: MRtrix3 could itself be invoked within a container (whether the official one or third party), and so itself attempting to invoke containers becomes a problem. It's not to say it can't be done if available, but IMO it's kicking the can down the road and could become a nightmare if utilised too much.

I think the only current example of it is in dwi2mask synthstrip here, because the containerised version can be found in PATH with a software-package-specified name; for anything under user control there would need to be a command-line option.

Generally in such circumstances my preference would be to have the user invoke some tool and then have MRtrix3 take as input the derivatives of that tool, rather than MRtrix3 itself invoking the tool. It's not always possible, or might make the user interface a little clunkier as it's a smaller fraction of the requisite processing that can be encapsulated, but it provides a more clear distinction regarding what is MRtrix3 and what is not (which is an ongoing problem).

- If it is possible to pass the M-CRIB template images through to ANTs without necessitating an explicit load of those images into the scratch directory, do so.
- If the M-CRIB data have been downloaded and extracted by the user in a way that preserves the original sub-directory structure, navigate that structure to find the required images.
- Continue processing even if only a subset of the M-CRIB images are found (this is exploited to speed up test execution).
- Add test data and tests for 5ttgen mcrib.
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

@Lestropie
Copy link
Member Author

5ttgen mcrib now has some test data and tests. These are M-CRIB participants downsampled by a factor of 4, so hopefully they're so unsuitable for any practical operation that it's not an issue redistributing them.

  • Add test data and tests for 5ttgen dhcp
    I believe the filesystem structure interrogated by the current code is based on an earlier data release. Need to decide whether it is still necessary to support input data of that form in addition to that of the most recent data release, or whether only the structure of the most recent release needs to be supported.

Lestropie and others added 2 commits October 26, 2025 11:09
- New alternatives for masking of image.
- By default, map brain stem to fifth image volume, mirroring behaviour of 5ttgen hsvs.

Co-authored-by: Manuel Blesa <mblesac@gmail.com>
- Merge VentralDC with brain stem component.
- Refactor help page, including option groups and additional description.
- Fix operation with piped input/output images.
- Perform some limited intermediate cleanup.
- Preserve relative ordering & sign of strides of input image in output images.
- Avoid explicit tissue sum normalisation if using hard segmentation.
@github-actions
Copy link

clang-tidy review says "All clean, LGTM! 👍"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants