40#include "../canvas_ity/src/canvas_ity.hpp"
104 bool Load(std::string path);
105 bool Load(
const YAML::Node& node);
135 float fullscalerange,
A single point within an EyeMaskPolygon.
Definition: EyeMask.h:50
EyeMaskPoint(float t, float v)
Initialize a point from a timestamp and voltage.
Definition: EyeMask.h:65
EyeMaskPoint()
Default constructor.
Definition: EyeMask.h:54
float m_time
X axis position of the point.
Definition: EyeMask.h:75
float m_voltage
Y axis position of the point.
Definition: EyeMask.h:78
A single polygon within an EyeMask.
Definition: EyeMask.h:86
std::vector< EyeMaskPoint > m_points
Set of vertices within the polygon.
Definition: EyeMask.h:90
A mask used for checking eye patterns.
Definition: EyeMask.h:98
bool empty() const
Return true if there are no polygons in the mask.
Definition: EyeMask.h:140
size_t GetHeight()
Get the rendered height of the mask.
Definition: EyeMask.h:156
size_t m_width
Current width.
Definition: EyeMask.h:194
void RenderForAnalysis(EyeWaveform *waveform, float xscale, float xoff, float yscale, float yoff, float height) const
Renders the mask to an offscreen buffer we can use for hit testing.
Definition: EyeMask.cpp:186
void GetPixels(std::vector< uint8_t > &pixels)
Get the raw image data as RGBA32.
Definition: EyeMask.h:167
size_t m_height
Current height.
Definition: EyeMask.h:197
const std::vector< EyeMaskPolygon > & GetPolygons() const
Return the set of polygons in the mask.
Definition: EyeMask.h:148
std::string GetMaskName() const
Get the display name of the eye pattern mask.
Definition: EyeMask.h:112
std::string m_maskname
Human readable name of the mask (e.g. "XFI")
Definition: EyeMask.h:188
float GetAllowedHitRate() const
Get the allowed mask hit rate.
Definition: EyeMask.h:120
EyeMask()
Initialize an empty mask.
Definition: EyeMask.cpp:55
std::vector< EyeMaskPolygon > m_polygons
Set of polygons in the mask.
Definition: EyeMask.h:179
bool IsTimebaseRelative()
Returns true if the timebase is in relative units (UI) and false if absolute (time)
Definition: EyeMask.h:144
std::string m_fname
Filename of the mask.
Definition: EyeMask.h:176
bool m_timebaseIsRelative
true = time measured in UIs || false = time measured in ps
Definition: EyeMask.h:185
std::string GetFileName() const
Get the filename of the mask.
Definition: EyeMask.h:108
float CalculateHitRate(EyeWaveform *cap, size_t width, size_t height, float fullscalerange, float xscale, float xoff)
Checks a raw eye pattern dataset against the mask.
Definition: EyeMask.cpp:226
float m_hitrate
Most recent hit rate.
Definition: EyeMask.h:182
size_t GetWidth()
Get the rendered width of the mask.
Definition: EyeMask.h:152
std::unique_ptr< canvas_ity::canvas > m_canvas
Canvas for rasterizing the mask.
Definition: EyeMask.h:191
Base class for all electronic load drivers.
Definition: Load.h:45