|
virtual uint32_t | GetMaximumChunkLength () const =0 |
| Returns the maximum chunk length possible for the currently allocated memory vs image attributes. More...
|
|
virtual uint32_t | GetRequiredSize () const =0 |
| Gets the size of buffer required to hold the acquired image. More...
|
|
virtual uint32_t | GetEffectiveImageSize () const =0 |
| Effective image size. More...
|
|
virtual void | SetOffsetX (uint32_t aValue)=0 |
| Sets the Offset X attribute of the image. More...
|
|
virtual void | SetOffsetY (uint32_t aValue)=0 |
| Sets the Offset X attribute of the image. More...
|
|
virtual PvResult | Alloc (uint32_t aSizeX, uint32_t aSizeY, PvPixelType aPixelType, uint16_t aPaddingX=0, uint16_t aPaddingY=0, uint32_t aMaximumChunkLength=0)=0 |
| Allocates memory for this PvImage. More...
|
|
virtual void | Free ()=0 |
| Frees (de-allocates) the buffer's internal memory. More...
|
|
virtual PvResult | Attach (void *aRawBuffer, uint32_t aSizeX, uint32_t aSizeY, PvPixelType aPixelType, uint16_t aPaddingX=0, uint16_t aPaddingY=0, uint32_t aMaximumChunkLength=0)=0 |
| Attach this PvImage to an external memory buffer. More...
|
|
virtual uint8_t * | Detach ()=0 |
| Releases an attached memory buffer. More...
|
|
virtual bool | IsPartialLineMissing () const =0 |
| If true, the grabber (on the device) was missing at least one pixel in at least one of the lines when the frame was grabbed. More...
|
|
virtual bool | IsFullLineMissing () const =0 |
| If true, the grabber (on the device) was missing at least one line when the frame was grabbed. More...
|
|
virtual void | SetEOFByLineCount (bool aValue=true)=0 |
| Simulates the EOFByLineCount used by Pleora video interfaces. More...
|
|
virtual bool | IsEOFByLineCount () const =0 |
| End of Frame by Line Count status bit. More...
|
|
virtual bool | IsInterlacedEven () const =0 |
| The image contained in the PvImage is an interlaced Even field. More...
|
|
virtual bool | IsInterlacedOdd () const =0 |
| The image contained in the PvImage is an interlaced Odd field. More...
|
|
virtual bool | IsImageDropped () const =0 |
| Image dropped status bit. More...
|
|
virtual bool | IsDataOverrun () const =0 |
| Data overrun status bit. More...
|
|
virtual PvBuffer * | GetBuffer ()=0 |
| Returns the PvBuffer this PvImage belongs to. More...
|
|
virtual const uint8_t * | GetDataPointer () const =0 |
| Get the image's data pointer. More...
|
|
virtual uint8_t * | GetDataPointer ()=0 |
| Get the image's data pointer. More...
|
|
virtual uint32_t | GetImageSize () const =0 |
| Actual image size within the payload or buffer. More...
|
|
virtual uint32_t | GetWidth () const =0 |
| Get the image's width. More...
|
|
virtual uint32_t | GetHeight () const =0 |
| Get the image's height. More...
|
|
virtual PvPixelType | GetPixelType () const =0 |
| The buffer's pixel type. More...
|
|
virtual uint32_t | GetBitsPerPixel () const =0 |
| Returns how many bits are required to hold a pixel using the current buffer's pixel type. More...
|
|
virtual uint32_t | GetOffsetX () const =0 |
| Get the image's horizontal offset. More...
|
|
virtual uint32_t | GetOffsetY () const =0 |
| Get the image's vertical offset. More...
|
|
virtual uint16_t | GetPaddingX () const =0 |
| Get the horizontal image padding. More...
|
|
virtual uint16_t | GetPaddingY () const =0 |
| Get the vertical image padding. More...
|
|
virtual uint64_t | GetBlockID () const =0 |
| Return the block ID. More...
|
|
virtual uint64_t | GetTimestamp () const =0 |
| Get the image's timestamp. More...
|
|
virtual uint64_t | GetReceptionTime () const =0 |
| Get the buffer's reception timestamp. More...
|
|
Image interface to a PvBuffer.
A PvBuffer represents a generic buffer with no specific payload type. If the payload type is image, the user can obtain a pointer to a PvImage buffer interface through PvBuffer::GetImage.
This PvImage pointer is owned by the PvBuffer and does not need to be released after use. It is valid as long as the PvBuffer exists.
Accessing image specific data
To determinate the payload type and access image specific data:
- Retrieve the PvPayloadType using PvBuffer::GetPayloadType
- If PvPayloadType is PvPayloadTypeImage, retrieve PvImage pointer from your PvBuffer
- Access image specific data through the PvImage pointer, like PvImage::GetWidth, PvImage::GetHeight, etc.
- There is no need to release or delete the PvImage pointer. It is valid as long as the PvBuffer exists.
uint32_t PvImage::GetRequiredSize |
( |
| ) |
const |
|
pure virtual |
Gets the size of buffer required to hold the acquired image.
This attribute is valid if the last image acquisition was successful or if it failed because the buffer was too small. It can be used to re-allocate the acquisition buffers if the acquisition failed because the buffer was too small.
The required size is only computed for the last image - based on the number of lines as provided in the GigE Vision or USB3 Vision streaming protocol trailer.
It is possible that with devices outputting images of varying length (like line scan cameras) that the last image required size may be smaller than the maximum possible size.
In order to be 100% sure of allocating buffers correctly, you should either hard code the buffer size to known big enough sizes or use the device GenICam GevPayloadSize parameter for dynamic cases.
- Returns
- The size, in bytes, required to hold the image in this buffer.