VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvxio::Render Class Referenceabstract

Detailed Description

Render interface.

See also
NVXIO APIs

Definition at line 61 of file Render.hpp.

Data Structures

struct  CircleStyle
 Defines circle style. More...
 
struct  DetectedObjectStyle
 Defines the detected object's rectangle style. More...
 
struct  FeatureStyle
 Defines the features parameters. More...
 
struct  LineStyle
 Defines line style. More...
 
struct  MotionFieldStyle
 Defines motion field style. More...
 
struct  TextBoxStyle
 Defines the text box parameters. More...
 

Public Types

enum  MouseButtonEvent {
  LeftButtonDown,
  LeftButtonUp,
  MiddleButtonDown,
  MiddleButtonUp,
  RightButtonDown,
  RightButtonUp,
  MouseMove
}
 Defines mouse events. More...
 
typedef void(* OnKeyboardEventCallback )(void *context, vx_char key, vx_uint32 x, vx_uint32 y)
 Callback for keyboard events. More...
 
typedef void(* OnMouseEventCallback )(void *context, MouseButtonEvent event, vx_uint32 x, vx_uint32 y)
 Callback for mouse events. More...
 
enum  TargetType {
  UNKNOWN_RENDER,
  WINDOW_RENDER,
  VIDEO_RENDER,
  IMAGE_RENDER
}
 Defines the Render types. More...
 

Public Member Functions

virtual void close ()=0
 Closes the render. More...
 
virtual bool flush ()=0
 Renders all primitives. More...
 
virtual vx_uint32 getHeight () const =0
 Gets the height. More...
 
std::string getRenderName () const
 Gets the render name. More...
 
TargetType getTargetType () const
 Gets the target type. More...
 
virtual vx_uint32 getWidth () const =0
 Gets the width. More...
 
virtual void putArrows (vx_array old_points, vx_array new_points, const LineStyle &style)=0
 Puts arrows on the image. More...
 
virtual void putCircles (vx_array circles, const CircleStyle &style)=0
 Puts circles on the image. More...
 
virtual void putConvexPoligon (vx_array vertices, const LineStyle &style)=0
 Puts a convex polygon on the image. More...
 
virtual void putFeatures (vx_array location, const FeatureStyle &style)=0
 Puts features on the image. More...
 
virtual void putImage (vx_image image)=0
 Puts the image to the render. More...
 
virtual void putLines (vx_array lines, const LineStyle &style)=0
 Puts lines on the image. More...
 
virtual void putMotionField (vx_image field, const MotionFieldStyle &style)=0
 Puts motion field on the image. More...
 
virtual void putObjectLocation (const vx_rectangle_t &location, const DetectedObjectStyle &style)=0
 Puts object location on the image. More...
 
virtual void putText (const std::string &text, const TextBoxStyle &style)=0
 Puts a message box on the image. More...
 
virtual void setOnKeyboardEventCallback (OnKeyboardEventCallback callback, void *context)=0
 Sets the keyboard event callback. More...
 
virtual void setOnMouseEventCallback (OnMouseEventCallback callback, void *context)=0
 Sets mouse event callback. More...
 
virtual ~Render ()
 Destructor. More...
 

Protected Member Functions

 Render (TargetType type=Render::UNKNOWN_RENDER, std::string name="Undefined")
 

Protected Attributes

const std::string renderName
 
const TargetType targetType
 

Member Typedef Documentation

typedef void(* nvxio::Render::OnKeyboardEventCallback)(void *context, vx_char key, vx_uint32 x, vx_uint32 y)

Callback for keyboard events.

Parameters
[in]contextA pointer to data to be passed to the callback.
[in]keySpecifies the keyboard key that corresponds to the event.
[in]xSpecifies the x-coordinate of the mouse position.
[in]ySpecifies the y-coordinate of the mouse position.

Definition at line 164 of file Render.hpp.

typedef void(* nvxio::Render::OnMouseEventCallback)(void *context, MouseButtonEvent event, vx_uint32 x, vx_uint32 y)

Callback for mouse events.

Parameters
[in]contextA pointer to data to be passed to the callback.
[in]eventSpecifies the mouse event.
[in]xSpecifies the x-coordinate of the mouse position.
[in]ySpecifies the y-coordinate of the mouse position.

Definition at line 173 of file Render.hpp.

Member Enumeration Documentation

Defines the Render types.

Enumerator
UNKNOWN_RENDER 

Indicates a stub render.

WINDOW_RENDER 

Indicates a window render.

VIDEO_RENDER 

Indicates a render for video writing.

IMAGE_RENDER 

Indicates a render for image writing.

Definition at line 68 of file Render.hpp.

Defines mouse events.

Enumerator
LeftButtonDown 

Indicates the left mouse button has been pressed down.

LeftButtonUp 

Indicates the left mouse button has been released.

MiddleButtonDown 

Indicates a middle mouse button has been pressed down.

MiddleButtonUp 

Indicates the middle mouse button has been released.

RightButtonDown 

Indicates the right mouse button has been pressed down.

RightButtonUp 

Indicates the right mouse button has been released.

MouseMove 

Indicates the mouse has been moved.

Definition at line 146 of file Render.hpp.

Constructor & Destructor Documentation

virtual nvxio::Render::~Render ( )
inlinevirtual

Destructor.

Definition at line 298 of file Render.hpp.

nvxio::Render::Render ( TargetType  type = Render::UNKNOWN_RENDER,
std::string  name = "Undefined" 
)
inlineprotected

Definition at line 303 of file Render.hpp.

Member Function Documentation

virtual void nvxio::Render::setOnKeyboardEventCallback ( OnKeyboardEventCallback  callback,
void *  context 
)
pure virtual

Sets the keyboard event callback.

Parameters
[in]callbackSpecifies the callback to set.
[in]contextA pointer to data to be passed to the callback.
virtual void nvxio::Render::setOnMouseEventCallback ( OnMouseEventCallback  callback,
void *  context 
)
pure virtual

Sets mouse event callback.

Parameters
[in]callbackCallback.
[in]contextA pointer to data to be passed to the callback.
virtual void nvxio::Render::putImage ( vx_image  image)
pure virtual

Puts the image to the render.

Parameters
[in]imageSpecifies the image.
virtual void nvxio::Render::putText ( const std::string &  text,
const TextBoxStyle style 
)
pure virtual

Puts a message box on the image.

Parameters
[in]textA reference to the text of the message.
[in]styleA reference to the style of the message box.
virtual void nvxio::Render::putFeatures ( vx_array  location,
const FeatureStyle style 
)
pure virtual

Puts features on the image.

Parameters
[in]locationSpecifies an array of vx_keypoint_t, nvx_point2f_t or nvx_keypointf_t structures.
[in]styleA reference to the style for the features.
virtual void nvxio::Render::putLines ( vx_array  lines,
const LineStyle style 
)
pure virtual

Puts lines on the image.

Parameters
[in]linesSpecifies an array of lines. Each line is encoded as nvx_point4f_t (x1,y1,x2,y2).
[in]styleA reference to the style of the lines.
virtual void nvxio::Render::putConvexPoligon ( vx_array  vertices,
const LineStyle style 
)
pure virtual

Puts a convex polygon on the image.

Parameters
[in]verticesSpecifies an array of poligon's vertices.
[in]styleA reference to the style of the polygon.
virtual void nvxio::Render::putMotionField ( vx_image  field,
const MotionFieldStyle style 
)
pure virtual

Puts motion field on the image.

Parameters
[in]fieldSpecfies a 2-channel image, each pixel corresponding to vector of motion.
[in]styleA reference to the style of the motion field.
virtual void nvxio::Render::putObjectLocation ( const vx_rectangle_t location,
const DetectedObjectStyle style 
)
pure virtual

Puts object location on the image.

Parameters
[in]locationA reference to the rectangle.
[in]styleA reference to the style of the object location.
virtual void nvxio::Render::putCircles ( vx_array  circles,
const CircleStyle style 
)
pure virtual

Puts circles on the image.

Parameters
[in]circlesSpecifies an array of circles. Each circle is encoded as a nvx_point3f_t (x, y, radius).
[in]styleA reference to the style of the object location.
virtual void nvxio::Render::putArrows ( vx_array  old_points,
vx_array  new_points,
const LineStyle style 
)
pure virtual

Puts arrows on the image.

Parameters
[in]old_pointsSpecifies an array of arrow start points.
[in]new_pointsSpecifies an array of arrow end points.
[in]styleSpecifies the style of the arrows's lines.
virtual bool nvxio::Render::flush ( )
pure virtual

Renders all primitives.

Returns
Status of the operation. Returns true if rendering procedure is successful; returns false if render is not initialized properly or has been closed by the user.
virtual void nvxio::Render::close ( )
pure virtual

Closes the render.

TargetType nvxio::Render::getTargetType ( ) const
inline

Gets the target type.

See also
TargetType.
Returns
Target type.

Definition at line 269 of file Render.hpp.

References targetType.

std::string nvxio::Render::getRenderName ( ) const
inline

Gets the render name.

Returns
Render name.

Definition at line 278 of file Render.hpp.

References renderName.

virtual vx_uint32 nvxio::Render::getWidth ( ) const
pure virtual

Gets the width.

Returns
Width.
virtual vx_uint32 nvxio::Render::getHeight ( ) const
pure virtual

Gets the height.

Returns
Height.

Field Documentation

const TargetType nvxio::Render::targetType
protected

Definition at line 308 of file Render.hpp.

Referenced by getTargetType().

const std::string nvxio::Render::renderName
protected

Definition at line 309 of file Render.hpp.

Referenced by getRenderName().


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