Scope
|
#include <ScopeImage.h>
Public Types | |
typedef std::pair< typename std::vector< T >::iterator, typename std::vector< T >::iterator > | datapart_t |
typedef std::vector< T >::const_iterator | citerator |
typedef std::vector< T >::size_type | size_type |
Public Member Functions | |
ScopeImage (const uint32_t &_lines=128, const uint32_t &_linewidth=128, const uint32_t &_area=0, const bool &_complete_avg=false, const bool &_complete_frame=false) | |
ScopeImage (const ScopeImage &_si) | |
ScopeImage & | operator= (const ScopeImage &_si) |
T | Pixel (const uint32_t &_column, const uint32_t &_line) const |
void | FillRandom () |
Several accessor methods | |
uint32_t | Area () const |
uint32_t | Lines () const |
uint32_t | Linewidth () const |
datapart_t | Newpart () const |
bool | IsCompleteFrame () const |
double | PercentComplete () const |
bool | IsCompleteAvg () const |
Mutator methods | |
void | SetCompleteFrame (const bool &_complete) |
void | SetPercentComplete (const double &_percent) |
void | SetCompleteAvg (const bool &_complete) |
Protected Member Functions | |
std::vector< T > * | GetData () |
const std::vector< T > * | GetDataConst () const |
void | ReleaseData () |
void | ReleaseDataConst () const |
Protected Attributes | |
const uint32_t | area |
uint32_t | lines |
uint32_t | linewidth |
bool | complete_frame |
bool | complete_avg |
double | percent_complete |
std::vector< T > | data |
std::vector< T >::iterator | inserter |
datapart_t | newpart |
std::mutex | pixelmutex |
std::atomic< int16_t > | reading_access |
std::condition_variable | readcond |
Private Attributes | |
friend | ScopeImageAccess< T > |
friend | ScopeImageConstAccess< T > |
A general image class.
Templatized for data type, in Scope usually uint16_t. Data is in one vector data order is linewise:
1234
5678
9...
The can only be accessed via ScopeImageAccess and ScopeImageConstAccess.
Definition at line 23 of file ScopeImage.h.
typedef std::pair<typename std::vector<T>::iterator, typename std::vector<T>::iterator> scope::ScopeImage< T >::datapart_t |
pair of two iterators over the data vector
Definition at line 33 of file ScopeImage.h.
typedef std::vector<T>::const_iterator scope::ScopeImage< T >::citerator |
const iterator over the data vector
Definition at line 36 of file ScopeImage.h.
typedef std::vector<T>::size_type scope::ScopeImage< T >::size_type |
the size type
Definition at line 39 of file ScopeImage.h.
|
inline |
Initialize with zeros.
Definition at line 80 of file ScopeImage.h.
|
inline |
|
inline |
Safe assignment.
Inserter and newpart are reset to data.begin()!
Definition at line 109 of file ScopeImage.h.
|
inline |
Definition at line 145 of file ScopeImage.h.
|
inline |
Fills the complete image with random pixel data.
Definition at line 151 of file ScopeImage.h.
|
inlineprotected |
Definition at line 162 of file ScopeImage.h.
|
inlineprotected |
Definition at line 171 of file ScopeImage.h.
|
inlineprotected |
Definition at line 179 of file ScopeImage.h.
|
inlineprotected |
Decreases reading_access counter.
Notifies waiting threads.
Definition at line 184 of file ScopeImage.h.
|
private |
give accessor classes friend access to the data
Definition at line 26 of file ScopeImage.h.
|
private |
give accessor classes friend access to the data
Definition at line 29 of file ScopeImage.h.
|
protected |
area of the image
Definition at line 43 of file ScopeImage.h.
|
protected |
number of lines, y resolution
Definition at line 46 of file ScopeImage.h.
|
protected |
width of a line, x resolution
Definition at line 49 of file ScopeImage.h.
|
protected |
false if frame not complete, allows for partial display during acquisition
Definition at line 52 of file ScopeImage.h.
|
protected |
false if this is a not completely averaged frame, it is then only for display purpose and will not be stored
Definition at line 55 of file ScopeImage.h.
|
protected |
how many percent of the frame are already filled
Definition at line 58 of file ScopeImage.h.
|
protected |
vector with pixel data
Definition at line 61 of file ScopeImage.h.
|
protected |
current insertion position
Definition at line 64 of file ScopeImage.h.
|
protected |
range of freshly inserted pixels
Definition at line 67 of file ScopeImage.h.
|
mutableprotected |
mutex for protection of pixel operations
Definition at line 70 of file ScopeImage.h.
|
mutableprotected |
>0 if someone got a pointer to the const datavector
Definition at line 73 of file ScopeImage.h.
|
mutableprotected |
condition variable for read access
Definition at line 76 of file ScopeImage.h.