ReconstructMe SDK
1.0.726-75385
Real-time 3D reconstruction engine
|
The context is responsible for life-time management of all objects involved in the reconstruction process. It also maintains the communication channel to the OpenCL device used for reconstruction.
typedef struct _reme_context* reme_context_t |
Handle referencing a context object.
A reme_context_t contains the complete state of the current reconstruction process, including sensor objects, reconstruction volumes and surface objects. reme_context_t objects are central to ReconstructMe SDK and all operations always require such a context as input.
typedef enum _reme_error reme_error_t |
Status enumeration.
A reme_error_t contains the available status codes as returned by all methods of ReconstructMe SDK. In case of error, use reme_context_get_last_error to get the latest details.
typedef enum _reme_log_severity reme_log_severity_t |
Logging severity levels.
Defines the severity of a given logging message
typedef void(* reme_log_callback_t)(reme_log_severity_t sev, const char *message, void *user_info) |
Callback function prototype to receive logging information.
Receives logging information consisting of severity level and message. Use reme_context_set_log_callback to register a new callback.
It allows passing of an optional void pointer to user specified data.
sev | severity level |
message | the log message |
user_info | optional pointer as specified by at reme_context_add_log_callback |
enum _reme_error |
Status enumeration.
A reme_error_t contains the available status codes as returned by all methods of ReconstructMe SDK. In case of error, use reme_context_get_last_error to get the latest details.
enum _reme_log_severity |
Logging severity levels.
Defines the severity of a given logging message
reme_error_t reme_context_create | ( | reme_context_t * | c | ) |
Create a new reme_context_t object.
c | A pointer that will receive the created context handle |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_context_destroy | ( | reme_context_t * | c | ) |
Destroy a previously created reme_context_t object.
Destroys all associated handles and memory allocated.
c | A pointer to a valid context object |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_context_get_version | ( | reme_context_t | c, |
const char ** | version, | ||
int * | length | ||
) |
Get the ReconstructMe SDK version string.
Format is
<major>.<minor>.<build> - <revision>
c | A valid context object |
version | A mutable pointer that receives the null terminated string |
length | length of string in bytes |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_context_set_log_callback | ( | reme_context_t | c, |
reme_log_callback_t | lc, | ||
void * | user_data = 0 |
||
) |
Set the logging callback.
The function pointer must stay valid until the context is destroyed or reme_context_set_log_callback is invoked with a different function pointer.
c | A valid context object |
lc | Logging callback function pointer |
user_data | A pointer to optional user data to be passed to the callback function |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_context_bind_compile_options | ( | reme_context_t | c, |
reme_options_t | o | ||
) |
Access the compile time options.
c | A valid context object |
o | A valid options binding |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_context_bind_opencl_info | ( | reme_context_t | c, |
reme_options_t | o | ||
) |
Access platform OpenCL information.
c | A valid context object |
o | A valid options binding |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_context_compile | ( | reme_context_t | c | ) |
Compile OpenCL related kernels.
Based on the compile time settings reme_context_get_compile_options, try to compile for the selected OpenCL compatible device.
In case of error check the last error through reme_context_get_last_error to receive the full build log.
Note that a successful compilation will force all objects that communicate with the computation device to re-initialize. Foremost these are the reme_sensor_t and reme_volume_t objects. Data of these objects will be reset to empty state.
c | A valid context object |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |
reme_error_t reme_context_get_last_error | ( | reme_context_t | c, |
const char ** | msg, | ||
int * | length | ||
) |
Get the last error message.
Returns the last error message.
In case of error check the last error through reme_context_get_last_error to receive the full build log.
c | A valid context object |
msg | A mutable pointer receiving the last error messge |
length | Number of characters in error message |
REME_ERROR_SUCCESS | On success |
REME_ERROR_UNSPECIFIED | On failure |