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 11
22from distutils .version import LooseVersion
33from ... 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
67IFLOGGER = 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+
1626else :
1727 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