File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 17
17
import os
18
18
from glob import glob
19
19
from shutil import rmtree
20
+ from warnings import warn
20
21
21
22
import numpy as np
22
23
from nibabel import load
30
31
BaseInterfaceInputSpec )
31
32
from .base import FSLCommand , FSLCommandInputSpec , Info
32
33
34
+ FSVersion = "0"
35
+ _ver = Info .version ()
36
+ if _ver :
37
+ if 'dev' in _ver :
38
+ FSVersion = _ver .rstrip ().split ('-' )[- 1 ] + '.dev'
39
+ else :
40
+ FSVersion = _ver .rstrip ().split ('-v' )[- 1 ]
41
+
33
42
34
43
class Level1DesignInputSpec (BaseInterfaceInputSpec ):
35
44
interscan_interval = traits .Float (mandatory = True ,
@@ -1075,13 +1084,17 @@ class ContrastMgr(FSLCommand):
1075
1084
"""Use FSL contrast_mgr command to evaluate contrasts
1076
1085
1077
1086
In interface mode this file assumes that all the required inputs are in the
1078
- same location.
1087
+ same location. This has deprecated for FSL versions 5.0.7+ as the necessary
1088
+ corrections file is no longer generated by FILMGLS.
1079
1089
"""
1080
1090
1091
+ if LooseVersion (FSVersion ) >= LooseVersion ("5.0.7" ):
1092
+ warn ("ContrastMgr is deprecated in FSL 5.0.7+" , DeprecationWarning )
1081
1093
_cmd = 'contrast_mgr'
1082
1094
input_spec = ContrastMgrInputSpec
1083
1095
output_spec = ContrastMgrOutputSpec
1084
1096
1097
+
1085
1098
def _run_interface (self , runtime ):
1086
1099
# The returncode is meaningless in ContrastMgr. So check the output
1087
1100
# in stderr and if it's set, then update the returncode
You can’t perform that action at this time.
0 commit comments