ddd_pylib.labeling.

ConnectedComponentsLabelingOperator#

class ddd_pylib.labeling.ConnectedComponentsLabelingOperator[source]#

Bases: ImageOperator

Takes an image and creates assigns a unique ID to all the voxels part of the same isolated connected component. The connectivity is to determine whether two pixels can be linked in diagonal or not. The possible values are: - 1 (only direct neighbors) - 2 (direct and diagonal neighbors)

Methods

static defaultConnectivity()[source]#
Return type:

int

getPrefix()[source]#

Prefix added to the input image name to generate the output image name.

setConnectivity(connectivity)[source]#

Used to switch between direct connectivity and direct+diagonal connectivity. The possible values are: - 1 (only direct neighbors) - 2 (direct and diagonal neighbors)

Parameters:

connectivity – The value of the wanted connectivity