Skip to content

Commit f39e222

Browse files
authored
Merge pull request #1997 from satra/fix/niftydocs
doc: fix rst formatting
2 parents 8d38c21 + fb61822 commit f39e222

13 files changed

+46
-71
lines changed

doc/devel/testing_nipype.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ To enable the tests depending on these data, just unpack the targz file and set
8989
variable to point to that folder.
9090

9191
Xfail tests
92-
~~~~~~~~~~
92+
~~~~~~~~~~~
9393

9494
Some tests are expect to fail until the code will be changed or for other reasons.
9595

nipype/interfaces/base.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,10 +390,6 @@ def _generate_handlers(self):
390390
xors = self.trait_names(**has_xor)
391391
for elem in xors:
392392
self.on_trait_change(self._xor_warn, elem)
393-
has_requires = dict(requires=lambda t: t is not None)
394-
requires = self.trait_names(**has_requires)
395-
for elem in requires:
396-
self.on_trait_change(self._requires_warn, elem)
397393
has_deprecation = dict(deprecated=lambda t: t is not None)
398394
deprecated = self.trait_names(**has_deprecation)
399395
for elem in deprecated:

nipype/interfaces/mipav/developer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ class MedicAlgorithmSPECTRE2010(SEMLikeCommandLine):
658658
category: Developer Tools
659659
660660
description: Simple Paradigm for Extra-Cranial Tissue REmoval
661-
################################################
661+
662662
Algorithm Version: 1.6
663663
GUI Version: 1.10
664664

nipype/interfaces/niftyseg/em.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,8 @@ class EM(NiftySegCommand):
117117
it's simplest form, it takes in one 2D or 3D image and segments it in n
118118
classes.
119119
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
120+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
121+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
123122
124123
Examples
125124
--------
@@ -128,8 +127,7 @@ class EM(NiftySegCommand):
128127
>>> node.inputs.in_file = 'im1.nii'
129128
>>> node.inputs.no_prior = 4
130129
>>> node.cmdline # doctest: +ALLOW_UNICODE
131-
'seg_EM -in im1.nii -nopriors 4 -bc_out im1_bc_em.nii.gz \
132-
-out im1_em.nii.gz -out_outlier im1_outlier_em.nii.gz'
130+
'seg_EM -in im1.nii -nopriors 4 -bc_out im1_bc_em.nii.gz -out im1_em.nii.gz -out_outlier im1_outlier_em.nii.gz'
133131
134132
"""
135133
_cmd = get_custom_path('seg_EM', env_dir='NIFTYSEGDIR')

nipype/interfaces/niftyseg/label_fusion.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,8 @@ class LabelFusion(NiftySegCommand):
133133
FusedSegmentation.nii -STEPS 2 15 TargetImage.nii \
134134
4D_Propagated_Intensities.nii
135135
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
136+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
137+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
139138
140139
Examples
141140
--------
@@ -148,8 +147,7 @@ class LabelFusion(NiftySegCommand):
148147
>>> node.inputs.template_num = 2
149148
>>> node.inputs.classifier_type = 'STEPS'
150149
>>> node.cmdline # doctest: +ALLOW_UNICODE
151-
'seg_LabFusion -in im1.nii -STEPS 2.000000 2 im2.nii im3.nii -out \
152-
im1_steps.nii'
150+
'seg_LabFusion -in im1.nii -STEPS 2.000000 2 im2.nii im3.nii -out im1_steps.nii'
153151
154152
"""
155153
_cmd = get_custom_path('seg_LabFusion', env_dir='NIFTYSEGDIR')
@@ -280,7 +278,6 @@ class CalcTopNCCInputSpec(CommandLineInputSpec):
280278

281279
mask_file = File(argstr='-mask %s',
282280
exists=True,
283-
mandatory=False,
284281
desc='Filename of the ROI for label fusion')
285282

286283

nipype/interfaces/niftyseg/lesions.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ class FillLesions(NiftySegCommand):
9999
100100
Fill all the masked lesions with WM intensity average.
101101
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
102+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
103+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
105104
106105
Examples
107106
--------

nipype/interfaces/niftyseg/maths.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ class UnaryMaths(MathsCommand):
102102
"""Interface for executable seg_maths from NiftySeg platform.
103103
104104
Interface to use any unary mathematical operations that can be performed
105-
with the seg_maths command-line program. See below for those operations:
105+
with the seg_maths command-line program. See below for those operations::
106+
106107
-sqrt Square root of the image.
107108
-exp Exponential root of the image.
108109
-log Log of the image.
@@ -133,9 +134,8 @@ class UnaryMaths(MathsCommand):
133134
-4to5 Flip the 4th and 5th dimension.
134135
-range Reset the image range to the min max
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/NiftySeg_documentation>`_
139139
140140
Examples
141141
--------
@@ -216,7 +216,8 @@ class BinaryMaths(MathsCommand):
216216
"""Interface for executable seg_maths from NiftySeg platform.
217217
218218
Interface to use any binary mathematical operations that can be performed
219-
with the seg_maths command-line program. See below for those operations:
219+
with the seg_maths command-line program. See below for those operations::
220+
220221
-mul <float/file> Multiply image <float> value or by other image.
221222
-div <float/file> Divide image by <float> or by other image.
222223
-add <float/file> Add image by <float> or by other image.
@@ -248,9 +249,8 @@ class BinaryMaths(MathsCommand):
248249
-splitinter <x/y/z> Split interleaved slices in direction <x/y/z>
249250
into separate time points
250251
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
252+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
253+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
254254
255255
Examples
256256
--------
@@ -348,8 +348,9 @@ class BinaryMathsInteger(MathsCommand):
348348
"""Interface for executable seg_maths from NiftySeg platform.
349349
350350
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)
351+
with the seg_maths command-line program. See below for those operations::
352+
353+
(requiring integer values)
353354
-equal <int> Get voxels equal to <int>
354355
-dil <int> Dilate the image <int> times (in voxels).
355356
-ero <int> Erode the image <int> times (in voxels).
@@ -358,9 +359,8 @@ class BinaryMathsInteger(MathsCommand):
358359
-pad <int> Pad <int> voxels with NaN value around each 3D
359360
volume.
360361
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
362+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
363+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
364364
365365
Examples
366366
--------
@@ -436,17 +436,17 @@ class TupleMaths(MathsCommand):
436436
"""Interface for executable seg_maths from NiftySeg platform.
437437
438438
Interface to use any tuple mathematical operations that can be performed
439-
with the seg_maths command-line program. See below for those operations:
439+
with the seg_maths command-line program. See below for those operations::
440+
440441
-lncc <file> <std> Local CC between current img and <file>
441442
on a kernel with <std>
442443
-lssd <file> <std> Local SSD between current img and <file>
443444
on a kernel with <std>
444445
-lltsnorm <file_norm> <float> Linear LTS normalisation assuming
445446
<float> percent outliers
446447
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
448+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
449+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
450450
451451
Examples
452452
--------
@@ -504,13 +504,13 @@ class Merge(MathsCommand):
504504
"""Interface for executable seg_maths from NiftySeg platform.
505505
506506
Interface to use the merge operation that can be performed
507-
with the seg_maths command-line program. See below for this option:
507+
with the seg_maths command-line program. See below for this option::
508+
508509
-merge <i> <d> <files> Merge <i> images and the working image in the
509510
<d> dimension
510511
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
512+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
513+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
514514
515515
Examples
516516
--------

nipype/interfaces/niftyseg/patchmatch.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,27 +53,22 @@ class PatchMatchInputSpec(CommandLineInputSpec):
5353

5454
# Optional arguments
5555
patch_size = traits.Int(desc="Patch size, #voxels",
56-
argstr='-size %i',
57-
mandatory=False)
56+
argstr='-size %i')
5857

5958
desc = "Constrained search area size, number of times bigger than the \
6059
patchsize"
6160
cs_size = traits.Int(desc=desc,
62-
argstr='-cs %i',
63-
mandatory=False)
61+
argstr='-cs %i')
6462

6563
match_num = traits.Int(desc="Number of better matching",
66-
argstr='-match %i',
67-
mandatory=False)
64+
argstr='-match %i')
6865

6966
pm_num = traits.Int(desc="Number of patchmatch executions",
70-
argstr='-pm %i',
71-
mandatory=False)
67+
argstr='-pm %i')
7268

7369
desc = "Number of iterations for the patchmatch algorithm"
7470
it_num = traits.Int(desc=desc,
75-
argstr='-it %i',
76-
mandatory=False)
71+
argstr='-it %i')
7772

7873

7974
class PatchMatchOutputSpec(TraitedSpec):
@@ -96,9 +91,8 @@ class PatchMatch(NiftySegCommand):
9691
volumes than the input image allowing to propagate multiple labels
9792
in the same execution.
9893
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
94+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
95+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
10296
10397
Examples
10498
--------

nipype/interfaces/niftyseg/stats.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ class StatsInput(CommandLineInputSpec):
2929

3030
# Constrains
3131
mask_file = File(exists=True,
32-
mandatory=False,
3332
position=-2,
3433
argstr='-m %s',
3534
desc='statistics within the masked area')
3635

3736
desc = 'Only estimate statistics if voxel is larger than <float>'
3837
larger_voxel = traits.Float(argstr='-t %f',
39-
mandatory=False,
4038
position=-3,
4139
desc=desc)
4240

@@ -103,7 +101,8 @@ class UnaryStats(StatsCommand):
103101
Interface for executable seg_stats from NiftySeg platform.
104102
105103
Interface to use any unary statistical operations that can be performed
106-
with the seg_stats command-line program. See below for those operations:
104+
with the seg_stats command-line program. See below for those operations::
105+
107106
-r | The range <min max> of all voxels.
108107
-R | The robust range (assuming 2% outliers on both sides)
109108
| of all voxels
@@ -130,9 +129,8 @@ class UnaryStats(StatsCommand):
130129
-xdim | Output the voxel dimention in the x direction.
131130
| Replace x with y/z for other directions.
132131
133-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
134-
For Documentation, see:
135-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
132+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
133+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
136134
137135
Examples
138136
--------
@@ -191,7 +189,8 @@ class BinaryStats(StatsCommand):
191189
Interface for executable seg_stats from NiftySeg platform.
192190
193191
Interface to use any binary statistical operations that can be performed
194-
with the seg_stats command-line program. See below for those operations:
192+
with the seg_stats command-line program. See below for those operations::
193+
195194
-p <float> | The <float>th percentile of all voxels intensity
196195
| (float=[0,100])
197196
-sa <ax> | Average of all voxels
@@ -206,9 +205,8 @@ class BinaryStats(StatsCommand):
206205
-Vl <csv> | Volume of each integer label <in>. Save to <csv>file.
207206
-Nl <csv> | Count of each label <in>. Save to <csv> file.
208207
209-
For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
210-
For Documentation, see:
211-
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
208+
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
209+
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_
212210
213211
Examples
214212
--------

nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ def test_BinaryStats_inputs():
1717
position=2,
1818
),
1919
larger_voxel=dict(argstr='-t %f',
20-
mandatory=False,
2120
position=-3,
2221
),
2322
mask_file=dict(argstr='-m %s',
24-
mandatory=False,
2523
position=-2,
2624
),
2725
operand_file=dict(argstr='%s',

nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def test_CalcTopNCC_inputs():
2121
position=3,
2222
),
2323
mask_file=dict(argstr='-mask %s',
24-
mandatory=False,
2524
),
2625
num_templates=dict(argstr='-templates %s',
2726
mandatory=True,

nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ def test_StatsCommand_inputs():
1717
position=2,
1818
),
1919
larger_voxel=dict(argstr='-t %f',
20-
mandatory=False,
2120
position=-3,
2221
),
2322
mask_file=dict(argstr='-m %s',
24-
mandatory=False,
2523
position=-2,
2624
),
2725
terminal_output=dict(nohash=True,

nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ def test_UnaryStats_inputs():
1717
position=2,
1818
),
1919
larger_voxel=dict(argstr='-t %f',
20-
mandatory=False,
2120
position=-3,
2221
),
2322
mask_file=dict(argstr='-m %s',
24-
mandatory=False,
2523
position=-2,
2624
),
2725
operation=dict(argstr='-%s',

0 commit comments

Comments
 (0)