plot
Plot
Bases: RendererWindowInteractor
Class with single renderer on a window.
Used for fast setting-up the 3D scene. Objects (actors) can be added to the renderer with self.renderer.add_actor method.
interactor_style = PickableInteractorStyle(self.renderer, self)
instance-attribute
__init__(width=800, height=600, background_color=(26, 51, 102))
add_actors(actors=())
Add list of actors to the renderer.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
actors |
list
|
List of actors to add to the renderer |
()
|
add_renderer(background_color)
add_time_operation(time_operation, dt=20)
Add time dependend operation to the scene.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_operation |
_type_
|
function for updating the scene |
required |
dt |
int
|
time interval operation. Defaults to 20 ms. |
20
|
export_html(filename)
Use PyVista's Plotter with the existing vtkRenderWindow.
Note
LATs need to be in transposed and rescaled to 0-255 range.
reset_camera(pad=1)
Reset the camera position to the original position with a vertical padding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pad |
float
|
vertical padding for the camera. Defaults to 1.0. |
1
|
set_camera_vector(vector, angle=0)
Set the camera vector and roll angle.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vector |
list
|
camera vector |
required |
angle |
float
|
roll angle in degrees. Defaults to 0. |
0
|