Time-of-Flight Library(ToF) 4.0.1
 
csf_writer.h
1#ifndef _CHRONOPTICS_TOF_CSF_WRITER_H_
2#define _CHRONOPTICS_TOF_CSF_WRITER_H_
3
4#include <chronoptics/tof/camera.h>
5#include <chronoptics/tof/camera_config.h>
6#include <chronoptics/tof/calibration.h>
7#include <chronoptics/tof/data.h>
8
9#ifdef __cplusplus
10extern "C" {
11#endif
12
13/** The csf writer class takes care of writing depth frames to disk. The class
14 * has to be created from either a Camera or csf reader, because it needs
15 * information about the camera that was used to record the depth frames.
16 * Therefore you should only write depth frames coming from one camera into the
17 * same writer
18
19 */
20typedef struct tof_csf_writer* tof_csf_writer_t;
21
22typedef struct tof_csf_writer const* tof_csf_writer_ct;
23
24/** Destruct tof_csf_writer */
25TOF_EXPORT void tof_csf_writer_delete(tof_csf_writer_t ptr);
26
27/** Construct the csf writer from a camera
28 * @param ptr Pointer to class
29 * @param file_location Path to where the csf file should be created
30 * @param camera The camera to get the camera config and calibration file from
31 * @param error Pointer to error
32 * @return New object
33 */
34TOF_EXPORT tof_csf_writer_t tof_csf_writer_new_from_camera(const char* file_location, tof_camera_ct camera, tof_error_t *error);
35
36/** Construct csf writer from calibration and configuration
37 * @param ptr Pointer to class
38 * @param file_location Path to where the csf file should be created
39 * @param camera_config Camera configuration
40 * @param calibration Calibration
41 * @param serial Serial number of camera
42 * @param error Pointer to error
43 * @return New object
44 */
45TOF_EXPORT tof_csf_writer_t tof_csf_writer_new_from_raw_data(const char* file_location, tof_camera_config_ct camera_config, tof_calibration_ct calibration, const char* serial, tof_error_t *error);
46
47/** Write frame to csf file
48 * @param ptr Pointer to class
49 * @param frame A data frame
50 * @param error Pointer to error
51 */
52TOF_EXPORT void tof_csf_writer_write_frame(tof_csf_writer_t ptr, tof_data_ct frame, tof_error_t *error);
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif