Engauge Digitizer  2
GridHealerVertical.h
1 /******************************************************************************************************
2  * (C) 2018 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef GRID_HEALER_VERTICAL_H
8 #define GRID_HEALER_VERTICAL_H
9 
10 #include "GridHealerAbstractBase.h"
11 #include "GridIndependentToDependent.h"
12 #include <QImage>
13 
15 class GridLog;
16 class QImage;
17 class QTextStream;
18 
21 {
22  public:
23 
27 
28  virtual void applyMutualPairs (const QImage &image);
29  virtual void doHealingAcrossGaps (QImage &image);
30 
31  private:
33 
35  void doHealingOnBelowAndAboveRangePair (QImage &image,
36  int xBelowStart,
37  int xBelowEnd,
38  int xAboveStart,
39  int xAboveEnd);
40 
42  void doHealingOnBelowRange (QImage &image,
43  int xBelowStart,
44  int xBelowEnd,
45  int maxHorSep);
46 
48  GridIndependentToDependent m_blackPixelsBelow; // (y,x) pairs in line parallel to vertical line on -x side
49  GridIndependentToDependent m_blackPixelsAbove; // (y,x) pairs in line parallel to vertical line on +x side
50 };
51 
52 #endif // GRID_HEALER_VERTICAL_H
Class that does special logging for GridLog and GridRemoval classes.
Definition: GridLog.h:16
virtual void doHealingAcrossGaps(QImage &image)
Guts of the algorithm in which sequences of black pixels across the gap from each other are filled in...
virtual void applyMutualPairs(const QImage &image)
Apply mutual pair points after all grid removal is done.
Class that 'heals' the curves after one grid line has been removed.
GridLog & gridLog()
Logging get method.
Subclass of GridHealerAbstractBase for vertical lines.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
DocumentModelGridRemoval & modelGridRemoval()
DocumentModelGridRemoval get method.