Skip to content

Commit e921ddf

Browse files
committed
added descriptions, few minor fixes
1 parent 155ae52 commit e921ddf

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

nipype/interfaces/dtitk/registration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ class DiffeoScalarVolInputSpec(CommandLineInputSpec):
378378
out_file = File(desc='output filename',
379379
argstr="-out %s", name_source="in_file",
380380
name_template="%s_diffeoxfmd", keep_extension=True)
381-
transform = transform = File(exists=True, argstr="-trans %s",
382-
mandatory=True, desc='transform to apply')
381+
transform = File(exists=True, argstr="-trans %s",
382+
mandatory=True, desc='transform to apply')
383383
target = File(exists=True, argstr="-target %s", xor=['voxel_size'],
384384
desc='output volume specification read from the target '
385385
'volume if specified')

nipype/interfaces/dtitk/tests/test_auto_TVAdjustVoxSp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def test_TVAdjustVoxSp_inputs():
2525
),
2626
out_file=dict(
2727
argstr='-out %s',
28-
genfile=True,
2928
keep_extension=True,
3029
name_source='in_file',
3130
name_template='%s_avs',

nipype/interfaces/dtitk/utils.py

Lines changed: 23 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
class TVAdjustVoxSpInputSpec(CommandLineInputSpec):
3737
in_file = File(desc="tensor volume to modify", exists=True,
3838
mandatory=True, argstr="-in %s")
39-
out_file = File(genfile=True, desc='output path',
39+
out_file = File(desc='output path',
4040
argstr="-out %s", name_source='in_file',
4141
name_template='%s_avs', keep_extension=True)
4242
target_file = File(desc='target volume to match',
@@ -263,15 +263,19 @@ def _gen_filename(self, name):
263263
class BinThreshInputSpec(CommandLineInputSpec):
264264
in_file = File(desc='Image to threshold/binarize', exists=True,
265265
position=0, argstr="%s", mandatory=True)
266-
out_file = File(desc='', position=1, argstr="%s",
266+
out_file = File(desc='output path', position=1, argstr="%s",
267267
keep_extension=True, name_source='in_file',
268268
name_template='%s_thrbin')
269-
lower_bound = traits.Float(0.01, position=2, argstr="%g", mandatory=True)
270-
upper_bound = traits.Float(100, position=3, argstr="%g", mandatory=True)
269+
lower_bound = traits.Float(0.01, position=2, argstr="%g", mandatory=True,
270+
desc='lower bound of binarization range')
271+
upper_bound = traits.Float(100, position=3, argstr="%g", mandatory=True,
272+
desc='upper bound of binarization range')
271273
inside_value = traits.Float(1, position=4, argstr="%g", usedefault=True,
272-
mandatory=True)
274+
mandatory=True, desc='value for voxels in '
275+
'binarization range')
273276
outside_value = traits.Float(0, position=5, argstr="%g", usedefault=True,
274-
mandatory=True)
277+
mandatory=True, desc='value for voxels'
278+
'outside of binarization range')
275279

276280

277281
class BinThreshOutputSpec(TraitedSpec):
@@ -282,20 +286,20 @@ class BinThresh(CommandLineDtitk):
282286
"""
283287
Binarizes an image
284288
285-
Example
286-
-------
289+
Example
290+
-------
287291
288-
>>> from nipype.interfaces import dtitk
289-
>>> node = dtitk.BinThresh()
290-
>>> node.inputs.in_file = 'im1.nii'
291-
>>> node.inputs.lower_bound = 0
292-
>>> node.inputs.upper_bound = 100
293-
>>> node.inputs.inside_value = 1
294-
>>> node.inputs.outside_value = 0
295-
>>> node.cmdline
296-
'BinaryThresholdImageFilter im1.nii im1_thrbin.nii 0 100 1 0'
297-
>>> node.run() # doctest: +SKIP
298-
"""
292+
>>> from nipype.interfaces import dtitk
293+
>>> node = dtitk.BinThresh()
294+
>>> node.inputs.in_file = 'im1.nii'
295+
>>> node.inputs.lower_bound = 0
296+
>>> node.inputs.upper_bound = 100
297+
>>> node.inputs.inside_value = 1
298+
>>> node.inputs.outside_value = 0
299+
>>> node.cmdline
300+
'BinaryThresholdImageFilter im1.nii im1_thrbin.nii 0 100 1 0'
301+
>>> node.run() # doctest: +SKIP
302+
"""
299303

300304
input_spec = BinThreshInputSpec
301305
output_spec = BinThreshOutputSpec

0 commit comments

Comments
 (0)