Process QImage into QPixmap, removing the grid lines.
56{
58 <<
" transformationIsDefined=" << (transformation.
transformIsDefined() ?
"true" :
"false")
60
61 QImage image = imageBefore;
62
63
65
66
69
70 double yGraphMin = modelGridRemoval.
startY();
71 double yGraphMax = modelGridRemoval.
stopY();
72 for (
int i = 0; i < modelGridRemoval.
countX(); i++) {
73 double xGraph = modelGridRemoval.
startX() + i * modelGridRemoval.
stepX();
74
75
76 QPointF posScreenMin, posScreenMax;
78 yGraphMin),
79 posScreenMin);
81 yGraphMax),
82 posScreenMax);
83
84 removeLine (posScreenMin,
85 posScreenMax,
86 image,
87 modelGridRemoval,
88 gridHealers);
89 }
90
91 double xGraphMin = modelGridRemoval.
startX();
92 double xGraphMax = modelGridRemoval.
stopX();
93 for (
int j = 0; j < modelGridRemoval.
countY(); j++) {
94 double yGraph = modelGridRemoval.
startY() + j * modelGridRemoval.
stepY();
95
96
97 QPointF posScreenMin, posScreenMax;
99 yGraph),
100 posScreenMin);
102 yGraph),
103 posScreenMax);
104
105 removeLine (posScreenMin,
106 posScreenMax,
107 image,
108 modelGridRemoval,
109 gridHealers);
110 }
111
112
113 GridHealers::iterator itr;
114 for (itr = gridHealers.begin(); itr != gridHealers.end(); itr++) {
115 GridHealerAbstractBase *gridHealer = *itr;
116 gridHealer->
healed (image);
117 delete gridHealer;
118 }
119 }
120
121 return QPixmap::fromImage (image);
122}
QList< GridHealerAbstractBase * > GridHealers
Storage of GridHealer instances.
log4cpp::Category * mainCat
bool removeDefinedGridLines() const
Get method for removing defined grid lines.
double stopX() const
Get method for x stop.
double startX() const
Get method for x start.
double stopY() const
Get method for y stop.
double stepX() const
Get method for x step.
double stepY() const
Get method for y step.
int countY() const
Get method for y count.
int countX() const
Get method for x count.
double startY() const
Get method for y start.
void healed(QImage &image)
Return healed image after grid removal.
#define LOG4CPP_INFO_S(logger)