Scope
ScopeMultiHistogram.h
1 #pragma once
2 
3 #include "ScopeDatatypes.h"
4 
5 // Forward declarations
6 namespace scope {
7 class ScopeMultiImage;
8 typedef std::shared_ptr<const ScopeMultiImage> ScopeMultiImageCPtr;
9 class ScopeHistogram;
10 typedef std::shared_ptr<ScopeHistogram> ScopeHistogramPtr;
11 }
12 
13 namespace scope {
14 
18 
19 protected:
21  const uint32_t area;
22 
24  const uint32_t channels;
25 
27  std::vector<ScopeHistogramPtr> hists;
28 
29 public:
31  ScopeMultiHistogram(const uint32_t& _area = 0, const uint32_t& _channels = 1, const uint32_t& _no_of_bins = 512, uint16_t _range = UINT16_MAX);
32 
35  void Calculate(ScopeMultiImageCPtr const _multi, const bool& _loghistogram = false);
36 
38  void Resize(const uint32_t& _no_of_bins);
39 
41  std::vector<uint32_t> MaxCounts() const ;
42 
44  std::vector<uint16_t> FirstCountPositions() const;
45 
47  std::vector<uint16_t> LastCountPositions() const;
48 
51  const std::vector<uint32_t>* GetHistConst(const uint32_t& _c) const;
52 
54  void ReleaseHistConst(const uint32_t& _c) const;
55 };
56 
58 typedef std::shared_ptr<ScopeMultiHistogram> ScopeMultiHistogramPtr;
59 
60 }
61 
void Calculate(ScopeMultiImageCPtr const _multi, const bool &_loghistogram=false)
const std::vector< uint32_t > * GetHistConst(const uint32_t &_c) const
In here all declarations for all kinds of datatypes Scope needs.
std::vector< uint16_t > LastCountPositions() const
std::vector< uint16_t > FirstCountPositions() const
std::vector< ScopeHistogramPtr > hists
vector with histograms for each channel
std::vector< uint32_t > MaxCounts() const
A multi channel histogram.
ScopeMultiHistogram(const uint32_t &_area=0, const uint32_t &_channels=1, const uint32_t &_no_of_bins=512, uint16_t _range=UINT16_MAX)
Initialize all channels.
const uint32_t area
area of the histogram
const uint32_t channels
number of channels in the area/histogram
void Resize(const uint32_t &_no_of_bins)
Resize the multi histogram to a new number of bins.
void ReleaseHistConst(const uint32_t &_c) const