DWI Extraction and FOD Processing


I am trying to create a DEC map through an FOD image. The commands I’ve been running on my eddy-corrected, normalized DWI files are:

dwiextract input output -shells 3000
dwi2fod msmt_csd input average_responses.txt output -mask MASK
fod2dec input output

However, my FOD and DEC images both come out with very low intensity near the top of the brain, and very bright signal at the bottom near the cerebellar area, which was not present in earlier files. I’m not sure if the problem is linked to having to extract only the b=3000 shell.

Would appreciate any help you could give!


Have you inspected the normalised DWI data? I’d suspect you see the same scaling issue for all shells which points at normalisation gone wrong. If you used dwibiascorrect and have multi-shell data, try mtnormalise instead or adjust the N4 options (see for instance here and here.). If you used mtnormalise, make sure the brain mask is very close to or within brain parenchyma.

Hi @soph,

Hope you’re doing well! :slightly_smiling_face:

With such high b-value data, and supposedly decent angular resolution, you can always perform 3-tissue CSD. Either with MSMT-CSD if you’ve got multi-shell data, or SS3T-CSD if you’ve got single-shell (and b=0 of course) data. Then you can also always follow this up with mtnormalise.

No, that would actually not work robustly if there’s a CSF compartment in the model, which you always would want to have to fit all signal well, in particular b=0 and low b-values, wherever free water or partial voluming with CSF appears. The mask for mtnormalise has to be a brain + CSF mask. Don’t dilate it 2~3 or more voxels beyond that though. But do include CSF; just brain parenchyma only will make it unstable.

@soph, feel free to provide a screenshot or two if you try some of these options. Happy to provide feedback if you think that’d help. :+1:

Cheers & take care,

Do you have any intuition for why this might be the case?

That seems contrary to what’s stated in the docs:

we recommend using conservative (i.e. less spatially extended) masks for the mtnormalise step. Unlike step 6, where inclusion of all brain voxels was encouraged even at the expense of including some non-brain voxels, for bias field estimation exclusion of non-brain voxels is of greater priority than inclusion of all brain voxels.

Thanks for all the suggestions! I looked back at the data and it seems like my pre-normalised data also suffers from the same problem. Also, only one subject is affected, so it may have been a problem with the initial data collection. I used dwinormalise initially, but I may try mtnormalise on that one subject’s wmfod file and see how it goes.

No worries. Looks like you’ll indeed have to correct actively for this. :slight_smile: As mentioned, this is always possible with mtnormalise on 3-tissue CSD output, either from MSMT-CSD for multi-shell data or SS3T-CSD for single-shell data.

That’s interesting indeed. Do keep a close eye on that. If you do apply e.g. mtnormalise, still run it consistently on all subjects in your study, not just this one; you might otherwise introduce another bias again.

Just to make sure you’ve got the right idea: you’ll have to provide mtnormalise with all tissues (not only a WM FOD image) to make it work for the purpose it was designed for. If the “WM FOD” file you mention comes from the single-tissue CSD (or just “CSD”), this is not supposed to be used with mtnormalise. It’ll run an do something, but not the thing you want it to do I’m afraid. :wink:


I’m not responsible for that addition to the docs; and I’m certainly not taking responsibility for the consequences of it. This isn’t generally correct; and relates to a certain kind of pattern and amount of “non-brain” voxels; the likes of which you wouldn’t get e.g. from the current dwi2mask. This in fact by the very definition of the core mechanism of dwi2mask.

In any case, that addition to the docs seems to be aimed at what is maybe in more nuance described here and beyond: Mtnormalise: spurious FODs outside brain mask . I recommend anyone to read that in great detail to appreciate the kind of voxels this aims to talk about. The problem appears to arise if you actively dilate a mask that is itself already overestimated by a good margin. So please, don’t do that in your pipelines. Due to the nature of bias field correction wrt multi-tissue signal compartments, that is naturally asking for the correction to introduce something that is not the correction of a bias field.

Alright, all that aside, @maxpietsch, what I specifically commented on in your point is more specific than that though. This might reveal that the wording in the docs itself is misleading even. My point related to you using the phrase “brain parenchyma”: i.e. only the brain tissue, excluding all fluid (maybe even up to a degree of partial voluming), i.e. ventricles and all. This would be a bad idea, because the tissue balance factor estimation relies on tissue signal to be robust of course. The most robust amount of signal for each “tissue” (including CSF) is found in the areas where there’s most of it. For CSF, that’s in the ventricles. For an adult brain, if you were to reduce the mask to a very strict definition of brain parenchyma, the balance factor for CSF will become highly sensitised to extremely small effects of any kind, anywhere in the parenchyma, of the CSF compartment (potentially spatially specific).
I don’t have the time to write this up in my former levels of detail, but maybe imagine this one (even though not quite the same, but there’s rough similarities in effects): you might just get the (similar-ish) problems some people get who ran MSMT-CSD with WM-GM-CSF on single-shell data, where in the end GM doesn’t get involved (but is also not always exactly zero, just small traces); and then go on to run mtnormalise on that. Every once in a while, you might even get the “Non-positive tissue balance factor was computed.” error. That itself would flag how bad it can get.

So well, the best you can have is areas of “very much present” summed signal across all tissues involved, and that also per tissue in some areas. To extend this to interesting scenarios I come across at times: if you’ve got e.g. a (surgical) resection of small or large parts of the brain, and the intra-cranial space gets naturally filled in with CSF… well, it’s quite a good idea to keep this in your mask, also for mtnormalise; certainly if this is to be integrated with other data in a quantitative analysis.