setShowGrid  
Top  Previous  Next

setShowGrid ( [ integer Show =1 ] )

Use this function to enable or disable an automatic display of the Global Grid after the automatic measurements. When the automatic measurements are called with the File argument missing, ImageWarp will collect the results in the Global Grid instead of writing them into a data file. If you do not want the Global Grid to be displayed upon finishing the measurements, use this function with the argument set to FALSE. Disabling the automatic display of the Global Grid can be necessary for a performance boost in time-critical scripts. For more information refer to measObjects and measFields.

Parameters
 
Show  
 
A boolean integer specifying whether an automatic display of the Global Grid will be enabled or disabled. Must be one of the following values:  
 
FALSE=0 – disables an automatic display of the Global Grid.  
TRUE=1 – enables an automatic display of the Global Grid.  
Default value: TRUE  
 
Error flags

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

Remark

When ImageWarp starts the automatic display of the Global Grid is set to the enabled state.  

Example:

The following set of statements performs blob measurements on a captured image without displaying the Global Grid:  
 
setShowGrid(FALSE)  
SelectParam("Area","Perim","DCircle","DMin","DMax")  
grabim(1)  
threshunimod(1,1,0,1)  
scrap(1,1,50,400,1)  
measobjects(1,1,"")  
Print "Area of object 10: ",Grid.GetParamValue(10,"Area"), " pixels"