spateo.tdr.widgets.morphology
#
Module Contents#
Functions#
|
Return the basic morphological characteristics of model, |
|
Calculate the kernel density of a 3D point cloud model. |
- spateo.tdr.widgets.morphology.model_morphology(model: Union[pyvista.PolyData, pyvista.UnstructuredGrid], pc: Optional[PolyData or UnstructuredGrid] = None) Dict[str, Union[float, Any]] [source]#
Return the basic morphological characteristics of model, including model volume, model surface area, volume / surface area ratio,etc.
- Parameters
- model
A reconstructed surface model or volume model.
- pc
A point cloud representing the number of cells.
- Returns
- A dictionary containing the following model morphological features:
morphology[‘Length(x)’]: Length (x) of model. morphology[‘Width(y)’]: Width (y) of model. morphology[‘Height(z)’]: Height (z) of model. morphology[‘Surface_area’]: Surface area of model. morphology[‘Volume’]: Volume of model. morphology[‘V/SA_ratio’]: Volume / surface area ratio of model; morphology[‘cell_density’]: Cell density of model.
- Return type
morphology
- spateo.tdr.widgets.morphology.pc_KDE(pc: pyvista.PolyData, key_added: str = 'kde', kernel: str = 'gaussian', bandwidth: float = 1.0, colormap: Union[str, list, dict] = 'hot_r', alphamap: Union[float, list, dict] = 1.0, inplace: bool = False) Union[pyvista.PolyData, pyvista.UnstructuredGrid] [source]#
Calculate the kernel density of a 3D point cloud model.
- Parameters
- pc
A point cloud model.
- key_added
The key under which to add the labels.
- kernel
The kernel to use. Available kernel are: * ‘gaussian’ * ‘tophat’ * ‘epanechnikov’ * ‘exponential’ * ‘linear’ * ‘cosine’
- bandwidth
The bandwidth of the kernel.
- colormap
Colors to use for plotting pcd. The default colormap is ‘hot_r’.
- alphamap
The opacity of the colors to use for plotting pcd. The default alphamap is 1.0.
- inplace
Updates model in-place.
- Returns
- Reconstructed 3D point cloud, which contains the following properties:
pc[key_added], the kernel density.
- Return type
pc