WidgetComponent.add_volume_clip_plane#
- WidgetComponent.add_volume_clip_plane(
- volume: Volume | ImageData | RectilinearGrid,
- *,
- normal: VectorLikeFloat | _NormalsLiteral = 'x',
- invert: bool = False,
- widget_color: ColorLike | None = None,
- value: float = 0.0,
- factor: float = 1.25,
- assign_to_axis: str | int | None = None,
- tubing: bool = False,
- origin_translation: bool = True,
- outline_translation: bool = False,
- implicit: bool = True,
- normal_rotation: bool = True,
- interaction_event: InteractionEventType = 'end',
- origin: VectorLikeFloat | None = None,
- outline_opacity: bool | float | None = None,
- **kwargs: Any,
Clip a volume using a plane widget.
- Parameters:
- volume
pyvista.plotting.volume.Volumeorpyvista.ImageDataorpyvista.RectilinearGrid New dataset of type
pyvista.ImageDataorpyvista.RectilinearGrid, or the return value frompyvista.plotting.volume.Volumefrompyvista.Plotter.add_volume().- normal
str|VectorLikeFloat, optional The starting normal vector of the plane.
- invertbool, optional
Flag on whether to flip/invert the clip.
- widget_color
ColorLike, optional Either a string, RGB list, or hex color string.
- value
float, optional Set the clipping value along the normal direction. The default value is 0.0.
- factor
float, optional An inflation factor to expand on the bounds when placing.
- assign_to_axis
strorint, optional Assign the normal of the plane to be parallel with a given axis. Options are
(0, 'x'),(1, 'y'), or(2, 'z').- tubingbool, optional
When using an implicit plane widget, this controls whether or not tubing is shown around the plane’s boundaries.
- origin_translationbool, optional
If
False, the plane widget cannot be translated by its origin and is strictly placed at the given origin. Only valid when using an implicit plane.- outline_translationbool, optional
If
False, the box widget cannot be translated and is strictly placed at the given bounds.- implicitbool, optional
When
True, a vtkImplicitPlaneWidget is used and whenFalse, a vtkPlaneWidget is used.- normal_rotationbool, optional
Set the opacity of the normal vector arrow to 0 such that it is effectively disabled. This prevents the user from rotating the normal. This is forced to
Falsewhenassign_to_axisis set.- interaction_eventvtkCommand.EventIds, optional
The VTK interaction event to use for triggering the callback.
- origin
VectorLikeFloat, optional The starting coordinate of the center of the plane.
- outline_opacitybool or
float, optional Set the visible of outline. Only valid when using an implicit plane. Either a
boolor float.Added in version 0.44.0.
- **kwargs
dict, optional All additional keyword arguments are passed to
pyvista.Plotter.add_volume()to control how the volume is displayed. Only applicable ifvolumeis either apyvista.ImageDataandpyvista.RectilinearGrid.
- volume
- Returns:
- outputvtkPlaneWidget | vtkImplicitPlaneWidget
The VTK plane widget depending on the value of
implicit.