| MIL 10 Reference
| Customize Help
| Save Settings

MbufGetArc



See also
Reference:
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
None.
Synopsis
Read the pixels along a specified arc, count the pixels, and store their values in a user-defined array.
Syntax
MIL_INT MbufGetArc(
MIL_ID ImageBufId, //in
MIL_INT XCenter, //in
MIL_INT YCenter, //in
MIL_INT XRad, //in
MIL_INT YRad, //in
MIL_DOUBLE StartAngle, //in
MIL_DOUBLE EndAngle, //in
void *UserArrayPtr, //out
MIL_INT *NbPixelsPtr //out
)
Description

This function reads the series of pixels along an elliptic arc from an image and stores their values in a user-defined array. The ellipse is centered at (XCenter, YCenter) with radii XRad and YRad and is defined by the start angle StartAngle and the end angle EndAngle.

If the source buffer is compressed, MIL decompresses the data before copying it to the user-supplied array.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ImageBufId

Specifies the identifier of the single-band (monochrome) source image buffer.

If the specified buffer is an image buffer with an associated region of interest (ROI), an error will occur.

XCenter

Specifies the X-coordinate of the ellipse center, relative to the top-left coordinate of the source buffer.

YCenter

Specifies the Y-coordinate of the ellipse center, relative to the top-left coordinate of the source buffer.

XRad

Specifies the radius along the X-axis. The radius should be given in pixels and must be greater than 0.

YRad

Specifies the radius along the Y-axis. The radius should be given in pixels and must be greater than 0.

StartAngle

Specifies the angle at which to start reading the arc, moving in a counter-clockwise direction. Express the angle in degrees relative to the positive X-axis.

EndAngle

Specifies the angle at which to stop reading the arc, moving in a counter-clockwise direction. Express the angle in degrees relative to the positive X-axis.

UserArrayPtr
Accepts the address of one of the following:
  • array of same type as the buffer

Specifies the address of the user array in which to store the pixels from the image buffer. Ensure that the user array is large enough to receive the data to be stored. To determine the required size of the array, you can set this parameter to M_NULL and pass a non-null address to NbPixelsPtr, which will store the required size of the array. In this case, nothing is read from the image buffer.

NbPixelsPtr

Specifies the address of the variable in which to write the number of pixels found along the arc. Set this parameter to M_NULL if it is not to be evaluated.

Return value
The returned value is the number of pixels found along the arc.
Compilation information
Header Include mil.h.
Library Use mil.lib.
DLL Requires mil.dll.
NONE