loadMap
Top  Previous  Next

laodMap ( integer Image, string File )

Use this function to load a display map from an ImageWarp map file to an 8- or 16-bit grayscale image. Mapping 16-bit pixel values onto the 8-bit gray scale is especially useful for non-linear contrasting of high-depth images while maintaining the maximum intensity resolution.

Parameters

Image  
 
An integer between 1 and 116 specifying the frame number of the image to which the map must be loaded. Values in the range of 100-116 correspond to hidden frames.  
 
File  
 
A string containing the name of an ImageWarp map file.  
 
Error flags

ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  
 
ERR_NOTFOUND  
 
The flag set if the file was not found.  
 
ERR_BADFORMAT  
 
The flag set if file was not recognized as an ImageWarp map file.  
 
Example

This set of statements reads a 16-bit grayscale sample image and loads the logarithmic display map into it to enhance the contrast of low intensity areas:  
 
setCurDir("samples")  
loadIm(1,"sample11.iwd")  
loadMap(1,"..\PALETTES\16bit_log.map")  
 
Remark

This function cannot be applied to a true color image.