ouster.sdk.viz.view_mode module

class FieldViewMode(*args, **kwargs)[source]

Bases: Protocol

LidarScan field processor

View modes define the process of getting the key data for the scan and return number as well as checks the possibility of showing data in that mode, see enabled().

property name: str

Name of the view mode

property names: List[str]

Name of the view mode per return number

enabled(ls, return_num=0)[source]

Checks the view mode availability for a scan and return number

Return type:

bool

class ImageMode(*args, **kwargs)[source]

Bases: FieldViewMode, Protocol

Applies the view mode key to the viz.Image

set_image(img, ls, return_num=0)[source]

Prepares the key data and sets the image key to it.

Return type:

None

class CloudMode(*args, **kwargs)[source]

Bases: FieldViewMode, Protocol

Applies the view mode key to the viz.Cloud

set_cloud_color(cloud, ls, *, return_num=0)[source]

Prepares the key data and sets the cloud key to it.

Return type:

None

class ImageCloudMode(*args, **kwargs)[source]

Bases: ImageMode, CloudMode, Protocol

Applies the view mode to viz.Cloud and viz.Image

class RingMode(info)[source]

Bases: CloudMode

View mode to show laser ring.

Parameters:

info (SensorInfo) – sensor metadata

property name: str

Name of the view mode

property names: List[str]

Name of the view mode per return number

set_cloud_color(cloud, ls, return_num=0)[source]

Prepares the key data and sets the cloud key to it.

Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a scan and return number

class SimpleMode(field, *, info=None, prefix='', suffix='', use_ae=True, use_buc=False)[source]

Bases: ImageCloudMode

Basic view mode with AutoExposure and BeamUniformityCorrector

Handles single and dual returns scans.

When AutoExposure is enabled its state updates only for return_num=0 but applies for both returns.

Parameters:
  • info (Optional[SensorInfo]) – sensor metadata used mainly for destaggering here

  • field (str) – name of field to process, second return is handled automatically

  • prefix (Optional[str]) – name prefix

  • suffix (Optional[str]) – name suffix

  • use_ae (bool) – if True, use AutoExposure for the field

  • use_buc (bool) – if True, use BeamUniformityCorrector for the field

property name: str

Name of the view mode

property names: List[str]

Name of the view mode per return number

set_image(img, ls, return_num=0)[source]

Prepares the key data and sets the image key to it.

Return type:

None

set_cloud_color(cloud, ls, return_num=0)[source]

Prepares the key data and sets the cloud key to it.

Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a scan and return number

class RGBMode(field, *, info=None)[source]

Bases: ImageCloudMode

RGB view mode

Parameters:
  • info (Optional[SensorInfo]) – sensor metadata used mainly for destaggering here

  • field (str) – channel field to process

property name: str

Name of the view mode

property names: List[str]

Name of the view mode per return number

set_image(img, ls, return_num=0)[source]

Prepares the key data and sets the image key to it.

Return type:

None

set_cloud_color(cloud, ls, return_num=0)[source]

Prepares the key data and sets the cloud key to it.

Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a scan and return number

class NormalsMode(field, *, info=None)[source]

Bases: ImageCloudMode

Normals value remap [-1, 1] -> [0, 1]

property name: str

Name of the view mode

property names: List[str]

Name of the view mode per return number

set_image(img, ls, return_num=0)[source]

Prepares the key data and sets the image key to it.

Return type:

None

set_cloud_color(cloud, ls, return_num=0)[source]

Prepares the key data and sets the cloud key to it.

Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a scan and return number

class ReflMode(*, info=None)[source]

Bases: SimpleMode, ImageCloudMode

Prepares image/cloud data for REFLECTIVITY channel

Parameters:
  • info (Optional[SensorInfo]) – sensor metadata used mainly for destaggering here

  • field – name of field to process, second return is handled automatically

  • prefix – name prefix

  • suffix – name suffix

  • use_ae – if True, use AutoExposure for the field

  • use_buc – if True, use BeamUniformityCorrector for the field

is_norm_reflectivity_mode(mode)[source]

Checks whether the image/cloud mode is a normalized REFLECTIVITY mode

Return type:

bool

LidarScanVizMode

Field view mode types

alias of Union[ImageCloudMode, ImageMode, CloudMode]

class CloudPaletteItem(name, palette)[source]

Bases: object

Palette with a name

name: str
palette: ndarray