KSquare Utilities
ScannerFrame.h
Go to the documentation of this file.
1 #if !defined(_SCANNERFRAME_)
2 #define _SCANNERFRAME_
3 
4 
5 #include "ScannerClock.h"
6 
7 
8 namespace KKLSC
9 {
10  /**
11  *@brief Used to buffer one Frame of Scanner Data for use by 'ScannerFileBuffered'.
12  *@details Each access to 'ScanLines' will cause the 'time' variable to increment by one. This will
13  * allow the 'ScannerFleBufered' class know how old its Buffered frames are. With this knowledge it
14  * will be able to keep the more currently accessed frames in memory.
15  */
17  {
18  public:
20 
21 
22  /**
23  *@brief Construct a frame with the dimensions (Height = _scanLinesPerFrame) and (Width = _pixelsPerScanLine).
24  *@param[in] _clock A ScannerClock instance that is shared by all instances of 'ScannerFrame' that are used by the same instance of 'ScannerFleBuffered'.
25  *@param[in] _scanLinesPerFrame Height of the frame.
26  *@param[in] _pixelsPerScanLine Width of the frame.
27  */
28  ScannerFrame (ScannerClockPtr _clock,
29  kkint32 _scanLinesPerFrame,
30  kkint32 _pixelsPerScanLine
31  );
32 
33  ~ScannerFrame ();
34 
35  kkint32 FrameNum () const {return frameNum;}
36  uchar** ScanLines (); /**< Will return scan-lines and increment 'time' by one. */
37  kkint32 ScanLineFirst () const {return scanLineFirst;}
38  kkint32 ScanLineLast () const {return scanLineLast;}
39  kkint32 Time () const {return time;} /**< The higher 'time' the more recently this frame has been accessed. */
40 
41 
42  void FrameNum (kkint32 _frameNum) {frameNum = _frameNum;}
43  void ScanLines (uchar** _scanLines);
44  void ScanLineFirst (kkint32 _scanLineFirst) {scanLineFirst = _scanLineFirst;}
45  void ScanLineLast (kkint32 _scanLineLast) {scanLineLast = _scanLineLast;}
46  void Time (kkint32 _time) {time = _time;}
47 
48 
49  private:
50  uchar** AllocateFrameArray ();
51 
52  ScannerClockPtr clock;
53  kkint32 frameNum;
54  kkint32 height;
55  uchar** scanLines;
56  kkint32 scanLineFirst;
57  kkint32 scanLineLast;
58  kkint32 time;
59  kkint32 width;
60  }; /* ScannerFrame */
61 
62  typedef ScannerFrame::ScannerFramePtr ScannerFramePtr;
63 }
64 
65 #endif
void ScanLines(uchar **_scanLines)
__int32 kkint32
Definition: KKBaseTypes.h:88
kkint32 Time() const
Definition: ScannerFrame.h:39
void ScanLineLast(kkint32 _scanLineLast)
Definition: ScannerFrame.h:45
unsigned char uchar
Unsigned character.
Definition: KKBaseTypes.h:77
void Time(kkint32 _time)
Definition: ScannerFrame.h:46
Contains Classes that are specific to Cameras physical characteristics.
ScannerFrame * ScannerFramePtr
Definition: ScannerFrame.h:19
void ScanLineFirst(kkint32 _scanLineFirst)
Definition: ScannerFrame.h:44
kkint32 ScanLineFirst() const
Definition: ScannerFrame.h:37
kkint32 FrameNum() const
Definition: ScannerFrame.h:35
ScannerFrame(ScannerClockPtr _clock, kkint32 _scanLinesPerFrame, kkint32 _pixelsPerScanLine)
Construct a frame with the dimensions (Height = _scanLinesPerFrame) and (Width = _pixelsPerScanLine)...
void FrameNum(kkint32 _frameNum)
Definition: ScannerFrame.h:42
Used to buffer one Frame of Scanner Data for use by &#39;ScannerFileBuffered&#39;.
Definition: ScannerFrame.h:16
kkint32 ScanLineLast() const
Definition: ScannerFrame.h:38