open_viewmin.filter_tree_plot_Qt.filter_tree_plot_Qt

Contents

open_viewmin.filter_tree_plot_Qt.filter_tree_plot_Qt#

Extend pyvistaqt.BackgroundPlotter functionality to include auto-updating filter trees and more complete UI.

Classes#

FilterTreePlotQt

Implement some PyVista functionality, with filter trees, in the PyVistaQt

Module Contents#

class FilterTreePlotQt(filenames=None, user_settings=None, theme=None, reader=ovm_utilities.fast_import, **kwargs)#

Bases: open_viewmin.filter_tree_plot.filter_tree_plot.FilterTreePlot, pyvistaqt.BackgroundPlotter

Implement some PyVista functionality, with filter trees, in the PyVistaQt GUI

Parameters:
  • filenames (list[str], str, or None, optional) – Files to import.

  • user_settings (dict or None, optional) – Customizations to default plotter settings.

  • theme (['dark' | 'document' | 'paraview' | None], optional) – PyVista plot theme

  • reader (callable()) – Function to import and process data files

  • kwargs (dict, optional) – Keyword arguments to open_viewmin.FilterTreePlot

_assign_keypress_events()#

Assign actions to keyboard keys.

static _get_menu(parent, title)#

Get a menu with a given title

Parameters:
  • parent (PyQt5.QtWidgets.QMenuBar) – Menu bar to search

  • title (str) – Title of menu

Returns:

Menu

Return type:

PyQt5.QtWidgets.QMenu

_init_procedures_after_data_import()#

Initialization steps that can be carried out only after some data is imported

add_filter_formula(name=None, **kwargs)#
add_slice_with_controls(scalars_name, mesh_to_slice_name='fullmesh')#

Create a callable that adds a slice filter formula controlled by sliders and buttons in the controls area.

Parameters:
  • scalars_name (str or None) – Name of scalar dataset to use for coloring the slice. Pass None to use a solid color.

  • mesh_to_slice_name (str, optional) – Name of parent mesh to slice

Return type:

callable()

add_widget_formula(name=None, **kwargs)#
customize_controls_dock()#

Modify settings of controls area

enable_pyvista_3_lights(only_active=False)#
enable_pyvista_lightkit(only_active=False)#
initialize_plotter(**kwargs)#

Override parent class’s plotter initialization to use pyvistaqt.BackgroundPlotter instead of pyvista.Plotter

Parameters:

kwargs (dict, optional) – Keyword arguments to pyvistaqt.BackgroundPlotter

load(filenames, **kwargs)#
open_files_dialog(sort=True)#

Launch GUI widget for selecting files to import

Parameters:

sort (bool, optional) – Whether to sort filenames by timestamp

refresh()#
remove_actor_completely(actor_name)#
remove_mesh_completely(mesh_name, remove_children=True)#
rename_mesh(from_name, to_name, do_refresh=False)#
save_html(filename=None)#

Export plotter scene as interactive html widget

Parameters:

filename (str or None) – Filename to write to. Pass None to launch GUI file selector.

save_mesh(mesh_name, mesh_filename=None)#

Export a mesh.

Note that the allowed file types depend on the type of mesh.

Parameters:
  • mesh_name (str) – Mesh name

  • mesh_filename (str or None) – File to write to. Pass None to launch GUI file selector.

save_meshes_launch_dialog(file_prefix=None)#
set_actor_visibility(actor, visibility)#
set_orbit_dlg(**kwargs)#
show_editor()#

Show editor widget controlling actors’ visibility

update_actor(actor_name, **kwargs)#
update_filter(mesh_name, update_actor=False, **kwargs)#
update_filters_tree()#
update_frame_spinbox()#

Update the spinbox controlling the frame

view_frame(frame_num=0, **kwargs)#

Use one of the imported data files as the source for all datasets

property actor_control_toolbars#
Get toolbars controlling individual actors
Returns:

Dictionary of toolbars

Return type:

dict

calculate_menu#
controls_dock_scroll_area#
controls_dock_widget#
controls_dock_window#
dock_widgets#
filters_tree_widget_items#
finished_setup = False#
frame_num = 0#
non_ovm_actors_toggle_menu#
settings_Qt_dict#
the_Add_menu#
the_File_menu#
the_Tools_menu#
the_View_menu#
the_refresh_toolbar#
theme_menu#
toolbars#
window_size#