src.clustering.postproc.cluster_enveloper
Classes
|
- class src.clustering.postproc.cluster_enveloper.ClusterEnveloper(**kwargs)
- Author:
Alberto M. Esmoris Pena
Clustering post-processor that computes the requested envelopes for each cluster. See
ClusteringPostProcessor.- Variables:
envelopes – List of dictionaries defining each envelope.
- __init__(**kwargs)
Initialize a ClusterEnveloper post-processor.
See
ClusteringPostProcessor.__init__().- Parameters:
kwargs – The key-word arguments for the initialization of the ClusterEnveloper.
- __call__(clusterer, pcloud, out_prefix=None)
Post-process the given point cloud with clusters to compute the cluster-wise envelopes.
- Parameters:
clusterer (
Clusterer) – The clusterer that generated the clusters.pcloud (
PointCloud) – The point cloud to be post-processed.out_prefix (str or None) – The output prefix in case path expansion must be applied.
- Returns:
The post-processed point cloud.
- Return type:
- compute_aabb_envelope(spec, X, cidx)
Compute the axis-aligned bounding box for the given points.
- Parameters:
spec (dict) – The specification of the axis aligned bounding box to be computed.
X (
np.ndarray) – The structure space matrix representing the cluster whose axis-aligned bounding box must be found.cidx (int) – The index of the cluster whose envelope must be computed.
- Returns:
Nothing, but the generated axis-aligned bounding box is stored in the member attribute
aabbs.
- compute_bbox_envelope(spec, X, cidx)
Compute the bounding box for the given points.
- Parameters:
spec (dict) – The specification of the bounding box to be computed.
X (
np.ndarray) – The structure space matrix representing the cluster whose bounding box must be found.cidx (int) – The index of the cluster whose envelope must be computed.
- Returns:
Nothing, but the generated bounding box is stored in the member attribute
bboxes.
- export_aabb_envelopes(out_prefix=None)
Export the axis-aligned bounding box envelopes stored as member attributes.
- Returns:
Nothing at all, but the bounding boxes are written to files.
- export_bbox_envelopes(out_prefix=None)
Export the bounding box envelopes stored as member attributes.
- Returns:
Nothing at all, but the bounding boxes are written to files.