Impact Acquire SDK Python
|
A wrapper class to handle mvIMPACT.acquire.ImageBuffer structures. More...
Public Member Functions | |
__init__ (self, *args) | |
Constructs a new mvIMPACT.acquire.ImageBufferDesc from an existing one. | |
clone (self) | |
Returns a deep copy of the mvIMPACT.acquire.ImageBuffer object referenced by this descriptor. | |
copy (self, pDst, dstSize) | |
Returns a deep copy of the data buffer of the underlying mvIMPACT.acquire.ImageBuffer object referenced by this descriptor. | |
getBuffer (self) | |
Grants access to the underlying mvIMPACT.acquire.ImageBuffer structure managed by this object. | |
save (self, *args) | |
Stores the complete data of one ImageBuffer structure into a file. | |
Properties | |
buffer = property (getBuffer, None, None, None) | |
A property (read-only) which holds a const reference to the mvIMPACT.acquire.ImageBuffer object referenced by this descriptor. | |
thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") | |
A wrapper class to handle mvIMPACT.acquire.ImageBuffer structures.
This class acts as a simple wrapper to handle mvIMPACT.acquire.ImageBuffer structures. When using this class the user is no longer responsible for the memory management of mvIMPACT.acquire.ImageBuffer structures.
Instances of this class are reference counted. Memory is freed once the last instance to it is destroyed. For details read the corresponding sections in the documentation of the various constructors and function belonging to this class.
__init__ | ( | self, | |
* | args ) |
Constructs a new mvIMPACT.acquire.ImageBufferDesc from an existing one.
OVERLOAD 1:
The image buffer associated with this descriptor will not be copied! The internal data will be reference counted and changing this new object will also affect the original one. The internal data is freed when the last descriptor referencing the image is destroyed.
source | [in] The source buffer descriptor. |
OVERLOAD 2: Constructs a new mvIMPACT.acquire.ImageBufferDesc object with channelCount channel specific data elements.
This constructor does NOT allocate memory for the actual pixel data but only for the a structure describing an image.
When passing invalid values to this constructor (e.g. a negative value for channelCount
) an exception will be thrown.
channelCount | [in] The number of channel specific data elements to allocate memory for. |
OVERLOAD 3: Constructs a new mvIMPACT.acquire.ImageBufferDesc object and allocates all memory needed.
This constructor will allocate and handle a new and complete ImageBuffer object including memory for the pixel data for the given pixel format.
The size(in bytes) of allocated pixel memory will depend on the pixelFormat as well as on the parameters width and height. mvIMPACT.acquire.ImageBuffer.iSize will return the amount of memory allocated for the buffer.
When passing invalid values to this constructor (e.g. a negative value for height
) an exception will be thrown.
pixelFormat | [in] The desired pixel format for the new mvIMPACT.acquire.ImageBuffer object handled by this descriptor. |
width | [in] The width of the new mvIMPACT.acquire.ImageBuffer object handled by this descriptor. |
height | [in] The height of the new mvIMPACT.acquire.ImageBuffer object handled by this descriptor. |
OVERLOAD 4: Constructs a new mvIMPACT.acquire.ImageBufferDesc object from a file and allocates all memory needed.
This constructor will allocate and handle a new and complete ImageBuffer object including memory for the pixel data for the given pixel format. The buffer will be filled with the data from the file referenced by fileName
.
fileName | [in] The name of the file to load. |
fileFormat | [in] The format of the file to load. |
OVERLOAD 5: Constructs a new mvIMPACT.acquire.ImageBufferDesc object from a file and allocates all memory needed.
This constructor will allocate and handle a new and complete ImageBuffer object including memory for the pixel data for the given pixel format. The buffer will be filled with the data from the file referenced by fileName
.
fileName | [in] The name of the file to load. |
fileFormat | [in] The format of the file to load. |
clone | ( | self | ) |
Returns a deep copy of the mvIMPACT.acquire.ImageBuffer object referenced by this descriptor.
This function will create a deep copy of the mvIMPACT.acquire.ImageBuffer object referenced by this descriptor. Afterwards modifying one of the images will NOT influence the other one.
copy | ( | self, | |
pDst, | |||
dstSize ) |
Returns a deep copy of the data buffer of the underlying mvIMPACT.acquire.ImageBuffer object referenced by this descriptor.
This function will create a deep copy of the data buffer of the mvIMPACT.acquire.ImageBuffer object referenced by this descriptor. Afterwards modifying one of the buffers will NOT influence the other one.
pDst
if dstSize
was too small or the size used if the operation was successful.pDst | A pointer to the buffer to copy the data into. Can be 0 if just the size needed shall be queried. |
dstSize | The size of the buffer pointed to by pDst . Is 'don't care' if just the size needed shall be queried. |
getBuffer | ( | self | ) |
Grants access to the underlying mvIMPACT.acquire.ImageBuffer structure managed by this object.
save | ( | self, | |
* | args ) |
Stores the complete data of one ImageBuffer structure into a file.
This function stores the image described by a mvIMPACT.acquire.ImageBuffer structure pointed to by the pBuffer
variable into a file.
fileName | [in] The full path of the file to create. |
format | [in] The format of the file to be created. If this parameter is set to mvIMPACT.acquire.iffAuto make sure to specify a proper file extension. |
|
static |
A property (read-only) which holds a const reference to the mvIMPACT.acquire.ImageBuffer object referenced by this descriptor.
|
static |