Fix skeleton breaks

Fixes breaks (gaps) in binary skeleton images.

Description

Fixes breaks (gaps) in binary skeleton images. This considers each end point of the skeleton and tests it against multiple distance and orientation criteria to see if it can be linked to any other ends (or even midpoints) of the skeleton. The path between linked ends is added to the binary image as a straight line. This image will be 8-bit with binary logic determined by the "Binary logic" parameter.

Parameters

Parameter Description
Input image Image to apply break correction to. This image will be 8-bit with binary logic determined by the "Binary logic" parameter.
Apply to input image Select if the correction should be applied directly to the input image, or if it should be applied to a duplicate, then stored as a different image in the workspace.
Output image Name of the output image created during processing. This image will be added to the workspace.
Number of end pixels to fit Number of pixels at the end of a branch to be used for determination of branch orientation.
Maximum linking distance Maximum break distance that can be bridged. Specified in pixels unless "Calibrated units" is enabled.
Calibrated units Select whether "Maximum linking distance" should be specified in pixel (false) or calibrated (true) units.
Maximum linking angle (degrees) Maximum angular deviation of linking region relative to orientation of existing branch end. Specified in degrees.
Only link ends Only remove breaks between pixels at branch ends. When disabled, an end can link into the middle of another branch.
Angle weight Weight applied to orientation mismatch of ends. This controls how important orientation mismatches are when considering multiple candidate fixes. The larger this is, the more likely ends need to be well aligned to be chosen for linking.
Distance weight Weight applied to distance between candidate ends. This controls how important minimising the distance between candidate ends is when multiple candidate fixes are available. The larger than is, the more likely ends will need to be in close proximity to be chosen for linking.
End weight Weight applied to preference for linking end points. The larger this is, the more likely the points chosen for linking will be ends of the skeleton (rather than mid-points).
Binary logic Controls whether objects are considered to be white (255 intensity) on a black (0 intensity) background, or black on a white background.