Class FileImage
Image container responsible of writing images to a file, including metadata. More...
#include <util.h>
Public Attributes
| Type | Name |
|---|---|
| std::vector< int > | m_acqNframeMetadata number of frame acquired by the camera. |
| QMap< QString, std::vector< float > > | m_additionalMetadata additional metadata to append to the NDArrays. Each vector will be appended to the vl metadata of the array using the key of the map as identifier. |
| std::vector< std::string > | m_colorFilterArray string determining the type of filter array of an RGB camera. |
| b2nd_context_t * | m_ctx Storage context. |
| std::vector< int > | m_exposureMetadata exposure time in microseconds. |
| char * | m_filePath path to file location. |
| b2nd_array_t * | m_src Array storage created temporarily for BLOSC. |
| std::vector< std::string > | m_timeStamp string determining the time stamp when images where acquired. |
Public Functions
| Type | Name |
|---|---|
| void | AppendMetadata () Appends metadata to BLOSC ND array. This method should be called before closing the file. |
| FileImage (const char * filePath, unsigned int imageHeight, unsigned int imageWidth) Opens a file and throws runtime error when opening fails. |
|
| void | WriteImageData (XI_IMG image, QMap< QString, float > additionalMetadata) Writes the content of an image into a file in UINT16 format. |
| ~FileImage () Frees blosc2 context and releases the resources associated with the file. |
Public Static Functions
| Type | Name |
|---|---|
| bool | CheckFileMetadata (const b2nd_array_t * src) Checks for each expected metadata key, that the length matches the number of images in the file. Returns false if metadata has inconsistent shape or if it does not exist for any key. |
Detailed Description
This class manges the writing of images to a file. Writing metadata to the file needs to be triggered through the method FileImage::AppendMetadata.
Public Attributes Documentation
variable m_acqNframeMetadata
number of frame acquired by the camera.
variable m_additionalMetadata
additional metadata to append to the NDArrays. Each vector will be appended to the vl metadata of the array using the key of the map as identifier.
variable m_colorFilterArray
string determining the type of filter array of an RGB camera.
variable m_ctx
Storage context.
variable m_exposureMetadata
exposure time in microseconds.
variable m_filePath
path to file location.
variable m_src
Array storage created temporarily for BLOSC.
variable m_timeStamp
string determining the time stamp when images where acquired.
Public Functions Documentation
function AppendMetadata
Appends metadata to BLOSC ND array. This method should be called before closing the file.
function FileImage
Opens a file and throws runtime error when opening fails.
Parameters:
filePathpath to file to openimageHeightheight of image to store in fileimageWidthwidth of image to store in file
Exception:
- XiLensError when initializing file fails
function WriteImageData
Writes the content of an image into a file in UINT16 format.
Parameters:
imageXimea image where data is storedadditionalMetadataAdditional metadata to be stored in the array
function ~FileImage
Frees blosc2 context and releases the resources associated with the file.
Public Static Functions Documentation
function CheckFileMetadata
Checks for each expected metadata key, that the length matches the number of images in the file. Returns false if metadata has inconsistent shape or if it does not exist for any key.
Parameters:
srcBLOSC ND-Array to check.
Returns:
true if the metadata is consistent and false if the metadata shape is missing or shape is inconsistent.
The documentation for this class was generated from the following file src/util.h