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.


Class: Tiff

Make subIFD specified by byte offset current IFD




setSubDirectory(tiffobj,offset) sets the subimage file directory (subIFD) specified by offset the current IFD. The offset value is given in bytes. Use this method when you want to access subIFDs linked through the SubIFD tag.


expand all

Open a TIFF file and read the value of the SubIFD tag in the current IFD. The SubIFD tag contains byte offsets that specify the location of subIFDs in the IFD. The TIFF file should contain subIFDs.

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

Read the value of the SubIFD tag to get subdirectory offsets.

offsets = getTag(t,'SubIFD');

Set one of the subdirectories (if more than one) as the current directory.



This method corresponds to the TIFFSetSubDirectory 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?