spateo.tdr.morphometrics.morphology =================================== .. py:module:: spateo.tdr.morphometrics.morphology Functions --------- .. autoapisummary:: spateo.tdr.morphometrics.morphology.model_morphology spateo.tdr.morphometrics.morphology.pc_KDE Module Contents --------------- .. py:function:: model_morphology(model: Union[pyvista.PolyData, pyvista.UnstructuredGrid], pc: Optional[PolyData or UnstructuredGrid] = None) -> Dict[str, Union[float, Any]] Return the basic morphological characteristics of model, including model volume, model surface area, volume / surface area ratio,etc. :param model: A reconstructed surface model or volume model. :param 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. :rtype: morphology .. py:function:: 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) -> Tuple[Union[pyvista.DataSet, pyvista.PolyData, None], Optional[str]] Calculate the kernel density of a 3D point cloud model. :param pc: A point cloud model. :param key_added: The key under which to add the labels. :param kernel: The kernel to use. Available `kernel` are: * `'gaussian'` * `'tophat'` * `'epanechnikov'` * `'exponential'` * `'linear'` * `'cosine'` :param bandwidth: The bandwidth of the kernel. :param colormap: Colors to use for plotting pcd. The default colormap is `'hot_r'`. :param alphamap: The opacity of the colors to use for plotting pcd. The default alphamap is `1.0`. :param inplace: Updates model in-place. :returns: Reconstructed 3D point cloud, which contains the following properties: `pc[key_added]`, the kernel density. plot_cmap: Recommended colormap parameter values for plotting. :rtype: pc