roi.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 #pragma once
4 
5 #include <memory>
6 
7 #include "core/extension.h"
8 #include "types.h" // exception
9 
10 namespace librealsense
11 {
13  {
14  int min_x;
15  int min_y;
16  int max_x;
17  int max_y;
18  };
19 
21  {
22  public:
23  virtual void set(const region_of_interest& roi) = 0;
24  virtual region_of_interest get() const = 0;
25 
26  virtual ~region_of_interest_method() = default;
27  };
28 
30  {
31  public:
32  virtual region_of_interest_method& get_roi_method() const = 0;
33  virtual void set_roi_method(std::shared_ptr<region_of_interest_method> roi_method) = 0;
34  };
35 
37  {
38  public:
40  {
41  if (!_roi_method.get())
42  throw librealsense::not_implemented_exception("Region-of-interest is not implemented for this device!");
43  return *_roi_method;
44  }
45 
46  void set_roi_method(std::shared_ptr<region_of_interest_method> roi_method) override
47  {
48  _roi_method = roi_method;
49  }
50 
51  private:
52  std::shared_ptr<region_of_interest_method> _roi_method = nullptr;
53  };
54 
56 }
region_of_interest_method & get_roi_method() const override
Definition: roi.h:39
void set_roi_method(std::shared_ptr< region_of_interest_method > roi_method) override
Definition: roi.h:46
MAP_EXTENSION(RS2_EXTENSION_POINTS, librealsense::points)


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