dipy
dipy copied to clipboard
NF: DKI+ constraints
This request implements the DKI+ constraints proposed in https://doi.org/10.1016/j.neuroimage.2019.116405. The constraints can be used by setting fit_method='CLS'
(constrained ordinary least squares) or fit_method='CWLS'
(constrained weighted least squares). The implementation can be tested by following the DKI example in the documentation (https://dipy.org/documentation/1.4.1./examples_built/reconst_dki), and running for example
dkimodel_plus = dki.DiffusionKurtosisModel(gtab, fit_method='CWLS')
dkifit_plus = dkimodel_plus.fit(data_smooth, mask=mask)
It is recommended to use the MOSEK solver for speed by setting cvxpy_solver='MOSEK'
, cf. https://docs.mosek.com/latest/install/installation.html for installation.
The implementation of these constraints is essentially identical to the implementation provided by #2531 for MAP-MRI.
One point: the SCS solver that CVXPY uses by default is more stable and gives more accurate results when the b-values are given in natural units [ms / micron^2], essentially dividing the b-values by 1000 when they are given in standard units of [s / mm^2]. Is there a recommended way of using these natural units when setting up a gradient table, or should I just try to rescale the gradients in the fitting function?
Hello @tomdelahaije, Thank you for updating !
Cheers ! There are no PEP8 issues in this Pull Request. :beers:
Comment last updated at 2022-09-09 13:06:11 UTC
Codecov Report
Merging #2609 (ca102ce) into master (f9dd0f5) will decrease coverage by
0.41%
. The diff coverage is80.72%
.
Additional details and impacted files
@@ Coverage Diff @@
## master #2609 +/- ##
==========================================
- Coverage 83.92% 83.51% -0.41%
==========================================
Files 132 135 +3
Lines 18479 18994 +515
Branches 3047 3106 +59
==========================================
+ Hits 15508 15863 +355
- Misses 2228 2359 +131
- Partials 743 772 +29
Impacted Files | Coverage Δ | |
---|---|---|
dipy/core/optimize.py | 79.06% <0.00%> (+2.59%) |
:arrow_up: |
dipy/reconst/utils.py | 96.00% <ø> (ø) |
|
dipy/viz/plotting.py | 7.22% <0.00%> (-0.18%) |
:arrow_down: |
dipy/reconst/dki.py | 94.49% <85.71%> (-1.90%) |
:arrow_down: |
dipy/reconst/dki_micro.py | 91.60% <100.00%> (-0.70%) |
:arrow_down: |
Hi @tomdelahaije,
Can you give us an update on this? thank you!
Hi @tomdelahaije,
Can you give us an update on this? thank you!
Hi @skoudoro
Sorry for the delay, there were some developments on the theory side of this that required some work. I'll get back to you with an update later today.
Ok, no problem, thank you for the feedback.
@tomdelahaije, in our lab, we would like to use your method to calculate kurtosis maps. Is this code reliable or would you recommend using another implementation? Thanks for the great work!
@tomdelahaije can you update this PR? Many people want to use it asap. We can also highlight it during the upcoming workshop http://dipy.org/workshops/latest
PR updated, thanks @tomdelahaije for your help!
It would be great if @kerkelae or @RafaelNH or @arokem could look at this and give feedback.
I think I might go ahead and merge this nice features tomorrow if there are no additional comments.
Congratulations @tomdelahaije !!! Another great + technique merged!
@kerkelae and all please start using this method and provide feedback to @tomdelahaije !
@Garyfallidis I've been using the code from @tomdelahaije's own branch for a while now and everything has been working well! Thanks for making it a part of DIPY. This is a really valuable contribution.