setParamScope  
Top  Previous  Next

setParamScope ( integer Scope )

Use this function to set the scope of the measurement parameters activated by the selectParam function for the interactive measurement functions. Typically, the parameters for interactive measurements are selected by pressing the Parameters button in a corresponding dialog. This function allows you to omit such an action and use selectParam instead.

Arguments
 
Scope  
 
An boolean integer specifying the scope of the parameters activated by the selectParam function. Must be one of the following value:  
 
PAR_LOCAL=0 – sets the local scope for the parameters activated by the selectParam. The parameters will not have effect on the interactive measurement functions.  
PAR_GLOBAL=1 – sets the global scope for the parameters activated by the selectParam. The parameters will be automatically selected in the interactive measurement functions.  
 
Error flags
 
ERR_OK  
 
The flag set if successful.  
 
ERR_FAILED  
 
The flag set if failed.  

Example

This set of statements sets activates measurement parameters, sets the global scope for them, starts interactive contour measurements and sets the local scope in the end:  
 
setCurDir ("samples")  
loadIm (1,"sample8.iwd")  
resetParam()  
selectParam ("Area","Perim","Circularity","Ellipticiy","GrayAvrg")  
setParamScope(PAR_GLOBAL)  
measContours (1,TRUE,3,"contours.dbs")  
setParamScope (PAR_LOCAL)