File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 55import os .path as op
66import nibabel as nb
77import numpy as np
8+ from distutils .version import LooseVersion
89
910from ...utils import NUMPY_MMAP
1011
1112from ... import logging
1213from ..base import (traits , TraitedSpec , File , isdefined )
13- from .base import DipyBaseInterface
14+ from .base import (HAVE_DIPY , dipy_version , dipy_to_nipype_interface ,
15+ get_dipy_workflows , DipyBaseInterface )
1416
1517IFLOGGER = logging .getLogger ('nipype.interface' )
1618
19+ if HAVE_DIPY and LooseVersion (dipy_version ()) >= LooseVersion ('0.15' ):
20+ from dipy .workflows import denoise , mask
21+
22+ l_wkflw = get_dipy_workflows (denoise ) + get_dipy_workflows (mask )
23+ for name , obj in l_wkflw :
24+ new_name = name .replace ('Flow' , '' )
25+ globals ()[new_name ] = dipy_to_nipype_interface (new_name , obj )
26+ del l_wkflw
27+
28+ else :
29+ IFLOGGER .info ("We advise you to upgrade DIPY version. This upgrade will"
30+ " open access to more function" )
31+
1732
1833class ResampleInputSpec (TraitedSpec ):
1934 in_file = File (
You can’t perform that action at this time.
0 commit comments