Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

setDirectory

Class: Tiff

Make specified IFD current IFD

Syntax

setDirectory(tiffobj,dirNum)

Description

setDirectory(tiffobj,dirNum) sets the image file directory (IFD) specified by dirNum as the current IFD. Tiff object methods operate on the current IFD. The directory index number is one-based.

Examples

Open a TIFF file and move to an IFD in the file by specifying its index number. The TIFF file should contain multiple images.

t = Tiff('example.tif','r');
setDirectory(t,2)
close(t)

Related Examples

References

This method corresponds to the TIFFSetDirectory function in the LibTIFF C API. To use this method, you must be familiar with the TIFF specification and technical notes. View this documentation at LibTIFF - TIFF Library and Utilities.

Was this topic helpful?