setMeasAttr
Top  Previous  Next

setMeasAttr (integer Border [, integer Conn, integer AngStep, integer ContStep,
integer ScanStep, integer AngStep, integer AngReverse])  

Use this function to set the attributes for blob measurement functions. Equivalent to changing Measurements Preferences (the Edit menu).

Arguments
 
Border  
 
An enumerated integer specifying how to measure objects that cross the edges of an image or selection. Must be one of the following values:  
 
BD_INCLUDE=0 – measure objects that cross the edges. If part of an object lies outside a selection area, it will be included into the count.  
BD_CUT=1 – partially measure the objects that cross the edges of an image or selection. If part of an object lies outside the selection area, it will be disregarded.  
BD_REMOVE=2 – exclude from the count any object that intersects the edges of the image or selection. Only the objects that lie entirely within the area of interest will be measured.  
 
Conn  
 
An enumerated integer specifying the neighborhood pattern for object detection algorithm. Must be one of the following values:  
 
M_4CONN=0 – use a "city block" neighborhood. The pixels connected diagonally will be treated as belonging to different objects.  
M_8CONN=1 – use an "chess board' neighborhood. Any interconnected pixels will be treated as belonging to the same object.  
 
AngStep  
 
A positive integer specifying the minimum angular step for radial measurements. The step is indicated in degrees. The following parameters are affected by this option: RadiiIn, RadiiOut, Diameters, Dmin, Dmax, AngleDmin, AngleDmax, Davrg, DRatio.  
 
ContStep  
 
A positive integer specifying the minimum step for outline-based measurements. The step is indicated in pixels. The following parameters are affected by this option: AreaOut, AreaConv, AreaBox, PerimOut, PerimConv, Convexity, Rmin, Rmax, AngleRmin, AngleRmax, Ravrg, RRatio, FeretMin, FeretMax, AngleFmin, AngleFmax, FeretAvrg, FeretRatio, BoxWidth, BoxHeight, BoxRatio, Rectangularity, CenterConvX, CenterConvY.  
 
ScanStep  
 
A positive integer specifying the distance between the scan lines in the field measurements. The following measurement parameters are affected by this option: ChordSum, ChordRef, InterceptX, InterceptY, Anisotropy.  
 
AngReverse  
 
An enumerated integer specifying whether the direction of angular measurements must be reversed. By default ImageWarp assigns the positive sign to angles increasing in a direction from the positive X-axis to the positive Y-axis.  
 
FALSE - angles will be reported in the default direction.  
 
TRUE=1 - angles will be reported in the inversed direction (from the positive X-axis to the negative Y-axis).  

Example
 
SetMeasAttr (BD_REMOVE, M_8CONN, 6, 3, 1)