spateo.tdr.widgets.slice

Functions

find_plane_equation(point1, point2, point3)

find_model_outline_planes(→ dict)

find_intersection(model, vec, center, plane)

euclidean_distance(instance1, instance2, dimension)

create_line(model, vec, center, n_points)

three_d_slice(, center, ...)

Create many slices of the input dataset along a specified axis or

interactive_slice(→ pyvista.MultiBlock)

Create a slice of the input dataset along a specified axis or

Module Contents

spateo.tdr.widgets.slice.find_plane_equation(point1: numpy.ndarray, point2: numpy.ndarray, point3: numpy.ndarray)[source]
spateo.tdr.widgets.slice.find_model_outline_planes(model) dict[source]
spateo.tdr.widgets.slice.find_intersection(model, vec, center, plane)[source]
spateo.tdr.widgets.slice.euclidean_distance(instance1, instance2, dimension)[source]
spateo.tdr.widgets.slice.create_line(model, vec, center, n_points)[source]
spateo.tdr.widgets.slice.three_d_slice(model: pyvista.PolyData | pyvista.UnstructuredGrid, method: Literal['axis', 'orthogonal', 'line'] = 'axis', n_slices: int = 10, axis: Literal['x', 'y', 'z'] = 'x', vec: tuple | list = (1, 0, 0), center: tuple | list = None) pyvista.PolyData | Tuple[pyvista.MultiBlock, pyvista.MultiBlock, pyvista.PolyData][source]

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.

Parameters:
model

Reconstructed 3D model.

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.

n_slices

The number of slices to create along a specified axis. Only works when method is ‘axis’ or ‘line’.

axis

The axis to generate the slices along. Only works when method is ‘axis’.

vec

The vector direction. Only works when method is ‘line’.

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.

spateo.tdr.widgets.slice.interactive_slice(model: pyvista.PolyData | pyvista.UnstructuredGrid | pyvista.MultiBlock, key: str = 'groups', method: Literal['axis', 'orthogonal'] = 'axis', axis: Literal['x', 'y', 'z'] = 'x') pyvista.MultiBlock[source]

Create a slice of the input dataset along a specified axis or create three orthogonal slices through the dataset on the three cartesian planes.

Parameters:
model

Reconstructed 3D model.

key

The key under which are the labels.

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.

axis

The axis to generate the slices along. Only works when method is ‘axis’.

Returns:

A MultiBlock that contains all models you sliced.

Return type:

sliced_model