-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi
Thank you for sharing the codes. I tried to run ... 01_globalconnectivity.sh script, the dcbc.py came up with an error saying deprecation error or warning with several instances.
My computer was installed python 3.9. I am not sure which version of python is compatible with the code. Could you please suggest to me how to fix that?
Error:
% test1/rsfMRI-global-local-connectivity-main/dcbc.py:9: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj).
-
deprecated from version: 3.0
-
Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
mask = mask.get_data().astype(bool)
/Users/kh/Downloads/test1/rsfMRI-global-local-connectivity-main/dcbc.py:10: DeprecationWarning: get_data() is deprecated in favor of get_fdata(), which has a more predictable return type. To obtain get_data() behavior going forward, use numpy.asanyarray(img.dataobj). -
deprecated from version: 3.0
-
Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
imgdata = img.get_data()
/Users/kh/Downloads/test1/rsfMRI-global-local-connectivity-main/dcbc.py:12: DeprecationWarning: get_header method is deprecated.
Please use theimg.headerproperty instead. -
deprecated from version: 2.1
-
Will raise <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 4.0
voxsize = np.array(img.get_header().get_zooms()[0:3]).reshape(1,3)
Traceback (most recent call last):
File "/Users/kh/Downloads/test1/rsfMRI-global-local-connectivity-main/dcbc.py", line 80, in
main()
File "/Users/kh/Downloads/test1/rsfMRI-global-local-connectivity-main/dcbc.py", line 75, in main
result = dcbc(img, mask, args.radius)
File "/Users/kh/Downloads/test1/rsfMRI-global-local-connectivity-main/dcbc.py", line 14, in dcbc
numtps = img.get_shape()[3]
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nibabel/deprecator.py", line 181, in deprecated_func
raise error_class(message)
nibabel.deprecator.ExpiredDeprecationError: get_shape method is deprecated.
Please use theimg.shapeproperty instead. -
deprecated from version: 1.2
-
Raises <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 3.0