我想使用 Python、Numpy 和 Matplotlib 绘制 3D 医学图像。我一直在尝试使用以下代码段来显示它们,但图像本身没有呈现。import osimport imageioimport matplotlib.pyplot as plt, numpy as npfrom mpl_toolkits.mplot3d import Axes3Ddef make_ax(grid=False):    fig = plt.figure()    ax = fig.gca(projection='3d')    ax.set_xlabel("x")    ax.set_ylabel("y")    ax.set_zlabel("z")    ax.grid(grid)    return axx=os.listdir('Path to .dcm images')print(x)vol = imageio.volread('Path to .dcm images') print(vol.shape)ax = make_ax(True)ax.voxels(vol, edgecolors='gray')plt.show()
                    
                    
                添加回答
举报
0/150
	提交
		取消
	