getDisplayRange
Top  Previous  Next

getDisplayRange ( integer Image, float& Min, float& Max )
or
val = getDisplayRange
( integer Image, integer& Level )

Use this function to retrieve the minimum and maximum value of the display range of a high-bit depth image or the Video Window. A display range is range of pixel values mapped to the standard viewable range of a video card (256 levels). All the levels below minimum are displayed black, while all the levels above maximum are displayed white. For images of a regular depth the display range is 0 – 255.

Parameters
 
Image  
 
An integer between 0 and 116 specifying the frame number of the image. A value of 0 represents the Video Window. Values in the range of 100-116 correspond to hidden frames.  
 
Min, Max  
 
Floating variables that return the minimum and maximum levels of the display range of the image.  
 
Level  
 
An enumerated integer that describes the mode for the alternative syntax. Must be one of the following values:  
 
DISP_MIN=1 – returns the minimum display level  
DISP_MAX=2 – returns the maximum display level  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
Example

This set of statements opens a 16-bit sample image, retrieves the display range and prints the information in the terminal window:  
 
setCurDir("samples")  
loadIm (1,"sample11.iwd")  
getDisplayRange (1, min, max )  
print "min=", min  
print "max=", max