Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update to Camino tracking interfaces
  • Loading branch information
mick-d committed Jan 23, 2015
commit da1342b2e71e1867c340ec325fbcbbac895343d3
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

12 changes: 11 additions & 1 deletion nipype/interfaces/camino/tests/test_auto_TrackBootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def test_TrackBootstrap_inputs():
bsdatafiles=dict(argstr='-bsdatafile %s',
mandatory=True,
),
curveinterval=dict(argstr='-curveinterval %f',
requires=['curvethresh'],
),
curvethresh=dict(argstr='-curvethresh %f',
),
data_dims=dict(argstr='-datadims %s',
Expand All @@ -28,14 +31,15 @@ def test_TrackBootstrap_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',
),
inversion=dict(argstr='-inversion %s',
),
ipthresh=dict(argstr='-ipthresh %f',
Expand Down Expand Up @@ -64,9 +68,15 @@ def test_TrackBootstrap_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
Loading