22 #ifndef _svlOverlayObjects_h
23 #define _svlOverlayObjects_h
43 typedef enum { _DoNotRemove, _Remove, _RemoveAndDelete } RemoveState;
51 void SetVideoChannel(
unsigned int videoch);
52 void SetVisible(
bool visible);
53 unsigned int GetVideoChannel()
const;
54 bool GetVisible()
const;
58 double GetTransformTimestamp()
const;
59 void SetTransformID(
int ID);
60 int GetTransformID()
const;
61 bool IsTransformed()
const;
62 void SetTransformSynchronized(
bool transform_synchronized);
63 bool GetTransformSynchronized()
const;
84 RemoveState MarkedForRemoval;
97 void SetInputName(
const std::string & inputname);
98 const std::string& GetInputName()
const;
99 void SetInputSynchronized(
bool input_synchronized);
100 bool GetInputSynchronized()
const;
121 const std::string & inputname,
122 unsigned int inputch,
124 unsigned char alpha);
127 void SetInputChannel(
unsigned int inputch);
129 void SetPosition(
int x,
int y);
130 void SetAlpha(
unsigned char alpha);
131 void SetEnableQuadMapping(
bool enable);
133 void SetQuadMapping(
int xul,
int yul,
int xur,
int yur,
int xll,
int yll,
int xlr,
int ylr);
135 unsigned int GetInputChannel()
const;
137 unsigned char GetAlpha()
const;
138 bool GetEnableQuadMapping()
const;
145 unsigned int InputCh;
148 bool QuadMappingEnabled;
150 vctInt2 QuadUL, QuadUR, QuadLL, QuadLR;
161 const std::string & inputname,
162 unsigned int inputch,
168 void SetInputChannel(
unsigned int inputch);
169 void SetConfidenceColoring(
bool enable);
170 void SetCrosshair(
bool enable);
171 void SetSize(
unsigned int size);
173 unsigned int GetInputChannel()
const;
174 bool GetConfidenceColoring()
const;
175 bool GetCrosshair()
const;
176 unsigned int GetSize()
const;
183 unsigned int InputCh;
184 bool ConfidenceColoring;
186 unsigned int TargetSize;
196 const std::string & inputname,
197 unsigned int inputch,
198 bool draw_id =
false);
201 void SetInputChannel(
unsigned int inputch);
202 void SetDrawID(
bool enable);
204 unsigned int GetInputChannel()
const;
205 bool GetDrawID()
const;
212 unsigned int InputCh;
223 const std::string & inputname,
224 unsigned int inputch,
225 unsigned int thickness,
230 void SetInputChannel(
unsigned int inputch);
231 void SetThickness(
unsigned int thickness);
232 void SetLength(
unsigned int length);
233 void SetColor(
svlRGB color);
235 unsigned int GetInputChannel()
const;
236 unsigned int GetThickness()
const;
237 unsigned int GetLength()
const;
245 unsigned int InputCh;
246 unsigned int Thickness;
260 unsigned char alpha);
264 unsigned int imagech,
266 unsigned char alpha);
272 void SetPosition(
int x,
int y);
273 void SetAlpha(
unsigned char alpha);
274 void SetEnableQuadMapping(
bool enable);
276 void SetQuadMapping(
int xul,
int yul,
int xur,
int yur,
int xll,
int yll,
int xlr,
int ylr);
279 unsigned char GetAlpha()
const;
280 bool GetEnableQuadMapping()
const;
289 bool QuadMappingEnabled;
291 vctInt2 QuadUL, QuadUR, QuadLL, QuadLR;
302 const std::string & text,
308 const std::string & text,
315 void SetText(
const std::string & text);
317 void SetRect(
int left,
int top,
int right,
int bottom);
318 void SetFontSize(
double size);
319 void SetTextColor(
svlRGB txtcolor);
320 void SetBackgroundColor(
svlRGB bgcolor);
321 void SetBackground(
bool enable);
323 const std::string & GetText()
const;
325 void GetRect(
int & left,
int & top,
int & right,
int & bottom)
const;
326 double GetFontSize()
const;
327 svlRGB GetTextColor()
const;
328 svlRGB GetBackgroundColor()
const;
329 bool GetBackground()
const;
331 svlRect GetTextSize(
const std::string & text);
343 #if CISST_SVL_HAS_OPENCV
345 #endif // CISST_SVL_HAS_OPENCV
357 const std::string & inputname,
363 const std::string & inputname,
371 void SetRect(
int left,
int top,
int right,
int bottom);
378 void GetRect(
int & left,
int & top,
int & right,
int & bottom)
const;
396 #if CISST_SVL_HAS_OPENCV
398 #endif // CISST_SVL_HAS_OPENCV
415 void SetRect(
const svlRect & rect);
416 void SetRect(
int left,
int top,
int right,
int bottom);
417 void SetColor(
const svlRGB & color);
418 void SetFill(
bool fill);
421 void GetRect(
int & left,
int & top,
int & right,
int & bottom)
const;
423 bool GetFill()
const;
463 template <
class _Type>
466 Ellipse.cx =
static_cast<int>(center[0]);
467 Ellipse.cy =
static_cast<int>(center[1]);
471 void SetRadius(
const int radius_horiz,
const int radius_vert);
472 void SetRadius(
const int radius);
473 void SetAngle(
const double angle);
474 void SetThickness(
unsigned int thickness);
475 void SetColor(
const svlRGB & color);
476 void SetFill(
bool fill);
480 void GetRadius(
int & radius_horiz,
int & radius_vert)
const;
481 double GetAngle()
const;
482 unsigned int GetThickness();
484 bool GetFill()
const;
491 unsigned int Thickness;
510 const int x1,
const int y1,
511 const int x2,
const int y2,
512 const int x3,
const int y3,
520 void SetCorners(
const int x1,
const int y1,
521 const int x2,
const int y2,
522 const int x3,
const int y3);
523 void SetColor(
svlRGB color);
524 void SetFill(
bool fill);
529 void GetCorners(
int& x1,
int& y1,
531 int& x3,
int& y3)
const;
533 bool GetFill()
const;
554 const std::string & inputname,
558 const std::string & inputname,
560 unsigned int thickness);
563 void SetColor(
svlRGB color);
564 void SetThickness(
unsigned int thickness);
567 unsigned int GetThickness()
const;
576 unsigned int Thickness;
593 unsigned int thickness);
602 unsigned int thickness,
607 void SetPoints(
const TypeRef points);
608 void SetPoints(
const TypeRef points,
unsigned int start);
609 void SetColor(
svlRGB color);
610 void SetThickness(
unsigned int thickness);
611 void SetStart(
unsigned int start);
615 unsigned int GetThickness()
const;
616 unsigned int GetStart()
const;
619 unsigned int AddPoint(
int x,
int y);
620 int SetPoint(
unsigned int idx,
svlPoint2D point);
621 int SetPoint(
unsigned int idx,
vctInt2 point);
622 int SetPoint(
unsigned int idx,
int x,
int y);
623 int GetPoint(
unsigned int idx,
svlPoint2D & point)
const;
624 int GetPoint(
unsigned int idx,
vctInt2 & point)
const;
625 int GetPoint(
unsigned int idx,
int & x,
int & y)
const;
634 unsigned int Thickness;
652 unsigned int borderwidth,
664 void SetRange(
const vct2 range);
665 void SetRange(
const double from,
const double to);
666 void SetValue(
const double value);
667 void SetDirection(
const bool vertical);
669 void SetRect(
int left,
int top,
int right,
int bottom);
670 void SetColor(
svlRGB color);
671 void SetBackgroundColor(
svlRGB bgcolor);
672 void SetBorderWidth(
const unsigned int pixels);
673 void SetBorderColor(
svlRGB bordercolor);
675 vct2 GetRange()
const;
676 void GetRange(
double & from,
double & to)
const;
677 double GetValue()
const;
678 bool GetDirection()
const;
680 void GetRect(
int & left,
int & top,
int & right,
int & bottom)
const;
682 svlRGB GetBackgroundColor()
const;
683 unsigned int GetBorderWidth()
const;
684 svlRGB GetBorderColor()
const;
686 int GetValueInImagePos(
double value,
int & imagepos)
const;
687 int GetImagePosInValue(
int imagepos,
double & value)
const;
724 void SetUpdateRate(
double seconds);
725 double GetUpdateRate()
const;
733 unsigned int PrevSampleCount;
734 double PrevSampleTime;
795 #endif // _svlOverlayObjects_h
#define CISST_EXPORT
Definition: cmnExportMacros.h:50
svlRGB GetBackgroundColor() const
Definition: svlOverlayObjects.h:296
bool GetBackground() const
svlStreamType
Definition: svlDefinitions.h:193
void SetBackgroundColor(svlRGB bgcolor)
Definition: svlFilterImageOverlay.h:35
void SetRect(svlRect rect)
void CISST_EXPORT Text(svlSampleImage *image, unsigned int videoch, svlPoint2D pos, const std::string &text, double fontsize, svlRGB color)
Definition: osaCriticalSection.h:36
int TransformID
Definition: svlOverlayObjects.h:76
Definition: svlOverlayObjects.h:580
bool Transformed
Definition: svlOverlayObjects.h:77
Definition: svlOverlayObjects.h:705
Definition: svlTypes.h:298
Definition: svlOverlayObjects.h:640
Definition: svlOverlayObjects.h:190
Dynamic vector referencing existing memory.
Definition: vctDynamicVectorRef.h:77
Definition: svlBufferImage.h:37
virtual void DrawInternal(svlSampleImage *bgimage, svlSample *input)
Definition: svlFilterBase.h:39
Definition: svlOverlayObjects.h:39
Definition: svlOverlayObjects.h:548
Definition: svlTypes.h:279
void SetBackground(bool enable)
virtual void SetTransform(const ThisType::ImageTransform &transform)
Definition: svlOverlayObjects.h:115
bool TransformSynchronized
Definition: svlOverlayObjects.h:78
virtual void DrawInternal(svlSampleImage *bgimage, svlSample *input)=0
Definition: svlOverlayObjects.h:768
Definition: svlOverlayObjects.h:436
void CISST_EXPORT Crosshair(svlSampleImage *image, unsigned int videoch, svlPoint2D pos, svlRGB color, unsigned int radius=5, unsigned int thickness=2)
Definition: osaStopwatch.h:82
unsigned int VideoCh
Definition: svlOverlayObjects.h:72
vct3x3 Transform
Definition: svlOverlayObjects.h:74
Definition: svlOverlayObjects.h:497
Definition: svlSampleImage.h:35
Macros to export the symbols of cisstStereoVision (in a Dll).
Definition: svlOverlayObjects.h:252
Definition: svlOverlayObjects.h:404
double GetFontSize() const
Definition: svlTypes.h:215
void SetFontSize(double size)
Definition: svlOverlayObjects.h:741
vctDynamicVector< svlPoint2D > Type
Definition: svlOverlayObjects.h:583
bool Visible
Definition: svlOverlayObjects.h:73
Definition: svlOverlayObjects.h:155
void CISST_EXPORT Poly(svlSampleImage *image, unsigned int videoch, const vctDynamicVectorRef< svlPoint2D > points, svlRGB color, unsigned int thickness, unsigned int start)
svlRect GetTextSize(const std::string &text)
double TransformTimestamp
Definition: svlOverlayObjects.h:75
void SetCenter(const vctFixedSizeVector< _Type, 2 > ¢er)
Definition: svlOverlayObjects.h:464
Definition: svlTypes.h:118
Definition: svlFilterOutput.h:35
vctDynamicVectorRef< svlPoint2D > TypeRef
Definition: svlOverlayObjects.h:584
void CISST_EXPORT Ellipse(svlSampleImage *image, unsigned int videoch, int cx, int cy, int rx, int ry, unsigned char r, unsigned char g, unsigned char b, double angle=0.0, double from_angle=0.0, double to_angle=2.0 *cmnPI, int thickness=1)
void SetTextColor(svlRGB txtcolor)
unsigned char ID
Definition: CiA301.h:13
svlRGB GetTextColor() const
Definition: svlOverlayObjects.h:351
Definition: svlSample.h:31