![]() |
KSquare Utilities
|
#include <A>
Inheritance diagram for KKLSC::ScannerFileSimple:Public Member Functions | |
| ScannerFileSimple (const KKStr &_fileName, RunLog &_log) | |
| ScannerFileSimple (const KKStr &_fileName, kkuint32 _pixelsPerScanLine, kkuint32 _frameHeight, RunLog &_log) | |
| virtual | ~ScannerFileSimple () |
| virtual Format | FileFormat () const |
| virtual void | WriteTextBlock (const uchar *txtBlock, kkuint32 txtBlockLen) |
Public Member Functions inherited from KKLSC::ScannerFile | |
| ScannerFile (const KKStr &_fileName, RunLog &_log) | |
| ScannerFile (const KKStr &_fileName, kkuint32 _pixelsPerScanLine, kkuint32 _frameHeight, RunLog &_log) | |
| virtual | ~ScannerFile () |
| void | AddHeaderField (const KKStr &_fieldName, const KKStr &_fieldValue) |
| void | AddHeaderFields (const ScannerHeaderFieldsPtr _headerFields) |
| void | AddStartPoint (kkint32 _scanLineNum) |
| Adds a Start-Point to the 'StartStopPoints' list. More... | |
| void | AddStopPoint (kkint32 _scanLineNum) |
| Adds a Stop-Point to the 'StartStopPoints' list. More... | |
| void | BuildFrameOffsets (const volatile bool &cancelFlag) |
| Will update the 'frameOffsets' table by scanning the file from the last known entry until the end of file. More... | |
| bool | BuildFrameOffsetsRunning () const |
| kkint64 | ByteOffsetScanLineZero () const |
| virtual void | Close () |
| bool | Eof () const |
| KKStr | FileFormatStr () const |
| const KKStr & | FileName () const |
| kkint64 | FileSizeInBytes () const |
| bool | FlatFieldEnabled () const |
| kkuint32 | FlowMeterCounter () const |
| kkuint32 | FlowMeterCounterScanLine () const |
| virtual void | Flush () |
| uchar * | FrameBuffer () const |
| kkint64 | FrameBufferFileOffsetLast () const |
| kkint64 | FrameBufferFileOffsetNext () const |
| kkint32 | FrameHeight () const |
| bool | FrameOffsetsLoaded () const |
| void | FrameRead (kkuint32 frameNum, bool &found) |
| Read into frame buffer 'frameNum' and reposition so that next scan-line will be the 1st line in the frame. More... | |
| virtual void | GetNextLine (uchar *lineBuff, kkuint32 lineBuffSize, kkuint32 &lineSize, kkuint32 colCount[], kkuint32 &pixelsInRow) |
| const KKStr & | GetValue (const KKStr &fieldName) |
| float | GetValueFloat (const KKStr &fieldName) |
| ScannerHeaderFieldsPtr | HeaderFields () const |
| void | InitiateWritting () |
| kkint32 | LargestKnowmFrameNum () const |
| kkint32 | LargestKnownScanLine () const |
| kkint32 | LastScanLine () const |
| void | LoadIndexFile (bool &successful) |
| Call this method to Load the FrameOffsets and StartStop points from the index file. More... | |
| virtual kkint32 | MemoryConsumedEstimated () const |
| kkint32 | NextScanLine () const |
| bool | Opened () const |
| kkuint32 | PixelsPerScanLine () const |
| VectorFloatPtr | RecordRateByTimeIntervals (int intervalSecs) |
| Returns an array indication the record rate in bytes/sec for specified time-intervals. More... | |
| void | Reset () |
| float | ScanRate () const |
| virtual void | ScanRate (float _scanRate) |
| void | SkipNextLine () |
| void | SkipToScanLine (kkint32 scanLine) |
| Repositions the file such that the next call to 'GetNextLine' returns the 'scanLine' scan-line. More... | |
| void | StartStopPointDelete (kkint32 _scanLineNum) |
| StartStopPointPtr | StartStopPointNearestEntry (kkint32 _scanLineNum) |
| StartStopPointPtr | StartStopPointPrevEntry (kkint32 _scanLineNum) |
| const StartStopPointList & | StartStopPoints () const |
| StartStopPointPtr | StartStopPointSuccEntry (kkint32 _scanLineNum) |
| virtual void | WriteInstrumentDataWord (uchar idNum, kkuint32 scanLineNum, WordFormat32Bits dataWord) |
| Writes a 32 bit number into the Scanner File Stream at current location. More... | |
| virtual void | WriteScanLine (const uchar *buffer, kkuint32 bufferLen) |
| virtual void | WriteTextBlock (const uchar *txtBlock, kkuint32 txtBlockLen)=0 |
Static Public Member Functions | |
| static const uchar * | CompensationTable () |
Static Public Member Functions inherited from KKLSC::ScannerFile | |
| static const uchar * | ConpensationTable (Format format) |
| static ScannerFilePtr | CreateScannerFile (KKStr _fileName, RunLog &_log) |
| static ScannerFilePtr | CreateScannerFileForOutput (const KKStr &_fileName, Format _format, kkuint32 _pixelsPerScanLine, kkuint32 _frameHeight, RunLog &_log) |
| static ScannerFilePtr | CreateScannerFileForOutput (const KKStr &_fileName, const KKStr &_formatStr, kkuint32 _pixelsPerScanLine, kkuint32 _frameHeight, RunLog &_log) |
| 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. More... | |
| static Format | GuessFormatOfFile (const KKStr &_fileName, RunLog &_log) |
| static Format | ScannerFileFormatFromStr (const KKStr &fileFormatStr) |
| static const KKStr & | ScannerFileFormatToStr (Format fileFormat) |
Protected Member Functions | |
| virtual kkuint32 | ReadBufferFrame () |
| Read in one Scanner File Frame return number of actual scan-lines read. More... | |
| virtual kkint64 | SkipToNextFrame () |
| Skip to start of next frame returning back byte offset of that frame. More... | |
| virtual void | WriteBufferFrame () |
| Write the contents of 'frameBuffer' to he end of the scanner file. More... | |
Protected Member Functions inherited from KKLSC::ScannerFile | |
| void | AddStartStopEntryToIndexFile (kkint32 scanLineNum, StartStopPoint::StartStopType type, bool deleteEntry) |
| void | AllocateFrameBuffer () |
| void | CreateGoalie () |
| void | DetermineFrameOffsetForFrame (kkuint32 frameNum) |
| Updates the byte offset for specified entry in 'frameOffsets' that is currently flagged with "-1". More... | |
| void | ExtractHeaderField (const KKStr &fieldName, const KKStr &fieldValue) |
| kkint32 | FSeek (kkint64 filePos) |
| kkint64 | GetFrameOffset (kkuint32 frameNum) |
| void | Open (const KKStr &_fileName) |
| void | ReadHeader () |
| void | ReportInstrumentDataWord (uchar idNum, kkuint32 scanLineNum, WordFormat32Bits dataWord) |
| void | ReportTextMsg (const char *textBuff, kkint32 numTextBytes) |
| Text messages that are embedded in a scanner file can be reported here. More... | |
| void | SaveIndexFile (std::vector< kkint64 > &frameOffsets) |
| void | SkipBytesForward (kkuint32 numBytes) |
| void | UpdateFrameOffset (kkuint32 frameNum, kkuint32 scanLineNum, kkint64 byteOffset) |
| void | WriteHeader () |
| This method is called before any scanner data is added to the file. It will write the header information for the file. More... | |
simple format where each scan line is stored without any encoding or compression.
Definition at line 11 of file ScannerFileSimple.h.
| KKLSC::ScannerFileSimple::ScannerFileSimple | ( | const KKStr & | _fileName, |
| RunLog & | _log | ||
| ) |
Constructor for opening file for reading
| KKLSC::ScannerFileSimple::ScannerFileSimple | ( | const KKStr & | _fileName, |
| kkuint32 | _pixelsPerScanLine, | ||
| kkuint32 | _frameHeight, | ||
| RunLog & | _log | ||
| ) |
Constructor for opening file for Writing
|
virtual |
Definition at line 54 of file ScannerFileSimple.cpp.
|
static |
Definition at line 137 of file ScannerFileSimple.cpp.
References KKB::GlobalGoalKeeper::EndBlock(), and KKB::GlobalGoalKeeper::StartBlock().
Referenced by KKLSC::ScannerFile::ConpensationTable().
|
inlinevirtual |
Reimplemented from KKLSC::ScannerFile.
Definition at line 30 of file ScannerFileSimple.h.
References KKLSC::ScannerFile::sfSimple.
|
protectedvirtual |
Read in one Scanner File Frame return number of actual scan-lines read.
Unless end of file is reached this method will read in 'framHeight' scan-lines.
Implements KKLSC::ScannerFile.
Definition at line 63 of file ScannerFileSimple.cpp.
References KKLSC::ScannerFile::file, KKLSC::ScannerFile::frameBufferFileOffsetLast, KKLSC::ScannerFile::frameBufferFileOffsetNext, KKLSC::ScannerFile::frameBufferLen, KKLSC::ScannerFile::frameBufferNextLine, KKB::osFTELL(), and KKLSC::ScannerFile::pixelsPerScanLine.
|
protectedvirtual |
Skip to start of next frame returning back byte offset of that frame.
This will be called by the 'UpdateFrameOffset' and 'DetermineFrameOffsetForFrame' methods used to build the 'frameOffsets' table. It is important that the implementation of this method NOT update the frameBuffer fields; such as 'frameBuffer', 'frameBufferNextLine', etc .....
Implements KKLSC::ScannerFile.
Definition at line 82 of file ScannerFileSimple.cpp.
References KKLSC::ScannerFile::file, KKLSC::ScannerFile::frameBufferSize, and KKB::osFTELL().
|
protectedvirtual |
Write the contents of 'frameBuffer' to he end of the scanner file.
Will write the entire contents of 'frameBuffer' to the end of the scanner file.
Implements KKLSC::ScannerFile.
Definition at line 100 of file ScannerFileSimple.cpp.
References KKLSC::ScannerFile::file, KKLSC::ScannerFile::fileSizeInBytes, KKLSC::ScannerFile::frameBufferFileOffsetLast, KKLSC::ScannerFile::frameBufferFileOffsetNext, KKLSC::ScannerFile::frameBufferNextLine, KKLSC::ScannerFile::frameBufferSize, KKB::osFTELL(), and KKLSC::ScannerFile::pixelsPerScanLine.
Definition at line 125 of file ScannerFileSimple.cpp.