ICogImage8GreyData Get8GreyPixelMemory Method Cognex VisionPro 9.8 SR1
Gets an object that can be used to directly access pixel memory. The caller MUST call Dispose on this object when finished with it.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 75.0.0.0
Syntax

ICogImage8PixelMemory Get8GreyPixelMemory(
	CogImageDataModeConstants dataMode,
	int x,
	int y,
	int width,
	int height
)

Return Value

Type: ICogImage8PixelMemory

An object that represents the pixel data.

Exceptions

ExceptionCondition
CogImageBadCoordException

x, y, height, and width describe a region that is not entirely within the image.

Remarks

Gets an CogImage8PixelMemory object that can be used to access pixel memory directly. You must call this object's Dispose  method when you are finished with it.

The x, y, height, and width parameters let you specify the portion of the image to get. To access the pixel memory for the entire image, specify zero for these parameters.

If you request read/write or write-only access to the pixel memory when you call Get8GreyPixelMemory(CogImageDataModeConstants, Int32, Int32, Int32, Int32), the pixel memory may be copied internally. Any changes that you make to the pixel may not be written back to the image until you call Dispose . Your application should assume that no changes to the image take place until then.

See Also