一个大脑区域的网络图。我想得到类似于图1的东西。在
我能够在三维空间中放置点,并通过使用python和mayavi将它们与edge链接起来。代码在这里:
import mayavi
# get data
xyz = getCoords(file_coords)
communities = getCommunities(file_communities)
mlab.figure(1, bgcolor=(0, 0, 0))
mlab.clf()
# plot points
pts = mlab.points3d(xyz[:,0], xyz[:,1], xyz[:,2],
communities,
colormap= "Blues",
scale_factor=7,
resolution=50)
# plot edges
pts.mlab_source.dataset.lines = np.array(list_of_edges)
tube = mlab.pipeline.tube(pts, tube_radius=0.1)
mlab.pipeline.surface(tube, color=(0.5, 0.5, 0.5))
mlab.show()
您可以在这里看到代码的输出,如图2所示:
我如何创建一个3D大脑渲染,以获得类似于图1的东西:
目前没有回答
相关问题 更多 >
编程相关推荐