LabelingDebug

Helper for the LabelingFilter, provides a debug display for diameters and contours.

Temporary until a proper way of rendering them is added.

Constructor

new LabelingDebug()

Methods

cleanBuffer(imageBuffer)

Cleans buffer of debug lines before calculations.

Parameters:
NameTypeDescription
imageBufferTypedArray

The image buffer to clean.

drawDebugLines(imageBuffer, unitVectors, sizes, spacing, borders, maxDiameters)

Renders debug lines for contours and diameters. The pixel value of the debug lines are the segmentation label of the segment + 128.

Parameters:
NameTypeDescription
imageBufferTypedArray

The image buffer to draw debug lines on.

unitVectorsArray.<number>

The unit vectors for index to offset conversion.

sizesArray.<number>

The image dimensions.

spacingArray.<number>

The pixel spacing of the image.

bordersTypedArray

The buffer containing the border pixel arrays.

maxDiametersobject

The dictionary of calculated diameters.