Skip to content

Commit 40ee809

Browse files
committed
Fixing docstring errors
1 parent bab21d6 commit 40ee809

File tree

6 files changed

+249
-165
lines changed

6 files changed

+249
-165
lines changed

nipype/interfaces/niftyseg/em.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
Change directory to provide relative paths for doctests
1515
>>> import os
1616
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
17-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
17+
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/\
18+
data'))
1819
>>> os.chdir(datadir)
1920
"""
2021

@@ -117,9 +118,9 @@ class EM(NiftySegCommand):
117118
it's simplest form, it takes in one 2D or 3D image and segments it in n
118119
classes.
119120
120-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
121-
For Documentation, see:
122-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
121+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
122+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
123+
NiftySeg_documentation>`_
123124
124125
Examples
125126
--------

nipype/interfaces/niftyseg/label_fusion.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
Change directory to provide relative paths for doctests
99
>>> import os
1010
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
11-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
11+
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/\
12+
data'))
1213
>>> os.chdir(datadir)
1314
"""
1415

@@ -133,9 +134,9 @@ class LabelFusion(NiftySegCommand):
133134
FusedSegmentation.nii -STEPS 2 15 TargetImage.nii \
134135
4D_Propagated_Intensities.nii
135136
136-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
137-
For Documentation, see:
138-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
137+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
138+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
139+
NiftySeg_documentation>`_
139140
140141
Examples
141142
--------

nipype/interfaces/niftyseg/lesions.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
Change directory to provide relative paths for doctests
1515
>>> import os
1616
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
17-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
17+
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/\
18+
data'))
1819
>>> os.chdir(datadir)
1920
"""
2021

@@ -99,9 +100,9 @@ class FillLesions(NiftySegCommand):
99100
100101
Fill all the masked lesions with WM intensity average.
101102
102-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
103-
For Documentation, see:
104-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
103+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
104+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
105+
NiftySeg_documentation>`_
105106
106107
Examples
107108
--------

nipype/interfaces/niftyseg/maths.py

Lines changed: 153 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
Change directory to provide relative paths for doctests
1515
>>> import os
1616
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
17-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
17+
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/\
18+
data'))
1819
>>> os.chdir(datadir)
1920
"""
2021

@@ -102,40 +103,61 @@ class UnaryMaths(MathsCommand):
102103
"""Interface for executable seg_maths from NiftySeg platform.
103104
104105
Interface to use any unary mathematical operations that can be performed
105-
with the seg_maths command-line program. See below for those operations:
106-
-sqrt Square root of the image.
107-
-exp Exponential root of the image.
108-
-log Log of the image.
109-
-recip Reciprocal (1/I) of the image.
110-
-abs Absolute value of the image.
111-
-bin Binarise the image.
112-
-otsu Otsu thresholding of the current image.
113-
-lconcomp Take the largest connected component
114-
-concomp6 Label the different connected components with a 6NN
115-
kernel
116-
-concomp26 Label the different connected components with a 26NN
117-
kernel
118-
-fill Fill holes in binary object (e.g. fill ventricle in
119-
brain mask).
120-
-euc Euclidean distance trasnform
121-
-tpmax Get the time point with the highest value (binarise 4D
122-
probabilities)
123-
-tmean Mean value of all time points.
124-
-tmax Max value of all time points.
125-
-tmin Mean value of all time points.
126-
-splitlab Split the integer labels into multiple timepoints
127-
-removenan Remove all NaNs and replace then with 0
128-
-isnan Binary image equal to 1 if the value is NaN and 0
129-
otherwise
130-
-subsamp2 Subsample the image by 2 using NN sampling (qform and
131-
sform scaled)
132-
-scl Reset scale and slope info.
133-
-4to5 Flip the 4th and 5th dimension.
134-
-range Reset the image range to the min max
135-
136-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
137-
For Documentation, see:
138-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
106+
with the seg_maths command-line program.
107+
108+
See below for those operations:
109+
110+
sqrt - Square root of the image).
111+
112+
exp - Exponential root of the image.
113+
114+
log - Log of the image.
115+
116+
recip - Reciprocal (1/I) of the image.
117+
118+
abs - Absolute value of the image.
119+
120+
bin - Binarise the image.
121+
122+
otsu - Otsu thresholding of the current image.
123+
124+
lconcomp - Take the largest connected component
125+
126+
concomp6 - Label the different connected components with a 6NN kernel
127+
128+
concomp26 - Label the different connected components with a 26NN kernel
129+
130+
fill - Fill holes in binary object (e.g. fill ventricle in brain mask).
131+
132+
euc - Euclidean distance trasnform
133+
134+
tpmax - Get the time point with the highest value (binarise 4D \
135+
probabilities)
136+
137+
tmean - Mean value of all time points.
138+
139+
tmax - Max value of all time points.
140+
141+
tmin - Mean value of all time points.
142+
143+
splitlab - Split the integer labels into multiple timepoints
144+
145+
removenan - Remove all NaNs and replace then with 0
146+
147+
isnan - Binary image equal to 1 if the value is NaN and 0 otherwise
148+
149+
subsamp2 - Subsample the image by 2 using NN sampling (qform and sform \
150+
scaled)
151+
152+
scl - Reset scale and slope info.
153+
154+
4to5 - Flip the 4th and 5th dimension.
155+
156+
range - Reset the image range to the min max.
157+
158+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
159+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
160+
NiftySeg_documentation>`_
139161
140162
Examples
141163
--------
@@ -216,41 +238,58 @@ class BinaryMaths(MathsCommand):
216238
"""Interface for executable seg_maths from NiftySeg platform.
217239
218240
Interface to use any binary mathematical operations that can be performed
219-
with the seg_maths command-line program. See below for those operations:
220-
-mul <float/file> Multiply image <float> value or by other image.
221-
-div <float/file> Divide image by <float> or by other image.
222-
-add <float/file> Add image by <float> or by other image.
223-
-sub <float/file> Subtract image by <float> or by other image.
224-
-pow <float> Image to the power of <float>.
225-
-thr <float> Threshold the image below <float>.
226-
-uthr <float> Threshold image above <float>.
227-
-smo <float> Gaussian smoothing by std <float> (in voxels
228-
and up to 4-D).
229-
-edge <float> Calculate the edges of the image using a
230-
threshold <float>.
231-
-sobel3 <float> Calculate the edges of all timepoints using a
232-
Sobel filter with a 3x3x3 kernel and applying
233-
<float> gaussian smoothing.
234-
-sobel5 <float> Calculate the edges of all timepoints using a
235-
Sobel filter with a 5x5x5 kernel and applying
236-
<float> gaussian smoothing.
237-
-min <file> Get the min per voxel between <current> and
238-
<file>.
239-
-smol <float> Gaussian smoothing of a 3D label image.
240-
-geo <float/file> Geodesic distance according to the speed
241-
function <float/file>
242-
-llsnorm <file_norm> Linear LS normalisation between current and
243-
<file_norm>
244-
-masknan <file_norm> Assign everything outside the mask (mask==0)
245-
with NaNs
246-
-hdr_copy <file> Copy header from working image to <file> and
247-
save in <output>.
248-
-splitinter <x/y/z> Split interleaved slices in direction <x/y/z>
249-
into separate time points
250-
251-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
252-
For Documentation, see:
253-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
241+
with the seg_maths command-line program.
242+
243+
See below for those operations:
244+
245+
mul - <float/file> - Multiply image <float> value or by other image.
246+
247+
div - <float/file> - Divide image by <float> or by other image.
248+
249+
add - <float/file> - Add image by <float> or by other image.
250+
251+
sub - <float/file> - Subtract image by <float> or by other image.
252+
253+
pow - <float> - Image to the power of <float>.
254+
255+
thr - <float> - Threshold the image below <float>.
256+
257+
uthr - <float> - Threshold image above <float>.
258+
259+
smo - <float> - Gaussian smoothing by std <float> (in voxels and up to \
260+
4-D).
261+
262+
edge - <float> - Calculate the edges of the image using a threshold <\
263+
float>.
264+
265+
sobel3 - <float> - Calculate the edges of all timepoints using a Sobel \
266+
filter with a 3x3x3 kernel and applying <float> gaussian smoothing.
267+
268+
sobel5 - <float> - Calculate the edges of all timepoints using a Sobel \
269+
filter with a 5x5x5 kernel and applying <float> gaussian smoothing.
270+
271+
min - <file> - Get the min per voxel between <current> and <file>.
272+
273+
smol - <float> - Gaussian smoothing of a 3D label image.
274+
275+
geo - <float/file> - Geodesic distance according to the speed function \
276+
<float/file>
277+
278+
llsnorm <file_norm> - Linear LS normalisation between current and \
279+
<file_norm>
280+
281+
masknan <file_norm> - Assign everything outside the mask (mask==0) \
282+
with NaNs
283+
284+
hdr_copy <file> - Copy header from working image to <file> and save in \
285+
<output>.
286+
287+
splitinter <x/y/z> - Split interleaved slices in direction <x/y/z> into \
288+
separate time points
289+
290+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
291+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
292+
NiftySeg_documentation>`_
254293
255294
Examples
256295
--------
@@ -348,19 +387,25 @@ class BinaryMathsInteger(MathsCommand):
348387
"""Interface for executable seg_maths from NiftySeg platform.
349388
350389
Interface to use any integer mathematical operations that can be performed
351-
with the seg_maths command-line program. See below for those operations:
352-
(requiring integer values)
353-
-equal <int> Get voxels equal to <int>
354-
-dil <int> Dilate the image <int> times (in voxels).
355-
-ero <int> Erode the image <int> times (in voxels).
356-
-tp <int> Extract time point <int>
357-
-crop <int> Crop <int> voxels around each 3D volume.
358-
-pad <int> Pad <int> voxels with NaN value around each 3D
359-
volume.
360-
361-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
362-
For Documentation, see:
363-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
390+
with the seg_maths command-line program.
391+
392+
See below for those operations: (requiring integer values)
393+
394+
equal - <int> - Get voxels equal to <int>
395+
396+
dil - <int> - Dilate the image <int> times (in voxels).
397+
398+
ero - <int> - Erode the image <int> times (in voxels).
399+
400+
tp - <int> - Extract time point <int>
401+
402+
crop - <int> - Crop <int> voxels around each 3D volume.
403+
404+
pad - <int> - Pad <int> voxels with NaN value around each 3D volume.
405+
406+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
407+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
408+
NiftySeg_documentation>`_
364409
365410
Examples
366411
--------
@@ -436,17 +481,22 @@ class TupleMaths(MathsCommand):
436481
"""Interface for executable seg_maths from NiftySeg platform.
437482
438483
Interface to use any tuple mathematical operations that can be performed
439-
with the seg_maths command-line program. See below for those operations:
440-
-lncc <file> <std> Local CC between current img and <file>
441-
on a kernel with <std>
442-
-lssd <file> <std> Local SSD between current img and <file>
443-
on a kernel with <std>
444-
-lltsnorm <file_norm> <float> Linear LTS normalisation assuming
445-
<float> percent outliers
446-
447-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
448-
For Documentation, see:
449-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
484+
with the seg_maths command-line program.
485+
486+
See below for those operations:
487+
488+
lncc <file> <std> Local CC between current img and <file> on a kernel \
489+
with <std>
490+
491+
lssd <file> <std> Local SSD between current img and <file> on a kernel \
492+
with <std>
493+
494+
lltsnorm <file_norm> <float> Linear LTS normalisation assuming <float> \
495+
percent outliers
496+
497+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
498+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
499+
NiftySeg_documentation>`_
450500
451501
Examples
452502
--------
@@ -504,13 +554,16 @@ class Merge(MathsCommand):
504554
"""Interface for executable seg_maths from NiftySeg platform.
505555
506556
Interface to use the merge operation that can be performed
507-
with the seg_maths command-line program. See below for this option:
508-
-merge <i> <d> <files> Merge <i> images and the working image in the
509-
<d> dimension
557+
with the seg_maths command-line program.
558+
559+
See below for this option:
560+
561+
merge <i> <d> <files> Merge <i> images and the working image in the \
562+
<d> dimension
510563
511-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
512-
For Documentation, see:
513-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
564+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
565+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
566+
NiftySeg_documentation>`_
514567
515568
Examples
516569
--------

nipype/interfaces/niftyseg/patchmatch.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
Change directory to provide relative paths for doctests
99
>>> import os
1010
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
11-
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
11+
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/\
12+
data'))
1213
>>> os.chdir(datadir)
1314
"""
1415

@@ -96,9 +97,9 @@ class PatchMatch(NiftySegCommand):
9697
volumes than the input image allowing to propagate multiple labels
9798
in the same execution.
9899
99-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
100-
For Documentation, see:
101-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
100+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
101+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/\
102+
NiftySeg_documentation>`_
102103
103104
Examples
104105
--------

0 commit comments

Comments
 (0)