CogCopyRegion Execute Method Cognex VisionPro 9.10
Copies a region of the InputImage into the DestinationImage, or into a newly-created OutputImage if no DestinationImage is given.

Namespace: Cognex.VisionPro.ImageProcessing
Assembly: Cognex.VisionPro.ImageProcessing (in Cognex.VisionPro.ImageProcessing.dll) Version: 79.0.0.0
Syntax

public ICogImage Execute(
	ICogImage inputImage,
	ICogRegion region,
	ICogImage destinationImage,
	out bool sourceClipped,
	out bool destinationClipped,
	out ICogRegion destinationRegion
)

Parameters

inputImage
Type: Cognex.VisionPro ICogImage

The input image.

region
Type: Cognex.VisionPro ICogRegion

The portion of inputImage to use. If NULL, the entire inputImage is used. Otherwise RegionMode specifies how the region is used.

destinationImage
Type: Cognex.VisionPro ICogImage

The destination image.

sourceClipped
Type: System Boolean 

True if the inputImage was clipped. False otherwise.

destinationClipped
Type: System Boolean 

True if the destinationImage was clipped. False otherwise.

destinationRegion
Type: Cognex.VisionPro ICogRegion 

The input region mapped into the pixel space of the destinationImage . This shape is not clipped.

Return Value

Type: ICogImage

The destination image. If destinationImage is NULL, this is a new image. Otherwise it is destinationImage.

Exceptions

ExceptionCondition
ArgumentException

Either FillRegion or FillBoundingBox is True and the value of either FillRegionValue or FillBoundingBoxValue is outside the range of valid values for inputImage (for example 0 to 255 for CogImage8Grey.

CogOperatorNoInputImageException

inputImage is NULL and (FillRegion = False or region = NULL).

CogImageNoPixelsException

inputImage is not allocated and (FillRegion = False or region = NULL).

CogSpaceTreeNameNotInTreeException

inputImage is not NULL and the selected space of region is not a valid space name in inputImage.

Remarks

Copies a region of the inputImage into the destinationImage, or into a newly-created image if no destinationImage is given.

See Also