File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 1
1
2
2
from distutils .version import LooseVersion
3
3
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 )
5
6
6
7
IFLOGGER = logging .getLogger ('nipype.interface' )
7
8
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' ) ):
9
10
10
11
from dipy .workflows .align import ResliceFlow , SlrWithQbxFlow
11
12
12
13
Reslice = dipy_to_nipype_interface ("Reslice" , ResliceFlow )
13
14
StreamlineRegistration = dipy_to_nipype_interface ("StreamlineRegistration" ,
14
15
SlrWithQbxFlow )
15
16
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
+
16
26
else :
17
27
IFLOGGER .info ("We advise you to upgrade DIPY version. This upgrade will"
18
- " activate Reslice, StreamlineRegistration. " )
28
+ " open access to more function " )
You can’t perform that action at this time.
0 commit comments