estimate_response: simple script to get single-shell response function#426
estimate_response: simple script to get single-shell response function#426jdtournier wants to merge 8 commits intoupdated_syntaxfrom
Conversation
|
@thijsdhollander, Interesting to hear about the issues in the current approach. I must admit I haven't had time to have a thorough look into it... I tried running So as to how to sort this out, I don't think a simple renaming will do. Clearly the issue is more complex than that, and even changing the commands to output the mask rather than the actual response doesn't really help much, if at all. It still leaves all the issues that we've seen come up time and again on the forum, and the more troubling issues mentioned by @thijsdhollander above. Even if the intention had been to use the current approach to identify a good single-fibre mask that we could then use to estimate the various responses from, it seems clear that it's not up to the task. One of the problems I can see here is that The script I've proposed here is actually much closer to the original Tax et al. approach. The only differences are that it uses a much more sensible (and stable!) initialisation, and use the top 300 voxels rather than a hard user-defined threshold. With these two changes we end up with something that is much faster and robust, using tools we've already written. And as I've stated above, I think operating on peak ratios rather than segmented FOD lobe volume ratios is actually the right thing to do. So what I'm clearly coming to here is that I think the current Clearly before we do something like this we need to come to a consensus about the need to do this, and whether the approach I'm proposing is the right way to go. Personally, I think even if this script turns out not to be completely optimal, it has the desirable property of being fairly robust (I can't think of any way it would fail to run and provide a useful set of response coefficients). I've tried it with very low anisotropy, very low b-value neonatal data (b=500, 47 DW directions - really very little anisotropy in these data), and it works fine there (although I did have to remove the mask refinement step, which made it run slower - I'm looking into that right now). It clearly works just fine in standard adult data. So, as always, opinions welcome... |
I also have a sneaking suspicion that when using the
I'd disagree: she explicitly justified starting with a too-fat response rather than a too-thin response, and uses a per-voxel data-driven threshold rather than a # of voxels threshold. So the current |
|
Just to comment on a few of the issues raised by @Lestropie:
So I've made some changes, which I've just committed. Just to highlight the main differences:
Let me know when/if it falls over... |
|
OK, just figured there is an issue with the peak ratio calculation... I'll have a look into it later. |
|
OK, I've had a go at improving the criterion by which fibres are assessed for inclusion in the single-fibre mask. I've settled on this formula: Rationale being that we want to remain scale invariant: here scaling all the values by some multiplier will still give a map that looks identical (just scaled by some global scale factor), so that thresholding by number of voxels gives the same mask. We also want to promote voxels with higher main peak amplitude, but still allow lower amplitude peaks to be included if they turn out to be highly suitable: that's the Everyone, feel free to have a go at breaking it... |
|
Small update since you're playing with this: I'm currently working on #419 and #422. Part of the changes will be a single |
|
Sounds like a great plan! Go for it. We could also merge |
|
I'll assume you mean Yes, that's the plan. I want to duplicate the current Even ye olde FA threshold approach gets its own algorithm in the script :-P |
|
😁 yes, I did mean Sounds good! |
|
Closing since implemented properly by @Lestropie in commit fece64a... |
As discussed in #422. This is currently a very simple proof of concept script, just to get feedback on whether the approach is worth implementing properly. Feedback welcome...