The McMeasure class exposes methods and properties that give access to a wide variety of measurements taken from an McFeatures object (a McPoints, McLines, or McRegions) or from an McRefFeatures object (each of which will be a child of some McFeatures object). The many types of measurement properties are instances of the McMeasure class (e.g., mLnLength or mRgnArea) or are instances of a derived class (e.g., mRgnHeterogeneity is an McHeterogeneity object. McHeterogeneity is derived from McMeasure).
McMeasure is derived from McMeasureInfo, which exposes information about a measurement.
Measurement naming conventions:
By convention, measurement names, Attributes(mcmaidName), are designed to give quick clues about the measurement's Attributes and the parent object about which it makes its computations. The name always starts with one or two lower-case letters. The first letter is a lower-case m. The second leading character, if any, indicates the shape or type of the result, as follows:
For typical one-scalar-value-per-feature measurements this second leading character is missing. For example: mRgnArea or mLnLength
For measurements where each feature result is an array (usually a 1-dimensional array) with the same fixed size for each feature, then the second letter is an a. For example, maRgnRadii which yields a 1-dimensional array of maRgnRadii.NumAngles for each feature. For all such measurements Attributes(mcmaidNofDimensions) will be 2 or more and Attributes(mcmaidShape) will be an array of dimension sizes where all sizes beyond the first are some non-zero number.
For measurements where each feature result is a Variant array (usually a 1-dimensional array) with variable size for each feature, then the second letter is an v. For example, mvRgnBranchLengths, which yields a 1-dimensional array of branch lengths for each feature. If the feature has no branches (as measured by mRgnNumDendrites), then the result will be a zero-length array for that feature; in general, the array length for any feature, iF, will be mRgnNumDendrites(iF). For all such measurements Attributes(mcmaidNofDimensions) will be 2 or more and Attributes(mcmaidShape) will be an array of dimension sizes where sizes of dimensions encoded as an array of Variant is shown as zero; for example 0,0 in the case of mvRgnBranchLengths.
For measurements where each feature result is an McPoints object, then the second letter is a p. Where the result is an McLines object, the second letter is an l (lower case L). Where the result is an McRegions object the second letter is an r. Examples include, mpRgnCentroidAsPoint and mlRefDistanceAsLine. For all such measurements, Attributes(mcmaidResultType) will not be the usual mcmrtNumeric, but instead will be mcmrtMcPoints, mcmrtMcLines or mcmrtMcRegions, respectively.
Reserved second leading letters that currently are not used by any built-in measurements are:
For measurements where the result is a single scalar value, the second leading character will be an s. For all such measurements Attributes(mcmaidNofDimensions) will be 0.
For measurements where the result is an array of feature index values, the second leading character will be an i. For all such measurements Attributes(mcmaidNofDimensions) will be 1, and Attributes(mcmaidPerFeatureMeasurement) will be False.
After the leading lower case letter comes a designation indicating on which type of target parent or ancestor object the measurement is made. These indicators are Pt for an McPoints (e.g., mPtDensity), Ln for an McLines (e.g., mLnChordRatio), Rgn for an McRegions (e.g., mRgnArea), and Ref for an McRefFeatures (e.g., mRefDistance). Reserved for future use are Feat for a measurement that would work with any ancestor McFeatures, Img for a measurement that would work as a direct child of an McImage object, and Aoi for a measurement that would work as a direct child of an McImage object to make some measurement related to its AOI.
For user-defined measurements (ones registered by calling McEngine.RegisterUserMeasurement), by convention "User"” or some other author designation follows the target type designation. For example, mRgnUserCircularityFull might be the name of a user-defined measurement (see McUserMeasure).
Finally, after the target indicator comes the actual name of the measurement. Note that this name is not what the user typically sees. The McMeasure.DisplayName property exposes a brief, localized measurement name suitable for lists and labels. For example, the DisplayName for the mRgnPerimeter2 measurement is Pixel Perimeter in its English localization.