Impact Acquire SDK C++
|
A wrapper class to handle mvIMPACT::acquire::ImageBuffer structures. More...
#include <mvIMPACT_acquire.h>
Public Member Functions | |
ImageBufferDesc | clone (void) const |
Returns a deep copy of the mvIMPACT::acquire::ImageBuffer object referenced by this descriptor. | |
int | copy (char *pDst, const int dstSize) const |
Returns a deep copy of the data buffer of the underlying mvIMPACT::acquire::ImageBuffer object referenced by this descriptor. | |
ImageBuffer * | getBuffer (void) const |
Grants access to the underlying mvIMPACT::acquire::ImageBuffer structure managed by this object. | |
ImageBufferDesc (const ImageBufferDesc &source) | |
Constructs a new mvIMPACT::acquire::ImageBufferDesc from an existing one. | |
ImageBufferDesc (const std::string &fileName, TImageFileFormat fileFormat=iffAuto) | |
Constructs a new mvIMPACT::acquire::ImageBufferDesc object from a file and allocates all memory needed. | |
ImageBufferDesc (int channelCount) | |
Constructs a new mvIMPACT::acquire::ImageBufferDesc object with channelCount channel specific data elements. | |
ImageBufferDesc (TImageBufferPixelFormat pixelFormat, int width, int height) | |
Constructs a new mvIMPACT::acquire::ImageBufferDesc object and allocates all memory needed. | |
ImageBufferDesc & | operator= (const ImageBufferDesc &rhs) |
Allows assignments of two different mvIMPACT::acquire::ImageBufferDesc. | |
int | save (const std::string &fileName, TImageFileFormat format=iffAuto) const |
Stores the complete data of one ImageBuffer structure into a file. | |
~ImageBufferDesc () | |
De-allocates all managed memory again when this is the last object referencing the image. | |
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.
|
inline |
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.
[in] | source | The source buffer descriptor. |
|
inlineexplicit |
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.
[in] | channelCount | The number of channel specific data elements to allocate memory for. |
|
inlineexplicit |
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.
[in] | pixelFormat | The desired pixel format for the new mvIMPACT::acquire::ImageBuffer object handled by this descriptor. |
[in] | width | The width of the new mvIMPACT::acquire::ImageBuffer object handled by this descriptor. |
[in] | height | The height of the new mvIMPACT::acquire::ImageBuffer object handled by this descriptor. |
|
inlineexplicit |
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
.
[in] | fileName | The name of the file to load. |
[in] | fileFormat | The format of the file to load. |
|
inline |
De-allocates all managed memory again when this is the last object referencing the image.
|
inline |
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.
|
inline |
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. |
|
inline |
Grants access to the underlying mvIMPACT::acquire::ImageBuffer structure managed by this object.
|
inline |
Allows assignments of two different mvIMPACT::acquire::ImageBufferDesc.
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.
|
inline |
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.
[in] | fileName | The full path of the file to create. |
[in] | format | 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. |