Description

Skeletonizes an image, then classifies the skeleton pixels according to their connectivity.

Return Type

A McImage object.  

The resulting IMcImage.

Syntax

object.BranchEnd ([mode], [vSourceImg])

The BranchEnd Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McMorpho.
modeOptional. A Long value.

An mcBranchMode value.

vSourceImgOptional. A Variant value.

Optional input IMcImage.

Remarks

This method uses the value of Threshold to binarize the image.

The output of this filter is an image where skeleton points are labeled according to what their connectivity is. By selecting the appropriate branch mode, the user can generate an image consisting of, for example, only branch points, only end points, or only unconnected line segments.

Points classified as mcBranchMode.bmEnd have only one neighbor, as an endpoint. mcBranchMode.bmSkeleton is applied to skeleton points with two neighbors, and will be the classification of most points in the skeleton. mcBranchMode.bmBranch3 is applied to three way branch points; mcBranchMode.bmBranchN is applied to four or more way branch points, possible in some degenerate cases.

The set of points labeled in an image is dertermined by the Classify bit mask, which can be the sum of all four-branch modes.

Points in the filtered image are assigned their classification values, i.e. endpoints will be assigned the mcBranchMode.bmEnd value.

Exceptions

The exception mceINVALIDARG (E_INVALIDARG) will be thrown if one of the parameters is invalid.