SomeName::Line Class Reference

#include <Line.h>

Inheritance diagram for SomeName::Line:

SomeName::Element SomeName::Root List of all members.

Detailed Description

A sub-region of a Page (or Region) consisting entirely of Glyphs.

My be sub-divided into Words that contain Glyphs, but may also contain only Glyphs. Line classes are not strictly necessary during character identification, but are useful at least during output to ensure that characters on the same line in the input image are placed on the same text line in output.

Whether Lines are detected first (and then analyed to detect Glyphs), or whether Glyphs are detected first (and then grouped to form Lines) is part of the partitioning process, and is under client control.


Public Member Functions

 Line (Element *parent, const Coord &topleft, const Coord &bottomright, u2 bottom, u2 base, u2 mid, u2 top)
const u2 & topY () const
const u2 & midY () const
const u2 & baseY () const
const u2 & bottomY () const
virtual int type () const
virtual LineasLine ()
virtual const LineasLine () const
virtual void printSummary (std::ostream &os=std::cerr, const std::string &indent="", int index=-1) const
 Print out information about this Element.

Static Public Member Functions

static void test (int argc=0, const char *argv[]=NULL)

Protected Member Functions

void topYIs (const u2 &topY)
void midYIs (const u2 &midY)
void baseYIs (const u2 &baseY)
void bottomYIs (const u2 &bottomY)


Member Function Documentation

virtual Line* SomeName::Line::asLine  )  [inline, virtual]
 

Allows Image instances to be converted to Line instances safely without requiring explicit down-casting.

Reimplemented from SomeName::Element.

void SomeName::Line::test int  argc = 0,
const char *  argv[] = NULL
[static]
 

Unit testing method.

This static method should create instances of the class (and instances of any other class necessary) and perform tests to ensure that all methods within the class are working as expected.

Reimplemented from SomeName::Element.

virtual int SomeName::Line::type  )  const [inline, virtual]
 

Returns an integer establishing how "small" this image type is, relative to other image types. It has nothing to do with width or height, but instead with the conceptual size of the type itself. All instances of a particular subtype will always return the same value. The code is designed so that Glyph returns a larger number than Word, which is larger than Line, which is larger than Region, which is larger than Page. This allows us to perform some sanity checks on hierarchial decompositions to ensure that we don't make silly structures in which Lines have Glyphs as parents, etc.

FUTURE FIX: This method should be pure-virtual, but making it pure-virtual causes failure during compilation due to code in the constructor. Must determine why the compilation error is occuring and resolve it.

Reimplemented from SomeName::Element.


The documentation for this class was generated from the following files:
Generated on Thu Jun 8 11:53:14 2006 for SomeName by  doxygen 1.4.6