tiff2dir

版本 1.1.0.0 (5.0 KB) 作者: Matthew Eicholtz
Convert multi-image TIFF file to directory of images.
35.0 次下载
更新时间 2016/5/27

查看许可证

TIFF2DIR Convert multi-image TIFF file to directory of images.
TIFF2DIR(TIFF) reads the input image volume, creates a new directory
with the same name as the input file, and writes each slice of the
image volume to that directory.

TIFF2DIR() with no input arguments opens a dialog box and queries the
user to select an input file.

FILES = TIFF2DIR(___) returns a cell array containing the fullpath of
each generated image file.

TIFF2DIR(___,Name,Value,___) uses additional parameter name-value
pairs. Valid parameters include:

'Binary' Logical scalar indicating whether to convert the TIFF
image slices to binary images, if possible. This
parameter is useful for image masks that are stored as
{0,255} instead of {0,1}. Note that this parameter has
no effect on multi-color (more than two colors) images.

Default: true

'Format' String indicating the format of the output images. This
is used as the third input argument to IMWRITE, so any
supported image type of that function is valid here.

Default: 'png'

'Indices' Positive integer or vector of integers specifying which
images to read from the input file. Can also be set to
the string 'all', which will read all available images
from the input file.

Default: 'all'

'Parent' String indicating the parent directory for the output
subdirectory of images.

Default: the parent directory of the input file

Examples:
1) Unpack MRI TIFF file into directory of PNG images:

tiff2dir('mri.tif');

2) Unpack 10 MRI image slices into named directory of JPEG images and
return the filenames as output:

files = tiff2dir('mri.tif','format','jpg','indices',1:10,'parent','data')

>> files =
'data\mri\mri01.jpg'
'data\mri\mri02.jpg'
...
'data\mri\mri10.jpg'

引用格式

Matthew Eicholtz (2024). tiff2dir (https://www.mathworks.com/matlabcentral/fileexchange/57379-tiff2dir), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2016a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Import, Export, and Conversion 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.1.0.0

Added optional output of image filenames.

1.0.0.0