Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 87.0.0.0
Parameters
- dataMode
- Type: Cognex.VisionPro CogImageDataModeConstants
Specifies whether the pixel data are read, write, or read/write.
- x
- Type: System Int32
The x-coordinate of the portion of the image to get.
- y
- Type: System Int32
The y-coordinate of the portion of the image to get.
- width
- Type: System Int32
The width of the image to get.
- height
- Type: System Int32
The height of the image to get.
Return Value
Type: ICogImage8PixelMemoryAn object that represents the pixel data.
| Exception | Condition |
|---|---|
| CogImageBadCoordException | x, y, height, and width describe a region that is not entirely within the image. |
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.