Class LidarScanEncoder

Inheritance Relationships

Derived Types

Class Documentation

class LidarScanEncoder

Interface for encoding lidar scan fields.

This interface defines a method to encode a field of a lidar scan, optionally destaggering it based on pixel offsets.

Subclassed by ouster::sdk::osf::PngLidarScanEncoder, ouster::sdk::osf::ZPngLidarScanEncoder

Public Functions

virtual ~LidarScanEncoder() = default
virtual ScanChannelData encode_field(const ouster::sdk::core::Field &field, const std::vector<int> &px_offset = {}) const = 0

This method encodes a field, if px_offset is provided it is destaggered before encoding.

Parameters:
  • field[in] – The field to encode (e.g., RANGE, SIGNAL).

  • px_offset[in] – Optional pixel offsets for destaggering the data.

Throws:

std::runtime_error – If encoding fails (e.g., invalid field shape, unsupported field type, or backend encoding errors).

Returns:

Encoded binary data representing the field.

inline virtual OUSTER_DIAGNOSTIC_PUSH virtual OUSTER_DIAGNOSTIC_IGNORE_UNUSED ScanChannelData encodeField (const ouster::sdk::core::Field &field, const std::vector< int > &px_offset={}) const

Deprecated:

Parameters:
  • field[in] – deprecated

  • px_offset[in] – deprecated

Returns:

deprecated