Welcome to our Support Center

Rectangle To ROI


Converts a rectangle or rotated rectangle to an ROI Descriptor. The contour of the ROI Descriptor returned is always of the type rotated rectangle.​ Type : polymorphic.


Input parameters

Rotated Rectangle : cluster,

 Left : int, left edge.
 Top : int, top edge.
 Right : int, right edge.
 Bottom : int, bottom edge.
 Rotation : double, rotation in degrees.




Output parameters


 ROI Descriptor : cluster, ROI descriptor containing all the contours in the array of ROIs.

 Global Rectangle : array, contains the coordinates of the bounding rectangle. Rectangles are specified by their bounding rectangle, with the format (Left/Top/Right/Bottom).
 Contours : array, are each of the individual shapes that define an ROI.

 ID : enum, refers to whether the contour is the external or internal edge of an ROI.
 Type : integer, is the shape type of the contour.
 Coordinates : array, indicates the relative position of the contour.



All these exemples are snippets PNG, you can drop these Snippet onto the block diagram and get the depicted code added to your VI (Do not forget to install TIGR library to run it).

Table of Contents