You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get the following exception when I deface, and issue appears to be line 124 in utils.py where get_affine() is used, which is deprecated. Has anyone addressed this issue? Thanks!
pydeface 2.0.0
--------------
Temporary files:
/tmp/tmp_c45u0hf.mat
/tmp/tmp9_yxyidm.nii.gz
Defacing...
/mnt/c/data/temp/PRISM2_NL-98-9998_V1_Struc.nii.gz
Traceback (most recent call last):
File "/home/amalik/anaconda3/bin/pydeface", line 8, in <module>
sys.exit(main())
File "/home/amalik/anaconda3/lib/python3.9/site-packages/pydeface/__main__.py", line 95, in main
pdu.deface_image(**vars(args))
File "/home/amalik/anaconda3/lib/python3.9/site-packages/pydeface/utils.py", line 124, in deface_image
masked_brain = Nifti1Image(outdata, infile_img.get_affine(),
File "/home/amalik/anaconda3/lib/python3.9/site-packages/nibabel/deprecator.py", line 181, in deprecated_func
raise error_class(message)
nibabel.deprecator.ExpiredDeprecationError: get_affine method is deprecated.
Please use the ``img.affine`` property instead.
* deprecated from version: 2.1
* Raises <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 4.0
The text was updated successfully, but these errors were encountered:
Hi. This is resolved now. Just needed to update line 124 in utils.py to use the affine and header properties of img instead of img.get_affine() and img.get_header().
Hi,
I get the following exception when I deface, and issue appears to be line 124 in
utils.py
whereget_affine()
is used, which is deprecated. Has anyone addressed this issue? Thanks!The text was updated successfully, but these errors were encountered: