Skip to content

Commit 55cdc82

Browse files
author
Chenying Zhao
committed
fix issue of deprecated get_data()
1 parent 7b96cc4 commit 55cdc82

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

.vscode/launch.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@
44
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
55
"version": "0.2.0",
66
"configurations": [
7-
87
{
98
"name": "Python: Current File",
109
"type": "python",
1110
"request": "launch",
1211
"program": "${file}",
1312
"console": "integratedTerminal",
1413
//"env": {"PYTHONPATH": "/cbica/projects/GRMPY/miniconda3/condabin"},
15-
"args": ["--group-mask-file","tpl-MNI152NLin6Asym_res-02_desc-brain_mask.nii.gz","--cohort-file","GRMPY_convoxel_meanCBF_n209_indmask.csv","--relative-root","/home/chenying/Desktop/fixel_project/data/data_voxel_grmpy","--analysis_name","lm_fullOutputs","--input-hdf5","GRMPY_meanCBF_n209_indmask_nvoxels-0_wResults_20220504-180709.h5","--output-dir","GRMPY_meanCBF_n209_indmask_nvoxels-0_wResults_20220504-180709","--output-ext",".nii.gz"]
14+
//"args": ["--group-mask-file","tpl-MNI152NLin6Asym_res-02_desc-brain_mask.nii.gz","--cohort-file","GRMPY_convoxel_meanCBF_n209_indmask.csv","--relative-root","/home/chenying/Desktop/fixel_project/data/data_voxel_grmpy","--analysis_name","lm_fullOutputs","--input-hdf5","GRMPY_meanCBF_n209_indmask_nvoxels-0_wResults_20220504-180709.h5","--output-dir","GRMPY_meanCBF_n209_indmask_nvoxels-0_wResults_20220504-180709","--output-ext",".nii.gz"]
15+
"args": [
16+
"--index-file",
17+
"FDC/index.mif",
18+
"--directions-file",
19+
"FDC/directions.mif",
20+
"--cohort-file",
21+
"cohort_FDC_n100.csv",
22+
"--relative-root",
23+
"/Users/chenyzh/Desktop/Research/Satterthwaite_Lab/fixel_project/data/data_demo",
24+
"--output-hdf5",
25+
"demo_FDC_n100.h5"
26+
]
1627
}
1728
]
1829
}

confixel/fixels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def mif_to_nifti2(mif_file):
4242
if not op.exists(nii_file):
4343
raise Exception(err)
4444
nifti2_img = nb.load(nii_file)
45-
data = nifti2_img.get_data().squeeze()
45+
data = nifti2_img.get_fdata(dtype=np.float32).squeeze()
4646
# ... do stuff with dirpath
4747
if dirpath:
4848
shutil.rmtree(dirpath)

0 commit comments

Comments
 (0)