-
Notifications
You must be signed in to change notification settings - Fork 532
[ENH]: Add mrdegibbs and dwibiascorrect from mrtrix3 #2904
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
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.
Thank you for the contribution! I left some minor comments/questions below, but overall this look good.
>>> import nipype.interfaces.mrtrix3 as mrt | ||
>>> unring = mrt.MRDeGibbs() | ||
>>> unring.inputs.in_file = 'dwi.mif' | ||
>>> unring.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.
i don't think you need the ELLIPSIS
option
|
||
class DWIDenoiseOutputSpec(TraitedSpec): | ||
out_file = File(desc="the output denoised DWI image", exists=True) | ||
out_noisemap = File(desc='the output noise map', exists=True) |
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.
is this always output?
genfile=True) | ||
|
||
class DWIBiasCorrectOutputSpec(TraitedSpec): | ||
out_bias = File(desc='the output estimated bias field') |
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.
is this always output?
>>> import nipype.interfaces.mrtrix3 as mrt | ||
>>> bias_correct = mrt.DWIBiasCorrect() | ||
>>> bias_correct.inputs.in_file = 'dwi.mif' | ||
>>> bias_correct.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.
ellipsis not needed
Codecov Report
@@ Coverage Diff @@
## master #2904 +/- ##
==========================================
+ Coverage 67.56% 67.57% +<.01%
==========================================
Files 343 343
Lines 43604 43648 +44
Branches 5427 5429 +2
==========================================
+ Hits 29461 29493 +32
- Misses 13438 13443 +5
- Partials 705 712 +7
Continue to review full report at Codecov.
|
Thanks for your feedback @mgxd! I reverted my variable name change to dwidenoise in case it affects existing code using it. Also modified the arguments to the optional output files. |
tests should start passing again if you merge with master |
@@ -28,16 +28,17 @@ class DWIDenoiseInputSpec(MRTrix3BaseInputSpec): | |||
desc='set the window size of the denoising filter. (default = 5,5,5)') | |||
noise = File( |
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.
it doesn't look like this is currently being tracked as an output by the interface, but if this is set it I think dwidenoise
would make it. You should :
- re-add it to the OutputSpec (
noise = File(..., exists=True
) - add a
_list_outputs()
method that checks ifself.inputs.noise
is defined, and if so adds it to outputs.
Here's an example of (2) - though you won't have to generate a filename.
@mgxd I finished incorporating your suggestions. Let me know if there's anything else I'm missing. |
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.
Looks good, thanks for the contribution!
Summary
Addition of dwibiascorrect references #1126
List of changes proposed in this PR (pull-request)
Acknowledgment
I acknowledge that this contribution will be available under the Apache 2 license.