ouster.sdk.viz.model module
Copyright (c) 2021, Ouster, Inc. All rights reserved.
Types for managing visualization state.
- class ZoneRenderMode(value)[source]
Bases:
EnumAn enumeration.
- STL = 0
- CLOUDS = 1
- STL_AND_CLOUDS = 2
- VOXEL_MESH = 3
- class ImgModeItem(mode, name, return_num=0)[source]
Bases:
objectImage mode for specific return with explicit name.
-
name:
str
-
return_num:
int= 0
-
name:
- class VizExtraMode(func)[source]
Bases:
objectImage/Cloud mode factory func
Used to embed viz modes from external plugins.
-
func:
Callable[[],Union[ImageCloudMode,ImageMode,CloudMode]]
- create(info=None)[source]
- Return type:
Union[ImageCloudMode,ImageMode,CloudMode]
-
func:
- class Palettes(_ext_palettes)[source]
Bases:
objectRepresents the color palettes used within an instance of LidarScanViz. Also keeps track of the palette currently in use.
Initialize a Palettes object, which populates two lists of palettes - one for normal view modes and one for ReflMode.
- get_palette(cloud_mode)[source]
Gets the current color palette depending on the view mode.
- Return type:
- class Selection2d(p1, p2, sensor_index, sensor, image_index, image)[source]
Bases:
object- property sensor
- property finalized
- property p1
- property p2
- property area: int
Calculates and returns the area of the rectangular selection.
The area is calculated as the absolute difference between the x and y coordinates, ensuring a positive result regardless of the points’ order.
- class SensorModel(viz, meta, *, _img_aspect_ratio=0, palettes=<ouster.sdk.viz.model.Palettes object>)[source]
Bases:
objectA model object representing viz state for a single sensor.
- update_cloud_palettes(cloud_mode_name)[source]
Sets each cloud palette given the cloud mode name. Has no effect if the cloud mode is not available for this sensor.
- Return type:
None
- update_cloud(cloud, cloud_mode, range_field, return_num, scan)[source]
Updates the given Cloud with the given CloudMode.
- Return type:
None
- update_clouds(cloud_mode_name, scan)[source]
Update range and mode for each cloud given a mode name and a scan.
- Return type:
None
- update_image(image, image_mode_item, scan)[source]
Update the view mode of the given image.
- Return type:
None
- class LidarScanVizModel(viz, metas, *, _img_aspect_ratio)[source]
Bases:
object- property metadata: List[SensorInfo]
Metadatas for the displayed sensors.
- sorted_image_mode_names()[source]
Returns the image mode names, limited to those for fields we’ve seen in at least one LidarScan.
- select_cloud_mode(name)[source]
Updates the currently selected cloud mode from the list of all available cloud modes. Returns false if the requested mode is not available.
- Return type:
bool
- cycle_cloud_mode(direction)[source]
Updates the currently selected cloud mode from the list of all available cloud modes.
- select_image_mode(i, name)[source]
Updates the currently selected image mode from the list of all available cloud modes. Returns false if the requested mode is not available.
- Return type:
bool