Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

DLSegmentation Class Reference

#include <DLSegmentation.h>

List of all members.

Public Member Functions

 DLSegmentation ()
 DLSegmentation (const string &segmentationID)
 DLSegmentation (DLPage *parentPage, const string &segmentationID)
virtual ~DLSegmentation ()
bool operator== (const DLSegmentation &right)
int dlGetPageWidth () const
int dlGetPageHeight () const
int dlGetNrOfZones () const
bool dlHasZones ()
void dlAppendZone (DLZone &segZone)
void dlAppendZoneList (list< DLZone * > zoneList)
void dlInsertZone (DLZone &segZone, int cursorPosition)
void dlInsertZoneList (list< DLZone * > zoneList, int cursorPosition)
void dlDeleteZone (int cursorPosition)
void dlDeleteZone (DLZone &deletedZone)
void dlClearZones ()
const DLImagedlGetPageImage () const
void dlPropagateSegmentationPointer ()
bool dlCheckPageImageData () const

Public Attributes

string segID
DLTagList segTags
list< DLZonesegZones

Protected Member Functions

bool dlCheckSegmentationPointer ()
bool dlIsWithinPageBoundaries (int pageWidth, int pageHeight)

Protected Attributes

DLPagesegPage

Friends

class DLPage


Detailed Description

The DLSegmentation class represents an independent hierarchy of DLZones. The root of this DLZone hierarchy is a list of DLZones, each possibly has its own child zones, further expanding this dynamic tree structure. In the DocLib document hierarchy, each DLPage object contains a list of DLSegmentations. The DLSegmentation class provides a necessary level of abstraction that enables multiple sets of segmented output contained in a DLPage object. A DLSegmentation object can be a complete DLZone hierarchy of segmented output from Docstrum or a hierarchy of DLZones of logos, stamps, signatures and textlines etc. A DLSegmentation object contains a segmentation ID and a dynamic attribute list the developer can use to store self-defined attributes. It provides functions for appending, inserting, or deleting zones in the segmentation. In addition, it provides methods for accessing page information, e.g. width, height. In particular, it provides a method for returning the associated page image as a DLImage object.


Constructor & Destructor Documentation

DLSegmentation::DLSegmentation  ) 
 

DLSegmentation Constructor

DLSegmentation::DLSegmentation const string &  segmentationID  ) 
 

DLSegmentation Constructor

Parameters:
segmentationID string ID of the DLSegmentation

DLSegmentation::DLSegmentation DLPage parentPage,
const string &  segmentationID
 

DLSegmentation Constructor

Parameters:
parentPage DLPage reference to the DLPage
segmentationID string ID of the DLSegmentation

virtual DLSegmentation::~DLSegmentation  )  [virtual]
 

Default DLSegmentation Destructor


Member Function Documentation

void DLSegmentation::dlAppendZone DLZone segZone  ) 
 

Append a new zone to the segmentation at the end of the current list of zones

Parameters:
segZone new zone to be appended

void DLSegmentation::dlAppendZoneList list< DLZone * >  zoneList  ) 
 

Append a list of new zones to the segmentation at the end of the current list

Parameters:
zoneList list of new zones to be appended to the segmentation at the end of the current list

bool DLSegmentation::dlCheckPageImageData  )  const
 

Check whether the page image has been initialized

Returns:
true if the page image has been initialized

bool DLSegmentation::dlCheckSegmentationPointer  )  [protected]
 

Check whether each zone currently in the segmentation has the correct DLSegmentation*.

Returns:
bool true if all the zones in the DLZone hierarchy have the correct DLSegmentation*

void DLSegmentation::dlClearZones  )  [inline]
 

Clear the list of zones in the segmentation

void DLSegmentation::dlDeleteZone DLZone deletedZone  ) 
 

Delete a specific zone from the segmentation

Parameters:
deletedZone zone to be deleted

void DLSegmentation::dlDeleteZone int  cursorPosition  ) 
 

Delete a zone at a given position from the segmentation

Parameters:
cursorPosition position of the zone to be removed from the zone list

int DLSegmentation::dlGetNrOfZones  )  const [inline]
 

Get the number of zones in the segmentation

Returns:
the number of zones in the segmentation

int DLSegmentation::dlGetPageHeight  )  const
 

Get page height

Returns:
page height

const DLImage* DLSegmentation::dlGetPageImage  )  const
 

Get const DLImage* to the page image

Returns:
const DLImage* to the page image

int DLSegmentation::dlGetPageWidth  )  const
 

Get page width

Returns:
page width

bool DLSegmentation::dlHasZones  )  [inline]
 

Check whether the current list of zones in the segmentation is empty

Returns:
true if segmentation contains zones

void DLSegmentation::dlInsertZone DLZone segZone,
int  cursorPosition
 

Insert a new zone to the segmentation at the specified position of the current list

Parameters:
segZone new DLZone to be inserted
cursorPosition cursor position in the current zone list where the new zone is to be inserted int cursorPosition must be between 0 (beginning of the list) and the number of zones currently on the list (end of the list)

void DLSegmentation::dlInsertZoneList list< DLZone * >  zoneList,
int  cursorPosition
 

Insert a list of new zones to the segmentation starting from the specified position in the current list

Parameters:
zoneList list of new DLZone*s to be inserted at the specified cursor position in the current list
cursorPosition position in the current zone list where the new zones are to be inserted int cursorPosition must be between 0 (beginning of the list) and the number of zones currently on the list (end of the list)

bool DLSegmentation::dlIsWithinPageBoundaries int  pageWidth,
int  pageHeight
[protected]
 

Check whether all the zones in the segmentation are within the dimensions of the page

Parameters:
pageWidth width of the page image
pageHeight height of the page image
Returns:
true if all the zones in the segmentation are within the dimensions of the page

void DLSegmentation::dlPropagateSegmentationPointer  ) 
 

Propagate the DLSegmentation* down to all the zones in this segmentation and refresh the DLZone* to the parent zone at each level of zone hierarchy

bool DLSegmentation::operator== const DLSegmentation right  ) 
 

Overload equality operator


Friends And Related Function Documentation

friend class DLPage [friend]
 


Member Data Documentation

string DLSegmentation::segID
 

DLPage* DLSegmentation::segPage [protected]
 

DLTagList DLSegmentation::segTags
 

list<DLZone> DLSegmentation::segZones
 


The documentation for this class was generated from the following file:

DocLib is being developed under contract by a collaboration between:
The Laboratory for Language and Media Processing
Unviersity of Maryland, College Park
and
Booz Allen Hamilton

All Rights Reserved, 2003