Skip to content

Commit 2575f3d

Browse files
committed
update registration cmd line
1 parent ab693cf commit 2575f3d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11

22
from distutils.version import LooseVersion
33
from ... import logging
4-
from .base import HAVE_DIPY, dipy_version, dipy_to_nipype_interface
4+
from .base import (HAVE_DIPY, dipy_version, dipy_to_nipype_interface,
5+
get_dipy_workflows)
56

67
IFLOGGER = logging.getLogger('nipype.interface')
78

8-
if HAVE_DIPY and LooseVersion(dipy_version()) >= LooseVersion('0.15'):
9+
if HAVE_DIPY and (LooseVersion('0.15') >= LooseVersion(dipy_version()) >= LooseVersion('0.16')):
910

1011
from dipy.workflows.align import ResliceFlow, SlrWithQbxFlow
1112

1213
Reslice = dipy_to_nipype_interface("Reslice", ResliceFlow)
1314
StreamlineRegistration = dipy_to_nipype_interface("StreamlineRegistration",
1415
SlrWithQbxFlow)
1516

17+
elif HAVE_DIPY and LooseVersion(dipy_version()) >= LooseVersion('1.0'):
18+
from dipy.workflows import align
19+
20+
l_wkflw = get_dipy_workflows(align)
21+
for name, obj in l_wkflw:
22+
new_name = name.replace('Flow', '')
23+
globals()[new_name] = dipy_to_nipype_interface(new_name, obj)
24+
del l_wkflw
25+
1626
else:
1727
IFLOGGER.info("We advise you to upgrade DIPY version. This upgrade will"
18-
" activate Reslice, StreamlineRegistration.")
28+
" open access to more function")

0 commit comments

Comments
 (0)