Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nifti_align error on Apple M2 Pro chip #106

Open
kavandeloo opened this issue Jul 5, 2023 · 1 comment
Open

nifti_align error on Apple M2 Pro chip #106

kavandeloo opened this issue Jul 5, 2023 · 1 comment

Comments

@kavandeloo
Copy link

Hi Tashrif! I'm trying pnlNipype on an Apple M2 Pro chip, not sure if it can be done. I have Python 3.10.12; Miniconda3 https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh; FSL 6.0.6.5; I built ANTs from source (https://github.com/ANTsX/ANTs/wiki/Compiling-ANTs-on-Linux-and-Mac-OS); FreeSurfer 7.4.1.

Could you provide insight into this problem with nifti_align?:

(pnlpipe3) katievandeloo@Katies-MacBook-Pro dwi % nifti_align --axisAlign --center -i sub-PILOT_ses-1_dwi.nii.gz --bvals sub-PILOT_ses-1_dwi.bval --bvecs sub-PILOT_ses-1_dwi.bvec -o sub-PILOT-ses-1_desc-Xc_dwi
Traceback (most recent call last):
File "/Users/katievandeloo/pnlNipype/exec/nifti_align", line 182, in
Xalign.run()
File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/plumbum/cli/application.py", line 633, in run
retcode = inst.main(*tailargs)
File "/Users/katievandeloo/pnlNipype/exec/nifti_align", line 178, in main
save_nifti(self.out_prefix+'.nii.gz', mri.get_data(), hdr_out.get_best_affine(), hdr_out)
File "/Users/katievandeloo/fsl/lib/python3.10/site-packages/nibabel/deprecator.py", line 208, in deprecated_func
raise exception(message)
nibabel.deprecator.ExpiredDeprecationError: 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
  • Raises <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 5.0
@kavandeloo kavandeloo changed the title nifti_align error nifti_align error on Apple M2 Pro chip Jul 5, 2023
@tashrifbillah
Copy link
Collaborator

Hi Katie, you just need to downgrade your nibabel.

pip remove nibabel
pip install nibabel==3.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants