Raytrix Light Field SDK  4.0
Logo
Public Member Functions | List of all members
Rx::LFR::CSeqFileReader Class Reference

Detailed Description

Provides methods for reading a ray sequence from a rays file.

Inherits Rx::LFR::CPimpl< CSeqFileReader_Impl, Interfaces::ESeqFileReader::ID >.

Public Member Functions

 CSeqFileReader ()
 Default constructor. More...
 
 CSeqFileReader (CSeqFileReader &&xSeqFileReader)
 Move constructor. More...
 
 ~CSeqFileReader ()
 Destructor. Closes the file if opened. More...
 
void Close ()
 Closes the opened sequence file and stops the background buffer thread. More...
 
unsigned GetDoubleShotMode () const
 Gets the double shot mode of the opened sequence. Is 0 if the sequence wasn't recorded in double shot mode. More...
 
uint64_t GetFileSize () const
 Gets the file size in bytes. More...
 
unsigned GetFrameCount () const
 Gets the number of frames in the opened sequence. More...
 
unsigned GetFrameIndex () const
 Gets the current frame index. More...
 
unsigned GetFrameSize () const
 Gets the size of a frame in bytes. More...
 
CSeqFileReader_Impl & GetImpl ()
 Gets the non constant implementation. More...
 
const CSeqFileReader_Impl & GetImpl () const
 Gets the constant implementation. More...
 
void * GetInterface (Interfaces::ESeqFileReader::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
const void * GetInterface (Interfaces::ESeqFileReader::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
TInterface * GetInterface (Interfaces::ESeqFileReader::ID eInterface)
 Gets the interface defined by the given interface ID. More...
 
const TInterface * GetInterface (Interfaces::ESeqFileReader::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
unsigned GetUsedFrameBufferCount ()
 Gets the current number of used buffer slots. More...
 
bool HasInterface (Interfaces::ESeqFileReader::ID eInterface)
 Queries if this object has the given interface. More...
 
bool IsOpen () const
 Queries if a file has been opened. More...
 
void MoveFrameIndex (int iDelta)
 Moves the current frame index by the given number forward or backward. More...
 
void Open (const CRxString &sxFilename, unsigned uFrameBufferCount=2)
 Opens the given ray sequence for reading. More...
 
CSeqFileReaderoperator= (CSeqFileReader &&xSeqFileReader)
 Move assignment operator. More...
 
void ReadFrame (CRxImage &xFrame)
 Reads the frame at the current frame index. Reads the frame from buffer if already buffered. More...
 
void SetFrameIndex (unsigned uNewIdx)
 Sets the current frame index. More...
 
void StartReading (CRayImage &xRayImg)
 Reads the first frame including the meta data and the calibration. This starts the background buffer thread. More...
 

Constructor & Destructor Documentation

Rx::LFR::CSeqFileReader::CSeqFileReader ( )

Default constructor.

Rx::LFR::CSeqFileReader::CSeqFileReader ( CSeqFileReader &&  xSeqFileReader)

Move constructor.

Parameters
xSeqFileReader[in,out] The sequence file reader instance.
Rx::LFR::CSeqFileReader::~CSeqFileReader ( )

Destructor. Closes the file if opened.

Member Function Documentation

void Rx::LFR::CSeqFileReader::Close ( )

Closes the opened sequence file and stops the background buffer thread.

unsigned Rx::LFR::CSeqFileReader::GetDoubleShotMode ( ) const

Gets the double shot mode of the opened sequence. Is 0 if the sequence wasn't recorded in double shot mode.

Returns
The double shot mode.
uint64_t Rx::LFR::CSeqFileReader::GetFileSize ( ) const

Gets the file size in bytes.

Returns
The file size.
unsigned Rx::LFR::CSeqFileReader::GetFrameCount ( ) const

Gets the number of frames in the opened sequence.

Returns
The frame count.
unsigned Rx::LFR::CSeqFileReader::GetFrameIndex ( ) const

Gets the current frame index.

Returns
The frame index.
unsigned Rx::LFR::CSeqFileReader::GetFrameSize ( ) const

Gets the size of a frame in bytes.

Returns
The frame size.
CSeqFileReader_Impl & Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::GetImpl ( )
inlineinherited

Gets the non constant implementation.

Returns
The implementation.
const CSeqFileReader_Impl & Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::GetImpl ( ) const
inlineinherited

Gets the constant implementation.

Returns
The implementation.
void* Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::GetInterface ( Interfaces::ESeqFileReader::ID  eInterface)
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterfaceThe interface ID.
Returns
Null if it fails, else the interface.
const void* Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::GetInterface ( Interfaces::ESeqFileReader::ID  eInterface) const
inherited

Gets the interface defined by the given interface ID.

Parameters
eInterfaceThe interface ID.
Returns
Null if it fails, else the interface.
TInterface* Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::GetInterface ( Interfaces::ESeqFileReader::ID  eInterface)
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterfaceThe interface type.
Parameters
eInterfaceThe interface.
Returns
Null if it fails, else the interface.
const TInterface* Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::GetInterface ( Interfaces::ESeqFileReader::ID  eInterface) const
inlineinherited

Gets the interface defined by the given interface ID.

Template Parameters
TInterfaceThe interface type.
Parameters
eInterfaceThe interface ID.
Returns
Null if it fails, else the interface.
unsigned Rx::LFR::CSeqFileReader::GetUsedFrameBufferCount ( )

Gets the current number of used buffer slots.

Returns
The used frame buffer count.
bool Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::HasInterface ( Interfaces::ESeqFileReader::ID  eInterface)
inlineinherited

Queries if this object has the given interface.

Parameters
eInterfaceThe interface to query.
Returns
True if this class has the given interface, false if not.
bool Rx::LFR::CSeqFileReader::IsOpen ( ) const

Queries if a file has been opened.

Returns
True if open, false if not.
void Rx::LFR::CSeqFileReader::MoveFrameIndex ( int  iDelta)

Moves the current frame index by the given number forward or backward.

Parameters
iDeltaThe number of frames to move the current index.
void Rx::LFR::CSeqFileReader::Open ( const CRxString sxFilename,
unsigned  uFrameBufferCount = 2 
)

Opens the given ray sequence for reading.

To read the first frame, you have to call StartReading. Then you can call ReadFrame to read frame by frame.

Requires an authenticated dongle (Rx::LFR::CLightFieldRuntime::Authenticate).

Parameters
sxFilenameThe file name.
uFrameBufferCount(Optional) Number of frames to buffer. Must NOT be zero.
CSeqFileReader& Rx::LFR::CSeqFileReader::operator= ( CSeqFileReader &&  xSeqFileReader)

Move assignment operator.

Parameters
xSeqFileReader[in,out]The sequence file reader instance.
Returns
The instance.
void Rx::LFR::CSeqFileReader::ReadFrame ( CRxImage xFrame)

Reads the frame at the current frame index. Reads the frame from buffer if already buffered.

To read the first frame, you have to call StartReading after calling Open.

Parameters
xFrame[out] The frame.
void Rx::LFR::CSeqFileReader::SetFrameIndex ( unsigned  uNewIdx)

Sets the current frame index.

Parameters
uNewIdxThe new frame index.
void Rx::LFR::CSeqFileReader::StartReading ( CRayImage xRayImg)

Reads the first frame including the meta data and the calibration. This starts the background buffer thread.

Parameters
xRayImg[out] The ray image.