Raytrix Light Field SDK  v3.1
Logo
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
Light Field Image Sequence API functions

Functions for working with light field sequences. More...

Functions

static unsigned Rx::Net::ApiLF::RxRaySeqBind (unsigned uRaySeqID)
 Bind a ray sequence for use by other API functions. More...
 
static unsigned Rx::Net::ApiLF::RxRaySeqClose (unsigned uRaySeqID)
 Close a ray sequence. More...
 
static void Rx::Net::ApiLF::RxRaySeqGetFileSize (unsigned uRaySeqID, System::UInt64% uFileSize)
 Get the total file size of the ray sequence in bytes. More...
 
static unsigned Rx::Net::ApiLF::RxRaySeqGetFrameBufferUsedCount (unsigned uRaySeqID)
 Get number of frame buffers in use. More...
 
static unsigned Rx::Net::ApiLF::RxRaySeqGetFrameCount (unsigned uRaySeqID)
 Get number of frames in ray sequence. More...
 
static unsigned Rx::Net::ApiLF::RxRaySeqGetFrameCount ()
 Get number of frames in ray sequence that is currently bound in read mode. More...
 
static unsigned Rx::Net::ApiLF::RxRaySeqGetFrameIndex (unsigned uRaySeqID)
 Get current frame index of ray sequence. More...
 
static bool Rx::Net::ApiLF::RxRaySeqIsBound ()
 Determines if a sequence is bound to the API. More...
 
static void Rx::Net::ApiLF::RxRaySeqMoveFrameIndex (unsigned uRaySeqID, int iStep)
 Move the frame index relative to the current position in the ray sequence. More...
 
static unsigned Rx::Net::ApiLF::RxRaySeqOpen (System::String^ sFilename, unsigned uMode, unsigned uFrameBufferCount)
 Open a ray sequence. Depending on the mode a ray sequence can be opened for reading or writing. More...
 
static void Rx::Net::ApiLF::RxRaySeqRead ()
 Read a frame from the currently bound ray sequence. More...
 
static void Rx::Net::ApiLF::RxRaySeqSetFrameIndex (unsigned uRaySeqID, unsigned uFrameIdx)
 Set the current frame index of ray sequence. More...
 
static void Rx::Net::ApiLF::RxRaySeqUnbind (unsigned uRaySeqID)
 Unbind a ray sequence. If a ray sequence in write mode is unbound, the currently bound ray image also stays bound. No more images can be written to the ray sequence once it has been unbound, however, the ray sequence has not been closed.It can be bound again to write further ray images to it. More...
 
static void Rx::Net::ApiLF::RxRaySeqWrite ()
 Write currently bound ray image to currently bound ray sequence. More...
 

Detailed Description

Functions for working with light field sequences.

Function Documentation

static unsigned Rx::Net::ApiLF::RxRaySeqBind ( unsigned  uRaySeqID)
static

Bind a ray sequence for use by other API functions.

Only one ray sequence for reading and one ray sequence for writing can be bound at a time. When a ray sequence is bound for reading, then any currently bound ray image is unbound, a new prototype ray image of the format of the ray sequence is created and bound and the first image of the ray sequence is loaded into the bound ray image.The ID of the newly created ray image is returned in uImgID.No new ray image can be bound until the ray sequence is unbound using Rx::Net::ApiLF::RxRaySeqUnbind.If a camera capture is started while a ray sequence is bound for reading, the ray sequence is automatically unbound. While a camera is in capture mode, no ray sequence can be bound for reading.

When a ray sequence is bound for writing a ray image must already be bound. If the ray sequence is empty up to now, the ray sequence is created for the currently bound image type and only ray images of the same format can be written to the ray sequence.Also only ray images of the same format can be bound while the ray sequence is bound. If the ray sequence already contains images, it can only be bound if the currently bound ray image format is of the same format as the ray sequence. If a ray sequence in write mode is bound and camera capture is started the ray sequence is also unbound if the image formats do not agree.To capture frames from a camera, first start the camera capture, then bind the ray sequence in write mode and set the parameter Rx::Net::ApiLF::EPar::RaySeq_AutoStoreCamFrames to 1. The value returned in uImgID is the ray image ID of the currently bound ray image.

Halcon Plugin - Function Name:
rx_ray_seq_bind.
Parameters
uRaySeqIDThe id of the ray sequence.
Returns
The ray image id of the newly bound ray image.
See also
Bind an Image Sequence.
static unsigned Rx::Net::ApiLF::RxRaySeqClose ( unsigned  uRaySeqID)
static

Close a ray sequence.

Warning
Closing a ray sequence also unbinds the corresponding ray image. The ray sequence ID becomes invalid once the ray sequence has been closed.
Halcon Plugin - Function Name:
rx_ray_seq_close.
Parameters
uRaySeqIDThe id of the ray sequence.
Returns
The number of frames written (if sequence was in write mode).
See also
Close Image Sequences.
static void Rx::Net::ApiLF::RxRaySeqGetFileSize ( unsigned  uRaySeqID,
System::UInt64%  uFileSize 
)
static

Get the total file size of the ray sequence in bytes.

Halcon Plugin - Function Name:
rx_ray_seq_get_file_size.
Parameters
uRaySeqIDThe ray sequence id.
[out]uFileSizeContains the total size of the ray sequence in bytes.
static unsigned Rx::Net::ApiLF::RxRaySeqGetFrameBufferUsedCount ( unsigned  uRaySeqID)
static

Get number of frame buffers in use.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_buffer_user_count.
Parameters
uRaySeqIDThe ray sequence id.
Returns
The number of frames in use in the frame buffer.
static unsigned Rx::Net::ApiLF::RxRaySeqGetFrameCount ( unsigned  uRaySeqID)
static

Get number of frames in ray sequence.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_count.
Parameters
uRaySeqIDThe ray sequence id.
Returns
The number of frames.
static unsigned Rx::Net::ApiLF::RxRaySeqGetFrameCount ( )
static

Get number of frames in ray sequence that is currently bound in read mode.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_count.
Returns
Number of frames.
static unsigned Rx::Net::ApiLF::RxRaySeqGetFrameIndex ( unsigned  uRaySeqID)
static

Get current frame index of ray sequence.

Halcon Plugin - Function Name:
rx_ray_seq_get_frame_index.
Parameters
uRaySeqIDThe ray sequence id.
Returns
The frame index on return.
static bool Rx::Net::ApiLF::RxRaySeqIsBound ( )
static

Determines if a sequence is bound to the API.

Halcon Plugin - Function Name:
rx_ray_seq_is_bound
Returns
True if a sequence is bound, false if not.
See also
Bind an Image Sequence.
static void Rx::Net::ApiLF::RxRaySeqMoveFrameIndex ( unsigned  uRaySeqID,
int  iStep 
)
static

Move the frame index relative to the current position in the ray sequence.

Halcon Plugin - Function Name:
rx_ray_seq_move_frame_index.
Parameters
uRaySeqIDThe ray sequence id.
iStepThe number of frames to move. Negative values move frame index backward.
static unsigned Rx::Net::ApiLF::RxRaySeqOpen ( System::String^  sFilename,
unsigned  uMode,
unsigned  uFrameBufferCount 
)
static

Open a ray sequence. Depending on the mode a ray sequence can be opened for reading or writing.

Attention
Returns the ray sequence handle
Halcon Plugin - Function Name:
rx_ray_seq_open.
Parameters
[in]sFilenameThe ray sequence id. This id is used in other functions to reference the ray sequence.
uModeThe ray sequence mode. This is a combination of elements of ERaySeqMode.
uFrameBufferCountThe number of frame buffers used for buffered writing/reading.
Returns
The ray sequence id. This id is used in other functions to reference the ray sequence.
See also
Open Image Sequences.
static void Rx::Net::ApiLF::RxRaySeqRead ( )
static

Read a frame from the currently bound ray sequence.

Precondition
A ray sequence in read mode must have been bound beforehand.
Attention
This function reads the current frame from the ray sequence and advanced the frame pointer by one frame.The ray image is read into the currently bound ray image and the image is automatically copied onto the CUDA device. This means that the function Rx::Net::ApiLF::RxRaySeqGetFrameIndex returns a frame index higher than before after calling Rx::Net::ApiLF::RxRaySeqRead
Halcon Plugin - Function Name:
rx_ray_seq_read.
static void Rx::Net::ApiLF::RxRaySeqSetFrameIndex ( unsigned  uRaySeqID,
unsigned  uFrameIdx 
)
static

Set the current frame index of ray sequence.

Halcon Plugin - Function Name:
rx_ray_seq_set_frame_index.
Parameters
uRaySeqIDThe ray sequence id.
uFrameIdxThe frame index.
static void Rx::Net::ApiLF::RxRaySeqUnbind ( unsigned  uRaySeqID)
static

Unbind a ray sequence. If a ray sequence in write mode is unbound, the currently bound ray image also stays bound. No more images can be written to the ray sequence once it has been unbound, however, the ray sequence has not been closed.It can be bound again to write further ray images to it.

If a ray sequence in read mode is unbound, the currently bound ray image stays bound. The ray image is therefore also not removed from memory.

Warning
You will have to unbind the ray image and then delete it to free all memory.
Halcon Plugin - Function Name:
rx_ray_seq_unbind.
Parameters
uRaySeqIDThe ray sequence ID of the ray sequence to unbind.
See also
Unbind an image Sequence
static void Rx::Net::ApiLF::RxRaySeqWrite ( )
static

Write currently bound ray image to currently bound ray sequence.

This function appends the currently bound ray image to the bound ray sequence.

Attention
To automatically write frames captured from a camera device to the bound ray sequence, set the parameter Rx::Net::ApiLF::EPar::RaySeq_AutoStoreCamFrames to 1.
Halcon Plugin - Function Name:
rx_ray_seq_write.