Class PngLidarScanEncoder
Defined in File png_lidarscan_encoder.h
Inheritance Relationships
Base Type
public ouster::sdk::osf::LidarScanEncoder(Class LidarScanEncoder)
Class Documentation
-
class PngLidarScanEncoder : public ouster::sdk::osf::LidarScanEncoder
Encoder for lidar scan fields into PNG format.
This class implements the LidarScanEncoder interface to encode lidar scan fields into PNG format, supporting various bit depths and destaggering options.
Public Functions
-
inline PngLidarScanEncoder(int compression_amount)
Construct a PngLidarScanEncoder with a specified compression level.
- Parameters:
compression_amount[in] – Compression level passed to zlib (0 = none, 9 = max).
-
virtual ScanChannelData encode_field(const ouster::sdk::core::Field &field, const std::vector<int> &px_offset = {}) const override
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 PngLidarScanEncoder(int compression_amount)