Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .zenodo.json
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,10 @@
"affiliation": "Sagol School of Neuroscience, Tel Aviv University",
"name": "Baratz, Zvi"
},
{
"affiliation": "Sagol School of Neuroscience, Tel Aviv University",
"name": "Ben-Zvi, Gal"
},
{
"name": "Matsubara, K"
},
Expand Down
16 changes: 12 additions & 4 deletions nipype/interfaces/mrtrix3/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,17 @@ class DWIBiasCorrectInputSpec(MRTrix3BaseInputSpec):
)
in_mask = File(argstr="-mask %s", desc="input mask image for bias field estimation")
use_ants = traits.Bool(
argstr="-ants",
argstr="ants",
mandatory=True,
desc="use ANTS N4 to estimate the inhomogeneity field",
position=0,
xor=["use_fsl"],
)
use_fsl = traits.Bool(
argstr="-fsl",
argstr="fsl",
mandatory=True,
desc="use FSL FAST to estimate the inhomogeneity field",
position=0,
xor=["use_ants"],
)
bias = File(argstr="-bias %s", desc="bias field")
Expand Down Expand Up @@ -224,14 +226,20 @@ class DWIBiasCorrect(MRTrix3Base):
>>> bias_correct.inputs.in_file = 'dwi.mif'
>>> bias_correct.inputs.use_ants = True
>>> bias_correct.cmdline
'dwibiascorrect -ants dwi.mif dwi_biascorr.mif'
'dwibiascorrect ants dwi.mif dwi_biascorr.mif'
>>> bias_correct.run() # doctest: +SKIP
"""

_cmd = "dwibiascorrect"
input_spec = DWIBiasCorrectInputSpec
output_spec = DWIBiasCorrectOutputSpec

def _format_arg(self, name, trait_spec, value):
if name in ("use_ants", "use_fsl"):
ver = self.version
# Changed in version 3.0, after release candidates
if ver is not None and (ver[0] < "3" or ver.startswith("3.0_RC")):
return f"-{trait_spec.argstr}"
super()._format_arg(name, trait_spec, value)

class ResponseSDInputSpec(MRTrix3BaseInputSpec):
algorithm = traits.Enum(
Expand Down