Image Processing Toolbox User's Guide Previous page   Next Page
getrangefromclass

Get dynamic range of image based on its class

Syntax

Description

range = getrangefromclass(I) returns the dynamic range of the image I, based on its class type. range is a two-element vector specifying the dynamic range.

Class Support

I can be uint8, uint16, int16, logical, single, or double. range is of class double.

Note

For single and double data, getrangefromclass returns the range [0 1] to be consistent with the way double and single images are interpreted in MATLAB. For integer data, getrangefromclass returns the range of the class. For example, if the class is uint8, the dynamic range is [0 255].

Example

This example reads in the 16-bit DICOM image and gets the range.

See Also

intmin, intmax


Previous page  getpts getrect Next page

© 1994-2005 The MathWorks, Inc.