Pleora Technologies Inc. eBUS SDK v7.0.1.7536 API



PvImage.h
1 // *****************************************************************************
2 //
3 // Copyright (c) 2010, Pleora Technologies Inc., All rights reserved.
4 //
5 // *****************************************************************************
6 
7 #ifndef __PVIMAGE_H__
8 #define __PVIMAGE_H__
9 
10 #include <PvPixelUtil.h>
11 
12 
13 class PvBuffer;
15 
20 class PV_BUFFER_API IPvImage
21 {
22 public:
23 
24  virtual ~IPvImage() {}
25 
31  virtual const uint8_t *GetDataPointer() const = 0;
32 
41  virtual uint8_t *GetDataPointer() = 0;
42 
51  virtual uint32_t GetImageSize() const = 0;
52 
58  virtual uint32_t GetWidth() const = 0;
59 
65  virtual uint32_t GetHeight() const = 0;
66 
72  virtual PvPixelType GetPixelType() const = 0;
73 
79  virtual uint32_t GetOffsetX() const = 0;
80 
86  virtual uint32_t GetOffsetY() const = 0;
87 
101  virtual uint16_t GetPaddingX() const = 0;
102 
114  virtual uint16_t GetPaddingY() const = 0;
115 
126  virtual uint64_t GetBlockID() const = 0;
127 
143  virtual uint64_t GetTimestamp() const = 0;
144 
150  virtual uint64_t GetReceptionTime() const = 0;
151 
152 };
153 
154 
174 class PV_BUFFER_API PvImage
175  : public IPvImage
176 {
177 public:
178 
184  virtual uint32_t GetMaximumChunkLength() const = 0;
185 
206  virtual uint32_t GetRequiredSize() const = 0;
207 
215  virtual uint32_t GetEffectiveImageSize() const = 0;
216 
222  virtual void SetOffsetX( uint32_t aValue ) = 0;
223 
229  virtual void SetOffsetY( uint32_t aValue ) = 0;
230 
231  virtual bool IsAllocated() const = 0;
232  virtual bool IsAttached() const = 0;
233 
251  virtual PvResult Alloc( uint32_t aSizeX, uint32_t aSizeY, PvPixelType aPixelType, uint16_t aPaddingX = 0, uint16_t aPaddingY = 0, uint32_t aMaximumChunkLength = 0 ) = 0;
252 
258  virtual void Free() = 0;
259 
280  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;
281 
291  virtual uint8_t *Detach() = 0;
292 
298  virtual bool IsPartialLineMissing() const = 0;
299 
305  virtual bool IsFullLineMissing() const = 0;
306 
313  virtual void SetFullLineMissing( bool aValue, uint32_t aLineNumber ) = 0;
314 
320  virtual void SetEOFByLineCount( bool aValue = true ) = 0;
321 
329  virtual void ClearEOFStatus() = 0;
330 
336  virtual bool IsEOFByLineCount() const = 0;
337 
343  virtual bool IsInterlacedEven() const = 0;
344 
350  virtual bool IsInterlacedOdd() const = 0;
351 
357  virtual bool IsImageDropped() const = 0;
358 
364  virtual bool IsDataOverrun() const = 0;
365 
371  virtual PvBuffer *GetBuffer() = 0;
372 
382  virtual bool HasWatermark() const = 0;
383 
384 private:
385 
386  friend class PvTruesenseConverter;
387 
388 };
389 
390 
391 #endif
PvPixelType
Definition: PvPixelType.h:51
Generic image interface.
Definition: PvImage.h:21
virtual uint8_t * GetDataPointer()=0
Get the image's data pointer.
virtual uint32_t GetOffsetY() const =0
Get the image's vertical offset.
virtual uint32_t GetHeight() const =0
Get the image's height.
virtual const uint8_t * GetDataPointer() const =0
Get the image's data pointer.
virtual uint16_t GetPaddingX() const =0
Get the horizontal image padding.
virtual uint64_t GetBlockID() const =0
Return the block ID.
virtual uint64_t GetTimestamp() const =0
Get the image's timestamp.
virtual uint32_t GetImageSize() const =0
Actual image size within the payload or buffer.
virtual uint32_t GetWidth() const =0
Get the image's width.
virtual PvPixelType GetPixelType() const =0
The buffer's pixel type.
virtual uint32_t GetOffsetX() const =0
Get the image's horizontal offset.
virtual uint16_t GetPaddingY() const =0
Get the vertical image padding.
virtual uint64_t GetReceptionTime() const =0
Get the buffer's reception timestamp.
Represents a block of GigE Vision or USB3 Vision data in memory.
Definition: PvBuffer.h:111
Image interface to a PvBuffer.
Definition: PvImage.h:176
virtual bool IsInterlacedEven() const =0
The image contained in the PvImage is an interlaced Even field.
virtual bool IsInterlacedOdd() const =0
The image contained in the PvImage is an interlaced Odd field.
virtual bool HasWatermark() const =0
Returns the watermark tag.
virtual bool IsEOFByLineCount() const =0
End of Frame by Line Count status bit.
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.
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.
virtual bool IsImageDropped() const =0
Image dropped status bit.
virtual bool IsDataOverrun() const =0
Data overrun status bit.
virtual bool IsFullLineMissing() const =0
If true, the grabber (on the device) was missing at least one line when the frame was grabbed.
virtual void SetEOFByLineCount(bool aValue=true)=0
Simulates the EOFByLineCount used by Pleora video interfaces.
virtual uint32_t GetEffectiveImageSize() const =0
Effective image size.
virtual uint32_t GetMaximumChunkLength() const =0
Returns the maximum chunk length possible for the currently allocated memory vs image attributes.
virtual void SetOffsetY(uint32_t aValue)=0
Sets the Offset X attribute of the image.
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...
virtual void ClearEOFStatus()=0
Set the EoFByLineCount and FullLineMissing Status of PvImage to the default value false.
virtual void SetOffsetX(uint32_t aValue)=0
Sets the Offset X attribute of the image.
virtual void SetFullLineMissing(bool aValue, uint32_t aLineNumber)=0
Simulates the FullLineMissing used by Pleora video interfaces.
virtual uint8_t * Detach()=0
Releases an attached memory buffer.
virtual void Free()=0
Frees (de-allocates) the buffer's internal memory.
virtual PvBuffer * GetBuffer()=0
Returns the PvBuffer this PvImage belongs to.
virtual uint32_t GetRequiredSize() const =0
Gets the size of buffer required to hold the acquired image.
Result information.
Definition: PvResult.h:30
Converts images from TRUESENSE(TM) to RGB.
Definition: PvTruesenseConverter.h:38

Copyright (c) 2002-2026 Pleora Technologies Inc.
www.pleora.com