--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/reference/ocr-simple/RLEPair.h Thu May 18 23:12:51 2006 +0200
@@ -0,0 +1,68 @@
+#ifndef _RLEPair_H
+#define _RLEPair_H
+
+#include "list.h"
+
+
+// Indicates a series of black pixels in a row.
+class RLEPair {
+public:
+
+ RLEPair()
+ :start(0),end(0) {};
+
+ RLEPair(int first, int last, int thisRow)
+ :start(first), end(last), row(thisRow) {};
+ RLEPair(int first, int last)
+ :start(first), end(last), row(-1) {};
+ ~RLEPair() {};
+
+ short int start;
+ short int end;
+ short int row;
+};
+
+
+
+class RLEPairs :public List {
+ public:
+
+ RLEPairs(int row_num);
+ ~RLEPairs();
+
+ // Create RLEPair Representation of contents read from TIFF file
+ void fill(unsigned char * contents, int contentsLength, int contentsRow);
+ int pixelsBetween(int start, int end);
+ int numPixels;
+ void shift(int);
+ void draw_pairs(int y_coord, char* color, double width);
+ void print_pairs();
+
+ RLEPairs * extract(int startcol, int endcol);
+ // create a copy of this from startcol to endcol.
+ // and return pointer to RLEPairs
+
+ void merge(RLEPairs * pairs);
+ // Merges pairs into this.
+
+ private:
+ int row;
+
+
+};
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+