Skip to content

Commit 2c684f1

Browse files
committed
fix errors in niftyreg workflows docstrings
1 parent 6c1d962 commit 2c684f1

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

nipype/workflows/smri/niftyreg/groupwise.py

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
22
# vi: set ft=python sts=4 ts=4 sw=4 et:
33

4-
'''
5-
This file provides some common registration routines useful for a variety of
6-
pipelines.
7-
8-
Including linear and non-linear image co-registration
9-
'''
4+
"""
5+
Example of registration workflows using niftyreg, useful for a variety of
6+
pipelines. Including linear and non-linear image co-registration
7+
"""
108

119
from builtins import str, range
1210
import nipype.interfaces.utility as niu
@@ -20,7 +18,7 @@ def create_linear_gw_step(name="linear_gw_niftyreg",
2018
use_mask=False,
2119
verbose=False):
2220
"""
23-
Creates a workflow that perform linear co-registration of a set of images
21+
Creates a workflow that performs linear co-registration of a set of images
2422
using RegAladin, producing an average image and a set of affine
2523
transformation matrices linking each of the floating images to the average.
2624
@@ -38,6 +36,7 @@ def create_linear_gw_step(name="linear_gw_niftyreg",
3836
outputspec.aff_files - The affine transformation files
3937
4038
Optional arguments::
39+
4140
linear_options_hash - An options dictionary containing a list of
4241
parameters for RegAladin that take
4342
the same form as given in the interface (default None)
@@ -51,8 +50,8 @@ def create_linear_gw_step(name="linear_gw_niftyreg",
5150
5251
>>> from nipype.workflows.smri.niftyreg import create_linear_gw_step
5352
>>> lgw = create_linear_gw_step('my_linear_coreg') # doctest: +SKIP
54-
>>> lgw.inputs.inputspec.in_files = ['file1.nii.gz', 'file2.nii.gz'] \
55-
# doctest: +SKIP
53+
>>> lgw.inputs.inputspec.in_files = [
54+
... 'file1.nii.gz', 'file2.nii.gz'] # doctest: +SKIP
5655
>>> lgw.inputs.inputspec.ref_file = ['ref.nii.gz'] # doctest: +SKIP
5756
>>> lgw.run() # doctest: +SKIP
5857
@@ -121,6 +120,7 @@ def create_nonlinear_gw_step(name="nonlinear_gw_niftyreg",
121120
cpp transformation linking each of the floating images to the average.
122121
123122
Inputs::
123+
124124
inputspec.in_files - The input files to be registered
125125
inputspec.ref_file - The initial reference image that the input files
126126
are registered to
@@ -134,6 +134,7 @@ def create_nonlinear_gw_step(name="nonlinear_gw_niftyreg",
134134
outputspec.cpp_files - The bspline transformation files
135135
136136
Optional arguments::
137+
137138
nonlinear_options_hash - An options dictionary containing a list of
138139
parameters for RegAladin that take the
139140
same form as given in the interface (default None)
@@ -144,8 +145,8 @@ def create_nonlinear_gw_step(name="nonlinear_gw_niftyreg",
144145
-------
145146
>>> from nipype.workflows.smri.niftyreg import create_nonlinear_gw_step
146147
>>> nlc = create_nonlinear_gw_step('nonlinear_coreg') # doctest: +SKIP
147-
>>> nlc.inputs.inputspec.in_files = ['file1.nii.gz', 'file2.nii.gz'] \
148-
# doctest: +SKIP
148+
>>> nlc.inputs.inputspec.in_files = [
149+
... 'file1.nii.gz', 'file2.nii.gz'] # doctest: +SKIP
149150
>>> nlc.inputs.inputspec.ref_file = ['ref.nii.gz'] # doctest: +SKIP
150151
>>> nlc.run() # doctest: +SKIP
151152
@@ -246,6 +247,7 @@ def create_groupwise_average(name="atlas_creation",
246247
non-linear components.
247248
248249
Inputs::
250+
249251
inputspec.in_files - The input files to be registered
250252
inputspec.ref_file - The initial reference image that the input files
251253
are registered to
@@ -258,12 +260,14 @@ def create_groupwise_average(name="atlas_creation",
258260
outputspec.average_image - The average image
259261
outputspec.cpp_files - The bspline transformation files
260262
263+
261264
Example
262265
-------
266+
263267
>>> from nipype.workflows.smri.niftyreg import create_groupwise_average
264268
>>> node = create_groupwise_average('groupwise_av') # doctest: +SKIP
265-
>>> node.inputs.inputspec.in_files = ['file1.nii.gz', 'file2.nii.gz'] \
266-
# doctest: +SKIP
269+
>>> node.inputs.inputspec.in_files = [
270+
... 'file1.nii.gz', 'file2.nii.gz'] # doctest: +SKIP
267271
>>> node.inputs.inputspec.ref_file = ['ref.nii.gz'] # doctest: +SKIP
268272
>>> node.inputs.inputspec.rmask_file = ['mask.nii.gz'] # doctest: +SKIP
269273
>>> node.run() # doctest: +SKIP
@@ -384,3 +388,4 @@ def create_groupwise_average(name="atlas_creation",
384388
])
385389

386390
return workflow
391+

0 commit comments

Comments
 (0)