Skip to content

Commit 0c1d5f7

Browse files
committed
Merge remote-tracking branch 'upstream/master' into enh/openfmri
* upstream/master: Updated CHANGES file FIX fix split_filename behaviour when path has no filename TST correct fail case in test_filemanip:test_split_filename TST: add fail case in test_filemanip:test_split_filename Updated CHANGES file Updated test for FSL DTIFit Added option to correct for gradient non linearities in dtifit CHANGES file updated to include Camino tracking updates Test overlap not included before Update to Camino tracking interfaces Fix conflicts delete line instead comment out update CHANGES make specs fix KeyError when using redirect_x in CommandLineInterface
2 parents d80982b + 4e3d750 commit 0c1d5f7

17 files changed

+529
-48
lines changed

CHANGES

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
Next release
22
============
3+
4+
* FIX: Fix split_filename behaviour when path has no file component (https://github.com/nipy/nipype/pull/1035)
5+
* ENH: Updated FSL dtifit to include option for grad non-linearities (https://github.com/nipy/nipype/pull/1032)
6+
* ENH: Updated Camino tracking interfaces, which can now use FSL bedpostx output.
7+
New options also include choice of tracker, interpolator, stepsize and
8+
curveinterval for angle threshold (https://github.com/nipy/nipype/pull/1029)
9+
* FIX: Interfaces redirecting X crashed if $DISPLAY not defined (https://github.com/nipy/nipype/pull/1027)
310
* FIX: Bug crashed 'make api' (https://github.com/nipy/nipype/pull/1026)
411
* ENH: Updated antsIntroduction to handle RA and RI registrations (https://github.com/nipy/nipype/pull/1009)
512
* ENH: Updated N4BiasCorrection input spec to include weight image and spline order. Made
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/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,12 +758,12 @@ def _get_trait_desc(self, inputs, name, spec):
758758
manhelpstr = ['\t%s' % name]
759759

760760
type_info = spec.full_info(inputs, name, None)
761-
default = ''
762761

762+
default = ''
763763
if spec.usedefault:
764764
default = ', nipype default value: %s' % str(spec.default_value()[1])
765-
766765
line = "(%s%s)" % (type_info, default)
766+
767767
manhelpstr = wrap(line, 70,
768768
initial_indent=manhelpstr[0]+': ',
769769
subsequent_indent='\t\t ')
@@ -991,7 +991,7 @@ def run(self, **inputs):
991991
time.sleep(0.2) # give Xvfb time to start
992992
if xvfb_proc.poll() is not None:
993993
raise Exception('Error: Xvfb did not start')
994-
old_displaynum = os.environ['DISPLAY']
994+
995995
runtime.environ['DISPLAY'] = ':%s' % vdisplay_num
996996

997997
runtime = self._run_interface(runtime)

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+

0 commit comments

Comments
 (0)