Skip to content

Commit f1fc014

Browse files
committed
update track cmd line
1 parent 0a2ff69 commit f1fc014

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

nipype/interfaces/dipy/tracks.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
from ..base import (TraitedSpec, BaseInterfaceInputSpec, File, isdefined,
1313
traits)
1414
from .base import (DipyBaseInterface, HAVE_DIPY, dipy_version,
15-
dipy_to_nipype_interface)
15+
dipy_to_nipype_interface, get_dipy_workflows)
1616

1717
IFLOGGER = logging.getLogger('nipype.interface')
1818

1919

20-
if HAVE_DIPY and LooseVersion(dipy_version()) >= LooseVersion('0.15'):
20+
if HAVE_DIPY and (LooseVersion('0.15') >= LooseVersion(dipy_version()) >= LooseVersion('0.16')):
2121

2222
from dipy.workflows.segment import RecoBundlesFlow, LabelsBundlesFlow
2323
try:
@@ -31,9 +31,18 @@
3131
DeterministicTracking = dipy_to_nipype_interface("DeterministicTracking",
3232
DetTrackFlow)
3333

34+
elif HAVE_DIPY and LooseVersion(dipy_version()) >= LooseVersion('1.0'):
35+
from dipy.workflows import segment, tracking
36+
37+
l_wkflw = get_dipy_workflows(segment) + get_dipy_workflows(tracking)
38+
for name, obj in l_wkflw:
39+
new_name = name.replace('Flow', '')
40+
globals()[new_name] = dipy_to_nipype_interface(new_name, obj)
41+
del l_wkflw
42+
3443
else:
3544
IFLOGGER.info("We advise you to upgrade DIPY version. This upgrade will"
36-
" activate RecoBundles, LabelsBundles, DeterministicTracking.")
45+
" open access to more function")
3746

3847

3948
class TrackDensityMapInputSpec(BaseInterfaceInputSpec):

0 commit comments

Comments
 (0)