OpenEV
Extending OpenCV to event-based vision
Loading...
Searching...
No Matches
ev::AbstractReader_ Class Referenceabstract

This is an auxiliary class. This class cannot be instanced. More...

#include <abstract-reader.hpp>

Inheritance diagram for ev::AbstractReader_:
ev::PlainTextReader

Public Member Functions

bool next (Event &e)
 Get next event from the dataset.
 
template<std::size_t N>
bool next (Array< N > &array)
 Get next events from the dataset.
 
bool next_n (Vector &vector, const int n)
 Get next n events from the dataset.
 
bool next_n (Queue &queue, const int n, const bool keep_size=false)
 Get next n events from the dataset.
 
bool next_t (Vector &vector, const double t)
 Get the next events until the specified duration is reached.
 
bool next_t (Queue &queue, const double t, const bool keep_size=false)
 Get the next events until the specified duration is reached and store them in a queue.
 
bool skip_n (int n)
 Skip the next n events in the dataset.
 
bool skip_t (const double t)
 Skip events for the specified duration.
 
void reset ()
 Start reading from the first event in the dataset.
 
std::size_t count ()
 

Protected Member Functions

virtual bool read_ (Event &e)=0
 
virtual void reset_ ()=0
 

Detailed Description

This is an auxiliary class. This class cannot be instanced.

Member Function Documentation

◆ count()

std::size_t ev::AbstractReader_::count ( )
inline

TODO

◆ next() [1/2]

template<std::size_t N>
bool ev::AbstractReader_::next ( Array< N > & array)
inline

Get next events from the dataset.

Parameters
arratEvent array
Returns
True if array fully populated events

◆ next() [2/2]

bool ev::AbstractReader_::next ( Event & e)
inline

Get next event from the dataset.

Parameters
eEvent
Returns
True if new event available
Note
The behaviour of next should be implemented in the derived classes.

◆ next_n() [1/2]

bool ev::AbstractReader_::next_n ( ev::Queue & queue,
const int n,
const bool keep_size = false )

Get next n events from the dataset.

Parameters
nNumber of events to get
queueEvent queue
keep_sizeIf true, pop one event for each insertion to maintain queue size.
Returns
True if queue populated with n new events

◆ next_n() [2/2]

bool ev::AbstractReader_::next_n ( ev::Vector & vector,
const int n )

Get next n events from the dataset.

Parameters
vectorEvent vector
nNumber of events to get
Returns
True if vector populated with n new events

◆ next_t() [1/2]

bool ev::AbstractReader_::next_t ( ev::Queue & queue,
const double t,
const bool keep_size = false )

Get the next events until the specified duration is reached and store them in a queue.

Parameters
tDuration to get events for.
queueEvent queue to store the events.
keep_sizeIf true, pop one event for each insertion to maintain queue size.
Returns
True if the queue is populated with events for the specified duration.

◆ next_t() [2/2]

bool ev::AbstractReader_::next_t ( ev::Vector & vector,
const double t )

Get the next events until the specified duration is reached.

Parameters
vectorEvent vector to store the events.
tDuration to get events for.
Returns
True if the vector is populated with events for the specified duration.

◆ reset()

void ev::AbstractReader_::reset ( )
inline

Start reading from the first event in the dataset.

Note
The behaviour of reset should be implemented in the derived classes.

◆ skip_n()

bool ev::AbstractReader_::skip_n ( int n)

Skip the next n events in the dataset.

Parameters
nNumber of events to skip.
Returns
True if the skip was successful.

◆ skip_t()

bool ev::AbstractReader_::skip_t ( const double t)

Skip events for the specified duration.

Parameters
tDuration to skip events for.
Returns
True if the skip was successful.

The documentation for this class was generated from the following files: