Skip to content

Add 'predicted_signal' to single-shell CSD#2235

Merged
Lestropie merged 10 commits intoMRtrix3:devfrom
tclose:predicted_signal
Oct 13, 2025
Merged

Add 'predicted_signal' to single-shell CSD#2235
Lestropie merged 10 commits intoMRtrix3:devfrom
tclose:predicted_signal

Conversation

@tclose
Copy link
Contributor

@tclose tclose commented Nov 25, 2020

This is my attempt to add the 'predicted_signal' to single-shell CSD by roughly copying what was done for MSMT CSD.

It isn't working though, what am I doing wrong?

@Lestropie
Copy link
Member

At a quick glance:

  • One of the first hurdles is the fact that you're basing the output modelled image on the input header, which could include b=0 volumes (or even other b-value shells technically), whereas the internal CSD structure will only include those volumes actually being utilised. So you'd need to either construct a new template header for that output image based on the number of volumes in the DW shell being utilised (and make sure dw_scheme is updated in that header also), or you'd need to zero-fill in the output image the volumes not utilised in CSD, and additionally know the mapping from rows in the CSD arithmetic to image volumes.

  • Your forward convolution is using "HR_dirs", which I think are used for the non-negativity regularisation, and therefore don't reflect the input DWI data sensitisation directions.

@jdtournier
Copy link
Member

Hi Tom! Hope all's well.

Just thought I'd mention before you invest too much time into this that the functionality you're after probably already exists with a combination of shconv & sh2amp, following the latest changes in #1617. This is available as of version 3.0.0. Probably not as convenient as an option in dwifod csd, but not all that tricky either...

Conflicts:
	cmd/dwi2fod.cpp
	src/dwi/sdeconv/msmt_csd.cpp
@Lestropie Lestropie changed the base branch from master to dev October 1, 2025 02:36
Lestropie and others added 2 commits October 1, 2025 12:43
- Fix implementation to appropriately use forward transform as created during CSD initialisation, and fill image data corresponding only to those volumes included in the model.
- Modify existing tests to evaluate -predicted_signal option for both dwi2fod csd and dwi2fod msmt_csd.
- Modify existing tests to reflect changes to test data filesystem structure.
- Import updated test data commitish.
@Lestropie Lestropie marked this pull request as ready for review October 1, 2025 02:44
@Lestropie Lestropie requested a review from jdtournier October 1, 2025 02:46
@Lestropie Lestropie merged commit 394f538 into MRtrix3:dev Oct 13, 2025
5 of 6 checks passed
Lestropie added a commit that referenced this pull request Jan 13, 2026
Resolves new test in #3172 merged into #3255 with the change in test data filesystem structure introduced in #2235.
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.

4 participants