Scope
scope::ScopeMultiHistogram Class Reference

#include <ScopeMultiHistogram.h>

Public Member Functions

 ScopeMultiHistogram (const uint32_t &_area=0, const uint32_t &_channels=1, const uint32_t &_no_of_bins=512, uint16_t _range=UINT16_MAX)
 
void Calculate (ScopeMultiImageCPtr const _multi, const bool &_loghistogram=false)
 
void Resize (const uint32_t &_no_of_bins)
 
std::vector< uint32_t > MaxCounts () const
 
std::vector< uint16_t > FirstCountPositions () const
 
std::vector< uint16_t > LastCountPositions () const
 
const std::vector< uint32_t > * GetHistConst (const uint32_t &_c) const
 
void ReleaseHistConst (const uint32_t &_c) const
 

Protected Attributes

const uint32_t area
 
const uint32_t channels
 
std::vector< ScopeHistogramPtr > hists
 

Detailed Description

A multi channel histogram.

Mutex-protected if you use GetHist and ReleaseHist correctly

Definition at line 17 of file ScopeMultiHistogram.h.

Constructor & Destructor Documentation

scope::ScopeMultiHistogram::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.

Definition at line 8 of file ScopeMultiHistogram.cpp.

Member Function Documentation

void scope::ScopeMultiHistogram::Calculate ( ScopeMultiImageCPtr const  _multi,
const bool &  _loghistogram = false 
)
Parameters
[in]_multithe multi image to calculate the multi histogram for
[in]_loghistogramif true the histogram contains the logarithms of the counts, if false it contains the counts

Definition at line 16 of file ScopeMultiHistogram.cpp.

void scope::ScopeMultiHistogram::Resize ( const uint32_t &  _no_of_bins)

Resize the multi histogram to a new number of bins.

Definition at line 22 of file ScopeMultiHistogram.cpp.

std::vector< uint32_t > scope::ScopeMultiHistogram::MaxCounts ( ) const
Returns
vector with maximum counts in every channel

Definition at line 27 of file ScopeMultiHistogram.cpp.

std::vector< uint16_t > scope::ScopeMultiHistogram::FirstCountPositions ( ) const
Returns
vector with positions of first counts >0

Definition at line 34 of file ScopeMultiHistogram.cpp.

std::vector< uint16_t > scope::ScopeMultiHistogram::LastCountPositions ( ) const
Returns
vector with positions of last counts >0

Definition at line 41 of file ScopeMultiHistogram.cpp.

const std::vector< uint32_t > * scope::ScopeMultiHistogram::GetHistConst ( const uint32_t &  _c) const
Returns
constant pointer to the histogram for one channel
Postcondition
mutex for that channel is locked shared

Definition at line 48 of file ScopeMultiHistogram.cpp.

void scope::ScopeMultiHistogram::ReleaseHistConst ( const uint32_t &  _c) const
Postcondition
mutex for that channel is unlocked

Definition at line 52 of file ScopeMultiHistogram.cpp.

Member Data Documentation

const uint32_t scope::ScopeMultiHistogram::area
protected

area of the histogram

Definition at line 21 of file ScopeMultiHistogram.h.

const uint32_t scope::ScopeMultiHistogram::channels
protected

number of channels in the area/histogram

Definition at line 24 of file ScopeMultiHistogram.h.

std::vector<ScopeHistogramPtr> scope::ScopeMultiHistogram::hists
protected

vector with histograms for each channel

Definition at line 27 of file ScopeMultiHistogram.h.


The documentation for this class was generated from the following files: