在我的 3d tif 图像中的非零非空像素上绘制 3d 覆盖

问题描述 投票:0回答:1

所以我有一个 3d tif 像素图像,想要在非零非空像素上绘制 3d 覆盖

起初我以 2D 方式工作,传递每个切片并尝试在周围绘制一个形状,然后将它们绘制成 3D 形状,但似乎没有成功

我在斐济尝试了使用 3D 绘制 ROI 的 3d 套件,但它只在每个切片上绘制了一个固定的 2d 圆圈

python r 3d imagej fiji
1个回答
0
投票

我在这个答案的帮助下构建了一个凸包,它符合我正在寻找的

hull = ConvexHull(data)

fig = plt.figure()
ax = fig.add_subplot(111, projection="3d")

# Plot defining corner points
ax.plot(data.T[0], data.T[1], data.T[2], "ko")

# 12 = 2 * 6 faces are the simplices (2 simplices per square face)
for s in hull.simplices:
    s = np.append(s, s[0])  # Here we cycle back to the first coordinate
    ax.plot(data[s, 0], data[s, 1], data[s, 2], "r-")

# Make axis label
for i in ["x", "y", "z"]:
    eval("ax.set_{:s}label('{:s}')".format(i, i))

plt.show()
© www.soinside.com 2019 - 2024. All rights reserved.