ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
RGBDRecorder.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <RGBDImage.h>
11 
13 
14 namespace cloudViewer {
15 namespace io {
16 
17 class RGBDRecorder {
18 public:
20  virtual ~RGBDRecorder() {}
21 
23  virtual bool InitSensor() = 0;
24 
26  virtual bool OpenRecord(const std::string &filename) = 0;
27 
36  virtual std::shared_ptr<geometry::RGBDImage> RecordFrame(
37  bool write, bool enable_align_depth_to_color) = 0;
38 
40  virtual bool CloseRecord() = 0;
41 };
42 
43 } // namespace io
44 } // namespace cloudViewer
std::string filename
virtual bool OpenRecord(const std::string &filename)=0
Create recording file.
virtual bool CloseRecord()=0
Flush data to recording file and disconnect from sensor.
virtual bool InitSensor()=0
Init recorder, connect to sensor.
virtual std::shared_ptr< geometry::RGBDImage > RecordFrame(bool write, bool enable_align_depth_to_color)=0
Generic file read and write utility for python interface.