www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/DetermineNumberofStripsinImageExample.m
%% Determine Number of Strips in Image % Determine the number of strips in the second image of a file. %% % Create a |Tiff| object associated with the example file, |example.tif|. t = Tiff('example.tif','r'); %% % When the |Tiff| object is created, the first image in the file is the % current image file directory. %% % Make the second image the current directory. nextDirectory(t) %% % Get the number of strips in the image if the image has a stripped organization. if ~isTiled(t) numStrips = numberOfStrips(t) end %% % The image has 7 strips. %% % Close the |Tiff| object. close(t)