NI-IMAQ C Function Reference

Content Type
Programming Language
Current manual

imgSessionFitROI

imgSessionFitROI

Usage

rval imgSessionFitROI(SESSION_ID boardid, IMG_ROI_FIT_MODE fitMode, uInt32 top, uInt32 left, uInt32 height, uInt32 width, uInt32* fittedTop, uInt32* fittedLeft, uInt32* fittedHeight, uInt32* fittedWidth);

Purpose

Evaluates the region of interest (ROI) you specify, and returns valid left, top, height, and width values. Returns an ROI that NI-IMAQ is guaranteed to be able to acquire and that best accommodates the ROI you specify.

Parameters

Name Type Direction
sid SESSION_ID input
fitMode IMG_ROI_FIT_MODE input
top uInt32 input
left uInt32 input
height uInt32 input
width uInt32 input
fittedTop uInt32* output
fittedLeft uInt32* output
fittedHeight uInt32* output
fittedWidth uInt32* output

Parameter Discussion

sid: valid SESSION_ID.

fitMode: next smallest or next largest acquirable ROI. The following are valid values for this parameter:

IMG_ROI_FIT_LARGER
IMG_ROI_FIT_SMALLER

top: top coordinate to fit.

left: left coordinate to fit.

height: height coordinate to fit.

width: width coordinate to fit.

fittedTop: fitted ROI top coordinate.

fittedLeft: fitted ROI left coordinate.

fittedHeight: fitted ROI height coordinate.

fittedWidth: fitted ROI width coordinate.

Return Value

This function returns 0 on success. On failure, this function returns an error code. For information about the error code, call imgShowError.

Was this information helpful?

Help us improve your future ni.com experience.

What are you trying to do?

Submit