Total number of tiles in image
numTiles = numberOfTiles(t)
example
numTiles = numberOfTiles(t) returns the total number of tiles in the image specified in the Tiff object t.
t
Tiff
collapse all
Create a Tiff object for the file example.tif.
example.tif
t = Tiff('example.tif','r');
Check if the image has a tiled organization, and then get the number of tiles in the image.
if isTiled(t) % If the image has tiled layout nTiles = numberOfTiles(t) end
nTiles = 110
Close the Tiff object.
close(t);
Tiff object representing a TIFF file. Use the Tiff function to create the object.
This function corresponds to the TIFFNumberOfTiles function in the LibTIFF C API. To use this function, you must be familiar with the TIFF specification and technical notes. View this documentation at LibTIFF - TIFF Library and Utilities.
TIFFNumberOfTiles
LibTIFF - TIFF Library and Utilities
isTiled | numberOfStrips
isTiled
numberOfStrips
You have a modified version of this example. Do you want to open this example with your edits?