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 1717import os
1818from glob import glob
1919from shutil import rmtree
20+ from warnings import warn
2021
2122import numpy as np
2223from nibabel import load
3031 BaseInterfaceInputSpec )
3132from .base import FSLCommand , FSLCommandInputSpec , Info
3233
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+
3342
3443class Level1DesignInputSpec (BaseInterfaceInputSpec ):
3544 interscan_interval = traits .Float (mandatory = True ,
@@ -1075,13 +1084,17 @@ class ContrastMgr(FSLCommand):
10751084 """Use FSL contrast_mgr command to evaluate contrasts
10761085
10771086 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.
10791089 """
10801090
1091+ if LooseVersion (FSVersion ) >= LooseVersion ("5.0.7" ):
1092+ warn ("ContrastMgr is deprecated in FSL 5.0.7+" , DeprecationWarning )
10811093 _cmd = 'contrast_mgr'
10821094 input_spec = ContrastMgrInputSpec
10831095 output_spec = ContrastMgrOutputSpec
10841096
1097+
10851098 def _run_interface (self , runtime ):
10861099 # The returncode is meaningless in ContrastMgr. So check the output
10871100 # in stderr and if it's set, then update the returncode
You can’t perform that action at this time.
0 commit comments