Skip to content

Commit 226ff40

Browse files
committed
Merge pull request #1029 from mick-d/camino
Camino tracking interfaces update
2 parents 0d3bbdc + 115534e commit 226ff40

12 files changed

+514
-40
lines changed

CHANGES

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Next release
22
============
33

4+
* ENH: Updated Camino tracking interfaces, which can now use FSL bedpostx output.
5+
New options also include choice of tracker, interpolator, stepsize and
6+
curveinterval for angle threshold (https://github.com/nipy/nipype/pull/1029)
47
* FIX: Interfaces redirecting X crashed if $DISPLAY not defined (https://github.com/nipy/nipype/pull/1027)
58
* FIX: Bug crashed 'make api' (https://github.com/nipy/nipype/pull/1026)
69
* ENH: Updated antsIntroduction to handle RA and RI registrations (https://github.com/nipy/nipype/pull/1009)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.algorithms.misc import Overlap
4+
5+
def test_Overlap_inputs():
6+
input_map = dict(bg_overlap=dict(mandatory=True,
7+
usedefault=True,
8+
),
9+
ignore_exception=dict(nohash=True,
10+
usedefault=True,
11+
),
12+
mask_volume=dict(),
13+
out_file=dict(usedefault=True,
14+
),
15+
vol_units=dict(mandatory=True,
16+
usedefault=True,
17+
),
18+
volume1=dict(mandatory=True,
19+
),
20+
volume2=dict(mandatory=True,
21+
),
22+
weighting=dict(usedefault=True,
23+
),
24+
)
25+
inputs = Overlap.input_spec()
26+
27+
for key, metadata in input_map.items():
28+
for metakey, value in metadata.items():
29+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
30+
31+
def test_Overlap_outputs():
32+
output_map = dict(dice=dict(),
33+
diff_file=dict(),
34+
jaccard=dict(),
35+
labels=dict(),
36+
roi_di=dict(),
37+
roi_ji=dict(),
38+
roi_voldiff=dict(),
39+
volume_difference=dict(),
40+
)
41+
outputs = Overlap.output_spec()
42+
43+
for key, metadata in output_map.items():
44+
for metakey, value in metadata.items():
45+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
46+

nipype/interfaces/camino/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
Shredder)
1010
from .dti import (DTIFit, ModelFit, DTLUTGen, PicoPDFs, Track, TrackPICo,
1111
TrackBayesDirac, TrackDT, TrackBallStick, TrackBootstrap,
12+
TrackBedpostxDeter, TrackBedpostxProba,
1213
ComputeFractionalAnisotropy, ComputeMeanDiffusivity,
1314
ComputeTensorTrace, ComputeEigensystem, DTMetric)
1415
from .calib import (SFPICOCalibData, SFLUTGen)

nipype/interfaces/camino/dti.py

Lines changed: 213 additions & 34 deletions
Large diffs are not rendered by default.

nipype/interfaces/camino/tests/test_auto_Track.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def test_Track_inputs():
99
),
1010
args=dict(argstr='%s',
1111
),
12+
curveinterval=dict(argstr='-curveinterval %f',
13+
requires=['curvethresh'],
14+
),
1215
curvethresh=dict(argstr='-curvethresh %f',
1316
),
1417
data_dims=dict(argstr='-datadims %s',
@@ -23,14 +26,15 @@ def test_Track_inputs():
2326
usedefault=True,
2427
),
2528
in_file=dict(argstr='-inputfile %s',
26-
mandatory=True,
2729
position=1,
2830
),
2931
inputdatatype=dict(argstr='-inputdatatype %s',
3032
),
3133
inputmodel=dict(argstr='-inputmodel %s',
3234
usedefault=True,
3335
),
36+
interpolator=dict(argstr='-interpolator %s',
37+
),
3438
ipthresh=dict(argstr='-ipthresh %f',
3539
),
3640
maxcomponents=dict(argstr='-maxcomponents %d',
@@ -51,9 +55,15 @@ def test_Track_inputs():
5155
seed_file=dict(argstr='-seedfile %s',
5256
position=2,
5357
),
58+
stepsize=dict(argstr='-stepsize %f',
59+
requires=['tracker'],
60+
),
5461
terminal_output=dict(mandatory=True,
5562
nohash=True,
5663
),
64+
tracker=dict(argstr='-tracker %s',
65+
usedefault=True,
66+
),
5767
voxel_dims=dict(argstr='-voxeldims %s',
5868
units='mm',
5969
),

nipype/interfaces/camino/tests/test_auto_TrackBallStick.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def test_TrackBallStick_inputs():
99
),
1010
args=dict(argstr='%s',
1111
),
12+
curveinterval=dict(argstr='-curveinterval %f',
13+
requires=['curvethresh'],
14+
),
1215
curvethresh=dict(argstr='-curvethresh %f',
1316
),
1417
data_dims=dict(argstr='-datadims %s',
@@ -23,14 +26,15 @@ def test_TrackBallStick_inputs():
2326
usedefault=True,
2427
),
2528
in_file=dict(argstr='-inputfile %s',
26-
mandatory=True,
2729
position=1,
2830
),
2931
inputdatatype=dict(argstr='-inputdatatype %s',
3032
),
3133
inputmodel=dict(argstr='-inputmodel %s',
3234
usedefault=True,
3335
),
36+
interpolator=dict(argstr='-interpolator %s',
37+
),
3438
ipthresh=dict(argstr='-ipthresh %f',
3539
),
3640
maxcomponents=dict(argstr='-maxcomponents %d',
@@ -51,9 +55,15 @@ def test_TrackBallStick_inputs():
5155
seed_file=dict(argstr='-seedfile %s',
5256
position=2,
5357
),
58+
stepsize=dict(argstr='-stepsize %f',
59+
requires=['tracker'],
60+
),
5461
terminal_output=dict(mandatory=True,
5562
nohash=True,
5663
),
64+
tracker=dict(argstr='-tracker %s',
65+
usedefault=True,
66+
),
5767
voxel_dims=dict(argstr='-voxeldims %s',
5868
units='mm',
5969
),

nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ def test_TrackBayesDirac_inputs():
99
),
1010
args=dict(argstr='%s',
1111
),
12+
curveinterval=dict(argstr='-curveinterval %f',
13+
requires=['curvethresh'],
14+
),
1215
curvepriorg=dict(argstr='-curvepriorg %G',
1316
),
1417
curvepriork=dict(argstr='-curvepriork %G',
@@ -33,14 +36,15 @@ def test_TrackBayesDirac_inputs():
3336
usedefault=True,
3437
),
3538
in_file=dict(argstr='-inputfile %s',
36-
mandatory=True,
3739
position=1,
3840
),
3941
inputdatatype=dict(argstr='-inputdatatype %s',
4042
),
4143
inputmodel=dict(argstr='-inputmodel %s',
4244
usedefault=True,
4345
),
46+
interpolator=dict(argstr='-interpolator %s',
47+
),
4448
ipthresh=dict(argstr='-ipthresh %f',
4549
),
4650
iterations=dict(argstr='-iterations %d',
@@ -71,9 +75,15 @@ def test_TrackBayesDirac_inputs():
7175
seed_file=dict(argstr='-seedfile %s',
7276
position=2,
7377
),
78+
stepsize=dict(argstr='-stepsize %f',
79+
requires=['tracker'],
80+
),
7481
terminal_output=dict(mandatory=True,
7582
nohash=True,
7683
),
84+
tracker=dict(argstr='-tracker %s',
85+
usedefault=True,
86+
),
7787
voxel_dims=dict(argstr='-voxeldims %s',
7888
units='mm',
7989
),
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.camino.dti import TrackBedpostxDeter
4+
5+
def test_TrackBedpostxDeter_inputs():
6+
input_map = dict(anisfile=dict(argstr='-anisfile %s',
7+
),
8+
anisthresh=dict(argstr='-anisthresh %f',
9+
),
10+
args=dict(argstr='%s',
11+
),
12+
bedpostxdir=dict(argstr='-bedpostxdir %s',
13+
mandatory=True,
14+
),
15+
curveinterval=dict(argstr='-curveinterval %f',
16+
requires=['curvethresh'],
17+
),
18+
curvethresh=dict(argstr='-curvethresh %f',
19+
),
20+
data_dims=dict(argstr='-datadims %s',
21+
units='voxels',
22+
),
23+
environ=dict(nohash=True,
24+
usedefault=True,
25+
),
26+
gzip=dict(argstr='-gzip',
27+
),
28+
ignore_exception=dict(nohash=True,
29+
usedefault=True,
30+
),
31+
in_file=dict(argstr='-inputfile %s',
32+
position=1,
33+
),
34+
inputdatatype=dict(argstr='-inputdatatype %s',
35+
),
36+
inputmodel=dict(argstr='-inputmodel %s',
37+
usedefault=True,
38+
),
39+
interpolator=dict(argstr='-interpolator %s',
40+
),
41+
ipthresh=dict(argstr='-ipthresh %f',
42+
),
43+
maxcomponents=dict(argstr='-maxcomponents %d',
44+
units='NA',
45+
),
46+
min_vol_frac=dict(argstr='-bedpostxminf %d',
47+
units='NA',
48+
),
49+
numpds=dict(argstr='-numpds %d',
50+
units='NA',
51+
),
52+
out_file=dict(argstr='-outputfile %s',
53+
genfile=True,
54+
position=-1,
55+
),
56+
output_root=dict(argstr='-outputroot %s',
57+
position=-1,
58+
),
59+
outputtracts=dict(argstr='-outputtracts %s',
60+
),
61+
seed_file=dict(argstr='-seedfile %s',
62+
position=2,
63+
),
64+
stepsize=dict(argstr='-stepsize %f',
65+
requires=['tracker'],
66+
),
67+
terminal_output=dict(mandatory=True,
68+
nohash=True,
69+
),
70+
tracker=dict(argstr='-tracker %s',
71+
usedefault=True,
72+
),
73+
voxel_dims=dict(argstr='-voxeldims %s',
74+
units='mm',
75+
),
76+
)
77+
inputs = TrackBedpostxDeter.input_spec()
78+
79+
for key, metadata in input_map.items():
80+
for metakey, value in metadata.items():
81+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
82+
83+
def test_TrackBedpostxDeter_outputs():
84+
output_map = dict(tracked=dict(),
85+
)
86+
outputs = TrackBedpostxDeter.output_spec()
87+
88+
for key, metadata in output_map.items():
89+
for metakey, value in metadata.items():
90+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
91+
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.camino.dti import TrackBedpostxProba
4+
5+
def test_TrackBedpostxProba_inputs():
6+
input_map = dict(anisfile=dict(argstr='-anisfile %s',
7+
),
8+
anisthresh=dict(argstr='-anisthresh %f',
9+
),
10+
args=dict(argstr='%s',
11+
),
12+
bedpostxdir=dict(argstr='-bedpostxdir %s',
13+
mandatory=True,
14+
),
15+
curveinterval=dict(argstr='-curveinterval %f',
16+
requires=['curvethresh'],
17+
),
18+
curvethresh=dict(argstr='-curvethresh %f',
19+
),
20+
data_dims=dict(argstr='-datadims %s',
21+
units='voxels',
22+
),
23+
environ=dict(nohash=True,
24+
usedefault=True,
25+
),
26+
gzip=dict(argstr='-gzip',
27+
),
28+
ignore_exception=dict(nohash=True,
29+
usedefault=True,
30+
),
31+
in_file=dict(argstr='-inputfile %s',
32+
position=1,
33+
),
34+
inputdatatype=dict(argstr='-inputdatatype %s',
35+
),
36+
inputmodel=dict(argstr='-inputmodel %s',
37+
usedefault=True,
38+
),
39+
interpolator=dict(argstr='-interpolator %s',
40+
),
41+
ipthresh=dict(argstr='-ipthresh %f',
42+
),
43+
iterations=dict(argstr='-iterations %d',
44+
units='NA',
45+
),
46+
maxcomponents=dict(argstr='-maxcomponents %d',
47+
units='NA',
48+
),
49+
min_vol_frac=dict(argstr='-bedpostxminf %d',
50+
units='NA',
51+
),
52+
numpds=dict(argstr='-numpds %d',
53+
units='NA',
54+
),
55+
out_file=dict(argstr='-outputfile %s',
56+
genfile=True,
57+
position=-1,
58+
),
59+
output_root=dict(argstr='-outputroot %s',
60+
position=-1,
61+
),
62+
outputtracts=dict(argstr='-outputtracts %s',
63+
),
64+
seed_file=dict(argstr='-seedfile %s',
65+
position=2,
66+
),
67+
stepsize=dict(argstr='-stepsize %f',
68+
requires=['tracker'],
69+
),
70+
terminal_output=dict(mandatory=True,
71+
nohash=True,
72+
),
73+
tracker=dict(argstr='-tracker %s',
74+
usedefault=True,
75+
),
76+
voxel_dims=dict(argstr='-voxeldims %s',
77+
units='mm',
78+
),
79+
)
80+
inputs = TrackBedpostxProba.input_spec()
81+
82+
for key, metadata in input_map.items():
83+
for metakey, value in metadata.items():
84+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
85+
86+
def test_TrackBedpostxProba_outputs():
87+
output_map = dict(tracked=dict(),
88+
)
89+
outputs = TrackBedpostxProba.output_spec()
90+
91+
for key, metadata in output_map.items():
92+
for metakey, value in metadata.items():
93+
yield assert_equal, getattr(outputs.traits()[key], metakey), value
94+

0 commit comments

Comments
 (0)