Class ObjectsFromConnectedComponentsFactory
Object
ObjectsFromConnectedComponentsFactory
Creates a
ObjectCollection
from the connected-components of a mask or binary-voxels.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionCreates to use a small-neighborhood.ObjectsFromConnectedComponentsFactory
(boolean bigNeighborhood) Creates to use a specified type of neighborhood.ObjectsFromConnectedComponentsFactory
(boolean bigNeighborhood, int minNumberVoxels) Creates to use a specified type of neighborhood, and minimum number of voxels.ObjectsFromConnectedComponentsFactory
(int minNumberVoxels) Creates to use a minimum number of voxels for each connected component. -
Method Summary
Modifier and TypeMethodDescriptionFinds the connected-components in unsigned byte voxels.Finds the connected-components in unsigned int voxels.
-
Constructor Details
-
ObjectsFromConnectedComponentsFactory
public ObjectsFromConnectedComponentsFactory()Creates to use a small-neighborhood.See
NeighborhoodFactory
. -
ObjectsFromConnectedComponentsFactory
public ObjectsFromConnectedComponentsFactory(boolean bigNeighborhood) Creates to use a specified type of neighborhood.- Parameters:
bigNeighborhood
- if true, use 8-Connectivity instead of 4 in 2D, and 26-connectivity instead of 6 in 3D, as perNeighborhoodFactory
.
-
ObjectsFromConnectedComponentsFactory
public ObjectsFromConnectedComponentsFactory(int minNumberVoxels) Creates to use a minimum number of voxels for each connected component.- Parameters:
minNumberVoxels
- the minimum number of voxels that must exist for an independent connected-component, otherwise the connected-component is omitted.
-
ObjectsFromConnectedComponentsFactory
public ObjectsFromConnectedComponentsFactory(boolean bigNeighborhood, int minNumberVoxels) Creates to use a specified type of neighborhood, and minimum number of voxels.- Parameters:
bigNeighborhood
- if true, use 8-Connectivity instead of 4 in 2D, and 26-connectivity instead of 6 in 3D, as perNeighborhoodFactory
.minNumberVoxels
- the minimum number of voxels that must exist for an independent connected-component, otherwise the connected-component is omitted.
-
-
Method Details
-
createUnsignedByte
Finds the connected-components in unsigned byte voxels.Connected-components are considered to be contiguous neighboring voxels with on states.
- Parameters:
voxels
- the voxels to find connected-components in. Note that these voxel values are changed, as the algorithm runs.- Returns:
- the connected-components, each encoded as an
ObjectMask
.
-
createUnsignedInt
Finds the connected-components in unsigned int voxels.Connected-components are considered to be contiguous neighboring voxels with on states.
- Parameters:
voxels
- the voxels to find connected-components in. Note that these voxel values are changed, as the algorithm runs.- Returns:
- the connected-components, each encoded as an
ObjectMask
.
-