measContours
Top  Previous  Next

measContours ( integer Input, integer Autoconnect, integer Step [, string File, string User ] )

Use this function to activate interactive contour measurements that allow the user to define closed contours and collect information about geometrical, optical and topological properties of objects they encompass. Equivalent to selecting the Contour Measurements command in the Measure menu. Prior to performing contour measurements, the image must be calibrated with the proper spatial and intensity calibration scales, and the background corrected for transmission and optical density measurements.

Parameters
 
Input  
 
An integer between 1 and 99 specifying the frame number of the image for which the measurements are taken.  
 
Autoconnect  
 
A boolean integer specifying whether contours must be closed automatically during the interactive contour definition, when the cursor returns to the vicinity of a starting point.  
FALSE=0 – Autoconnect option is disabled. The right mouse button should be clicked to close a contour and complete its definition.  
TRUE=0 – A contour will be closed automatically when the cursor returns to the vicinity of a starting point. The radius of the vicinity is defined by the Step option.  
Step  
 
A positive integer specifying the distance between consecutive points in freehand segments of contour features. This value also defines the size of the window around a starting point of a contour for the Autoconnect functionality.  
 
File  
 
An optional string specifying the name of the ImageWarp data file for saving measurement results. If the file already exists, the data previously stored will be loaded into the Measurement table and the measurement parameters recorded in the file will be used to activate the set of measurements for the session. If no such a file exists, it will be created when the user presses the Save button on the dialog. In this case the set of parameters must be selected manually by pressing the Parameters button or specified in advance by using the combination of the setParamScope and selectParam functions.  
 
User  
 
An optional string specifying the formulas for calculating user-defined parameter. See User-defined parameters for more details.  
 
Example
 
This set of statements reads a sample image, initializes measurement parameters using the global scope and activates interactive contour measurements:  
 
setCurDir ("samples")  
loadIm (1,"sample8.iwd")  
setParamScope(PAR_GLOBAL)  
resetParam()  
selectParam ("Area","Perim","Circularity","Ellipticiy","GrayAvrg")  
measContours (1,TRUE,3,"contours.dbs")  
 
Remark

For more information on the Angle Measurements dialog box and the list of supported parameters refer to ImageWarp User's Guide.