KSquare Utilities
ScannerFileSipper3.h
Go to the documentation of this file.
1 #if !defined(_SCANNERFILESIPPER3)
2 #define _SCANNERFILESIPPER3
3 
4 #include "KKBaseTypes.h"
5 using namespace KKB;
6 
7 namespace KKLSC
8 {
9 
10  /**
11  *@class ScannerFileSipper3 ScannerFileSipper3.h
12  *@brief Used to construct Sipper3 data record stream from scan lines.
13  *@details This class is meant to construct a stream of Sipper3 Records for
14  * a single Scan line. You add all the pixels from a single scan line by
15  * calling 'AddPixel' for each pixel in the scan line. When you are done
16  * Adding all the pixels in a single scan line you call 'Write' to write
17  * all the Sipper3 buffer records to disk. The input range of pixel values
18  * is '0 '- thru '255' where '0' is the background. 'AddPixel' will
19  * convert into 3 bit gray-scale by dividing by 32.
20  */
22  {
23  public:
25 
27 
28  kkint64 BytesWritten () const {return bytesWritten;}
29  kkint32 BytesLastScanLine () const {return bytesLastScanLine;}
30  kkint32 ScanLinesWritten () const {return scanLinesWritten;}
31 
32  void WriteWholeScanLine (ostream& o,
33  uchar* line,
34  kkint32 len
35  );
36 
37  private:
38  // The two variables 'rawPixelsBuffUsed' and 'zerosInARow' specify whether Back Ground Run Length data or
39  // raw data is currently be added. Only one of them can be greater than 0.
40  kkint64 bytesWritten;
41  kkint32 bytesLastScanLine;
42  kkint32 scanLinesWritten;
43  }; /* ScannerFileSipper3 */
44 
46 }
47 
48 
49 
50 #endif
__int32 kkint32
Definition: KKBaseTypes.h:88
kkint32 ScanLinesWritten() const
void WriteWholeScanLine(ostream &o, uchar *line, kkint32 len)
ScannerFileSipper3 * ScannerFileSipper3Ptr
__int64 kkint64
Definition: KKBaseTypes.h:90
KKTHread * KKTHreadPtr
unsigned char uchar
Unsigned character.
Definition: KKBaseTypes.h:77
Contains Classes that are specific to Cameras physical characteristics.
Used to construct Sipper3 data record stream from scan lines.
kkint32 BytesLastScanLine() const