Scope
ScopeMultiImageResonanceSW.h
1 #pragma once
2 
3 #include "ScopeMultiImage.h"
4 
5 // Forward declarations
6 namespace scope {
7 template<class T>class ScopeImage;
8 typedef std::shared_ptr<ScopeImage<uint16_t>> ScopeImageU16Ptr;
9 }
10 
11 namespace scope {
12 
15  : public ScopeMultiImage {
16 
17 protected:
19  std::vector<uint32_t> lastimagepos;
20 
22  std::vector<bool> lastforthline;
23 
25  std::vector<uint32_t> lastl;
26 
28  std::vector<uint32_t> lastx;
29 
31  std::vector<std::vector<uint16_t>> currentlinedata;
32 
33 public:
35  ScopeMultiImageResonanceSW(const uint32_t& _area = 0, const size_t& _nochannels = 1, const uint32_t& _lines = 256, const uint32_t& _linewidth = 256);
36 
39  bool LastForthline(const size_t& _chan) const { return lastforthline[_chan]; }
40 
41  uint32_t LastImagePos(const size_t& _chan) const { return lastimagepos[_chan]; }
42 
43  uint32_t LastL(const size_t& _chan) const { return lastl[_chan]; }
44 
45  uint32_t LastX(const size_t& _chan) const { return lastx[_chan]; }
46 
47  std::vector<std::vector<uint16_t>>* CurrentLineData() const { return (std::vector<std::vector<uint16_t>>*)&currentlinedata; }
53  void SetLastImagepos(const size_t& _chan, const uint32_t& _value) { lastimagepos[_chan] = _value; }
54 
56  void SetLastForthline(const size_t& _chan, const bool& _value) { lastforthline[_chan] = _value; }
57 
59  void SetLastL(const size_t& _chan, const uint32_t& _value) { lastl[_chan] = _value; }
60 
62  void SetLastX(const size_t& _chan, const uint32_t& _value) { lastx[_chan] = _value; }
66  void InitializeCurrentLineData(const uint32_t& _size) { currentlinedata = std::vector<std::vector<uint16_t>>(nochannels, std::vector<uint16_t>(_size, 0)); }
67 };
68 
70 typedef std::shared_ptr<ScopeMultiImageResonanceSW> ScopeMultiImageResonanceSWPtr;
72 typedef std::shared_ptr<const ScopeMultiImageResonanceSW> ScopeMultiImageResonanceSWCPtr;
73 }
void SetLastL(const size_t &_chan, const uint32_t &_value)
Sets last line (for software mapping resonance scanner mode)
std::vector< std::vector< uint16_t > > currentlinedata
intermediate vector for storing the backward line (for software mapping resonance scanner mode) ...
ScopeMultiImageResonanceSW(const uint32_t &_area=0, const size_t &_nochannels=1, const uint32_t &_lines=256, const uint32_t &_linewidth=256)
Initializes and generate blank images for each channel.
void SetLastX(const size_t &_chan, const uint32_t &_value)
Sets last x (for software mapping resonance scanner mode)
std::vector< uint32_t > lastimagepos
position in the image that was filled with a value last time (for software mapping resonance scanner ...
void SetLastForthline(const size_t &_chan, const bool &_value)
Sets boolean indicating the direction of the last line (for software mapping resonance scanner mode) ...
const size_t nochannels
number of channels
void SetLastImagepos(const size_t &_chan, const uint32_t &_value)
Sets last the position in the current frame that was last mapped (for software mapping resonance scan...
std::vector< bool > lastforthline
direction of the line that was filled last time (for software mapping resonance scanner mode) ...
A multichannel image.
void InitializeCurrentLineData(const uint32_t &_size)
Initializes currentlinedata (for software mapping resonance scanner mode)
std::vector< uint32_t > lastl
line of the image that was being processed last time (for software mapping resonance scanner mode) ...
std::vector< uint32_t > lastx
x position in the image that was being processed last time (for software mapping resonance scanner mo...