ccmain/expandblob.h File Reference

#include "tessclas.h"

Go to the source code of this file.

Functions


Function Documentation

void free_blob ( register TBLOB blob  ) 

Frees the blob and everything it is connected to, i.e. outlines, nodes, edgepts, bytevecs, ratings etc

Definition at line 28 of file expandblob.cpp.

References free_tree(), NULL, and oldblob().

00029                                      {
00030   if (blob == NULL)
00031     return;                      /*duff blob */
00032   free_tree (blob->outlines);    /*do the tree of outlines */
00033   oldblob(blob);  /*free the actual blob */
00034 }

void free_loop ( register EDGEPT startpt  ) 

Frees all the elements of the closed loop starting at startpt

Definition at line 71 of file expandblob.cpp.

References NULL, and oldedgept().

Referenced by free_outline().

00072                                          {
00073   register EDGEPT *edgept;       /*current point */
00074 
00075   if (startpt == NULL)
00076     return;
00077   edgept = startpt;
00078   do {
00079     edgept = oldedgept (edgept); /*free it and move on */
00080   }
00081   while (edgept != startpt);
00082 }

void free_outline ( register TESSLINE outline  ) 

Frees an outline and anything connected to it

Definition at line 55 of file expandblob.cpp.

References free_loop(), memfree(), NULL, and oldoutline.

00056                                               {
00057   if (outline->compactloop != NULL)
00058                                  /*no compact loop */
00059       memfree (outline->compactloop);
00060 
00061   if (outline->loop != NULL)
00062     free_loop (outline->loop);
00063 
00064   oldoutline(outline);
00065 }

void free_tree ( register TESSLINE outline  ) 

Frees the current outline and then its sub-tree

Definition at line 40 of file expandblob.cpp.

References free_outline(), free_tree(), and NULL.

00041                                            {
00042   if (outline == NULL)
00043     return;                      /*duff outline */
00044   if (outline->next != NULL)
00045     free_tree (outline->next);
00046   if (outline->child != NULL)
00047     free_tree (outline->child);  /*and sub-tree */
00048   free_outline(outline);  /*free the outline */
00049 }


Generated on Wed Feb 28 19:49:14 2007 for Tesseract by  doxygen 1.5.1