Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

setDirectory - Class: Tiff

Make specified IFD current IFD

Syntax

tiffobj.setDirectory(dirNum)

Description

tiffobj.setDirectory(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. Replace myfile.tif with the name of a TIFF file on your MATLAB path. The TIFF file should contain multiple images.

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

References

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

See Also

Tiff.currentDirectory | Tiff.nextDirectory

Tutorials

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS