processing-block-model.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <librealsense2/rs.hpp>
4 #include <string>
5 
6 
7 namespace rs2
8 {
9  class subdevice_model;
10  class option_model;
11 
13  {
14  public:
16  const std::string& name,
17  std::shared_ptr<rs2::filter> block,
18  std::function<rs2::frame( rs2::frame )> invoker,
19  std::string& error_message,
20  bool enabled = true );
21  virtual ~processing_block_model() = default;
22 
23  const std::string& get_name() const { return _name; }
24 
26 
27  rs2::frame invoke( rs2::frame f ) const { return _invoker( f ); }
28 
29  void save_to_config_file();
30 
31  std::vector<rs2_option> get_option_list()
32  {
33  return _block->get_supported_options();
34  }
35 
36  void populate_options( const std::string& opt_base_label,
38  bool* options_invalidated,
39  std::string& error_message );
40 
41  std::shared_ptr<rs2::filter> get_block() { return _block; }
42 
43  void enable( bool e = true )
44  {
46  }
47  bool is_enabled() const { return _enabled; }
48 
49  bool visible = true;
50 
51  // Callback when our state changes
52  // NOTE: actual may not be same as is_enabled()! The latter is this particular pb,
53  // while the former takes into account global "Post-Processing"...
54  virtual void processing_block_enable_disable( bool actual ) {}
55 
56  protected:
57  bool _enabled = true;
58  std::shared_ptr<rs2::filter> _block;
59  std::map<int, option_model> options_metadata;
62  std::function<rs2::frame( rs2::frame )> _invoker;
64  };
65 }
GLuint const GLchar * name
std::map< int, option_model > options_metadata
rs2_option
Defines general configuration controls. These can generally be mapped to camera UVC controls...
Definition: rs_option.h:22
virtual void processing_block_enable_disable(bool actual)
std::shared_ptr< rs2::filter > get_block()
const std::string & get_name() const
Definition: cah-model.h:10
option_model & get_option(rs2_option opt)
GLsizei const GLchar *const * string
processing_block_model(subdevice_model *owner, const std::string &name, std::shared_ptr< rs2::filter > block, std::function< rs2::frame(rs2::frame)> invoker, std::string &error_message, bool enabled=true)
e
Definition: rmse.py:177
void populate_options(const std::string &opt_base_label, subdevice_model *model, bool *options_invalidated, std::string &error_message)
std::function< void(std::function< void()>)> invoker
GLdouble f
rs2::frame invoke(rs2::frame f) const
GLenum GLenum GLsizei const GLuint GLboolean enabled
std::function< rs2::frame(rs2::frame)> _invoker
std::shared_ptr< rs2::filter > _block
virtual ~processing_block_model()=default
std::vector< rs2_option > get_option_list()


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:39