Skip to content

doc: fix rst formatting #1997

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/devel/testing_nipype.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ To enable the tests depending on these data, just unpack the targz file and set
variable to point to that folder.

Xfail tests
~~~~~~~~~~
~~~~~~~~~~~

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

Expand Down
4 changes: 0 additions & 4 deletions nipype/interfaces/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,6 @@ def _generate_handlers(self):
xors = self.trait_names(**has_xor)
for elem in xors:
self.on_trait_change(self._xor_warn, elem)
has_requires = dict(requires=lambda t: t is not None)
requires = self.trait_names(**has_requires)
for elem in requires:
self.on_trait_change(self._requires_warn, elem)
has_deprecation = dict(deprecated=lambda t: t is not None)
deprecated = self.trait_names(**has_deprecation)
for elem in deprecated:
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/mipav/developer.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ class MedicAlgorithmSPECTRE2010(SEMLikeCommandLine):
category: Developer Tools

description: Simple Paradigm for Extra-Cranial Tissue REmoval
################################################

Algorithm Version: 1.6
GUI Version: 1.10

Expand Down
8 changes: 3 additions & 5 deletions nipype/interfaces/niftyseg/em.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ class EM(NiftySegCommand):
it's simplest form, it takes in one 2D or 3D image and segments it in n
classes.

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand All @@ -128,8 +127,7 @@ class EM(NiftySegCommand):
>>> node.inputs.in_file = 'im1.nii'
>>> node.inputs.no_prior = 4
>>> node.cmdline # doctest: +ALLOW_UNICODE
'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'
'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'

"""
_cmd = get_custom_path('seg_EM', env_dir='NIFTYSEGDIR')
Expand Down
9 changes: 3 additions & 6 deletions nipype/interfaces/niftyseg/label_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ class LabelFusion(NiftySegCommand):
FusedSegmentation.nii -STEPS 2 15 TargetImage.nii \
4D_Propagated_Intensities.nii

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand All @@ -148,8 +147,7 @@ class LabelFusion(NiftySegCommand):
>>> node.inputs.template_num = 2
>>> node.inputs.classifier_type = 'STEPS'
>>> node.cmdline # doctest: +ALLOW_UNICODE
'seg_LabFusion -in im1.nii -STEPS 2.000000 2 im2.nii im3.nii -out \
im1_steps.nii'
'seg_LabFusion -in im1.nii -STEPS 2.000000 2 im2.nii im3.nii -out im1_steps.nii'

"""
_cmd = get_custom_path('seg_LabFusion', env_dir='NIFTYSEGDIR')
Expand Down Expand Up @@ -280,7 +278,6 @@ class CalcTopNCCInputSpec(CommandLineInputSpec):

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


Expand Down
5 changes: 2 additions & 3 deletions nipype/interfaces/niftyseg/lesions.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,8 @@ class FillLesions(NiftySegCommand):

Fill all the masked lesions with WM intensity average.

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down
42 changes: 21 additions & 21 deletions nipype/interfaces/niftyseg/maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class UnaryMaths(MathsCommand):
"""Interface for executable seg_maths from NiftySeg platform.

Interface to use any unary mathematical operations that can be performed
with the seg_maths command-line program. See below for those operations:
with the seg_maths command-line program. See below for those operations::

-sqrt Square root of the image.
-exp Exponential root of the image.
-log Log of the image.
Expand Down Expand Up @@ -133,9 +134,8 @@ class UnaryMaths(MathsCommand):
-4to5 Flip the 4th and 5th dimension.
-range Reset the image range to the min max

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down Expand Up @@ -216,7 +216,8 @@ class BinaryMaths(MathsCommand):
"""Interface for executable seg_maths from NiftySeg platform.

Interface to use any binary mathematical operations that can be performed
with the seg_maths command-line program. See below for those operations:
with the seg_maths command-line program. See below for those operations::

-mul <float/file> Multiply image <float> value or by other image.
-div <float/file> Divide image by <float> or by other image.
-add <float/file> Add image by <float> or by other image.
Expand Down Expand Up @@ -248,9 +249,8 @@ class BinaryMaths(MathsCommand):
-splitinter <x/y/z> Split interleaved slices in direction <x/y/z>
into separate time points

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down Expand Up @@ -348,8 +348,9 @@ class BinaryMathsInteger(MathsCommand):
"""Interface for executable seg_maths from NiftySeg platform.

Interface to use any integer mathematical operations that can be performed
with the seg_maths command-line program. See below for those operations:
(requiring integer values)
with the seg_maths command-line program. See below for those operations::

(requiring integer values)
-equal <int> Get voxels equal to <int>
-dil <int> Dilate the image <int> times (in voxels).
-ero <int> Erode the image <int> times (in voxels).
Expand All @@ -358,9 +359,8 @@ class BinaryMathsInteger(MathsCommand):
-pad <int> Pad <int> voxels with NaN value around each 3D
volume.

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down Expand Up @@ -436,17 +436,17 @@ class TupleMaths(MathsCommand):
"""Interface for executable seg_maths from NiftySeg platform.

Interface to use any tuple mathematical operations that can be performed
with the seg_maths command-line program. See below for those operations:
with the seg_maths command-line program. See below for those operations::

-lncc <file> <std> Local CC between current img and <file>
on a kernel with <std>
-lssd <file> <std> Local SSD between current img and <file>
on a kernel with <std>
-lltsnorm <file_norm> <float> Linear LTS normalisation assuming
<float> percent outliers

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down Expand Up @@ -504,13 +504,13 @@ class Merge(MathsCommand):
"""Interface for executable seg_maths from NiftySeg platform.

Interface to use the merge operation that can be performed
with the seg_maths command-line program. See below for this option:
with the seg_maths command-line program. See below for this option::

-merge <i> <d> <files> Merge <i> images and the working image in the
<d> dimension

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down
20 changes: 7 additions & 13 deletions nipype/interfaces/niftyseg/patchmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,27 +53,22 @@ class PatchMatchInputSpec(CommandLineInputSpec):

# Optional arguments
patch_size = traits.Int(desc="Patch size, #voxels",
argstr='-size %i',
mandatory=False)
argstr='-size %i')

desc = "Constrained search area size, number of times bigger than the \
patchsize"
cs_size = traits.Int(desc=desc,
argstr='-cs %i',
mandatory=False)
argstr='-cs %i')

match_num = traits.Int(desc="Number of better matching",
argstr='-match %i',
mandatory=False)
argstr='-match %i')

pm_num = traits.Int(desc="Number of patchmatch executions",
argstr='-pm %i',
mandatory=False)
argstr='-pm %i')

desc = "Number of iterations for the patchmatch algorithm"
it_num = traits.Int(desc=desc,
argstr='-it %i',
mandatory=False)
argstr='-it %i')


class PatchMatchOutputSpec(TraitedSpec):
Expand All @@ -96,9 +91,8 @@ class PatchMatch(NiftySegCommand):
volumes than the input image allowing to propagate multiple labels
in the same execution.

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down
18 changes: 8 additions & 10 deletions nipype/interfaces/niftyseg/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ class StatsInput(CommandLineInputSpec):

# Constrains
mask_file = File(exists=True,
mandatory=False,
position=-2,
argstr='-m %s',
desc='statistics within the masked area')

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

Expand Down Expand Up @@ -103,7 +101,8 @@ class UnaryStats(StatsCommand):
Interface for executable seg_stats from NiftySeg platform.

Interface to use any unary statistical operations that can be performed
with the seg_stats command-line program. See below for those operations:
with the seg_stats command-line program. See below for those operations::

-r | The range <min max> of all voxels.
-R | The robust range (assuming 2% outliers on both sides)
| of all voxels
Expand All @@ -130,9 +129,8 @@ class UnaryStats(StatsCommand):
-xdim | Output the voxel dimention in the x direction.
| Replace x with y/z for other directions.

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down Expand Up @@ -191,7 +189,8 @@ class BinaryStats(StatsCommand):
Interface for executable seg_stats from NiftySeg platform.

Interface to use any binary statistical operations that can be performed
with the seg_stats command-line program. See below for those operations:
with the seg_stats command-line program. See below for those operations::

-p <float> | The <float>th percentile of all voxels intensity
| (float=[0,100])
-sa <ax> | Average of all voxels
Expand All @@ -206,9 +205,8 @@ class BinaryStats(StatsCommand):
-Vl <csv> | Volume of each integer label <in>. Save to <csv>file.
-Nl <csv> | Count of each label <in>. Save to <csv> file.

For source code, see http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg
For Documentation, see:
http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation
`Source code <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg>`_ |
`Documentation <http://cmictig.cs.ucl.ac.uk/wiki/index.php/NiftySeg_documentation>`_

Examples
--------
Expand Down
2 changes: 0 additions & 2 deletions nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ def test_BinaryStats_inputs():
position=2,
),
larger_voxel=dict(argstr='-t %f',
mandatory=False,
position=-3,
),
mask_file=dict(argstr='-m %s',
mandatory=False,
position=-2,
),
operand_file=dict(argstr='%s',
Expand Down
1 change: 0 additions & 1 deletion nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def test_CalcTopNCC_inputs():
position=3,
),
mask_file=dict(argstr='-mask %s',
mandatory=False,
),
num_templates=dict(argstr='-templates %s',
mandatory=True,
Expand Down
2 changes: 0 additions & 2 deletions nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ def test_StatsCommand_inputs():
position=2,
),
larger_voxel=dict(argstr='-t %f',
mandatory=False,
position=-3,
),
mask_file=dict(argstr='-m %s',
mandatory=False,
position=-2,
),
terminal_output=dict(nohash=True,
Expand Down
2 changes: 0 additions & 2 deletions nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@ def test_UnaryStats_inputs():
position=2,
),
larger_voxel=dict(argstr='-t %f',
mandatory=False,
position=-3,
),
mask_file=dict(argstr='-m %s',
mandatory=False,
position=-2,
),
operation=dict(argstr='-%s',
Expand Down