for (int ii = 0 ; ii < 2 ; ii ++)
{
m_UniqueCurveFitter[ii]->setFitMode(m_UniqueCurveFitter[ii]->ParametricSpline);
m_UniqueCurveFitter[ii]->setSplineSize(4096);
m_UniqueCurve[ii]->setCurveFitter(m_UniqueCurveFitter[ii]);
}
m_UniqueCurve
[0]->setCurveAttribute
(QwtPlotCurve::Fitted,
true);
m_UniqueCurve
[1]->setCurveAttribute
(QwtPlotCurve::Fitted,
false);
m_UniqueCurve
[0]->setPen
(QColor(Qt
::transparent));
m_UniqueCurve
[1]->setPen
(QColor(Qt
::black));
for ( int i = 0; i < TabX.count() ; i++ )
{
OriginalPoints
+= QPointF(TabX
[i
], TabY
[i
]);
}
InterpolatedPoints= m_RedCurveFitter[1]->fitCurve(points);
m_UniqueCurve[0]->setData(TabX.data(), TabY.data(),TabX.count());
m_UniqueCurve[1]->setData(InterpolatedPoints);
for (int ii = 0 ; ii < 2 ; ii ++)
{
m_UniqueCurve[ii] = new QwtPlotCurve();
m_UniqueCurveFitter[ii] = new QwtSplineCurveFitter();
m_UniqueCurveFitter[ii]->setFitMode(m_UniqueCurveFitter[ii]->ParametricSpline);
m_UniqueCurveFitter[ii]->setSplineSize(4096);
m_UniqueCurve[ii]->setCurveFitter(m_UniqueCurveFitter[ii]);
}
m_UniqueCurve[0]->setCurveAttribute(QwtPlotCurve::Fitted, true);
m_UniqueCurve[1]->setCurveAttribute(QwtPlotCurve::Fitted, false);
m_UniqueCurve[0]->setStyle(QwtPlotCurve::Lines);
m_UniqueCurve[1]->setStyle(QwtPlotCurve::Dots);
m_UniqueCurve[0]->setPen(QColor(Qt::transparent));
m_UniqueCurve[0]->setSymbol(QwtSymbol(QwtSymbol::Ellipse,Qt::gray, QColor(Qt::black), QSize(8,8)));
m_UniqueCurve[1]->setPen(QColor(Qt::black));
QPolygonF OriginalPoints,InterpolatedPoints;
for ( int i = 0; i < TabX.count() ; i++ )
{
OriginalPoints+= QPointF(TabX[i], TabY[i]);
}
InterpolatedPoints= m_RedCurveFitter[1]->fitCurve(points);
m_UniqueCurve[0]->setData(TabX.data(), TabY.data(),TabX.count());
m_UniqueCurve[1]->setData(InterpolatedPoints);
To copy to clipboard, switch view to plain text mode
Bookmarks