Impact Acquire SDK Java
|
A wrapper class to handle mvIMPACT.acquire.ImageBuffer structures. More...
Public Member Functions | |
ImageBufferDesc | clone () |
Returns a deep copy of the mvIMPACT.acquire.ImageBuffer object referenced by this descriptor. | |
int | copy (byte[] pDst) |
Returns a deep copy of the data buffer of the underlying mvIMPACT.acquire.ImageBuffer object referenced by this descriptor. | |
synchronized void | delete () |
ImageBuffer | getBuffer () |
Grants access to the underlying mvIMPACT.acquire.ImageBuffer structure managed by this object. | |
ImageBufferDesc (ImageBufferDesc source) | |
Constructs a new mvIMPACT.acquire.ImageBufferDesc from an existing one. | |
ImageBufferDesc (int channelCount) | |
Constructs a new mvIMPACT.acquire.ImageBufferDesc object with channelCount channel specific data elements. | |
ImageBufferDesc (int pixelFormat, int width, int height) | |
Constructs a new mvIMPACT.acquire.ImageBufferDesc object and allocates all memory needed. | |
ImageBufferDesc (String fileName) | |
Constructs a new mvIMPACT.acquire.ImageBufferDesc object from a file and allocates all memory needed. | |
ImageBufferDesc (String fileName, int fileFormat) | |
Constructs a new mvIMPACT.acquire.ImageBufferDesc object from a file and allocates all memory needed. | |
int | save (String fileName) |
Stores the complete data of one ImageBuffer structure into a file. | |
int | save (String fileName, int format) |
Stores the complete data of one ImageBuffer structure into a file. | |
Protected Member Functions | |
void | finalize () |
ImageBufferDesc (long cPtr, boolean cMemoryOwn) | |
Static Protected Member Functions | |
static long | swigRelease (ImageBufferDesc obj) |
Protected Attributes | |
transient boolean | swigCMemOwn |
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.
|
protected |
ImageBufferDesc | ( | ImageBufferDesc | source | ) |
Constructs a new mvIMPACT.acquire.ImageBufferDesc from an existing one.
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. |
ImageBufferDesc | ( | int | channelCount | ) |
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. |
ImageBufferDesc | ( | int | pixelFormat, |
int | width, | ||
int | height ) |
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. |
ImageBufferDesc | ( | String | fileName, |
int | fileFormat ) |
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. |
ImageBufferDesc | ( | String | fileName | ) |
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. |
ImageBufferDesc clone | ( | ) |
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.
int copy | ( | byte[] | pDst | ) |
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. |
synchronized void delete | ( | ) |
|
protected |
ImageBuffer getBuffer | ( | ) |
Grants access to the underlying mvIMPACT.acquire.ImageBuffer structure managed by this object.
int save | ( | String | fileName | ) |
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. |
int save | ( | String | fileName, |
int | format ) |
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.TImageFileFormat.iffAuto make sure to specify a proper file extension. |
|
staticprotected |
|
protected |