Class FrameSetSourceWrapper

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class FrameSetSourceWrapper : public ouster::sdk::core::FrameSetSource

Base class for FrameSetSource wrappers, which wrap a FrameSetSource and forward all calls to it.

This is useful for building FrameSetSources that modify the behavior of an underlying FrameSetSource without having to reimplement all of the FrameSetSource interface.

Subclassed by ouster::sdk::core::AnyFrameSetSource, ouster::sdk::core::Collator, ouster::sdk::core::Singler, ouster::sdk::core::Slicer

Public Functions

virtual const std::vector<std::shared_ptr<SensorInfo>> &sensor_info() const override

Get the sensor info for each sensor in this dataset.

Returns:

sensor info for each sensor

virtual bool is_live() const override

Indicates if the source is streaming from a device, such as a sensor.

Returns:

if live or not

virtual bool is_indexed() const override

Indicates if the source contains an index for fast random access.

Returns:

if indexed or not

virtual bool is_collated() const override

Check if the source provides collated frames.

Returns:

true if collations are provided.

virtual bool contains_collations() const override

Check if the most underlying source stores collated frames.

Returns:

true if collations are stored.

virtual size_t size_hint() const override

The approximate length of the source if unindexed, or the real size if indexed.

Live sources or sources with undefined length will return 0.

Returns:

approximate length of source

virtual const std::vector<std::pair<uint64_t, uint64_t>> &full_index() const override

timestamp based index of all frames in the file, each pair is timestamp followed by sensor index

Throws:

std::runtime_error – if unindexed

Returns:

index

virtual const std::vector<std::vector<std::pair<uint64_t, uint64_t>>> &individual_index() const override

timestamp based index of all frames in the file for each sensor, each pair is timestamp followed by global frame index

Throws:

std::runtime_error – if unindexed

Returns:

index

virtual const std::vector<size_t> &frames_num() const override

Get the frame count for each sensor in the file.

Throws:

std::runtime_error – if unindexed

Returns:

frame count for each sensor in the file

virtual bool has_metadata(const std::string &key) const override

Check if the frame set source has metadata associated with a given key.

Parameters:

key[in] The key to check for in the metadata.

Returns:

True if the metadata contains the key, false otherwise.

virtual std::set<std::string> metadata_keys() const override

Get the keys of the metadata entries associated with the frame set source.

Returns:

A set of strings representing the keys of the metadata entries.

virtual const FrameSetSourceMetadata &metadata(const std::string &name) const override

Get the metadata entry associated with a given key.

Parameters:

name[in] The key of the metadata entry to retrieve.

Throws:

std::out_of_range – if the key is not found in the metadata.

Returns:

The metadata entry associated with the given key.