Class Singler¶
Defined in File frame_set_source_utils.h
Inheritance Relationships¶
Base Type¶
public ouster::sdk::core::FrameSetSourceWrapperClass FrameSetSourceWrapper
Class Documentation¶
-
class Singler : public ouster::sdk::core::FrameSetSourceWrapper¶
FrameSetSource that iterates over a single stream in a FrameSetSource.
Public Functions
-
Singler(const FrameSetSource &source, size_t idx)¶
Single the provided source, getting the sensor with the provided index.
- Parameters:
source[in] source to single
idx[in] index of sensor to single out
-
Singler(FrameSetSource &&source, size_t idx)¶
Single the provided source, getting the sensor with the provided index.
- Parameters:
source[in] source to single
idx[in] index of sensor to single out
-
Singler(std::unique_ptr<FrameSetSource> source, size_t idx)¶
Single the provided source, getting the sensor with the provided index.
- Parameters:
source[in] source to single
idx[in] index of sensor to single out
-
Singler(Singler &©) = default¶
Move constructor for Singler.
- Parameters:
copy[in] The Singler instance to move from.
-
virtual FrameSetIterator begin() const override¶
Provides each frame from all sensors in time order.
- Returns:
start iterator for all sensors
-
virtual FrameSetIterator begin(int idx) const override¶
Provides frames from a single sensor in time order If idx < 0 provides frames from all sensors.
- Parameters:
sensor_index[in] sensor index
sensor_index[in] sensor index
- Throws:
std::runtime_error – if sensor_idx >= number of sensors
- Returns:
start iterator for the sensor with the given index
-
virtual FrameSetIterator end() const override¶
Return the end iterator.
- Returns:
end iterator
-
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 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 bool is_collated() const override¶
Check if the source provides collated frames.
- Returns:
true if collations are provided.
-
virtual std::unique_ptr<FrameSetSource> move() override¶
move into a newly allocated item
- Returns:
a unique pointer to a newly allocated
FrameSetSourceinstance containing the moved-from state.
-
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 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
-
Singler(const FrameSetSource &source, size_t idx)¶