spateo.tdr.widgets¶
Submodules¶
Functions¶
|
Pick the interested part of a model using a 3D box widget. Only one model can be generated. |
|
Pick the interested part of a model using a 2D rectangle widget. |
|
Add a checkbox button widget to pick the desired groups through the interactive window and output the picked groups. |
|
Pick the intersection between two mesh models. |
|
Pick the point cloud inside the mesh model and point cloud outside the mesh model. |
|
Add a checkbox button widget to pick the desired groups through the interactive window and output the picked groups. |
|
Pick the desired groups. |
|
Create a slice of the input dataset along a specified axis or |
|
Create many slices of the input dataset along a specified axis or |
Package Contents¶
- spateo.tdr.widgets.interactive_box_clip(model: pyvista.PolyData | pyvista.UnstructuredGrid | pyvista.MultiBlock, key: str = 'groups', invert: bool = False) pyvista.MultiBlock [source]¶
Pick the interested part of a model using a 3D box widget. Only one model can be generated.
- Parameters:
- model
Reconstructed 3D model.
- key
The key under which are the labels.
- invert
Flag on whether to flip/invert the pick.
- Returns:
A MultiBlock that contains all models you picked.
- Return type:
picked_model
- spateo.tdr.widgets.interactive_rectangle_clip(model: pyvista.PolyData | pyvista.UnstructuredGrid | pyvista.MultiBlock, key: str = 'groups', model_style: Literal['points', 'surface', 'wireframe'] | list = 'points', model_size: float | list = 8.0, colormap: str = 'Spectral', invert: bool = False, bg_model=None) pyvista.MultiBlock [source]¶
Pick the interested part of a model using a 2D rectangle widget. Multiple models can be generated at the same time.
- Parameters:
- model
Reconstructed 3D model.
- key
The key under which are the labels.
- invert
Flag on whether to flip/invert the pick.
- bg_model
A visualization-only background model to help clip our target model.
- Returns:
A MultiBlock that contains all models you picked.
- Return type:
picked_model
- spateo.tdr.widgets.interactive_pick(model: pyvista.PolyData | pyvista.UnstructuredGrid | pyvista.MultiBlock, key: str = 'groups', checkbox_size: int = 27, label_size: int = 12) pyvista.MultiBlock [source]¶
Add a checkbox button widget to pick the desired groups through the interactive window and output the picked groups.
- Parameters:
- model
Reconstructed 3D model.
- key
The key under which are the groups.
- checkbox_size
The size of the button in number of pixels.
- label_size
The font size of the checkbox labels.
- Returns:
A MultiBlock that contains all models you picked.
- spateo.tdr.widgets.overlap_mesh_pick(mesh1: pyvista.PolyData, mesh2: pyvista.PolyData) pyvista.PolyData [source]¶
Pick the intersection between two mesh models.
- Parameters:
- mesh1
Reconstructed 3D mesh model.
- mesh2
Reconstructed 3D mesh model.
- Returns:
The intersection mesh model.
- Return type:
select_mesh
- spateo.tdr.widgets.overlap_pc_pick(pc: pyvista.PolyData, mesh: pyvista.PolyData) [pyvista.PolyData, pyvista.PolyData] [source]¶
Pick the point cloud inside the mesh model and point cloud outside the mesh model.
- Parameters:
- pc
Reconstructed 3D point cloud model corresponding to mesh.
- mesh
Reconstructed 3D mesh model.
- Returns:
Point cloud inside the mesh model. outside_pc: Point cloud outside the mesh model.
- Return type:
inside_pc
- spateo.tdr.widgets.overlap_pick(main_mesh: pyvista.PolyData, other_mesh: pyvista.PolyData, main_pc: pyvista.PolyData | None = None, other_pc: pyvista.PolyData | None = None)[source]¶
Add a checkbox button widget to pick the desired groups through the interactive window and output the picked groups.
- Parameters:
- main_mesh
Reconstructed 3D mesh model.
- other_mesh
Reconstructed 3D mesh model.
- main_pc
Reconstructed 3D point cloud model corresponding to main_mesh.
- other_pc
Reconstructed 3D point cloud model corresponding to other_mesh.
- Returns:
A MultiBlock that contains all models you picked.
- spateo.tdr.widgets.three_d_pick(model: pyvista.PolyData | pyvista.UnstructuredGrid | pyvista.MultiBlock, key: str = 'groups', picked_groups: str | list = None) pyvista.MultiBlock [source]¶
Pick the desired groups.
- spateo.tdr.widgets.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
- spateo.tdr.widgets.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.