Raytrix Light Field SDK  5.0
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. 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 GetFrameSize () const
 Gets the size of a frame in bytes. More...
 
void GetGrayImage (CRayImage &xRayImage)
 
void GetGrayImage (CRxImage &xGrayImage)
 Reads the hold gray image of the sequence file. 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...
 
TInterface * 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...
 
const TInterface * GetInterface (Interfaces::ESeqFileReader::ID eInterface) const
 Gets the interface defined by the given interface ID. More...
 
unsigned GetLastFrameIndex () const
 Gets the frame index of the last read frame. More...
 
void GetMetaData (CRayImage &xRayImage)
 
void GetMetaData (CRxMetaData &xMetaData)
 Reads the hold meta data of the sequence file. More...
 
unsigned GetNextFrameIndex () const
 Gets the next frame index. 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)
 Opens the given ray sequence for reading. Then you can call ReadFrame to read frame by frame. More...
 
CSeqFileReaderoperator= (CSeqFileReader &&xSeqFileReader)
 Move assignment operator. More...
 
void ReadFrame (CRayImage &xRayImage, bool bUpdateCalibration=true, bool bMoveToNextFrame=true)
 Reads the frame and its camera format at the current frame index. More...
 
void SetNextFrameIndex (unsigned uNewIdx)
 Sets the current frame index. More...
 

Constructor & Destructor Documentation

◆ CSeqFileReader() [1/2]

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

Default constructor.

◆ CSeqFileReader() [2/2]

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

Move constructor.

Parameters
xSeqFileReader[in,out] The sequence file reader instance.

◆ ~CSeqFileReader()

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

Destructor. Closes the file if opened.

Member Function Documentation

◆ Close()

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

Closes the opened sequence file.

◆ GetDoubleShotMode()

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.

◆ GetFileSize()

uint64_t Rx::LFR::CSeqFileReader::GetFileSize ( ) const

Gets the file size in bytes.

Returns
The file size.

◆ GetFrameCount()

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

Gets the number of frames in the opened sequence.

Returns
The frame count.

◆ GetFrameSize()

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

Gets the size of a frame in bytes.

Returns
The frame size.

◆ GetGrayImage() [1/2]

void Rx::LFR::CSeqFileReader::GetGrayImage ( CRayImage xRayImage)

◆ GetGrayImage() [2/2]

void Rx::LFR::CSeqFileReader::GetGrayImage ( CRxImage xGrayImage)

Reads the hold gray image of the sequence file.

Parameters
xGrayImage[out] The gray image.

◆ GetImpl() [1/2]

CSeqFileReader_Impl & Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::GetImpl
inlineinherited

Gets the non constant implementation.

Returns
The implementation.

◆ GetImpl() [2/2]

const CSeqFileReader_Impl & Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::GetImpl
inlineinherited

Gets the constant implementation.

Returns
The implementation.

◆ GetInterface() [1/4]

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
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetInterface() [2/4]

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
TInterface[in] The interface type.
Parameters
eInterface[in] The interface.
Returns
Null if it fails, else the interface.

◆ GetInterface() [3/4]

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
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetInterface() [4/4]

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
TInterface[in] The interface type.
Parameters
eInterface[in] The interface ID.
Returns
Null if it fails, else the interface.

◆ GetLastFrameIndex()

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

Gets the frame index of the last read frame.

Returns
The last read frame index.

◆ GetMetaData() [1/2]

void Rx::LFR::CSeqFileReader::GetMetaData ( CRayImage xRayImage)

◆ GetMetaData() [2/2]

void Rx::LFR::CSeqFileReader::GetMetaData ( CRxMetaData xMetaData)

Reads the hold meta data of the sequence file.

Parameters
xMetaData[out] The meta data.

◆ GetNextFrameIndex()

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

Gets the next frame index.

Returns
The frame index of the frame that is going to be read next.

◆ HasInterface()

bool Rx::LFR::CPimpl< CSeqFileReader_Impl , Interfaces::ESeqFileReader::ID >::HasInterface ( Interfaces::ESeqFileReader::ID  eInterface)
inlineinherited

Queries if this object has the given interface.

Parameters
eInterface[in] The interface to query.
Returns
True if this class has the given interface, false if not.

◆ IsOpen()

bool Rx::LFR::CSeqFileReader::IsOpen ( ) const

Queries if a file has been opened.

Returns
True if open, false if not.

◆ MoveFrameIndex()

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.

◆ Open()

void Rx::LFR::CSeqFileReader::Open ( const CRxString sxFilename)

Opens the given ray sequence for reading. Then you can call ReadFrame to read frame by frame.

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

Parameters
sxFilename[in] The file name.

◆ operator=()

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

Move assignment operator.

Parameters
xSeqFileReader[in,out]The sequence file reader instance.
Returns
The instance.

◆ ReadFrame()

void Rx::LFR::CSeqFileReader::ReadFrame ( CRayImage xRayImage,
bool  bUpdateCalibration = true,
bool  bMoveToNextFrame = true 
)

Reads the frame and its camera format at the current frame index.

Before frames can be read, you need to call Open.

Parameters
xRayImage[out] The frame.
bUpdateCalibration(Optional) True to update the calibration with the next frame.
bMoveToNextFrame(Optional) True to move to next frame.

◆ SetNextFrameIndex()

void Rx::LFR::CSeqFileReader::SetNextFrameIndex ( unsigned  uNewIdx)

Sets the current frame index.

Parameters
uNewIdxThe new frame index.