Designer 3D View API

class metavision_designer_3dview.Image3dDisplayBase

Base class displaying an image from a 3D events producer in an OpenGL window

Args:

source (Producer): Producer source providing 3D events

display_3d (Display3dBase): Structure defining configuration parameters to initialize the viewer

class metavision_designer_3dview.Image3dDisplayOSG

Creates a 3D display using OpenSceneGraph.

Image3dDisplayOSG creates a renderer that displays events using a 3D display, where dimensions are x, y and t

  • x: X coordinate of the event

  • y: Y coordinate of the event

  • t: Timestamp of the event

Args:

source (Producer): Pointer to the Producer which provides the stream

width (int): Window width

height (int): Window height

display_scale (int): Scale factor applied for visualizing points in 3D XYT space. Each point coordinate will be multiplied by this scale value. Default is 2

class CameraManipulator

Members:

TRACKBALL

FIRST_PERSON

property name

(self: handle) -> str

class SceneDisplayProperty

Members:

POINT_SIZE

SCENE_SCALE_MM

BACKGROUND_COLOR

PRISM_COLOR

PRISM_COLORED

property name

(self: handle) -> str

class StandardView

Members:

ORIGINAL

FRONT

BACK

LEFT

RIGHT

UP

DOWN

property name

(self: handle) -> str

add_2D_text(self: metavision_designer_3dview.Image3dDisplayOSG, text: str, position: list, color: list = [], size: float = 100.0) → int

Adds some text on the display using 2D coordinates and gets its ID, in order to be able to remove/show/hide it

Args:

text (string): Text to display

position (list): x, y coordinates of the text

color (list): List of r, g, b components of the text color (default : [])

size (float): Size of the text (default : 100)

add_prism(self: metavision_designer_3dview.Image3dDisplayOSG) → int

Adds a frame delimiting where the events will be displayed in the 3D view.

add_prism_with_ticks(self: metavision_designer_3dview.Image3dDisplayOSG, interval_number: int, tick_size: float = - 1) → int

Adds a frame delimiting where the events will be displayed in the 3D view, and adds ticks to mark intervals at constant spacing

Args:

interval_number (int): Number of ticks to mark intervals

tick_size (int): Size of the ticks (default : -1)

add_text(self: metavision_designer_3dview.Image3dDisplayOSG, text: str, position: list, color: list = [], size: float = 100.0) → int

Adds some text on the display using 3D coordinates and gets its ID, in order to be able to remove/show/hide it

Args:

text (string): Text to display

position (list): x, y, z coordinates of the text

color (list): List of r, g, b components of the text color (default : [])

size (float): Size of the text (default : 100)

hide_item(self: metavision_designer_3dview.Image3dDisplayOSG, item_id: int) → bool

Hides an item, using its ID

Args:

item_id (int): ID of the item to hide

set_camera_manipulator(self: metavision_designer_3dview.Image3dDisplayOSG, camera_manipulator: Metavision::Display3dOSG::CameraManipulator) → None
Args:

camera_manipulator (CameraManipulator): can be one of Image3dDisplayOSG.CameraManipulator

set_event_display_colors(self: metavision_designer_3dview.Image3dDisplayOSG, positive_colors: list, negative_colors: list) → None

Sets the colors for ON and OFF events

Args:

positive_colors (list): (r, g, b) components of the color assigned to positive polarity events

negative_colors (list): (r, g, b) components of the color assigned to negative polarity events

set_projection_matrix_as_perspective(self: metavision_designer_3dview.Image3dDisplayOSG, fovy: float, ar: float, near: float, far: float) → None

Sets the projection matrix using perspective PoV

Args:

fovy (float): Field of view angle in the y direction, in degrees

ar (float): Aspect ratio that determines the field of view in the x direction. The aspect ratio is the ratio of x (width) to y (height)

near (float): Distance from the camera to the near clipping plane (always positive)

far (float): Distance from the camera to the far clipping plane (always positive)

set_scene_display_parameters(*args, **kwargs)

Overloaded function.

  1. set_scene_display_parameters(self: metavision_designer_3dview.Image3dDisplayOSG, property: Metavision::Display3dOSG::SceneDisplayProperty, value: float) -> None

Sets the display properties using the float format (point size, scene scale)

Args:

property (SceneDisplayProperty): Property to set

value (float): Value of the property

  1. set_scene_display_parameters(self: metavision_designer_3dview.Image3dDisplayOSG, property: Metavision::Display3dOSG::SceneDisplayProperty, value: list) -> None

Sets the display properties using the list format (background color, prism color)

Args:

property (SceneDisplayProperty): Property to set

value (list): Value of the property

set_standard_view(self: metavision_designer_3dview.Image3dDisplayOSG, standard_view: Metavision::Display3dOSG::StandardView) → None

Sets the view as one of the standard view defined in MVDView3d.StandarView. Note that the Original view is the identity by default, and it is overwritten by the matrix given in each subsequent call to set_view_matrix_as_lookat() or set_view_matrix().

Args:

standard_view (CameraView): can be one of Image3dDisplayOSG.StandardView

set_standard_views_bounding_box(self: metavision_designer_3dview.Image3dDisplayOSG, bounding_box_mins: list, bounding_box_maxs: list) → None

Sets the bounding box that will be used to compute the view matrix for the standard camera view. By default, the bounding box is automatically computed whenever a standard view is selected. This can be a problem, if the displayed geometry varies a lot, or if the scene is empty at the moment you switch to a standard view. You can call this function to switch the way the standard views are computed, to use the given bounding box or to compute it for you.

Args:

bounding_box_mins (list): x, y, z minimal values of the bounding box

bounding_box_maxs (list): x, y, z maximal values of the bounding box

set_view_matrix_as_lookat(self: metavision_designer_3dview.Image3dDisplayOSG, eye: list, center: list, up: list) → None

Sets the position and the orientation of view matrix

Args:

eye (list): (x, y, z) position of the eye point

center (list): (x, y, z) position of the reference point

up (list): Direction of the up vector

show_item(self: metavision_designer_3dview.Image3dDisplayOSG, item_id: int) → bool

Shows an item, using its ID

Args:

item_id (int): ID of the item to show

toggle_pause_status(self: metavision_designer_3dview.Image3dDisplayOSG) → None

Plays or Pauses the display

class metavision_designer_3dview.Image3dDisplayXYTUI

Helper class to start the XYT demo.

Image3dDisplayXYTUI allows to create and start a GUI that will display events using a 3D display, on a x, y, t maner.

Args:

prod (Producer): Producer source providing the events

display_scale (int): Scale factor applied for visualizing points in 3D XYT space. Each point coordinate will be multiplied by this scale value. Default is 2