this morning I had to re-install mrtrix and now the HCP tutorial, that worked smoothly before, get stuck. The problem is the Diffusion Processing, the dwi2response bit:
this my command
dwi2response msmt_5tt DWI.mif 5TT.mif RF_GM.txt RF_WM.txt RF_CSF.txt -voxels RF_voxels.mif -force
here the errors (everything seems to work fine for the dwi2mask, the mrtrasform and the mrconvert steps):
…
…
dwi2response: Calling dwi2response recursively to select WM single-fibre voxels using ‘tournier’ algorithm
Command: dwi2response tournier dwi.mif wm_ss_response.txt -mask wm_mask.mif -voxels wm_sf_mask.mif -quiet -tempdir /tmp/dwi2response-tmp-AZWB5H/
dwi2response:
dwi2response: [ERROR] Command failed: dwi2response tournier dwi.mif wm_ss_response.txt -mask wm_mask.mif -voxels wm_sf_mask.mif -quiet -tempdir /tmp/dwi2response-tmp-AZWB5H/
dwi2response: Output of failed command:
dwi2response: Script failed while executing the command: fixel2voxel iter0_peaks.msf split_value iter0_amps.mif
dwi2response: For debugging, inspect contents of temporary directory: /tmp/dwi2response-tmp-AZWB5H/dwi2response-tmp-1CLADS/
dwi2response: [ERROR] Command failed: fixel2voxel iter0_peaks.msf split_value iter0_amps.mif
dwi2response: Output of failed command:
fixel2voxel: [ERROR] fixel image is empty
dwi2response: Changing back to original directory (~/HCP/100307/T1w)
dwi2response: Script failed while executing the command: dwi2response tournier dwi.mif wm_ss_response.txt -mask wm_mask.mif -voxels wm_sf_mask.mif -quiet -tempdir /tmp/dwi2response-tmp-AZWB5H/
dwi2response: For debugging, inspect contents of temporary directory: /tmp/dwi2response-tmp-AZWB5H/
Could you check whether the prior 5 tissue type segmentation worked as expected? If you inspect 5TT.mif using mrview, do the different tissue types show up as expected?
It’s still very new though (I presented it yesterday here at the ISMRM diffusion workshop in Lisbon); so I always love hearing about your experiences with it!
I’m actually pretty satisfied with the new “dhollander” algorithm (it also quite fast! And that is a great advantage). Till now I’ve been using it just with multi-shell (HCP) data but I’m planning to try using it with single-shell data.
What it feel now as the major difference between “dhollander” and “msmt_5tt” is that either msmt_5tt slightly underestimated the wm fod or dhollander slightly overestimated it. Was wondering if it could be related to the fact that the dhollander is a unsupervised algorithm - I kind of remember you can have overestimation in the unsupervised learning, but It’s not my field at all
Thanks again!
Sara
Thanks for reporting back @sara! I was just wondering what you specifically meant with this: I’m slightly confused because you say “WM FOD” in this context (and those algorithms just extract responses). Are you referring to the FODs after applying MSMT-CSD, while using the responses from these algorithms? If so, it may be that you’re describing the effect that I saw in the abstract?
In that case, the funny thing is that this is actually (in a certain way) because the “dhollander” algorithm is quite “conservative”; so the responses are (most of the time) a bit more “pure”, and so they sit at wider extremes and allow a slightly wider spectrum of things to be successfully fitted by the multi-tissue CSD thereafter. There’s different ways to reason about this though (as well as what you’d actually want to expect from a multi-tissue CSD outcome in general). It’s not always trivial what is “best” here: it may very well depend on what you’re after in terms of interpretation of the final result. (I’m sorry if this paragraph is slightly cryptic; in that case, feel free to ignore it )
But in any way: thanks a lot for reporting back. I’m always interested to hear about peoples’ experiences with this algorithm!
Just as an extra comment: while you can indeed already use this algorithm for 3-tissue response function estimation in single shell data, note that you can’t do much with these responses yet thereafter: the MSMT-CSD method still requires at least 3 b-values (including the b=0 data) if you want to separate WM, GM and CSF tissue classes. The best you could do on that front at the moment for single-shell data, would be to ask the MSMT-CSD algorithm just for, e.g., the WM and the CSF (and ditch the GM response). That would at least already do a (suboptimal) form of free-water elimination (and a-tiny-bit-of-GM-elimination, due to a slight bias).
That’s all about to change (hopefully not too long from now) though; I’ll provide an implementation of single-shell 3-tissue CSD at some point.
Yes, exactly! Sorry, re-reading my comment, was actually quite lacking of details
You are right, I was referring to what I can see after applying dhollander or msmt_5tt AND the msmt_csd thereafter. And it seems exactly what you observed in your abstract, cool!
PS: The multi-shell DWI data is HCP 100048
DWI.mif was produced by
mrconvert …/T1w/Diffusion/data.nii.gz DWI.mif -fslgrad …/T1w/Diffusion/bvecs …/T1w/Diffusion/bvals -datatype float32 -stride 0,0,0,1
It looks like the problem you’re running into is due to remnants of an older MRtrix version still being there. I suppose you’ve been an MRtrix user since before the big update we did in March?
The problem is that you still may have a command called dwi2response sitting around, and that is causing conflicts with our new dwi2responsescript.
If this is the case, try running the following at the command line:
./build clean
git pull
./configure
./build
…and see if that fixes things. This should clean all the old stuff up, get the latest version of everything, and set everything up fresh.
Looks to me like this might be a similar problem to what’s going on in this parallel discussion: One of the mask images derived during the response function estimation algorithm is empty, which is resulting in a call to mrstats not returning any result. In your particular case this subsequently results in a malformed call to mrcalc (See the double space between ‘safe_sdm.mif’ and ‘-subtract’? There’s supposed to be a number in the middle), but it’s the preceding empty mask that’s the fundamental problem. My guess is that there’s something particularly unusual about your data that’s breaking one of the assumptions within the dwi2response dhollander algorithm; so the best bet would be to make an example image available so that the problem can be reproduced at our end.
Sorry, but it seems I had completely missed your post here! Rob is right in that this is a combination of a specific mask in the algorithm being empty, and then the way how this makes the script crash due to a particular technical caveat in a command that just surfaced for another user in another context too… I’ll eventually add in a useful error message for this particular event. You’d get that error message in that case any way, so you’d still not be able to proceed.
In your particular case, it seems the region within the initial brain mask that has FA values below 0.2 is empty. That would be very odd indeed… Maybe even the original brain masking went wrong. If you want, you could make the DWI image that you provides to the script available somewhere (via Dropbox of something), and let me know in private (you can use the messaging feature on the forum, if you’re ok with it); so I can take a look at it.
Anyway, it seems you’re after single-shell processing here; so for now (while you may share the dataset with me in between), you could still proceed using just the tournier algorithm in dwi2response, combined with dwi2fod csd afterwards, for simple single-shell single-tissue CSD.
I met the same problem using hcp data(the subject 163129,166438,169747), and I checked the 5tt.mif .I think the 5tt.mif is right.Are there other reasons causing the problem ?
Hello,
I got a similar problem with my data, the mask is empty. Something that I know is NOT recommendable was performed in order to obtain and embed bval & bvec into dwi.mif file (not sure whether this is the cause of the problem). I got only raw data, converted to nii format by Bru2Nii, and extracted bvec and bval from $PVM_DwDir and $PVM_DwEffBval respectively from a file called “method” at the raw data, and arranged it in fsl format.
My data looks like this:
Carloss-MacBook-Pro:mrtrix_test carlosengutierrez$ mrinfo 14.mif
************************************************
Image: “14.mif”
************************************************
Dimensions: 128 x 30 x 128 x 130
Voxel size: 3.5 x 7 x 3.5 x 4
Data strides: [ 1 3 -2 4 ]
Format: MRtrix
Data type: signed 16 bit integer (little endian)
Intensity scaling: offset = 0, multiplier = 4.3775600000000001e-05
Transform: 1 -0.0005371 0.003784 -212.5
0.00053 1 0.001875 -86.65
-0.003785 -0.001873 1 -217.8
comments: 13_HR_DTI_128axis_b3000
dw_scheme: [ 130 entries ]
mrtrix_version: 005da18a
Hello,
About mask images getting empty, I found the problem for my case, the gradient data was not in MRTrix format.
I used commnad convert_bruker to obtain mih file with the correct gradient data format, then I converted mih to mif.
Thanks for reporting back yourself already @Carlos_Gutierrez. I was already thinking it must’ve been something as fundamental as that; it definitely didn’t seem specific to (any algorithm for) response function selection.