This function allows you to set the non-rectangular ROI attributes associated with any HIGEAR that has an associated non-rectangular ROI mask.
Declaration:
Copy Code | |
---|---|
AT_ERRCOUNT ACCUAPI IG_IP_NR_ROI_control_set(
HIGEAR hIGear,
AT_MODE nAttributeID,
const LPVOID lpData
);
|
Arguments:
hIGear | HIGEAR handle of the image to which you wish make the non-rectangular ROI setting changes. |
nAttributeID | Set to an AT_MODE constant for the non-rectangular ROI attribute you would like to set. |
lpData | Set to the desired attribute setting. |
Return Value:
Returns the number of ImageGear errors that occurred during this function call. If there are no errors, the return value is IGE_SUCCESS.
Supported Raster Image Formats:
This function does not process image pixels.
Sample:
Image Processing
Example:
Copy Code | |
---|---|
AT_ERRCOUNT nErrcount; HIGEAR hIGear; BOOL bCondition; HIGEAR hIGearMask;] /* Find out whether the image rectangle for hIGear is set to be overridden by a non- rectangular ROI */ nErrcount = IG_IP_NR_ROI_control_set (hIGear, IG_CONTROL_NR_ROI_DIB, (LPVOID) hIGearMask); /* Find out what the reference point for a mask HIGEAR is in the hIGear */ nErrcount = IG_IP_NR_ROI_control_set (hIGear, IG_CONTROL_NR_ROI_CONDITION, (LPVOID) bCondition); |
Remarks:
These attributes are only applicable for non-rectangular ROIs. Use IG_IP_NR_ROI_to_HIGEAR_mask() to create the mask image.
All ROI control settings have defined constants in accucnst.h which have a prefix of IG_CONTROL_NR_ROI_. The following is a list of each setting available at the time of this writing, and a description of what each does.
- IG_CONTROL_NR_ROI_DIB: Sets the DIB to be used as the mask HIGEAR for the currently loaded HIGEAR image.
- IG_CONTROL_NR_ROI_REFERENCE_POINT: Sets the position within the HIGEAR image at which the upper-left corner of the masking HIGEAR should be placed.
- IG_CONTROL_NR_ROI_REFERENCE_POINT_LEFT: Sets the left point of the mask.
- IG_CONTROL_NR_ROI_REFERENCE_POINT_TOP: Sets the top point of the mask.
- IG_CONTROL_NR_ROI_CONDITION: Sets whether or not ImageGear should override the AT_RECT argument passed to its API. Set to TRUE if you would like ImageGear to use the non-rectangular ROI defined by the mask HIGEAR. Set to FALSE for ImageGear to use the rectangular ROI defined by the current image rectangle.
IG_CONTROL_NR_ROI_CONDITION can also be set using IG_IP_NR_ROI_mask_associate() function. |