src/ccstruct/seam.cpp
void SEAM::UndoSeam(TBLOB *blob, TBLOB *other_blob) const {
  if (blob->outlines == nullptr) {
    blob->outlines = other_blob->outlines;
    other_blob->outlines = nullptr;
  }

  TESSLINE *outline = blob->outlines;
  while (outline->next) {
    outline = outline->next;
  }
  outline->next = other_blob->outlines;
  other_blob->outlines = nullptr;
  delete other_blob;

  for (int s = 0; s < num_splits_; ++s) {
    splits_[s].UnsplitOutlineList(blob);
  }
  blob->ComputeBoundingBoxes();
  blob->EliminateDuplicateOutlines();
}
// Undoes ApplySeam by removing the seam between these two blobs.
// Produces one blob as a result, and deletes other_blob.
Undoes ApplySeam by removing the seam between these two blobs.
Produces one blob as a result, and deletes other_blob.
Undoes ApplySeam by removing the seam between these two blobs . Produces one blob as a result and deletes other_blob .
void SEAM::UndoSeam(TBLOB *blob, TBLOB *other_blob) const {
  if (blob->outlines == nullptr) {
    blob->outlines = other_blob->outlines;
    other_blob->outlines = nullptr;
  }
  TESSLINE *outline = blob->outlines;
  while (outline->next) {
    outline = outline->next;
  }
  outline->next = other_blob->outlines;
  other_blob->outlines = nullptr;
  delete other_blob;
  for (int s = 0; s < num_splits_; ++s) {
    splits_[s].UnsplitOutlineList(blob);
  }
  blob->ComputeBoundingBoxes();
  blob->EliminateDuplicateOutlines();
}
void SEAM :: UndoSeam ( TBLOB * blob , TBLOB * other_blob ) const { if ( blob -> outlines == nullptr ) { blob -> outlines = other_blob -> outlines ; other_blob -> outlines = nullptr ; } TESSLINE * outline = blob -> outlines ; while ( outline -> next ) { outline = outline -> next ; } outline -> next = other_blob -> outlines ; other_blob -> outlines = nullptr ; delete other_blob ; for ( int s = 0 ; s < num_splits_ ; ++ s ) { splits_ [ s ] . UnsplitOutlineList ( blob ) ; } blob -> ComputeBoundingBoxes ( ) ; blob -> EliminateDuplicateOutlines ( ) ; }
Undoes ApplySeam by removing the seam between these two blobs.
Undoes ApplySeam by removing the seam between these two blobs .