EBaseROI::SetImagePtr
Sets the pointer to an externally allocated image buffer.
Namespace: Euresys::Open_eVision
[C++]
void SetImagePtr(
int width,
int height,
void* imagePointer,
int bitsPerRow
)
Parameters
width
The width of the supplied buffer, in pixels.
height
The height of the supplied buffer, in pixels.
imagePointer
The pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image.
bitsPerRow
The total number of bits contained in a row, padding
included. Using the value 0
(default) means that this size is computed
from the buffer width and the pixel size plus a padding with the smallest
possible value that leads to a multiple of 4 bytes (32 bits),
which is the minimum padding accepted by this method.
Remarks
This call is only valid on an image. An ROI gets its buffer from its parent while an image normally allocates a pixel buffer automatically. The pointer to this buffer refers to the top left pixel of the image. The next pixels are stored contiguously, row by row, from top to bottom and from left to right.
Padding at the end of a row may be used, but it must lead to rows that are
multiple of 4 bytes.
This method overrides the internally allocated image buffer of the EBaseROI
.
As long as the image accesses this buffer, it must not be deleted.
EBaseROI.SetImagePtr
Sets the pointer to an externally allocated image buffer.
Namespace: Euresys.Open_eVision
[C#]
void SetImagePtr(
int width,
int height,
IntPtr imagePointer,
int bitsPerRow
)
Parameters
width
The width of the supplied buffer, in pixels.
height
The height of the supplied buffer, in pixels.
imagePointer
The pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image.
bitsPerRow
The total number of bits contained in a row, padding
included. Using the value 0
(default) means that this size is computed
from the buffer width and the pixel size plus a padding with the smallest
possible value that leads to a multiple of 4 bytes (32 bits),
which is the minimum padding accepted by this method.
Remarks
This call is only valid on an image. An ROI gets its buffer from its parent while an image normally allocates a pixel buffer automatically. The pointer to this buffer refers to the top left pixel of the image. The next pixels are stored contiguously, row by row, from top to bottom and from left to right.
Padding at the end of a row may be used, but it must lead to rows that are
multiple of 4 bytes.
This method overrides the internally allocated image buffer of the EBaseROI
.
As long as the image accesses this buffer, it must not be deleted.
EBaseROI.SetImagePtr
Sets the pointer to an externally allocated image buffer.
Module: open_evision
[Python]
SetImagePtr(
width: int
height: int
imagePointer: ctypes.c_void_p
bitsPerRow: int
) -> None
SetImagePtr(
width: int
height: int
imagePointer: ctypes.c_void_p
) -> None
Parameters
width
The width of the supplied buffer, in pixels.
height
The height of the supplied buffer, in pixels.
imagePointer
The pointer (aligned on 4 bytes) to the buffer, which must be large enough to hold the image.
bitsPerRow
The total number of bits contained in a row, padding
included. Using the value 0
(default) means that this size is computed
from the buffer width and the pixel size plus a padding with the smallest
possible value that leads to a multiple of 4 bytes (32 bits),
which is the minimum padding accepted by this method.
Remarks
This call is only valid on an image. An ROI gets its buffer from its parent while an image normally allocates a pixel buffer automatically. The pointer to this buffer refers to the top left pixel of the image. The next pixels are stored contiguously, row by row, from top to bottom and from left to right.
Padding at the end of a row may be used, but it must lead to rows that are
multiple of 4 bytes.
This method overrides the internally allocated image buffer of the EBaseROI
.
As long as the image accesses this buffer, it must not be deleted.