【发布时间】:2021-08-02 12:28:39
【问题描述】:
我正在尝试运行这个教程 http://emmanuelle.github.io/segmentation-of-3-d-tomography-images-with-python-and-scikit-image.html
我想用 Python 对 3-D 断层扫描图像进行分割。
我一开始就在努力重塑形象。
这是代码:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import time as time
data = np.fromfile('/data/data_l67/dalladas/Python3/Daten/Al8Cu_1000_g13_t4_200_250.vol', dtype=np.float32)
data.shape
(60940800,)
data.reshape((50,1104,104))
----------------------------------- ---------------------------- ValueError Traceback(最近一次调用 最后)在() ----> 1 个数据.reshape((50,1104,104))
ValueError: 无法将大小为 30470400 的数组重新整形为形状 (50,1104,104)
有人可以帮帮我吗?
【问题讨论】:
-
试试
a.reshape(50, 1104, -1),它会自动找出第三个暗淡