Skip to content

Camino tracking interfaces update #1029

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 3 commits into from
Jan 24, 2015
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
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Next release
============

* ENH: Updated Camino tracking interfaces, which can now use FSL bedpostx output.
New options also include choice of tracker, interpolator, stepsize and
curveinterval for angle threshold (https://github.com/nipy/nipype/pull/1029)
* FIX: Interfaces redirecting X crashed if $DISPLAY not defined (https://github.com/nipy/nipype/pull/1027)
* FIX: Bug crashed 'make api' (https://github.com/nipy/nipype/pull/1026)
* ENH: Updated antsIntroduction to handle RA and RI registrations (https://github.com/nipy/nipype/pull/1009)
Expand Down
46 changes: 46 additions & 0 deletions nipype/algorithms/tests/test_auto_Overlap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.algorithms.misc import Overlap

def test_Overlap_inputs():
input_map = dict(bg_overlap=dict(mandatory=True,
usedefault=True,
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
mask_volume=dict(),
out_file=dict(usedefault=True,
),
vol_units=dict(mandatory=True,
usedefault=True,
),
volume1=dict(mandatory=True,
),
volume2=dict(mandatory=True,
),
weighting=dict(usedefault=True,
),
)
inputs = Overlap.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value

def test_Overlap_outputs():
output_map = dict(dice=dict(),
diff_file=dict(),
jaccard=dict(),
labels=dict(),
roi_di=dict(),
roi_ji=dict(),
roi_voldiff=dict(),
volume_difference=dict(),
)
outputs = Overlap.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value

1 change: 1 addition & 0 deletions nipype/interfaces/camino/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Shredder)
from .dti import (DTIFit, ModelFit, DTLUTGen, PicoPDFs, Track, TrackPICo,
TrackBayesDirac, TrackDT, TrackBallStick, TrackBootstrap,
TrackBedpostxDeter, TrackBedpostxProba,
ComputeFractionalAnisotropy, ComputeMeanDiffusivity,
ComputeTensorTrace, ComputeEigensystem, DTMetric)
from .calib import (SFPICOCalibData, SFLUTGen)
Expand Down
247 changes: 213 additions & 34 deletions nipype/interfaces/camino/dti.py

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion nipype/interfaces/camino/tests/test_auto_Track.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def test_Track_inputs():
),
args=dict(argstr='%s',
),
curveinterval=dict(argstr='-curveinterval %f',
requires=['curvethresh'],
),
curvethresh=dict(argstr='-curvethresh %f',
),
data_dims=dict(argstr='-datadims %s',
Expand All @@ -23,14 +26,15 @@ def test_Track_inputs():
usedefault=True,
),
in_file=dict(argstr='-inputfile %s',
mandatory=True,
position=1,
),
inputdatatype=dict(argstr='-inputdatatype %s',
),
inputmodel=dict(argstr='-inputmodel %s',
usedefault=True,
),
interpolator=dict(argstr='-interpolator %s',
),
ipthresh=dict(argstr='-ipthresh %f',
),
maxcomponents=dict(argstr='-maxcomponents %d',
Expand All @@ -51,9 +55,15 @@ def test_Track_inputs():
seed_file=dict(argstr='-seedfile %s',
position=2,
),
stepsize=dict(argstr='-stepsize %f',
requires=['tracker'],
),
terminal_output=dict(mandatory=True,
nohash=True,
),
tracker=dict(argstr='-tracker %s',
usedefault=True,
),
voxel_dims=dict(argstr='-voxeldims %s',
units='mm',
),
Expand Down
12 changes: 11 additions & 1 deletion nipype/interfaces/camino/tests/test_auto_TrackBallStick.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def test_TrackBallStick_inputs():
),
args=dict(argstr='%s',
),
curveinterval=dict(argstr='-curveinterval %f',
requires=['curvethresh'],
),
curvethresh=dict(argstr='-curvethresh %f',
),
data_dims=dict(argstr='-datadims %s',
Expand All @@ -23,14 +26,15 @@ def test_TrackBallStick_inputs():
usedefault=True,
),
in_file=dict(argstr='-inputfile %s',
mandatory=True,
position=1,
),
inputdatatype=dict(argstr='-inputdatatype %s',
),
inputmodel=dict(argstr='-inputmodel %s',
usedefault=True,
),
interpolator=dict(argstr='-interpolator %s',
),
ipthresh=dict(argstr='-ipthresh %f',
),
maxcomponents=dict(argstr='-maxcomponents %d',
Expand All @@ -51,9 +55,15 @@ def test_TrackBallStick_inputs():
seed_file=dict(argstr='-seedfile %s',
position=2,
),
stepsize=dict(argstr='-stepsize %f',
requires=['tracker'],
),
terminal_output=dict(mandatory=True,
nohash=True,
),
tracker=dict(argstr='-tracker %s',
usedefault=True,
),
voxel_dims=dict(argstr='-voxeldims %s',
units='mm',
),
Expand Down
12 changes: 11 additions & 1 deletion nipype/interfaces/camino/tests/test_auto_TrackBayesDirac.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def test_TrackBayesDirac_inputs():
),
args=dict(argstr='%s',
),
curveinterval=dict(argstr='-curveinterval %f',
requires=['curvethresh'],
),
curvepriorg=dict(argstr='-curvepriorg %G',
),
curvepriork=dict(argstr='-curvepriork %G',
Expand All @@ -33,14 +36,15 @@ def test_TrackBayesDirac_inputs():
usedefault=True,
),
in_file=dict(argstr='-inputfile %s',
mandatory=True,
position=1,
),
inputdatatype=dict(argstr='-inputdatatype %s',
),
inputmodel=dict(argstr='-inputmodel %s',
usedefault=True,
),
interpolator=dict(argstr='-interpolator %s',
),
ipthresh=dict(argstr='-ipthresh %f',
),
iterations=dict(argstr='-iterations %d',
Expand Down Expand Up @@ -71,9 +75,15 @@ def test_TrackBayesDirac_inputs():
seed_file=dict(argstr='-seedfile %s',
position=2,
),
stepsize=dict(argstr='-stepsize %f',
requires=['tracker'],
),
terminal_output=dict(mandatory=True,
nohash=True,
),
tracker=dict(argstr='-tracker %s',
usedefault=True,
),
voxel_dims=dict(argstr='-voxeldims %s',
units='mm',
),
Expand Down
91 changes: 91 additions & 0 deletions nipype/interfaces/camino/tests/test_auto_TrackBedpostxDeter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.camino.dti import TrackBedpostxDeter

def test_TrackBedpostxDeter_inputs():
input_map = dict(anisfile=dict(argstr='-anisfile %s',
),
anisthresh=dict(argstr='-anisthresh %f',
),
args=dict(argstr='%s',
),
bedpostxdir=dict(argstr='-bedpostxdir %s',
mandatory=True,
),
curveinterval=dict(argstr='-curveinterval %f',
requires=['curvethresh'],
),
curvethresh=dict(argstr='-curvethresh %f',
),
data_dims=dict(argstr='-datadims %s',
units='voxels',
),
environ=dict(nohash=True,
usedefault=True,
),
gzip=dict(argstr='-gzip',
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
in_file=dict(argstr='-inputfile %s',
position=1,
),
inputdatatype=dict(argstr='-inputdatatype %s',
),
inputmodel=dict(argstr='-inputmodel %s',
usedefault=True,
),
interpolator=dict(argstr='-interpolator %s',
),
ipthresh=dict(argstr='-ipthresh %f',
),
maxcomponents=dict(argstr='-maxcomponents %d',
units='NA',
),
min_vol_frac=dict(argstr='-bedpostxminf %d',
units='NA',
),
numpds=dict(argstr='-numpds %d',
units='NA',
),
out_file=dict(argstr='-outputfile %s',
genfile=True,
position=-1,
),
output_root=dict(argstr='-outputroot %s',
position=-1,
),
outputtracts=dict(argstr='-outputtracts %s',
),
seed_file=dict(argstr='-seedfile %s',
position=2,
),
stepsize=dict(argstr='-stepsize %f',
requires=['tracker'],
),
terminal_output=dict(mandatory=True,
nohash=True,
),
tracker=dict(argstr='-tracker %s',
usedefault=True,
),
voxel_dims=dict(argstr='-voxeldims %s',
units='mm',
),
)
inputs = TrackBedpostxDeter.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value

def test_TrackBedpostxDeter_outputs():
output_map = dict(tracked=dict(),
)
outputs = TrackBedpostxDeter.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value

94 changes: 94 additions & 0 deletions nipype/interfaces/camino/tests/test_auto_TrackBedpostxProba.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from nipype.testing import assert_equal
from nipype.interfaces.camino.dti import TrackBedpostxProba

def test_TrackBedpostxProba_inputs():
input_map = dict(anisfile=dict(argstr='-anisfile %s',
),
anisthresh=dict(argstr='-anisthresh %f',
),
args=dict(argstr='%s',
),
bedpostxdir=dict(argstr='-bedpostxdir %s',
mandatory=True,
),
curveinterval=dict(argstr='-curveinterval %f',
requires=['curvethresh'],
),
curvethresh=dict(argstr='-curvethresh %f',
),
data_dims=dict(argstr='-datadims %s',
units='voxels',
),
environ=dict(nohash=True,
usedefault=True,
),
gzip=dict(argstr='-gzip',
),
ignore_exception=dict(nohash=True,
usedefault=True,
),
in_file=dict(argstr='-inputfile %s',
position=1,
),
inputdatatype=dict(argstr='-inputdatatype %s',
),
inputmodel=dict(argstr='-inputmodel %s',
usedefault=True,
),
interpolator=dict(argstr='-interpolator %s',
),
ipthresh=dict(argstr='-ipthresh %f',
),
iterations=dict(argstr='-iterations %d',
units='NA',
),
maxcomponents=dict(argstr='-maxcomponents %d',
units='NA',
),
min_vol_frac=dict(argstr='-bedpostxminf %d',
units='NA',
),
numpds=dict(argstr='-numpds %d',
units='NA',
),
out_file=dict(argstr='-outputfile %s',
genfile=True,
position=-1,
),
output_root=dict(argstr='-outputroot %s',
position=-1,
),
outputtracts=dict(argstr='-outputtracts %s',
),
seed_file=dict(argstr='-seedfile %s',
position=2,
),
stepsize=dict(argstr='-stepsize %f',
requires=['tracker'],
),
terminal_output=dict(mandatory=True,
nohash=True,
),
tracker=dict(argstr='-tracker %s',
usedefault=True,
),
voxel_dims=dict(argstr='-voxeldims %s',
units='mm',
),
)
inputs = TrackBedpostxProba.input_spec()

for key, metadata in input_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(inputs.traits()[key], metakey), value

def test_TrackBedpostxProba_outputs():
output_map = dict(tracked=dict(),
)
outputs = TrackBedpostxProba.output_spec()

for key, metadata in output_map.items():
for metakey, value in metadata.items():
yield assert_equal, getattr(outputs.traits()[key], metakey), value

Loading