Skip to content

Commit 0f0924a

Browse files
committed
include multiple examples
1 parent 1327e5b commit 0f0924a

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

nipype/interfaces/mrtrix3/utils.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -698,20 +698,14 @@ class MRResizeInputSpec(MRTrix3BaseInputSpec):
698698
(traits.Float, traits.Float, traits.Float),
699699
argstr='-voxel %g,%g,%g',
700700
mandatory=True,
701-
desc='define the new voxel size for the output image. This can be '
702-
'specified either as a single value to be used for all '
703-
'dimensions, or as a comma-separated list of the size for each '
704-
'voxel dimension.',
701+
desc='Desired voxel size in mm for the output image',
705702
xor=['image_size', 'scale_factor'],
706703
)
707704
scale_factor = traits.Tuple(
708705
(traits.Float, traits.Float, traits.Float),
709706
argstr='-scale %g,%g,%g',
710707
mandatory=True,
711-
desc='scale the image resolution by the supplied factor. This can be '
712-
'specified either as a single value to be used for all '
713-
'dimensions, or as a comma-separated list of scale factors for '
714-
'each dimension.',
708+
desc='Scale factors to rescale the image by in each dimension',
715709
xor=['image_size', 'voxel_size'],
716710
)
717711
interpolation = traits.Enum(
@@ -752,9 +746,17 @@ class MRResize(MRTrix3Base):
752746
>>> import nipype.interfaces.mrtrix3 as mrt
753747
>>> resize = mrt.MRResize()
754748
>>> resize.inputs.in_file = 'dwi.mif'
749+
>>> resize.inputs.image_size = (256, 256, 144)
750+
>>> resize.cmdline # doctest: +ELLIPSIS
751+
'mrresize -interp cubic -size 256,256,144 dwi.mif dwi_resized.mif'
752+
>>> resize.run() # doctest: +SKIP
755753
>>> resize.inputs.voxel_size = (1, 1, 1)
756754
>>> resize.cmdline # doctest: +ELLIPSIS
757-
'mrresize -voxel 1,1,1 dwi.mif dwi_resized.mif'
755+
'mrresize -interp cubic -voxel 1,1,1 dwi.mif dwi_resized.mif'
756+
>>> resize.run() # doctest: +SKIP
757+
>>> resize.inputs.scale_factor = (2.0,2.0,2.0)
758+
>>> resize.cmdline # doctest: +ELLIPSIS
759+
'mrresize -interp cubic -scale 2.0,2.0,2.0 dwi.mif dwi_resized.mif'
758760
>>> resize.run() # doctest: +SKIP
759761
"""
760762

0 commit comments

Comments
 (0)