getParamValue
Top  Previous  Next

val = getParamValue (string Param, [ integer Index =0 ] )

Use this function to retrieve the value of a specified measurement parameter for the last measured object. Typically applied after a measurement function called in the single measure mode.

Arguments

Param  
 
A string specifying the name of the measurement parameter whose value is to be retrieved. See selectParam for the list of parameters supported by ImageWarp.  
 
Index  
 
An optional integer specifying the index of an element to be retrieved from a vector parameter. This argument is ignored for scalar parameters.  
Default value: 0  
 
Return value
 
The value of the specified parameter.  
 
 
Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  

Remark
 
To retrieve the measurement data from the Global Grid, use the Grid object.  

Example
 
This set of statements measures the histogram of a sample image and retrieves the 128-th element of the histogram array:  
 
setCurDir ("samples")  
loadIm (1,"sample8.iwd")  
measHistogram(1)  
val=getParamValue("Histogram", 128)  
Print "128-th bin: ",val