Skip to content

Commit ca60263

Browse files
committed
fix:docstrings
1 parent 66487ba commit ca60263

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

nipype/interfaces/elastix/registration.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# @Author: oesteban - code@oscaresteban.es
77
# @Date: 2014-06-02 12:06:50
88
# @Last Modified by: oesteban
9-
# @Last Modified time: 2014-08-14 19:04:57
9+
# @Last Modified time: 2014-09-01 21:03:57
1010
"""
1111
Interfaces to perform image registrations and to apply the resulting
1212
displacement maps to images and points.
@@ -60,6 +60,8 @@ class Registration(CommandLine):
6060
>>> reg.inputs.parameters = ['elastix.txt']
6161
>>> reg.cmdline
6262
'elastix -f fixed1.nii -m moving1.nii -out ./ -p elastix.txt'
63+
64+
6365
"""
6466

6567
_cmd = 'elastix'
@@ -137,17 +139,21 @@ class ApplyWarpOutputSpec(TraitedSpec):
137139
warped_file = File(desc='input moving image warped to fixed image')
138140

139141
class ApplyWarp(CommandLine):
140-
"""Use `transformix` to apply a transform on an input image.
142+
"""
143+
Use ``transformix`` to apply a transform on an input image.
141144
The transform is specified in the transform-parameter file.
142145
143-
Example::
146+
Example
147+
-------
144148
145149
>>> from nipype.interfaces.elastix import ApplyWarp
146150
>>> reg = ApplyWarp()
147151
>>> reg.inputs.moving_image = 'moving1.nii'
148152
>>> reg.inputs.transform_file = 'TransformParameters.0.txt'
149153
>>> reg.cmdline
150154
'transformix -in moving1.nii -out ./ -tp TransformParameters.0.txt'
155+
156+
151157
"""
152158

153159
_cmd = 'transformix'
@@ -185,6 +191,8 @@ class AnalyzeWarp(CommandLine):
185191
>>> reg.inputs.transform_file = 'TransformParameters.0.txt'
186192
>>> reg.cmdline
187193
'transformix -def all -jac all -jacmat all -out ./ -tp TransformParameters.0.txt'
194+
195+
188196
"""
189197

190198
_cmd = 'transformix -def all -jac all -jacmat all'
@@ -212,17 +220,20 @@ class PointsWarpOutputSpec(TraitedSpec):
212220
warped_file = File(desc='input points displaced in fixed image domain')
213221

214222
class PointsWarp(CommandLine):
215-
"""Use `transformix` to apply a transform on an input point set.
223+
"""Use ``transformix`` to apply a transform on an input point set.
216224
The transform is specified in the transform-parameter file.
217225
218-
Example::
226+
Example
227+
-------
219228
220229
>>> from nipype.interfaces.elastix import PointsWarp
221230
>>> reg = PointsWarp()
222231
>>> reg.inputs.points_file = 'surf1.vtk'
223232
>>> reg.inputs.transform_file = 'TransformParameters.0.txt'
224233
>>> reg.cmdline
225234
'transformix -out ./ -def surf1.vtk -tp TransformParameters.0.txt'
235+
236+
226237
"""
227238

228239
_cmd = 'transformix'

nipype/interfaces/elastix/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# @Author: oesteban - code@oscaresteban.es
77
# @Date: 2014-06-17 10:17:07
88
# @Last Modified by: oesteban
9-
# @Last Modified time: 2014-06-27 10:25:36
9+
# @Last Modified time: 2014-09-01 21:05:33
1010
"""
1111
Generic interfaces to manipulate registration parameters files, including
1212
transform files (to configure warpings)
@@ -51,14 +51,17 @@ class EditTransform(BaseInterface):
5151
"""
5252
Manipulates an existing transform file generated with elastix
5353
54-
Example::
54+
Example
55+
-------
5556
5657
>>> from nipype.interfaces.elastix import EditTransform
5758
>>> tfm = EditTransform()
5859
>>> tfm.inputs.transform_file = 'TransformParameters.0.txt'
5960
>>> tfm.inputs.reference_image = 'fixed1.nii'
6061
>>> tfm.inputs.output_type = 'unsigned char'
6162
>>> tfm.run() # doctest: +SKIP
63+
64+
6265
"""
6366

6467
input_spec = EditTransformInputSpec

0 commit comments

Comments
 (0)