diff --git a/doc/devel/testing_nipype.rst b/doc/devel/testing_nipype.rst index cc2debe53c..ff1a14fe6c 100644 --- a/doc/devel/testing_nipype.rst +++ b/doc/devel/testing_nipype.rst @@ -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. diff --git a/nipype/interfaces/base.py b/nipype/interfaces/base.py index ec1ab8c43d..66c205f46a 100644 --- a/nipype/interfaces/base.py +++ b/nipype/interfaces/base.py @@ -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: diff --git a/nipype/interfaces/mipav/developer.py b/nipype/interfaces/mipav/developer.py index 2e14f3a6b5..ac42f7c5a9 100644 --- a/nipype/interfaces/mipav/developer.py +++ b/nipype/interfaces/mipav/developer.py @@ -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 diff --git a/nipype/interfaces/niftyseg/em.py b/nipype/interfaces/niftyseg/em.py index 102ee4d111..a6f501c87a 100644 --- a/nipype/interfaces/niftyseg/em.py +++ b/nipype/interfaces/niftyseg/em.py @@ -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 `_ | + `Documentation `_ Examples -------- @@ -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') diff --git a/nipype/interfaces/niftyseg/label_fusion.py b/nipype/interfaces/niftyseg/label_fusion.py index e3173d96bd..b656ee639d 100644 --- a/nipype/interfaces/niftyseg/label_fusion.py +++ b/nipype/interfaces/niftyseg/label_fusion.py @@ -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 `_ | + `Documentation `_ Examples -------- @@ -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') @@ -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') diff --git a/nipype/interfaces/niftyseg/lesions.py b/nipype/interfaces/niftyseg/lesions.py index 69d616181b..45b8f00a2a 100644 --- a/nipype/interfaces/niftyseg/lesions.py +++ b/nipype/interfaces/niftyseg/lesions.py @@ -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 `_ | + `Documentation `_ Examples -------- diff --git a/nipype/interfaces/niftyseg/maths.py b/nipype/interfaces/niftyseg/maths.py index 852fe699ce..256438ba4e 100644 --- a/nipype/interfaces/niftyseg/maths.py +++ b/nipype/interfaces/niftyseg/maths.py @@ -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. @@ -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 `_ | + `Documentation `_ Examples -------- @@ -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 Multiply image value or by other image. -div Divide image by or by other image. -add Add image by or by other image. @@ -248,9 +249,8 @@ class BinaryMaths(MathsCommand): -splitinter Split interleaved slices in direction 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 `_ | + `Documentation `_ Examples -------- @@ -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 Get voxels equal to -dil Dilate the image times (in voxels). -ero Erode the image times (in voxels). @@ -358,9 +359,8 @@ class BinaryMathsInteger(MathsCommand): -pad Pad 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 `_ | + `Documentation `_ Examples -------- @@ -436,7 +436,8 @@ 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 Local CC between current img and on a kernel with -lssd Local SSD between current img and @@ -444,9 +445,8 @@ class TupleMaths(MathsCommand): -lltsnorm Linear LTS normalisation assuming 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 `_ | + `Documentation `_ Examples -------- @@ -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 Merge images and the working image in the 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 `_ | + `Documentation `_ Examples -------- diff --git a/nipype/interfaces/niftyseg/patchmatch.py b/nipype/interfaces/niftyseg/patchmatch.py index 5a81583dc7..4c579983f7 100644 --- a/nipype/interfaces/niftyseg/patchmatch.py +++ b/nipype/interfaces/niftyseg/patchmatch.py @@ -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): @@ -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 `_ | + `Documentation `_ Examples -------- diff --git a/nipype/interfaces/niftyseg/stats.py b/nipype/interfaces/niftyseg/stats.py index b587392d29..05fbb0ac38 100644 --- a/nipype/interfaces/niftyseg/stats.py +++ b/nipype/interfaces/niftyseg/stats.py @@ -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 ' larger_voxel = traits.Float(argstr='-t %f', - mandatory=False, position=-3, desc=desc) @@ -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 of all voxels. -R | The robust range (assuming 2% outliers on both sides) | of all voxels @@ -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 `_ | + `Documentation `_ Examples -------- @@ -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 | The th percentile of all voxels intensity | (float=[0,100]) -sa | Average of all voxels @@ -206,9 +205,8 @@ class BinaryStats(StatsCommand): -Vl | Volume of each integer label . Save to file. -Nl | Count of each label . Save to 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 `_ | + `Documentation `_ Examples -------- diff --git a/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py b/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py index 9546286202..14ea5463b0 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_BinaryStats.py @@ -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', diff --git a/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py b/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py index 750426acc1..a54501c730 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_CalcTopNCC.py @@ -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, diff --git a/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py b/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py index c7c7f2b364..f535133dee 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_StatsCommand.py @@ -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, diff --git a/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py b/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py index cfbde15114..17252084c6 100644 --- a/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py +++ b/nipype/interfaces/niftyseg/tests/test_auto_UnaryStats.py @@ -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',