Conjecture::Line Class Reference

#include <Line.h>

Inheritance diagram for Conjecture::Line:

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

Detailed Description

A sub-region of a Page (or Region) containing Glyphs or Words containing Glyphs.

*****************************************************************

NOTE: Whether a Page is segmented into Glyphs first, then into Lines, or Lines first, then Glyphs, depends on the particular segmentation/identification/formatting algorithms used.

ISSUES TO FIX:


Public Member Functions

 Line (Element *parent, const Coord &topleft, const Coord &bottomright, u2 bottom, u2 base, u2 mid, u2 top)
const u2 & midY () const
const u2 & baseY () const
virtual int type () const
const u2 & upperY () const
const u2 & lowerY () const
virtual LineasLine ()
virtual const LineasLine () const
virtual void printSummary (std::ostream &os=std::cerr, const std::string &indent="", int index=-1) const
virtual void writeText (std::ostream &os) const

Static Public Member Functions

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

Protected Member Functions

void midYIs (const u2 &midY)
void baseYIs (const u2 &baseY)
void upperYIs (const u2 &upperY)
void lowerYIs (const u2 &lowerY)


Member Function Documentation

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

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

Reimplemented from Conjecture::Element.

virtual void Conjecture::Line::printSummary std::ostream &  os = std::cerr,
const std::string &  indent = "",
int  index = -1
const [virtual]
 

Print summary of this line

Normally recurses by summarizing Glyphs within it. Specify an index of -2 (or less) to avoid this recursion.

Reimplemented from Conjecture::Element.

void Conjecture::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 Conjecture::Element.

virtual int Conjecture::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 compilation failure (pure virtual method invoked in constructor).

Reimplemented from Conjecture::Element.

virtual void Conjecture::Line::writeText std::ostream &  os  )  const [virtual]
 

Writes a textual representation of this element to given output stream

Reimplemented from Conjecture::Element.


The documentation for this class was generated from the following files:
Generated on Thu Jun 15 19:56:11 2006 for Conjecture by  doxygen 1.4.6