我有一个形状为200130131(x,y,z)的三维数组。基本上就是屏蔽文件。我们可以说它被称为“maskCoords”。我想把它扩展到我原来的数据形状512*512*485(x,y,z)。但保持掩码不变,并将其余索引填充为零。你知道吗
所以,我创建了一个空的3D数组,比如:
mask3d = np.zeros_like(MainData3d)
但现在我无法理解如何用保存在屏蔽文件中的值填充这个mask3d数组。我试着做我喜欢的事
mask3d[maskCoords]=1
但事实并非如此工作。什么时候I重叠Maindata3d和mask3d遮罩区域不可见。 任何帮助或想法都将不胜感激。你知道吗
我假设你的maskCoords是3d坐标到你的3d数组中,我的答案是,因为就像你问题中的评论所说的,很难准确地说出你的意思。你知道吗
这是方法。你知道吗
也许不是你想要的,但我还是在尝试。你知道吗
相关问题 更多 >
编程相关推荐