spateo.tdr.widgets.slice ======================== .. py:module:: spateo.tdr.widgets.slice Functions --------- .. autoapisummary:: spateo.tdr.widgets.slice.find_plane_equation spateo.tdr.widgets.slice.find_model_outline_planes spateo.tdr.widgets.slice.find_intersection spateo.tdr.widgets.slice.euclidean_distance spateo.tdr.widgets.slice.create_line spateo.tdr.widgets.slice.three_d_slice spateo.tdr.widgets.slice.interactive_slice Module Contents --------------- .. py:function:: find_plane_equation(point1: numpy.ndarray, point2: numpy.ndarray, point3: numpy.ndarray) .. py:function:: find_model_outline_planes(model) -> dict .. py:function:: find_intersection(model, vec, center, plane) .. py:function:: euclidean_distance(instance1, instance2, dimension) .. py:function:: create_line(model, vec, center, n_points) .. py:function:: three_d_slice(model: Union[pyvista.PolyData, pyvista.UnstructuredGrid], method: Literal['axis', 'orthogonal', 'line'] = 'axis', n_slices: int = 10, axis: Literal['x', 'y', 'z'] = 'x', vec: Union[tuple, list] = (1, 0, 0), center: Union[tuple, list] = None) -> Union[pyvista.PolyData, Tuple[pyvista.MultiBlock, pyvista.MultiBlock, pyvista.PolyData]] Create many slices of the input dataset along a specified axis or create three orthogonal slices through the dataset on the three cartesian planes or slice a model along a vector direction perpendicularly. :param model: Reconstructed 3D model. :param method: The methods of slicing a model. Available `method` are: * `'axis'`: Create many slices of the input dataset along a specified axis. * `'orthogonal'`: Create three orthogonal slices through the dataset on the three cartesian planes. This method is usually used interactively without entering a position which slices are taken. * `'line'`: Slice a model along a vector direction perpendicularly. :param n_slices: The number of slices to create along a specified axis. Only works when `method` is 'axis' or 'line'. :param axis: The axis to generate the slices along. Only works when `method` is 'axis'. :param vec: The vector direction. Only works when `method` is 'line'. :param center: A 3-length sequence specifying the position which slices are taken. Defaults to the center of the model. :returns: If method is 'axis' or 'orthogonal', return a MultiBlock that contains all models you sliced; else return a tuple that contains line model, all models you sliced and intersections of slices model and line model. .. py:function:: interactive_slice(model: Union[pyvista.PolyData, pyvista.UnstructuredGrid, pyvista.MultiBlock], key: str = 'groups', method: Literal['axis', 'orthogonal'] = 'axis', axis: Literal['x', 'y', 'z'] = 'x') -> pyvista.MultiBlock Create a slice of the input dataset along a specified axis or create three orthogonal slices through the dataset on the three cartesian planes. :param model: Reconstructed 3D model. :param key: The key under which are the labels. :param method: The methods of slicing a model. Available `method` are: * `'axis'`: Create a slice of the input dataset along a specified axis. * `'orthogonal'`: Create three orthogonal slices through the dataset on the three cartesian planes. :param axis: The axis to generate the slices along. Only works when `method` is 'axis'. :returns: A MultiBlock that contains all models you sliced. :rtype: sliced_model