Pleora Technologies Inc. eBUS SDK v5.1.10.4642 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 <PvBufferLib.h>
11 #include <PvPixelType.h>
12 
13 
14 class PvBuffer;
16 
17 namespace PvBufferLib
18 {
19  class Image;
20  class Buffer;
21 }
22 
23 
24 class PV_BUFFER_API PvImage
25 {
26 public:
27 
28  const uint8_t *GetDataPointer() const;
29  uint8_t *GetDataPointer();
30 
31  uint32_t GetWidth() const;
32  uint32_t GetHeight() const;
33  PvPixelType GetPixelType() const;
34  uint32_t GetBitsPerPixel() const;
35 
36  static uint32_t GetPixelSize( PvPixelType aPixelType );
37  static bool IsPixelColor( PvPixelType aPixelType );
38  static bool IsPixelHighRes( PvPixelType aPixelType );
39  static uint32_t GetBitsPerComponent( PvPixelType aPixelType );
40  static PvString PixelTypeToString( PvPixelType aPixelType );
41 
42  uint32_t GetRequiredSize() const;
43  uint32_t GetImageSize() const;
44  uint32_t GetEffectiveImageSize() const;
45 
46  uint32_t GetOffsetX() const;
47  uint32_t GetOffsetY() const;
48  uint16_t GetPaddingX() const;
49  uint16_t GetPaddingY() const;
50 
51  void SetOffsetX( uint32_t aValue );
52  void SetOffsetY( uint32_t aValue );
53 
54  PvResult Alloc( uint32_t aSizeX, uint32_t aSizeY, PvPixelType aPixelType, uint16_t aPaddingX = 0, uint16_t aPaddingY = 0,
55  uint32_t aMaximumChunkLength = 0 );
56  void Free();
57 
58  PvResult Attach( void * aRawBuffer, uint32_t aSizeX, uint32_t aSizeY, PvPixelType aPixelType, uint16_t aPaddingX = 0,
59  uint16_t aPaddingY = 0, uint32_t aMaximumChunkLength = 0 );
60  uint8_t *Detach();
61 
62  bool IsPartialLineMissing() const;
63  bool IsFullLineMissing() const;
64  void SetEOFByLineCount( bool aValue = true );
65  bool IsEOFByLineCount() const;
66  bool IsInterlacedEven() const;
67  bool IsInterlacedOdd() const;
68  bool IsImageDropped() const;
69  bool IsDataOverrun() const;
70 
71  PvBuffer *GetBuffer();
72 
73 protected:
74 
75  PvImage( PvBufferLib::Image *aImage );
76  virtual ~PvImage();
77 
78 private:
79 
80  friend class PvBufferLib::Buffer;
81  friend class PvTruesenseConverter;
82 
83  PvBufferLib::Image * mThis;
84 
85  // Not implemented
86  PvImage( const PvImage & );
87  const PvImage &operator=( const PvImage & );
88 };
89 
90 #endif
String class.
Definition: PvString.h:21
Result information.
Definition: PvResult.h:13
PvPixelType
Definition: PvPixelType.h:51
Converts images from TRUESENSE(TM) to RGB.
Definition: PvTruesenseConverter.h:21
Represents a block of GigE Vision or USB3 Vision data in memory.
Definition: PvBuffer.h:37
Image interface to a PvBuffer.
Definition: PvImage.h:24
Definition: PvBuffer.h:18

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