【发布时间】:2014-08-05 16:06:13
【问题描述】:
我使用 cat 函数堆叠了 10 张图像,得到了一个标记为 myImage 的图像堆栈,其尺寸为:100x100x10(每个图像都有100x100 尺寸)。我想使用write_gdf 将此文件转换为 GDF 文件。但是,当我尝试运行此转换时,
myImage = cat(3,X{1:NumberOfFiles});
s = write_gdf('stack.gdf',myImage);
我希望s 是一个维度为100x100x10 的3D 矩阵,其值等于myImage 的值。相反,我只是让 s 成为一维变量:s=3。
在write_gdf帮助中提到:
NAME:
write_gdf
PURPOSE:
write data files in gdf format.
CATEGORY:
General Purpose Utility
CALLING SEQUENCE:
fid = write_gdf(filename,data)
INPUTS:
file: Complete pathname of the file to be written.
OUTPUTS:
data: Data structure. For example, if the original
data was stored as an array of bytes, then
DATA will be returned as an array of bytes also.
RESTRICTIONS:
Current implementation does not support structures or
arrays of structures.
PROCEDURE:
Reasonably straightforward.
Determines if the file is ASCII or binary, reads the size
and dimension info from the header, and reads in the data
请帮忙。提前谢谢!
【问题讨论】:
-
@Schorsch,我期待
s也是一个维度为100x100x10的 3 维文件。正在编写文件s,但它是一个值为 3 的一维变量。我将编辑问题以使其更清楚我的期望。谢谢 -
是的,很抱歉回复晚了。