ouster.sdk.viz.view_mode module

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

Bases: Protocol

LidarFrame field processor

View modes define the process of getting the key data for the frame 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 frame and return number :rtype: bool

Parameters:
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. :rtype: None

Parameters:
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. :rtype: None

Parameters:
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. :rtype: None

Parameters:
Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a frame and return number

Parameters:
class SensorMode(info, color)[source]

Bases: CloudMode

View mode to show sensor index.

Parameters:
  • info (SensorInfo) – sensor metadata

  • color (Tuple[int, int, int])

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. :rtype: None

Parameters:
Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a frame and return number

Parameters:
class TimestampMode(info)[source]

Bases: CloudMode

View mode to show column timestamp.

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. :rtype: None

Parameters:
Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a frame and return number

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

Bases: ImageCloudMode

Basic view mode with AutoExposure and BeamUniformityCorrector

Handles single and dual returns frames.

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

  • scale (Optional[float]) – if use_ae is false and this is set, use this to scale the values for display

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. :rtype: None

Parameters:
Return type:

None

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

Prepares the key data and sets the cloud key to it. :rtype: None

Parameters:
Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a frame and return number

Parameters:
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. :rtype: None

Parameters:
Return type:

None

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

Prepares the key data and sets the cloud key to it. :rtype: None

Parameters:
Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a frame and return number

Parameters:
class HDRRGBMode(field, info)[source]

Bases: ImageCloudMode

RGB view mode using LocalToneMapper.

Parameters:
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. :rtype: None

Parameters:
Return type:

None

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

Prepares the key data and sets the cloud key to it. :rtype: None

Parameters:
Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a frame and return number :rtype: bool

Parameters:
Return type:

bool

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

Bases: ImageCloudMode

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

Parameters:
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. :rtype: None

Parameters:
Return type:

None

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

Prepares the key data and sets the cloud key to it. :rtype: None

Parameters:
Return type:

None

enabled(ls, return_num=0)[source]

Checks the view mode availability for a frame and return number

Parameters:
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

  • scale – if use_ae is false and this is set, use this to scale the values for display

is_norm_reflectivity_mode(mode)[source]

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

Return type:

bool

Parameters:

mode (FieldViewMode)

LidarFrameVizMode

Field view mode types

alias of ImageCloudMode | ImageMode | CloudMode

class CloudPaletteItem(name, palette)[source]

Bases: object

Palette with a name

Parameters:
  • name (str)

  • palette (ndarray)

name: str
palette: ndarray