Skip to content

Commit 757c10e

Browse files
josephmjeoesteban
authored andcommitted
address suggested changes
1 parent 4e90afd commit 757c10e

File tree

3 files changed

+25
-17
lines changed

3 files changed

+25
-17
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_DWIDenoise.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def test_DWIDenoise_inputs():
4040
noise=dict(
4141
argstr='-noise %s',
4242
extensions=None,
43-
genfile=True,
4443
keep_extension=True,
4544
name_source='in_file',
4645
name_template='%s_noise',
@@ -52,7 +51,6 @@ def test_DWIDenoise_inputs():
5251
out_file=dict(
5352
argstr='%s',
5453
extensions=None,
55-
genfile=True,
5654
keep_extension=True,
5755
name_source='in_file',
5856
name_template='%s_denoised',

nipype/interfaces/mrtrix3/tests/test_auto_MRDeGibbs.py

Lines changed: 13 additions & 4 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(
@@ -37,17 +38,25 @@ def test_MRDeGibbs_inputs():
3738
mandatory=True,
3839
position=-2,
3940
),
40-
maxW=dict(argstr='-maxW %d', ),
41-
minW=dict(argstr='-minW %d', ),
42-
nshifts=dict(argstr='-nshifts %d', ),
41+
maxW=dict(
42+
argstr='-maxW %d',
43+
use_default=True,
44+
),
45+
minW=dict(
46+
argstr='-minW %d',
47+
use_default=True,
48+
),
49+
nshifts=dict(
50+
argstr='-nshifts %d',
51+
use_default=True,
52+
),
4353
nthreads=dict(
4454
argstr='-nthreads %d',
4555
nohash=True,
4656
),
4757
out_file=dict(
4858
argstr='%s',
4959
extensions=None,
50-
genfile=True,
5160
keep_extension=True,
5261
name_source='in_file',
5362
name_template='%s_unr',

0 commit comments

Comments
 (0)