| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
Make specified IFD current IFD
tiffobj.setDirectory(dirNum)
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.
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);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.
Tiff.currentDirectory | Tiff.nextDirectory
![]() | setdiff | setdisp (hgsetget) | ![]() |

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 |