Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

computeStrip - Class: Tiff

Index number of strip containing specified coordinate

Syntax

stripNumber = tiffobj.computeStrip(row)
stripNumber = tiffobj.computeStrip(row, plane)

Description

stripNumber = tiffobj.computeStrip(row) returns the index number of the strip containing the given row. The value of row must be one-based.

stripNumber = tiffobj.computeStrip(row, plane) returns the index number of the strip containing the given row in the specified plane, if the value of the PlanarConfiguration tag is Tiff.PlanarConfiguration.Separate.. The values of row and plane must be one-based.

computeStrip clamps out-of-range coordinate values to the bounds of the image.

Examples

Open a Tiff object and get the index number of the strip containing the middle row. Replace myfile.tif with the name of a TIFF file on your MATLAB path:

t = Tiff('myfile.tif','r');
% Get the number of rows in the image.
numRows = t.getTag('ImageLength');
% Get the number of the strip containing the middle row
stripNum = t.computeStrip(numRows/2);

References

This method corresponds to the TIFFComputeStrip 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.computeTile

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