Skip to content

Commit 83bc6a4

Browse files
committed
add noisemap to dwidenoise and fix mrdegibbs
1 parent c32258c commit 83bc6a4

File tree

1 file changed

+22
-21
lines changed

1 file changed

+22
-21
lines changed

nipype/interfaces/mrtrix3/preprocess.py

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class DWIDenoiseInputSpec(MRTrix3BaseInputSpec):
2626
extent = traits.Tuple((traits.Int, traits.Int, traits.Int),
2727
argstr='-extent %d,%d,%d',
2828
desc='set the window size of the denoising filter. (default = 5,5,5)')
29-
out_noise = File(name_template='%s_noise',
29+
out_noisemap = File(name_template='%s_noisemap',
3030
name_source='in_file',
3131
keep_extension=True,
3232
argstr='-noise %s',
@@ -41,7 +41,7 @@ class DWIDenoiseInputSpec(MRTrix3BaseInputSpec):
4141
genfile=True)
4242

4343
class DWIDenoiseOutputSpec(TraitedSpec):
44-
out_noise = File(desc="the output noise map", exists=True)
44+
out_noisemap = File(desc="the output noise map", exists=True)
4545
out_file = File(desc="the output denoised DWI image", exists=True)
4646

4747
class DWIDenoise(MRTrix3Base):
@@ -87,28 +87,27 @@ class MRDeGibbsInputSpec(MRTrix3BaseInputSpec):
8787
position=-2,
8888
mandatory=True,
8989
desc='input DWI image')
90-
axes = InputMultiObject(
91-
traits.Int,
92-
value=[0,1],
90+
axes = traits.ListInt(
91+
default_value=[0,1],
92+
sep=',',
93+
minlen=1,
94+
maxlen=4,
9395
usedefault=True,
94-
argstr='-axes %s', # how to define list?
96+
argstr='-axes %s',
9597
desc='select the slice axes (default = 0,1)')
96-
nshifts = InputMultiObject(
97-
traits.Int,
98-
value=[20],
98+
nshifts = traits.Int(
99+
default_value=20,
99100
usedefault=True,
100101
argstr='-nshifts %d',
101102
desc='discretizaiton of subpixel spacing (default = 20)')
102-
minW = InputMultiObject(
103-
traits.Int,
104-
value=[1],
103+
minW = traits.Int(
104+
default_value=1,
105105
usedefault=True,
106106
argstr='-minW %d',
107107
desc='left border of window used for total variation (TV) computation '
108108
'(default = 1)')
109-
maxW = InputMultiObject(
110-
traits.Int,
111-
value=[3],
109+
maxW = traits.Int(
110+
default_value=3,
112111
usedefault=True,
113112
argstr='-maxW %d',
114113
desc='right border of window used for total variation (TV) computation '
@@ -174,15 +173,16 @@ class DWIBiasCorrectInputSpec(MRTrix3BaseInputSpec):
174173
desc='input DWI image')
175174
in_mask = File(
176175
argstr='-mask %s',
177-
desc='mask image')
178-
ants = traits.Bool(
179-
True,
176+
desc='input mask image for bias field estimation')
177+
_xor_inputs = ('use_ants', 'use_fsl')
178+
use_ants = traits.Bool(
180179
argstr='-ants',
181-
desc='use ANTS N4 to estimate the inhomogeneity field')
182-
fsl = traits.Bool(
183-
False,
180+
desc='use ANTS N4 to estimate the inhomogeneity field',
181+
xor=_xor_inputs)
182+
use_fsl = traits.Bool(
184183
argstr='-fsl',
185184
desc='use FSL FAST to estimate the inhomogeneity field',
185+
xor=_xor_inputs,
186186
min_ver='5.0.10')
187187
# only one of either grad or fslgrad should be supplied
188188
grad = File(
@@ -206,6 +206,7 @@ class DWIBiasCorrectInputSpec(MRTrix3BaseInputSpec):
206206
genfile=True)
207207

208208
class DWIBiasCorrectOutputSpec(TraitedSpec):
209+
out_bias = File(desc="the output estimated bias field")
209210
out_file = File(desc="the output bias corrected DWI image", exists=True)
210211

211212
class DWIBiasCorrect(MRTrix3Base):

0 commit comments

Comments
 (0)