CVB++ 14.0
IndexedStream Class Referenceabstract

A stream with a finite number of images, which can also be accessed via an index. More...

#include <cvb/driver/indexed_stream.hpp>

Inherits Stream.

Public Member Functions

virtual int ImageCount () const noexcept=0
 Gets the number of images contained in this stream. More...
 
virtual int ImageIndex () const =0
 Gets the index of the current active image. More...
 
virtual void SetImageIndex (int index)=0
 Sets the index of the current active image. More...
 
bool IsIndexed () const noexcept override
 Gets whether this stream is an indexed stream. More...
 
- Public Member Functions inherited from Stream
Cvb::Driver::AcquisitionInterface AcquisitionInterface () const noexcept override
 Gets the interface of this implementation. More...
 
void SetAcquisitionInterface (Cvb::Driver::AcquisitionInterface acquisitionInterface)
 Sets the interface of this implementation. More...
 
void Start () override
 Starts the acquisition. More...
 
void Stop () override
 Stops the acquisition. More...
 
bool TryStop () noexcept override
 Stops the acquisition. More...
 
void Abort () override
 Stops the acquisition of images immediately. More...
 
bool TryAbort () noexcept override
 Stops the acquisition of images immediately. More...
 
bool IsRunning () const noexcept
 Gets whether the acquisition is currently active. More...
 
virtual bool IsIndexed () const noexcept override
 Gets whether this stream is an indexed stream. More...
 
double Statistics (StreamInfo query) const
 Gets statistics value if supported. More...
 
template<class T >
Statistics (StreamInfo query) const
 Gets statistics value if supported. More...
 
virtual RingBufferPtr RingBuffer () const noexcept
 Gets the ring buffer interface object if present. More...
 
template<class T , class Rep , class Period >
std::shared_ptr< T > WaitFor (const std::chrono::duration< Rep, Period > &timeSpan, WaitStatus &waitStatus)
 Waits for the given time span for the next acquired image. More...
 
template<class Rep , class Period >
StreamImagePtr WaitFor (const std::chrono::duration< Rep, Period > &timeSpan, WaitStatus &waitStatus)
 Waits for the given time span for the next acquired image. More...
 
template<class T , class Rep , class Period >
WaitResult< T > WaitFor (const std::chrono::duration< Rep, Period > &timeSpan)
 Waits for the given time span for the next acquired image. More...
 
template<class Rep , class Period >
WaitResult< StreamImageWaitFor (const std::chrono::duration< Rep, Period > &timeSpan)
 Waits for the given time span for the next acquired image. More...
 
template<class T >
std::shared_ptr< T > Wait (WaitStatus &waitStatus)
 Waits forever for the next acquired image and returns it. More...
 
StreamImagePtr Wait (WaitStatus &waitStatus)
 Waits for ever for the next acquired image and returns it. More...
 
template<class T >
WaitResult< T > Wait ()
 Waits for ever for the next acquired image and returns it. More...
 
WaitResult< StreamImageWait ()
 Waits for ever for the next acquired image and returns it. More...
 
template<class T , class Rep , class Period >
std::shared_ptr< T > GetTimedSnapshot (const std::chrono::duration< Rep, Period > &timeSpan, WaitStatus &waitStatus)
 Acquires a single image for a given time span and returns it. More...
 
template<class Rep , class Period >
StreamImagePtr GetTimedSnapshot (const std::chrono::duration< Rep, Period > &timeSpan, WaitStatus &waitStatus)
 Acquires a single image for a given time span and returns it. More...
 
template<class T , class Rep , class Period >
WaitResult< T > GetTimedSnapshot (const std::chrono::duration< Rep, Period > &timeSpan)
 Acquires a single image for a given time span and returns it. More...
 
template<class Rep , class Period >
WaitResult< StreamImageGetTimedSnapshot (const std::chrono::duration< Rep, Period > &timeSpan)
 Acquires a single image for a given time span and returns it. More...
 
StreamImagePtr GetSnapshot (WaitStatus &waitStatus)
 Acquires a single image and returns it. More...
 
WaitResult< StreamImageGetSnapshot ()
 Acquires a single image and returns it. More...
 
- Public Member Functions inherited from StreamBase
DevicePtr Parent () const noexcept
 Gets the parent device of this stream. More...
 
virtual Cvb::Driver::AcquisitionInterface AcquisitionInterface () const noexcept=0
 Gets the interface of this implementation. More...
 
virtual void Start ()=0
 Starts the acquisition. More...
 
virtual void Stop ()=0
 Stops the acquisition. More...
 
virtual bool TryStop () noexcept=0
 Stops the acquisition. More...
 
virtual void Abort ()=0
 Stops the acquisition of images immediately. More...
 
virtual bool TryAbort () noexcept=0
 Stops the acquisition of images immediately. More...
 
virtual bool IsIndexed () const noexcept=0
 Gets whether this stream is an indexed stream. More...
 

Detailed Description

A stream with a finite number of images, which can also be accessed via an index.

Member Function Documentation

◆ ImageCount()

virtual int ImageCount ( ) const
pure virtualnoexcept

Gets the number of images contained in this stream.

Returns
Number of images.
Exceptions
Doesnot throw any exception.

◆ ImageIndex()

virtual int ImageIndex ( ) const
pure virtual

Gets the index of the current active image.

Returns
Current active image index.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ IsIndexed()

bool IsIndexed ( ) const
inlineoverridevirtualnoexcept

Gets whether this stream is an indexed stream.

Returns
True if indexed, false otherwise.
Exceptions
Doesnot throw any exception.
See also
IndexedStream

Reimplemented from Stream.

◆ SetImageIndex()

virtual void SetImageIndex ( int  index)
pure virtual

Sets the index of the current active image.

Parameters
[in]indexNew active image index.
Exceptions
Anyexception derived from std::exception including CvbException.