This class is designed to allow efficient access to a representation of a rectangular section foreground and background pixels (a bit mask, where foreground bits are one and background bits are zero). The primary representation is as a labeled scan list. A scan list is a list of start,end segments of foreground pixels along a scan line (a horizontal line). A labeled bit mask is one where sets of connected forground bits (also known as blobs) are counted and tagged with an identifying number (the label). Blobs may be either 4-connected or 8-connected, as identified by the Connect8 property.
In addition to the scan list representation, an unlabeled, packed bitmap is available as the BitmapBits property. To get a labeled bitmap, one could call CreateMaskImage to create an 8-bit or 16-bit monochrome McImage where each pixel holds either zero (for background bits) or a blob label (foreground bits).
Objects of this class are directly creatable via McEngine.CreateOperator, though often they are created by other objects, primarily via McFeatures.CreateFeatureMask, where the McFeatures is usually an McRegions (in some circumstances an McBitMask from an McPoints or an McLines is of interest).
A copy of an McBitMask object may be generated with the Duplicate method. The McBitMask class also exposes a CopyFrom method that allows assignment from a source McBitMask object.
McBitMask has a Threshold property that can be used to fill the mask with foreground bits based on luminance thresholds from a parent or ancestor McImage.