@@ -26,17 +26,22 @@ class DWIDenoiseInputSpec(MRTrix3BaseInputSpec):
26
26
extent = traits .Tuple ((traits .Int , traits .Int , traits .Int ),
27
27
argstr = '-extent %d,%d,%d' ,
28
28
desc = 'set the window size of the denoising filter. (default = 5,5,5)' )
29
- noise = File (
29
+ out_noise = File (name_template = '%s_noise' ,
30
+ name_source = 'in_file' ,
31
+ keep_extension = True ,
30
32
argstr = '-noise %s' ,
31
- desc = 'noise map' )
33
+ desc = "the output noise map" ,
34
+ genfile = True )
32
35
out_file = File (name_template = '%s_denoised' ,
33
36
name_source = 'in_file' ,
34
37
keep_extension = True ,
35
38
argstr = "%s" ,
36
39
position = - 1 ,
37
- desc = "the output denoised DWI image" )
40
+ desc = "the output denoised DWI image" ,
41
+ genfile = True )
38
42
39
43
class DWIDenoiseOutputSpec (TraitedSpec ):
44
+ out_noise = File (desc = "the output noise map" , exists = True )
40
45
out_file = File (desc = "the output denoised DWI image" , exists = True )
41
46
42
47
class DWIDenoise (MRTrix3Base ):
@@ -84,10 +89,10 @@ class MRDeGibbsInputSpec(MRTrix3BaseInputSpec):
84
89
desc = 'input DWI image' )
85
90
axes = InputMultiObject (
86
91
traits .Int ,
87
- value = [0 ],
92
+ value = [0 , 1 ],
88
93
usedefault = True ,
89
- argstr = '-axes %d' ,
90
- desc = 'select the slice axes (default = 0)' )
94
+ argstr = '-axes %s' , # how to define list?
95
+ desc = 'select the slice axes (default = 0,1 )' )
91
96
nshifts = InputMultiObject (
92
97
traits .Int ,
93
98
value = [20 ],
@@ -99,19 +104,22 @@ class MRDeGibbsInputSpec(MRTrix3BaseInputSpec):
99
104
value = [1 ],
100
105
usedefault = True ,
101
106
argstr = '-minW %d' ,
102
- desc = 'left border of window used for TV computation (default = 1)' )
107
+ desc = 'left border of window used for total variation (TV) computation '
108
+ '(default = 1)' )
103
109
maxW = InputMultiObject (
104
110
traits .Int ,
105
111
value = [3 ],
106
112
usedefault = True ,
107
113
argstr = '-maxW %d' ,
108
- desc = 'right border of window used for TV computation (default = 3)' )
114
+ desc = 'right border of window used for total variation (TV) computation '
115
+ '(default = 3)' )
109
116
out_file = File (name_template = '%s_unring' ,
110
117
name_source = 'in_file' ,
111
118
keep_extension = True ,
112
119
argstr = "%s" ,
113
120
position = - 1 ,
114
- desc = "the output unringed DWI image" )
121
+ desc = "the output unringed DWI image" ,
122
+ genfile = True )
115
123
116
124
class MRDeGibbsOutputSpec (TraitedSpec ):
117
125
out_file = File (desc = "the output unringed DWI image" , exists = True )
@@ -147,9 +155,9 @@ class MRDeGibbs(MRTrix3Base):
147
155
>>> import nipype.interfaces.mrtrix3 as mrt
148
156
>>> unring = mrt.MRDeGibbs()
149
157
>>> unring.inputs.in_file = 'dwi.mif'
150
- >>> unring.cmdline
158
+ >>> unring.cmdline # doctest: +ELLIPSIS
151
159
'mrdegibbs dwi.mif dwi_unring.mif'
152
- >>> unring.run()
160
+ >>> unring.run() # doctest: +SKIP
153
161
"""
154
162
155
163
_cmd = 'mrdegibbs'
@@ -164,33 +172,38 @@ class DWIBiasCorrectInputSpec(MRTrix3BaseInputSpec):
164
172
position = - 2 ,
165
173
mandatory = True ,
166
174
desc = 'input DWI image' )
167
- mask = File (
175
+ in_mask = File (
168
176
argstr = '-mask %s' ,
169
177
desc = 'mask image' )
170
- bias = File (
171
- argstr = '-bias %s' ,
172
- desc = 'bias field' )
173
178
ants = traits .Bool (
174
179
True ,
175
180
argstr = '-ants' ,
176
- desc = 'use ANTS N4' )
181
+ desc = 'use ANTS N4 to estimate the inhomogeneity field ' )
177
182
fsl = traits .Bool (
178
183
False ,
179
184
argstr = '-fsl' ,
180
- desc = 'use FSL FAST' ,
185
+ desc = 'use FSL FAST to estimate the inhomogeneity field ' ,
181
186
min_ver = '5.0.10' )
187
+ # only one of either grad or fslgrad should be supplied
182
188
grad = File (
183
189
argstr = '-grad %s' ,
184
190
desc = 'diffusion gradient table in MRtrix format' )
185
191
fslgrad = File (
186
192
argstr = '-fslgrad %s %s' ,
187
193
desc = 'diffusion gradient table in FSL bvecs/bvals format' )
188
- out_file = File (name_template = '%s_unbias' ,
194
+ out_bias = File (name_template = '%s_biasfield' ,
195
+ name_source = 'in_file' ,
196
+ keep_extension = True ,
197
+ argstr = '-bias %s' ,
198
+ desc = 'bias field' ,
199
+ genfile = True )
200
+ out_file = File (name_template = '%s_biascorr' ,
189
201
name_source = 'in_file' ,
190
202
keep_extension = True ,
191
203
argstr = "%s" ,
192
204
position = - 1 ,
193
- desc = "the output bias corrected DWI image" )
205
+ desc = "the output bias corrected DWI image" ,
206
+ genfile = True )
194
207
195
208
class DWIBiasCorrectOutputSpec (TraitedSpec ):
196
209
out_file = File (desc = "the output bias corrected DWI image" , exists = True )
@@ -208,9 +221,9 @@ class DWIBiasCorrect(MRTrix3Base):
208
221
>>> import nipype.interfaces.mrtrix3 as mrt
209
222
>>> bias_correct = mrt.DWIBiasCorrect()
210
223
>>> bias_correct.inputs.in_file = 'dwi.mif'
211
- >>> bias_correct.cmdline
212
- 'dwibiascorrect dwi.mif dwi_unbias .mif'
213
- >>> bias_correct.run()
224
+ >>> bias_correct.cmdline # doctest: +ELLIPSIS
225
+ 'dwibiascorrect dwi.mif dwi_biascorr .mif'
226
+ >>> bias_correct.run() # doctest: +SKIP
214
227
"""
215
228
216
229
_cmd = 'dwibiascorrect'
0 commit comments