1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
.TH "QwtWeedingCurveFitter" 3 "Thu Dec 11 2014" "Version 6.1.2" "Qwt User's Guide" \" -*- nroff -*-
.ad l
.nh
.SH NAME
QwtWeedingCurveFitter \-
.PP
A curve fitter implementing Douglas and Peucker algorithm\&.
.SH SYNOPSIS
.br
.PP
.PP
\fC#include <qwt_curve_fitter\&.h>\fP
.PP
Inherits \fBQwtCurveFitter\fP\&.
.SS "Public Member Functions"
.in +1c
.ti -1c
.RI "\fBQwtWeedingCurveFitter\fP (double \fBtolerance\fP=1\&.0)"
.br
.ti -1c
.RI "virtual \fB~QwtWeedingCurveFitter\fP ()"
.br
.RI "\fIDestructor\&. \fP"
.ti -1c
.RI "void \fBsetTolerance\fP (double)"
.br
.ti -1c
.RI "double \fBtolerance\fP () const "
.br
.ti -1c
.RI "void \fBsetChunkSize\fP (uint)"
.br
.ti -1c
.RI "uint \fBchunkSize\fP () const "
.br
.ti -1c
.RI "virtual QPolygonF \fBfitCurve\fP (const QPolygonF &) const "
.br
.in -1c
.SS "Additional Inherited Members"
.SH "Detailed Description"
.PP
A curve fitter implementing Douglas and Peucker algorithm\&.
The purpose of the Douglas and Peucker algorithm is that given a 'curve' composed of line segments to find a curve not too dissimilar but that has fewer points\&. The algorithm defines 'too dissimilar' based on the maximum distance (tolerance) between the original curve and the smoothed curve\&.
.PP
The runtime of the algorithm increases non linear ( worst case O( n*n ) ) and might be very slow for huge polygons\&. To avoid performance issues it might be useful to split the polygon ( \fBsetChunkSize()\fP ) and to run the algorithm for these smaller parts\&. The disadvantage of having no interpolation at the borders is for most use cases irrelevant\&.
.PP
The smoothed curve consists of a subset of the points that defined the original curve\&.
.PP
In opposite to \fBQwtSplineCurveFitter\fP the Douglas and Peucker algorithm reduces the number of points\&. By adjusting the tolerance parameter according to the axis scales \fBQwtSplineCurveFitter\fP can be used to implement different level of details to speed up painting of curves of many points\&.
.SH "Constructor & Destructor Documentation"
.PP
.SS "QwtWeedingCurveFitter::QwtWeedingCurveFitter (doubletolerance = \fC1\&.0\fP)"
Constructor
.PP
\fBParameters:\fP
.RS 4
\fItolerance\fP Tolerance
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetTolerance()\fP, \fBtolerance()\fP
.RE
.PP
.SH "Member Function Documentation"
.PP
.SS "uint QwtWeedingCurveFitter::chunkSize () const"
.PP
\fBReturns:\fP
.RS 4
Maximum for the number of points passed to a run of the algorithm - or 0, when unlimited
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetChunkSize()\fP
.RE
.PP
.SS "QPolygonF QwtWeedingCurveFitter::fitCurve (const QPolygonF &points) const\fC [virtual]\fP"
.PP
\fBParameters:\fP
.RS 4
\fIpoints\fP Series of data points
.RE
.PP
\fBReturns:\fP
.RS 4
Curve points
.RE
.PP
.PP
Implements \fBQwtCurveFitter\fP\&.
.SS "void QwtWeedingCurveFitter::setChunkSize (uintnumPoints)"
Limit the number of points passed to a run of the algorithm
.PP
The runtime of the Douglas Peucker algorithm increases non linear with the number of points\&. For a chunk size > 0 the polygon is split into pieces passed to the algorithm one by one\&.
.PP
\fBParameters:\fP
.RS 4
\fInumPoints\fP Maximum for the number of points passed to the algorithm
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBchunkSize()\fP
.RE
.PP
.SS "void QwtWeedingCurveFitter::setTolerance (doubletolerance)"
Assign the tolerance
.PP
The tolerance is the maximum distance, that is acceptable between the original curve and the smoothed curve\&.
.PP
Increasing the tolerance will reduce the number of the resulting points\&.
.PP
\fBParameters:\fP
.RS 4
\fItolerance\fP Tolerance
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBtolerance()\fP
.RE
.PP
.SS "double QwtWeedingCurveFitter::tolerance () const"
.PP
\fBReturns:\fP
.RS 4
Tolerance
.RE
.PP
\fBSee Also:\fP
.RS 4
\fBsetTolerance()\fP
.RE
.PP
.SH "Author"
.PP
Generated automatically by Doxygen for Qwt User's Guide from the source code\&.
|