Mayavi colormap适用于imshow,但不适用于图像平面

2024-06-25 22:52:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我用TraitsUI和Mayavi编写了一些代码。我有两个婚姻关系:

  1. NxN被称为imageArray2Dmesh—一种列密度的“数据”。在
  2. 称为数据。在

当我使用imshow进行二维渲染时,我得到以下结果:

self.scene.mlab.clf()   
self.scene.mlab.imshow(np.log10(self.imageArray2Dmesh),colormap=self.possible_colormap)

enter image description here

但是当我做横截面图时,我得到了以下结果:

^{pr2}$

enter image description here

这有什么原因吗?它应该只是看起来像3个切片与彩色地图显示在二维案件!是因为我在同一个窗口运行同一个场景吗?在


Tags: 数据代码selfnpscene密度mayaviclf