Skip to content

Commit 79992cd

Browse files
josephmjeoesteban
authored andcommitted
address suggested changes
1 parent af7264f commit 79992cd

File tree

2 files changed

+25
-14
lines changed

2 files changed

+25
-14
lines changed

nipype/interfaces/mrtrix3/preprocess.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,14 @@ class DWIDenoiseInputSpec(MRTrix3BaseInputSpec):
3232
name_template='%s_noise',
3333
name_source='in_file',
3434
keep_extension=True,
35-
desc='the output noise map',
36-
genfile=True)
35+
desc='the output noise map')
3736
out_file = File(
3837
argstr='%s',
3938
position=-1,
4039
name_template='%s_denoised',
4140
name_source='in_file',
4241
keep_extension=True,
43-
desc='the output denoised DWI image',
44-
genfile=True)
42+
desc='the output denoised DWI image')
4543

4644

4745
class DWIDenoiseOutputSpec(TraitedSpec):
@@ -93,24 +91,28 @@ class MRDeGibbsInputSpec(MRTrix3BaseInputSpec):
9391
mandatory=True,
9492
desc='input DWI image')
9593
axes = traits.ListInt(
96-
[0,1],
94+
default_value=[0, 1],
95+
use_default=True,
9796
sep=',',
9897
minlen=2,
9998
maxlen=2,
10099
argstr='-axes %s',
101100
desc='indicate the plane in which the data was acquired (axial = 0,1; '
102101
'coronal = 0,2; sagittal = 1,2')
103102
nshifts = traits.Int(
104-
20,
103+
default_value=20,
104+
use_default=True,
105105
argstr='-nshifts %d',
106106
desc='discretization of subpixel spacing (default = 20)')
107107
minW = traits.Int(
108-
1,
108+
default_value=1,
109+
use_default=True,
109110
argstr='-minW %d',
110111
desc='left border of window used for total variation (TV) computation '
111112
'(default = 1)')
112113
maxW = traits.Int(
113-
3,
114+
default_value=3,
115+
use_default=True,
114116
argstr='-maxW %d',
115117
desc='right border of window used for total variation (TV) computation '
116118
'(default = 3)')
@@ -120,8 +122,7 @@ class MRDeGibbsInputSpec(MRTrix3BaseInputSpec):
120122
keep_extension=True,
121123
argstr='%s',
122124
position=-1,
123-
desc='the output unringed DWI image',
124-
genfile=True)
125+
desc='the output unringed DWI image')
125126

126127
class MRDeGibbsOutputSpec(TraitedSpec):
127128
out_file = File(desc='the output unringed DWI image', exists=True)
@@ -158,7 +159,7 @@ class MRDeGibbs(MRTrix3Base):
158159
>>> unring = mrt.MRDeGibbs()
159160
>>> unring.inputs.in_file = 'dwi.mif'
160161
>>> unring.cmdline
161-
'mrdegibbs dwi.mif dwi_unr.mif'
162+
'mrdegibbs -axes 0,1 -maxW 3 -minW 1 -nshifts 20 dwi.mif dwi_unr.mif'
162163
>>> unring.run() # doctest: +SKIP
163164
"""
164165

nipype/interfaces/mrtrix3/tests/test_auto_MRDeGibbs.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def test_MRDeGibbs_inputs():
1111
maxlen=2,
1212
minlen=2,
1313
sep=',',
14+
use_default=True,
1415
),
1516
bval_scale=dict(argstr='-bvalue_scaling %s', ),
1617
environ=dict(
@@ -26,9 +27,18 @@ def test_MRDeGibbs_inputs():
2627
mandatory=True,
2728
position=-2,
2829
),
29-
maxW=dict(argstr='-maxW %d', ),
30-
minW=dict(argstr='-minW %d', ),
31-
nshifts=dict(argstr='-nshifts %d', ),
30+
maxW=dict(
31+
argstr='-maxW %d',
32+
use_default=True,
33+
),
34+
minW=dict(
35+
argstr='-minW %d',
36+
use_default=True,
37+
),
38+
nshifts=dict(
39+
argstr='-nshifts %d',
40+
use_default=True,
41+
),
3242
nthreads=dict(
3343
argstr='-nthreads %d',
3444
nohash=True,

0 commit comments

Comments
 (0)