Image interface to a PvBuffer. More...
#include <PvImage.h>
Public Member Functions | |
| 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 | SetFullLineMissing (bool aValue, uint32_t aLineNumber)=0 |
| Simulates the FullLineMissing used by Pleora video interfaces. More... | |
| virtual void | SetEOFByLineCount (bool aValue=true)=0 |
| Simulates the EOFByLineCount used by Pleora video interfaces. More... | |
| virtual void | ClearEOFStatus ()=0 |
| Set the EoFByLineCount and FullLineMissing Status of PvImage to the default value false. 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 bool | HasWatermark () const =0 |
| Returns the watermark tag. More... | |
Public Member Functions inherited from IPvImage | |
| 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... | |
Static Public Member Functions | |
| static uint32_t | GetPixelSize (PvPixelType aPixelType) |
| Static method returning the pixel size in bits for a specific pixel type. More... | |
| static bool | IsPixelColor (PvPixelType aPixelType) |
| Static method returning whether a pixel type is color or not. More... | |
| static bool | IsPixelHighRes (PvPixelType aPixelType) |
| Static method returning whether a pixel type is higher than 8-bit per channel or not. More... | |
| static uint32_t | GetBitsPerComponent (PvPixelType aPixelType) |
| Static method returning the number of bit per components for a pixel type. More... | |
| static PvString | PixelTypeToString (PvPixelType aPixelType) |
| Static method returning a string representation of a pixel type. More... | |
Friends | |
| class | PvTruesenseConverter |
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.
To determinate the payload type and access image specific data:
|
pure virtual |
Allocates memory for this PvImage.
Allocs a PvImage of specific width, height and pixel format
| [in] | aSizeX | The width of the image, in pixels. See GetWidth. |
| [in] | aSizeY | The height of the image, in pixels. See GetHeight. |
| [in] | aPixelType | The GEV pixel type from which the pixel depth is extracted. For supported pixel types, see PvPixelType.h. |
| [in] | aPaddingX | The horizontal padding of the image, in pixels. See GetPaddingX. |
| [in] | aPaddingY | The vertical padding of the image, in pixels. See GetPaddingY. |
| [in] | aMaximumChunkLength | The chunk size in bytes. |
|
pure virtual |
Attach this PvImage to an external memory buffer.
This method is identical to Alloc(uint32_t,uint32_t,PvPixelType,uint16_t,uint16_t,uint32_t), with the following exceptions:
| [in] | aRawBuffer | A pointer to the buffer. |
| [in] | aSizeX | See Alloc(uint32_t,uint32_t,PvPixelType,uint16_t,uint16_t,uint32_t). |
| [in] | aSizeY | See Alloc(uint32_t,uint32_t,PvPixelType,uint16_t,uint16_t,uint32_t). |
| [in] | aPixelType | See Alloc(uint32_t,uint32_t,PvPixelType,uint16_t,uint16_t,uint32_t). |
| [in] | aPaddingX | See Alloc(uint32_t,uint32_t,PvPixelType,uint16_t,uint16_t,uint32_t). |
| [in] | aPaddingY | See Alloc(uint32_t,uint32_t,PvPixelType,uint16_t,uint16_t,uint32_t). |
| [in] | aMaximumChunkLength | See Alloc(uint32_t,uint32_t,PvPixelType,uint16_t,uint16_t,uint32_t). |
|
pure virtual |
Set the EoFByLineCount and FullLineMissing Status of PvImage to the default value false.
This method should be called on every PvImage if the EoFByLineCount feature is used for streaming. It set the EoFByLineCount and FullLineMissing Status of the PvImage to the default value false, the user could then decide if and which status needs to be set on the current PvImage.
|
pure virtual |
Releases an attached memory buffer.
Does nothing other then resetting the memory buffer pointer to NULL.
|
pure virtual |
Frees (de-allocates) the buffer's internal memory.
|
static |
Static method returning the number of bit per components for a pixel type.
PvPixelMono8 and PvPixelRGBa8 would be 8. Mono16, PvPixelRGB16, PvPixelBayerRG16 would be 16, etc.
| [in] | aPixelType | Pixel type. |
|
pure virtual |
|
pure virtual |
Effective image size.
Uses same size x and y as GetImageSize() but excludes all padding.
|
pure virtual |
Returns the maximum chunk length possible for the currently allocated memory vs image attributes.
|
static |
Static method returning the pixel size in bits for a specific pixel type.
| [in] | aPixelType | Pixel type. |
|
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.
|
pure virtual |
Returns the watermark tag.
A watermark is applied onto the image if the system is not provided with a valid eBUS receiver license.
Use this method to check if a watermark was applied to the image or not.
|
pure virtual |
Data overrun status bit.
|
pure virtual |
End of Frame by Line Count status bit.
|
pure virtual |
If true, the grabber (on the device) was missing at least one line when the frame was grabbed.
|
pure virtual |
Image dropped status bit.
|
pure virtual |
The image contained in the PvImage is an interlaced Even field.
|
pure virtual |
The image contained in the PvImage is an interlaced Odd field.
|
pure virtual |
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.
|
static |
Static method returning whether a pixel type is color or not.
| [in] | aPixelType | Pixel type. |
|
static |
Static method returning whether a pixel type is higher than 8-bit per channel or not.
10, 12, 14 and 16-bit pixel type are considered high resolution. RGB8 counts as 8 so high resolution here means per channel.
| [in] | aPixelType | Pixel type. |
|
static |
Static method returning a string representation of a pixel type.
| [in] | aPixelType | Pixel type. |
|
pure virtual |
Simulates the EOFByLineCount used by Pleora video interfaces.
| [in] | aValue | True to enable, false to disable |
|
pure virtual |
Simulates the FullLineMissing used by Pleora video interfaces.
| [in] | aValue | True to enable, false to disable |
| [in] | aValue | The Actual line number in the image. |
|
pure virtual |
Sets the Offset X attribute of the image.
| [in] | aValue | New value. |
|
pure virtual |
Sets the Offset X attribute of the image.
| [in] | aValue | New value. |
Copyright (c) 2002-2024 Pleora Technologies Inc.
www.pleora.com