KSquare Utilities
ScannerFile.h
Go to the documentation of this file.
1 #if !defined(_SCANNERFILE_)
2 #define _SCANNERFILE_
3 
4 #include <vector>
5 
6 
7 //**************************************************************************
8 //* ScannerFile *
9 //* *
10 //* *
11 //* Base class to be used by different ScanLine buffer formats. *
12 //* *
13 //* <p>Copyright: Copyright (c) 2011</p> *
14 //* <p>Author: Kurt Kramer</p> *
15 //* *
16 //*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *
17 //* *
18 //* *
19 //**************************************************************************
20 
21 #include "GoalKeeper.h"
22 #include "KKBaseTypes.h"
23 #include "KKStr.h"
24 #include "RunLog.h"
25 using namespace KKB;
26 
27 #define MAXLINELEN 4096
28 
29 #include "StartStopPoint.h"
31 
32 
33 namespace KKLSC
34 {
35 
36 #if !defined(_SCANNERFILEENTRY_)
37  class ScannerFileEntry;
39 #endif
40 
41 
42  /**
43  * @class ScannerFile ScannerFile.h base class to be used for all the different Scanner File Formats.
44  */
46  {
47  public:
49 
50  enum class Format
51  {sfSimple,
56  sfUnKnown
57  };
58 
59  typedef enum {ioRead, ioWrite} IOMode;
60 
61 
62  /** Constructor for opening file for reading */
63  ScannerFile (const KKStr& _fileName,
64  RunLog& _log
65  );
66 
67  /** Constructor for opening file for Writing */
68  ScannerFile (const KKStr& _fileName,
69  kkuint32 _pixelsPerScanLine,
70  kkuint32 _frameHeight,
71  RunLog& _log
72  );
73 
74  virtual ~ScannerFile ();
75 
76  virtual kkint32 MemoryConsumedEstimated () const;
77 
78  virtual Format FileFormat () const {return Format::sfUnKnown;}
79 
80  KKStr FileFormatStr () const;
81 
82  virtual void Close ();
83 
84  virtual void Flush ();
85 
86  static
87  const uchar* ConpensationTable (Format format);
88 
90  kkint64 ByteOffsetScanLineZero () const {return byteOffsetScanLineZero;} /**< Byte offset of 1st scan line after header field. */
91  bool Eof () const {return eof;}
92  const KKStr& FileName () const {return fileName;}
93  kkint64 FileSizeInBytes () const {return fileSizeInBytes;} /**< When opening a existing file represents size of file in Bytes. */
94  bool FlatFieldEnabled () const {return flatFieldEnabled;}
97  kkint32 FrameHeight () const {return frameHeight;}
98  uchar* FrameBuffer () const {return frameBuffer;}
99  bool FrameOffsetsLoaded () const {return frameOffsetsLoaded;}
103  kkint32 LargestKnowmFrameNum () const {return ((kkint32)frameOffsets.size () - 1);}
105  kkint32 LastScanLine () const {return lastScanLine;} /**< Last Scan-line read or written. */
106  kkint32 NextScanLine () const {return nextScanLine;} /**< Next scan-line to be read. */
107  bool Opened () const {return opened;}
109  float ScanRate () const {return scanRate;}
110 
111  virtual
112  void ScanRate (float _scanRate);
113 
114 
115 
116  /********************************************************************/
117  /* next several methods support Start-Stop-Point maintenance. */
118  /********************************************************************/
119 
120  /**@brief Adds a Start-Point to the 'StartStopPoints' list. */
121  void AddStartPoint (kkint32 _scanLineNum);
122 
123  /**@brief Adds a Stop-Point to the 'StartStopPoints' list. */
124  void AddStopPoint (kkint32 _scanLineNum);
125 
126  void StartStopPointDelete (kkint32 _scanLineNum);
127 
128  StartStopPointPtr StartStopPointNearestEntry (kkint32 _scanLineNum);
129 
130  StartStopPointPtr StartStopPointPrevEntry (kkint32 _scanLineNum);
131 
132  StartStopPointPtr StartStopPointSuccEntry (kkint32 _scanLineNum);
133 
134  const StartStopPointList& StartStopPoints () const {return startStopPoints;}
135 
136 
137 
138  /**
139  *@brief Returns an array indication the record rate in bytes/sec for specified time-intervals.
140  *@details Each element in the returned array will give the average number of bytes recorded for the time
141  * the corresponding time interval. Array element 0 starts at the beginning of the Scanner file and covers
142  * the number of scan lines required to account for 'intervalSecs' seconds.
143  */
144  VectorFloatPtr RecordRateByTimeIntervals (int intervalSecs);
145 
146 
147  void AddHeaderField (const KKStr& _fieldName,
148  const KKStr& _fieldValue
149  );
150 
151  void AddHeaderFields (const ScannerHeaderFieldsPtr _headerFields);
152 
153  const KKStr& GetValue (const KKStr& fieldName);
154 
155  float GetValueFloat (const KKStr& fieldName);
156 
157 
158 
159 
160  /**
161  *@brief Will update the 'frameOffsets' table by scanning the file from the last known entry until the end of file.
162  *@details It would be best to call this method using a separate thread. The method will utilize synchronization code
163  * to prevent interference with the other access methods such as 'GetNextLine', 'FrameRead', etc. The idea is that
164  * it will not interfere with file positioning.
165  *@param[in] cancelFlag This Boolean variable will be monitored by the method; if it turns true it will terminate
166  * and return immediately.
167  */
168  void BuildFrameOffsets (const volatile bool& cancelFlag);
169 
170 
171  /**
172  *@brief Call this method to Load the FrameOffsets and StartStop points from the index file.
173  *@details This method is also called from 'BuildFrameOffsets',
174  */
175  void LoadIndexFile (bool& successful);
176 
177 
178  /**
179  *@brief Read into frame buffer 'frameNum' and reposition so that next scan-line will be the 1st line in the frame.
180  *@details The purpose of this method is to allow you to get whole frames at a time. Use the access method 'FrameBuffer'
181  * to get a pointer to the contents of the frame retrieved. The next call to 'GetNextLine' will return the first scan
182  * line in frame 'frameNum'.
183  */
184  void FrameRead (kkuint32 frameNum,
185  bool& found
186  );
187 
188 
189  virtual
190  void GetNextLine (uchar* lineBuff,
191  kkuint32 lineBuffSize,
192  kkuint32& lineSize,
193  kkuint32 colCount[],
194  kkuint32& pixelsInRow
195  );
196 
197  void InitiateWritting ();
198 
199  void Reset ();
200 
201  void SkipNextLine ();
202 
203 
204  /**
205  *@brief Repositions the file such that the next call to 'GetNextLine' returns the 'scanLine' scan-line.
206  *@details This method depends on the table'frameOffsets'; it will compute the frame number from the scan line
207  * and use the appropriate entry in 'frameOffsets' to start reading from the beginning of the frame that contains
208  * 'scanLine'. If you select a 'scanLine' that is beyond the known number of scan lines in the scanner file
209  * (see largestKnownScanLine) the eof flag will be set to 'true'.
210  *@param[in] scanLine Scan line to skip to so that the next call to 'GetNextLine' retrieves it.
211  */
212  void SkipToScanLine (kkint32 scanLine);
213 
214 
215  virtual
216  void WriteScanLine (const uchar* buffer,
217  kkuint32 bufferLen
218  );
219 
220  virtual
221  void WriteTextBlock (const uchar* txtBlock,
222  kkuint32 txtBlockLen
223  ) = 0;
224 
225 
226  /**
227  *@brief Writes a 32 bit number into the Scanner File Stream at current location.
228  *@param[in] idNum nNumber that identifies Instrument data, ex: 0 is reserved for Flow Meter Count.
229  *@param[in] scanLineNum Scan-line that 'dataWord' occurred at.
230  *@param[in] dataWord 32 bit number being written.
231  */
232  virtual
233  void WriteInstrumentDataWord (uchar idNum,
234  kkuint32 scanLineNum,
235  WordFormat32Bits dataWord
236  );
237 
238 
239  static
240  Format GuessFormatOfFile (const KKStr& _fileName,
241  RunLog& _log
242  );
243 
244  static
246  RunLog& _log
247  );
248 
249  static
251  Format _format,
252  kkuint32 _pixelsPerScanLine,
253  kkuint32 _frameHeight,
254  RunLog& _log
255  );
256 
257  static
259  const KKStr& _formatStr,
260  kkuint32 _pixelsPerScanLine,
261  kkuint32 _frameHeight,
262  RunLog& _log
263  );
264 
265 
266  static
267  const KKStr& ScannerFileFormatToStr (Format fileFormat);
268 
269  static
270  Format ScannerFileFormatFromStr (const KKStr& fileFormatStr);
271 
272 
273  /**
274  *@brief Retrieves statistics for a specified Scanner File.
275  *@details Will read the header information for the specified scanner file to retrieve
276  * parameters.
277  *@param[in] _scannerFileName Name of scanner file that you want to retrieve parameters for.
278  *@param[out] _headerFields Copy of header fields from Scanner File; caller will own them and
279  * be responsible for deleting them; if != NULL upon call previous
280  * instance will be deleted.
281  *@param[out] _scannerFileFormat Format of scanner file; ex: sf3BitEncoded.
282  *@param[out] _frameHeight Frame height of source camera.
283  *@param[out] _frameWidth Width in pixels of scanner file.
284  *@param[out] _scanRate Scan lines/sec that imagery was acquired at.
285  *@param[out] _successful Indicates if successful in retrieving parameters.
286  *@param[in,out] _log Log file.
287  */
288  static
289  void GetScannerFileParameters (const KKStr& _scannerFileName,
290  ScannerHeaderFieldsPtr& _headerFields,
291  Format& _scannerFileFormat,
292  kkint32& _frameHeight,
293  kkint32& _frameWidth,
294  float& _scanRate,
295  bool& _successful,
296  RunLog& _log
297  );
298 
299 
300 
301  protected:
302  void AllocateFrameBuffer ();
303 
304  void ExtractHeaderField (const KKStr& fieldName,
305  const KKStr& fieldValue
306  );
307  void Open (const KKStr& _fileName);
308 
309 
310  /**
311  *@brief Read in one Scanner File Frame return number of actual scan-lines read.
312  *@details Unless end of file is reached this method will read in 'framHeight' scan-lines.
313  */
314  virtual
315  kkuint32 ReadBufferFrame () = 0;
316 
317 
318  void ReadHeader ();
319 
320 
321  /**
322  *@brief Text messages that are embedded in a scanner file can be reported here.
323  *@details If a derived class/format of 'ScannerFile' contains Text messages, that class
324  * would call this method with the embedded text message. Possible uses of this would be
325  * instrumentation data such as that produced by CTD.
326  */
327  void ReportTextMsg (const char* textBuff,
328  kkint32 numTextBytes
329  );
330 
331  void ReportInstrumentDataWord (uchar idNum,
332  kkuint32 scanLineNum,
333  WordFormat32Bits dataWord
334  );
335 
336 
337  kkint32 FSeek (kkint64 filePos);
338 
339  /**
340  *@brief Write the contents of 'frameBuffer' to he end of the scanner file.
341  *@details Will write the entire contents of 'frameBuffer' to the end of the scanner file.
342  */
343  virtual
344  void WriteBufferFrame () = 0;
345 
346 
347  /**
348  *@brief This method is called before any scanner data is added to the file. It will
349  * write the header information for the file
350  */
351  void WriteHeader ();
352 
353 
354  static
355  void ReadHeaderOneLine (FILE* f,
356  bool& endOfText,
357  KKStr& line
358  );
359 
360  void SkipBytesForward (kkuint32 numBytes);
361 
362  static
364 
365  void CreateGoalie ();
366  kkint64 GetFrameOffset (kkuint32 frameNum);
367  void DetermineFrameOffsetForFrame (kkuint32 frameNum);
368 
369  void UpdateFrameOffset (kkuint32 frameNum,
370  kkuint32 scanLineNum,
371  kkint64 byteOffset
372  );
373 
374  void SaveIndexFile (std::vector<kkint64>& frameOffsets);
375 
376  void AddStartStopEntryToIndexFile (kkint32 scanLineNum,
378  bool deleteEntry
379  );
380 
381 
382  /**
383  *@brief Skip to start of next frame returning back byte offset of that frame.
384  *@details This will be called by the 'UpdateFrameOffset' and 'DetermineFrameOffsetForFrame' methods used
385  * to build the 'frameOffsets' table. It is important that the implementation of this method NOT update
386  * the frameBuffer fields; such as 'frameBuffer', 'frameBufferNextLine', etc .....
387  */
388  virtual
389  kkint64 SkipToNextFrame () = 0;
390 
391 
392  kkint64 byteOffsetScanLineZero; /**< Byte offset of 1st scan line after the header fields. */
393  bool eof;
394  FILE* file;
397  bool flatFieldEnabled; /**< Indicates if Flat-Field-Correction was enabled when file recorded. */
398  kkuint32 frameHeight; /**< Represents the number of scam lines per frame; as stored in the Scanner File. */
399  bool headerDataWritten; /**< Sets to true after all Header data has been written. */
401  IOMode ioMode;
403  kkint32 lastScanLine; /**< The last scan-line read. */
405  kkint32 nextScanLine; /**< The next scan-line that will be returned by 'GetNextLine'. */
406  bool opened;
408  float scanRate; /**< Scan-Lines Per Second. */
409 
410 
411 
412  kkuint32 flowMeterCounter; /**< Updated while reading Scanner Files; whenever InstrumentID == 0 is read
413  * this field will be updated along with 'flowMeterCounterScanLineNum'.
414  */
415 
416  kkuint32 flowMeterCounterScanLine; /**< Represents the scan line that 'flowMeterCounter' was last updated for
417  * while reading a Scanner File.
418  */
419 
420  // 'frameBuffer' fields: The following fields are to be used for buffering ScnnerFile frames, both reading and writing.
421 
422  uchar* frameBuffer; /**< Raw scanner data will be stored here; for both reading and writing on scanner *
423  * file frame data. The frame of the scanner file is not the same as a frame from *
424  * the camera. *
425  */
426 
427  kkint64 frameBufferFileOffsetLast; /**< The byte-offset that the last frameBuffer read or written to starts at. */
428 
429  kkint64 frameBufferFileOffsetNext; /**< The byte-offset of the next frameBuffer to be read or written */
430 
431  bool frameBufferLastReadEof; /**< Indicates that the last call to 'ReadBufferFrame' encountered *
432  * feof (file) which means the next call to 'ReadBufferFrame' should return eof. *
433  */
434 
435  kkuint32 frameBufferLen; /**< Represents the number of bytes being used in 'frameBuffer'; when data is being *
436  * read from a Scanner file you would start reading from this point in the buffer and *
437  * while data is be written it will be added to 'frameBuffer' and this variable will *
438  * be incremented to reflect the new amount occupied. *
439  */
440 
441  kkuint32 frameBufferNextLine; /**< Next scan-line in 'frameBuffer' to either read or write; used to compute the *
442  * byte offset into the buffer. *
443  */
444 
445  kkuint32 frameBufferNumScanLines; /**< The Number of scan-lines that the last call to 'ReadBufferFrame' read. */
446 
447  kkuint32 frameBufferSize; /**< The number of bytes that were allocated to 'frameBuffer'; 'frameBufferLen' *
448  * should never exceed this value. *
449  */
450 
451  kkuint32 frameNumCurLoaded; /**< Indicates the frame that is currently loaded in 'frameBuffer'. */
452 
453 
454  std::vector<kkint64> frameOffsets; /**< Will maintain a list of byte offsets; each entry will be the byte offset for *
455  * its corresponding frame *
456  */
458 
459  bool frameOffsetsLoaded; /**< Indicates if the entire scannerFile has been scanned and all entries in *
460  * frameOffsets are updated. Can only be set to 'true' upon successful completion *
461  * of 'BuildFrameOffsets'. *
462  */
463 
464  GoalKeeperPtr goalie; /**< Used to control access to the buildFrameIndex table. */
465 
466  std::ofstream* indexFile; /**< When writing a Scanner file will also write out a ByteOffset index file to aid
467  * future access to this file.
468  */
470 
472 
473 
474  StartStopPointList startStopPoints; /**< Points where he user does or does-not want to process(Count) are tacked in this
475  * data structure. Each entry is flagged as a Start or Stop point. These entries
476  * are saved in the IndexFile along with the frame offsets table.
477  */
478 
479  }; /* ScannerFile */
480 
481  typedef ScannerFile::ScannerFilePtr ScannerFilePtr;
482 
483 
484 } /* KKLSC */
485 
486 
487 #endif
static ScannerFilePtr CreateScannerFileForOutput(const KKStr &_fileName, const KKStr &_formatStr, kkuint32 _pixelsPerScanLine, kkuint32 _frameHeight, RunLog &_log)
uchar * FrameBuffer() const
Definition: ScannerFile.h:98
kkint32 LastScanLine() const
Definition: ScannerFile.h:105
kkint64 frameBufferFileOffsetLast
Definition: ScannerFile.h:427
kkint32 NextScanLine() const
Definition: ScannerFile.h:106
virtual void WriteTextBlock(const uchar *txtBlock, kkuint32 txtBlockLen)=0
kkuint32 FlowMeterCounterScanLine() const
Definition: ScannerFile.h:96
kkint64 frameBufferFileOffsetNext
Definition: ScannerFile.h:429
const KKStr & FileName() const
Definition: ScannerFile.h:92
void SaveIndexFile(std::vector< kkint64 > &frameOffsets)
StartStopPointPtr StartStopPointPrevEntry(kkint32 _scanLineNum)
void LoadIndexFile(bool &successful)
Call this method to Load the FrameOffsets and StartStop points from the index file.
static const KKStr & ScannerFileFormatToStr(Format fileFormat)
kkint64 fileSizeInBytes
Definition: ScannerFile.h:396
__int32 kkint32
Definition: KKBaseTypes.h:88
Structure used to break 32 bit word into different formats;.
Definition: KKBaseTypes.h:283
ScannerFile * ScannerFilePtr
Definition: ScannerFile.h:48
kkint32 LargestKnownScanLine() const
Definition: ScannerFile.h:104
ScannerHeaderFields * ScannerHeaderFieldsPtr
virtual void WriteInstrumentDataWord(uchar idNum, kkuint32 scanLineNum, WordFormat32Bits dataWord)
Writes a 32 bit number into the Scanner File Stream at current location.
GoalKeeperPtr goalie
Definition: ScannerFile.h:464
void Open(const KKStr &_fileName)
void WriteHeader()
This method is called before any scanner data is added to the file. It will write the header informat...
void AddStartPoint(kkint32 _scanLineNum)
Adds a Start-Point to the &#39;StartStopPoints&#39; list.
void ReportInstrumentDataWord(uchar idNum, kkuint32 scanLineNum, WordFormat32Bits dataWord)
VectorFloatPtr RecordRateByTimeIntervals(int intervalSecs)
Returns an array indication the record rate in bytes/sec for specified time-intervals.
void SkipBytesForward(kkuint32 numBytes)
void AddStopPoint(kkint32 _scanLineNum)
Adds a Stop-Point to the &#39;StartStopPoints&#39; list.
float ScanRate() const
Definition: ScannerFile.h:109
void ReportTextMsg(const char *textBuff, kkint32 numTextBytes)
Text messages that are embedded in a scanner file can be reported here.
kkuint32 frameBufferNumScanLines
Definition: ScannerFile.h:445
virtual kkuint32 ReadBufferFrame()=0
Read in one Scanner File Frame return number of actual scan-lines read.
void FrameRead(kkuint32 frameNum, bool &found)
Read into frame buffer &#39;frameNum&#39; and reposition so that next scan-line will be the 1st line in the f...
void AddHeaderFields(const ScannerHeaderFieldsPtr _headerFields)
kkuint32 frameBufferLen
Definition: ScannerFile.h:435
StartStopPointPtr StartStopPointSuccEntry(kkint32 _scanLineNum)
bool BuildFrameOffsetsRunning() const
Definition: ScannerFile.h:89
kkuint32 frameBufferSize
Definition: ScannerFile.h:447
unsigned __int32 kkuint32
Definition: KKBaseTypes.h:89
bool FrameOffsetsLoaded() const
Definition: ScannerFile.h:99
const KKStr & GetValue(const KKStr &fieldName)
StartStopPointList startStopPoints
Definition: ScannerFile.h:474
__int64 kkint64
Definition: KKBaseTypes.h:90
kkuint32 flowMeterCounterScanLine
Definition: ScannerFile.h:416
KKTHread * KKTHreadPtr
void ExtractHeaderField(const KKStr &fieldName, const KKStr &fieldValue)
Class that keeps track of parameter details of a single scanner file.
ScannerHeaderFieldsPtr headerFields
Definition: ScannerFile.h:400
void AddStartStopEntryToIndexFile(kkint32 scanLineNum, StartStopPoint::StartStopType type, bool deleteEntry)
void DetermineFrameOffsetForFrame(kkuint32 frameNum)
Updates the byte offset for specified entry in &#39;frameOffsets&#39; that is currently flagged with "-1"...
static ScannerFilePtr CreateScannerFile(KKStr _fileName, RunLog &_log)
std::ofstream * indexFile
Definition: ScannerFile.h:466
kkint64 FileSizeInBytes() const
Definition: ScannerFile.h:93
kkuint32 FlowMeterCounter() const
Definition: ScannerFile.h:95
static const KKStr fileFormatOptions[]
Definition: ScannerFile.h:363
KKStr FileFormatStr() const
unsigned char uchar
Unsigned character.
Definition: KKBaseTypes.h:77
static Format ScannerFileFormatFromStr(const KKStr &fileFormatStr)
virtual Format FileFormat() const
Definition: ScannerFile.h:78
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of &#39;std::string&#39; strings.
Definition: KKStr.cpp:1082
virtual ~ScannerFile()
void UpdateFrameOffset(kkuint32 frameNum, kkuint32 scanLineNum, kkint64 byteOffset)
Contains Classes that are specific to Cameras physical characteristics.
virtual void WriteScanLine(const uchar *buffer, kkuint32 bufferLen)
kkint64 GetFrameOffset(kkuint32 frameNum)
virtual void Flush()
ScannerHeaderFieldsPtr HeaderFields() const
Definition: ScannerFile.h:102
kkint64 ByteOffsetScanLineZero() const
Definition: ScannerFile.h:90
virtual void WriteBufferFrame()=0
Write the contents of &#39;frameBuffer&#39; to he end of the scanner file.
kkint64 FrameBufferFileOffsetNext() const
Definition: ScannerFile.h:101
void StartStopPointDelete(kkint32 _scanLineNum)
bool frameOffsetsBuildRunning
Definition: ScannerFile.h:457
bool FlatFieldEnabled() const
Definition: ScannerFile.h:94
bool Opened() const
Definition: ScannerFile.h:107
kkint32 LargestKnowmFrameNum() const
Definition: ScannerFile.h:103
const StartStopPointList & StartStopPoints() const
Definition: ScannerFile.h:134
void BuildFrameOffsets(const volatile bool &cancelFlag)
Will update the &#39;frameOffsets&#39; table by scanning the file from the last known entry until the end of ...
float GetValueFloat(const KKStr &fieldName)
kkuint32 frameNumCurLoaded
Definition: ScannerFile.h:451
static const uchar * ConpensationTable(Format format)
std::vector< kkint64 > frameOffsets
Definition: ScannerFile.h:454
kkuint32 frameHeight
Definition: ScannerFile.h:398
kkuint32 frameBufferNextLine
Definition: ScannerFile.h:441
kkint32 FSeek(kkint64 filePos)
static void ReadHeaderOneLine(FILE *f, bool &endOfText, KKStr &line)
virtual void GetNextLine(uchar *lineBuff, kkuint32 lineBuffSize, kkuint32 &lineSize, kkuint32 colCount[], kkuint32 &pixelsInRow)
kkuint32 pixelsPerScanLine
Definition: ScannerFile.h:407
kkint64 FrameBufferFileOffsetLast() const
Definition: ScannerFile.h:100
void AddHeaderField(const KKStr &_fieldName, const KKStr &_fieldValue)
Used for logging messages.
Definition: RunLog.h:49
class ScannerFileEntry * ScannerFileEntryPtr
Definition: ScannerFile.h:38
static void GetScannerFileParameters(const KKStr &_scannerFileName, ScannerHeaderFieldsPtr &_headerFields, Format &_scannerFileFormat, kkint32 &_frameHeight, kkint32 &_frameWidth, float &_scanRate, bool &_successful, RunLog &_log)
Retrieves statistics for a specified Scanner File.
virtual void ScanRate(float _scanRate)
virtual kkint64 SkipToNextFrame()=0
Skip to start of next frame returning back byte offset of that frame.
kkuint32 PixelsPerScanLine() const
Definition: ScannerFile.h:108
kkint32 FrameHeight() const
Definition: ScannerFile.h:97
void SkipToScanLine(kkint32 scanLine)
Repositions the file such that the next call to &#39;GetNextLine&#39; returns the &#39;scanLine&#39; scan-line...
ScannerFile(const KKStr &_fileName, kkuint32 _pixelsPerScanLine, kkuint32 _frameHeight, RunLog &_log)
kkint32 largestKnownScanLine
Definition: ScannerFile.h:402
static ScannerFilePtr CreateScannerFileForOutput(const KKStr &_fileName, Format _format, kkuint32 _pixelsPerScanLine, kkuint32 _frameHeight, RunLog &_log)
kkint64 byteOffsetScanLineZero
Definition: ScannerFile.h:392
virtual void Close()
bool Eof() const
Definition: ScannerFile.h:91
Class that keeps track of parameter details of a single scanner file.
ScannerFile(const KKStr &_fileName, RunLog &_log)
Definition: ScannerFile.cpp:40
StartStopPointPtr StartStopPointNearestEntry(kkint32 _scanLineNum)
static Format GuessFormatOfFile(const KKStr &_fileName, RunLog &_log)
ScannerFileEntryPtr scannerFileEntry
Definition: ScannerFile.h:471
kkuint32 flowMeterCounter
Definition: ScannerFile.h:412
virtual kkint32 MemoryConsumedEstimated() const
VectorFloat * VectorFloatPtr
Definition: KKBaseTypes.h:157