Skip to content

Commit 9fef6d4

Browse files
committed
Merge remote-tracking branch 'origin/pr/936'
2 parents 0e39ed1 + f7abd3e commit 9fef6d4

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

nipype/interfaces/camino/connectivity.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,18 @@
1212
import os
1313

1414
class ConmatInputSpec(CommandLineInputSpec):
15-
in_file = File(exists=True, argstr='-inputfile %s',
16-
mandatory=True, position=1,
15+
in_file = File(exists=True, argstr='-inputfile %s', mandatory=True,
1716
desc='Streamlines as generated by the Track interface')
1817

19-
target_file = File(exists=True, argstr='-targetfile %s',
20-
mandatory=True, position=2,
18+
target_file = File(exists=True, argstr='-targetfile %s', mandatory=True,
2119
desc='An image containing targets, as used in ProcStreamlines interface.')
2220

2321
scalar_file = File(exists=True, argstr='-scalarfile %s',
24-
position=3,
2522
desc=('Optional scalar file for computing tract-based statistics. '
2623
'Must be in the same space as the target file.'),
2724
requires=['tract_stat'])
2825

2926
targetname_file = File(exists=True, argstr='-targetnamefile %s',
30-
position=4,
3127
desc=('Optional names of targets. This file should contain one entry per line, '
3228
'with the target intensity followed by the name, separated by white space. '
3329
'For example: '
@@ -39,7 +35,12 @@ class ConmatInputSpec(CommandLineInputSpec):
3935

4036
tract_stat = traits.Enum("mean", "min", "max", "sum", "median", "var", argstr='-tractstat %s', units='NA',
4137
desc=("Tract statistic to use. See TractStats for other options."),
42-
requires=['scalar_file'])
38+
requires=['scalar_file'],xor=['tract_prop'])
39+
40+
tract_prop = traits.Enum("length", "endpointsep", argstr='-tractstat %s',
41+
units='NA', xor=['tract_stat'],
42+
desc=('Tract property average to compute in the connectivity matrix. '
43+
'See TractStats for details.'))
4344

4445
output_root = File(argstr='-outputroot %s', genfile=True,
4546
desc=('filename root prepended onto the names of the output files. '

nipype/interfaces/camino/tests/test_auto_Conmat.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,29 @@ def test_Conmat_inputs():
1313
),
1414
in_file=dict(argstr='-inputfile %s',
1515
mandatory=True,
16-
position=1,
1716
),
1817
output_root=dict(argstr='-outputroot %s',
1918
genfile=True,
2019
),
2120
scalar_file=dict(argstr='-scalarfile %s',
22-
position=3,
2321
requires=['tract_stat'],
2422
),
2523
target_file=dict(argstr='-targetfile %s',
2624
mandatory=True,
27-
position=2,
2825
),
2926
targetname_file=dict(argstr='-targetnamefile %s',
30-
position=4,
3127
),
3228
terminal_output=dict(mandatory=True,
3329
nohash=True,
3430
),
31+
tract_prop=dict(argstr='-tractstat %s',
32+
units='NA',
33+
xor=['tract_stat'],
34+
),
3535
tract_stat=dict(argstr='-tractstat %s',
3636
requires=['scalar_file'],
3737
units='NA',
38+
xor=['tract_prop'],
3839
),
3940
)
4041
inputs = Conmat.input_spec()

0 commit comments

Comments
 (0)