Scope
ScopeOverlay.h
1 #pragma once
2 
3 #include "pixel.h"
4 
5 // Forward declarations
6 struct ID2D1Bitmap;
7 namespace scope {
8 class ColorProps;
9 class ScopeMultiImage;
10 typedef std::shared_ptr<const ScopeMultiImage> ScopeMultiImageCPtr;
11 }
12 
13 namespace scope {
14 
17 class ScopeOverlay {
18 
19 protected:
21  uint32_t lines;
22 
24  uint32_t linewidth;
25 
27  std::vector<BGRA8Pixel> overlay;
28 
30  mutable std::mutex mutex;
31 
32 public:
36  ScopeOverlay(const uint32_t& _lines = 0, const uint32_t& _linewidth = 0);
37 
41  virtual void Create(ScopeMultiImageCPtr const _multi, const std::vector<ColorProps>& _color_props);
42 
44  void ToD2Bitmap(ID2D1Bitmap* const _d2bitmap) const;
45 
47  void Resize(const uint32_t& _lines, const uint32_t& _linewidth);
48 
50  uint32_t Lines() const;
51 
53  uint32_t Linewidth() const;
54 };
55 
56 }
void ToD2Bitmap(ID2D1Bitmap *const _d2bitmap) const
uint32_t Linewidth() const
virtual void Create(ScopeMultiImageCPtr const _multi, const std::vector< ColorProps > &_color_props)
Creates an overlay from a multi image with the specified color properties per channel.
uint32_t Lines() const
std::vector< BGRA8Pixel > overlay
vector with pixeldata
Definition: ScopeOverlay.h:27
uint32_t lines
number of lines, y resolution
Definition: ScopeOverlay.h:21
Overlay of several gray-scale/uint16_t channels into one BGRA8 image.
Definition: ScopeOverlay.h:17
uint32_t linewidth
width of a line, x resolution
Definition: ScopeOverlay.h:24
The BGRA8Pixel struct and various related helpers for color conversions.
ScopeOverlay(const uint32_t &_lines=0, const uint32_t &_linewidth=0)
overlay will be initialized with 0s
void Resize(const uint32_t &_lines, const uint32_t &_linewidth)
std::mutex mutex
mutex for protection
Definition: ScopeOverlay.h:30