MATLAB 帮助中心
确定当前 IFD 是否为文件中的最后一个目录
tf = lastDirectory(t)
如果当前的图像文件目录 (IFD) 是 TIFF 文件中的最后一个 IFD,tf = lastDirectory(t) 将返回 true。否则,该函数将返回 false。如果文件只包含一个图像,则当前 IFD 就是最后一个 IFD。
t
true
false
示例
全部折叠
为文件创建 Tiff 对象,并确定当前目录是否为文件中的最后一个目录。如果当前目录是最后一个目录,lastDirectory 函数将返回 1。否则,该函数将返回 0。
Tiff
lastDirectory
1
0
t = Tiff('example.tif','r'); lastDirectory(t)
ans = logical 0
将当前目录设置为编号为 3 的目录,并检查它是否为文件中的最后一个目录。
3
setDirectory(t,3); lastDirectory(t)
ans = logical 1
关闭 Tiff 对象。
close(t);
代表 TIFF 文件的 Tiff 对象。使用 Tiff 函数创建该对象。
此函数对应于 LibTIFF C API 中的 TIFFLastDirectory 函数。要使用此函数,您必须熟悉 TIFF 规范和技术说明。请访问 LibTIFF - TIFF 库和实用工具查看此文档。
TIFFLastDirectory
在 R2009b 中推出
setDirectory | Tiff
setDirectory
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处