-
Notifications
You must be signed in to change notification settings - Fork 532
ENH: Adds interfaces for MRtrix utils shconv and sh2amp #3280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
added predicted signal to estimate output spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good. Some small comments.
nipype/interfaces/mrtrix3/reconst.py
Outdated
@@ -187,6 +203,9 @@ def _list_outputs(self): | |||
outputs["gm_odf"] = op.abspath(self.inputs.gm_odf) | |||
if self.inputs.csf_odf != Undefined: | |||
outputs["csf_odf"] = op.abspath(self.inputs.csf_odf) | |||
if self.inputs.predicted_signal != Undefined: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that you're being consistent with the rest of this function. If you feel the urge, you can fix up the others, but I think we should do this the standard way.
if self.inputs.predicted_signal != Undefined: | |
if isdefined(self.inputs.predicted_signal): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On this interface, I remembered that 'predicted_signal' is only a valid option when using the 'msmt_csd' algorithm. Is there a way to specify this in the input spec?
nipype/interfaces/mrtrix3/utils.py
Outdated
>>> sh.inputs.in_file = 'odf.mif' | ||
>>> sh.inputs.response = 'response.txt' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files should exist in https://github.com/nipy/nipype/tree/master/nipype/testing/data. If there isn't already one with a name that works for this tool, feel free to create an empty file with that name.
nipype/interfaces/mrtrix3/utils.py
Outdated
>>> sh = mrt.SHConv() | ||
>>> sh.inputs.in_file = 'odf.mif' | ||
>>> sh.inputs.response = 'response.txt' | ||
>>> sh.cmdline # doctest: +ELLIPSIS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No ...
appears in the output line.
>>> sh.cmdline # doctest: +ELLIPSIS | |
>>> sh.cmdline |
nipype/interfaces/mrtrix3/utils.py
Outdated
>>> sh = mrt.SH2Amp() | ||
>>> sh.inputs.in_file = 'sh.mif' | ||
>>> sh.inputs.directions = 'grads.txt' | ||
>>> sh.cmdline # doctest: +ELLIPSIS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
>>> sh.cmdline # doctest: +ELLIPSIS | |
>>> sh.cmdline |
Also can you run |
for correct algorithm when using predicted_signal
Ok, I think I have made all the changes you requested now |
Codecov Report
@@ Coverage Diff @@
## master #3280 +/- ##
==========================================
+ Coverage 65.07% 65.08% +0.01%
==========================================
Files 307 307
Lines 40323 40362 +39
Branches 5326 5329 +3
==========================================
+ Hits 26240 26270 +30
- Misses 13010 13019 +9
Partials 1073 1073
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding msmt_csd
, please see #3176 and #3004.
I think what we want to do is leave EstimateFOD
alone and improve ConstrainedSphericalDeconvolution
, since that one is capable of doing something other than msmt_csd
. This would encourage people to move to the more "correct" interface to get the full feature set.
Some small suggestions, but otherwise this is looking good.
Hey @tclose just a reminder that there are unresolved suggestions here. |
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Sorry, I think I was on leave when they came through and they slipped of the radar. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just about there, @tclose. Can you merge master
, as well, to get any bug fixes from there?
I'm going to try to make a release in the next couple days. If you want to try to finish this off, I'd love to include it! |
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Sorry to miss your release, I'm just getting back into this now. Hopefully it passes the checks now (I'm off to bed:). On a very tangential note, I have created a new Pydra task repository for Dcm2niix at tclose/pydra-dcm2niix, which is nearly ready to go I think. Would it be good to migrate it into the nipype org, and if so, which is the best way to do this? |
Oh, hey Tom. We didn't actually release due to some failing checks, so I'll try to get this in. Re pydra-dcm2niix, would you mind opening an issue on https://github.com/nipype/pydra-tasks-template/issues? We don't really have a process for transitioning projects into nipype control, so this would be a good one to work through manually. At some point, it would be nice to have something like a |
Ok great, so it is all good to go now? |
Looks like it! In it goes. |
Summary
This PR adds the predicted signal output option of MRtrix's dwi2tensor two interfaces to mrtrix3.utils: SHConv and SH2Amp, which wrap the MRtrix3 (>v3.0.0) commands
shconv
andsh2amp
respectively. Together these can be useful for calculating the residual signal after fitting tensor or ODF models.List of changes proposed in this PR (pull-request)
Acknowledgment