私はこのエラーを取得する:Pythonの:私は私のスクリプトを実行するとはAttributeError
File "test_cm.py", line 34, in
labels = labels_img.get_data() AttributeError: 'tuple' object has no attribute 'get_data'
from dipy.tracking.eudx import EuDX
from dipy.reconst import peaks, shm
from dipy.tracking import utils
from dipy.data import read_stanford_labels
from dipy.io.gradients import read_bvals_bvecs
import numpy as np
import matplotlib.pyplot as plt
import nibabel as nib
source="prova11/"
path=source
print('loading data')
bvals,bvecs=read_bvals_bvecs(source+"bvals",source+"bvecs")
bvals[bvals < 10] = 0
img = nib.load(source+"segment-TO-b0.nii")
data = img.get_data()
affine=img.affine
labels_img = read_stanford_labels()
labels = labels_img.get_data()