Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
ExportFileRelations.cpp
1 /******************************************************************************************************
2  * (C) 2014 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 #include "CurveConnectAs.h"
8 #include "Document.h"
9 #include "EngaugeAssert.h"
10 #include "ExportFileRelations.h"
11 #include "ExportLayoutFunctions.h"
12 #include "ExportOrdinalsSmooth.h"
13 #include "ExportOrdinalsStraight.h"
14 #include "FormatCoordsUnits.h"
15 #include "Logger.h"
16 #include <qdebug.h>
17 #include <qmath.h>
18 #include <QTextStream>
19 #include <QVector>
20 #include "Spline.h"
21 #include "SplinePair.h"
22 #include "Transformation.h"
23 #include <vector>
24 
25 using namespace std;
26 
27 const int COLUMNS_PER_CURVE = 2;
28 
30 {
31 }
32 
33 void ExportFileRelations::exportAllPerLineXThetaValuesMerged (const DocumentModelExportFormat &modelExportOverride,
34  const Document &document,
35  const MainWindowModel &modelMainWindow,
36  const QStringList &curvesIncluded,
37  const QString &delimiter,
38  const Transformation &transformation,
39  QTextStream &str) const
40 {
41  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::exportAllPerLineXThetaValuesMerged";
42 
43  int curveCount = curvesIncluded.count();
44  int maxColumnSize = maxColumnSizeAllocation (modelExportOverride,
45  document,
46  transformation,
47  curvesIncluded);
48 
49  // Skip if every curve was a function
50  if (maxColumnSize > 0) {
51 
52  QVector<QVector<QString*> > xThetaYRadiusValues (COLUMNS_PER_CURVE * curveCount, QVector<QString*> (maxColumnSize));
53  initializeXThetaYRadiusValues (curvesIncluded,
54  xThetaYRadiusValues);
55  loadXThetaYRadiusValues (modelExportOverride,
56  document,
57  modelMainWindow,
58  curvesIncluded,
59  transformation,
60  xThetaYRadiusValues);
61  outputXThetaYRadiusValues (modelExportOverride,
62  curvesIncluded,
63  xThetaYRadiusValues,
64  delimiter,
65  str);
66  destroy2DArray (xThetaYRadiusValues);
67  }
68 }
69 
70 void ExportFileRelations::exportOnePerLineXThetaValuesMerged (const DocumentModelExportFormat &modelExportOverride,
71  const Document &document,
72  const MainWindowModel &modelMainWindow,
73  const QStringList &curvesIncluded,
74  const QString &delimiter,
75  const Transformation &transformation,
76  QTextStream &str) const
77 {
78  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::exportOnePerLineXThetaValuesMerged";
79 
80  QStringList::const_iterator itr;
81  for (itr = curvesIncluded.begin(); itr != curvesIncluded.end(); itr++) {
82 
83  QString curveIncluded = *itr;
84 
85  exportAllPerLineXThetaValuesMerged (modelExportOverride,
86  document,
87  modelMainWindow,
88  QStringList (curveIncluded),
89  delimiter,
90  transformation,
91  str);
92  }
93 }
94 
96  const Document &document,
97  const MainWindowModel &modelMainWindow,
98  const Transformation &transformation,
99  QTextStream &str) const
100 {
101  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::exportToFile";
102 
103  // Identify curves to be included
104  QStringList curvesIncluded = curvesToInclude (modelExportOverride,
105  document,
106  document.curvesGraphsNames(),
107  CONNECT_AS_RELATION_SMOOTH,
108  CONNECT_AS_RELATION_STRAIGHT);
109 
110  // Delimiter
111  const QString delimiter = exportDelimiterToText (modelExportOverride.delimiter(),
112  modelExportOverride.header() == EXPORT_HEADER_GNUPLOT);
113 
114  // Export in one of two layouts
115  if (modelExportOverride.layoutFunctions() == EXPORT_LAYOUT_ALL_PER_LINE) {
116  exportAllPerLineXThetaValuesMerged (modelExportOverride,
117  document,
118  modelMainWindow,
119  curvesIncluded,
120  delimiter,
121  transformation,
122  str);
123  } else {
124  exportOnePerLineXThetaValuesMerged (modelExportOverride,
125  document,
126  modelMainWindow,
127  curvesIncluded,
128  delimiter,
129  transformation,
130  str);
131  }
132 }
133 
134 void ExportFileRelations::initializeXThetaYRadiusValues (const QStringList &curvesIncluded,
135  QVector<QVector<QString*> > &xThetaYRadiusValues) const
136 {
137  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::initializeXThetaYRadiusValues";
138 
139  // Initialize every entry with empty string
140  int curveCount = curvesIncluded.count();
141  int xThetaCount = xThetaYRadiusValues [0].count();
142  for (int row = 0; row < xThetaCount; row++) {
143  for (int col = 0; col < COLUMNS_PER_CURVE * curveCount; col++) {
144  xThetaYRadiusValues [col] [row] = new QString;
145  }
146  }
147 }
148 
149 QPointF ExportFileRelations::linearlyInterpolate (const Points &points,
150  double ordinal,
151  const Transformation &transformation) const
152 {
153  // LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::linearlyInterpolate";
154 
155  double xTheta = 0, yRadius = 0;
156  double ordinalBefore = 0; // Not set until ip=1
157  QPointF posGraphBefore; // Not set until ip=1
158  bool foundIt = false;
159  for (int ip = 0; ip < points.count(); ip++) {
160 
161  const Point &point = points.at (ip);
162  QPointF posGraph;
163  transformation.transformScreenToRawGraph (point.posScreen(),
164  posGraph);
165 
166  if (ordinal <= point.ordinal()) {
167 
168  foundIt = true;
169  if (ip == 0) {
170 
171  // Use first point
172  xTheta = posGraph.x();
173  yRadius = posGraph.y();
174 
175  } else {
176 
177  // Between posGraphBefore and posGraph. Note that if posGraph.x()=posGraphBefore.x() then
178  // previous iteration of loop would have been used for interpolation, and then the loop was exited
179  double s = (ordinal - ordinalBefore) / (point.ordinal() - ordinalBefore);
180  xTheta = (1.0 - s) * posGraphBefore.x() + s * posGraph.x();
181  yRadius = (1.0 - s) * posGraphBefore.y() + s * posGraph.y();
182  }
183 
184  break;
185  }
186 
187  ordinalBefore = point.ordinal();
188  posGraphBefore = posGraph;
189  }
190 
191  if (!foundIt) {
192 
193  // Use last point
194  xTheta = posGraphBefore.x();
195  yRadius = posGraphBefore.y();
196 
197  }
198 
199  return QPointF (xTheta,
200  yRadius);
201 }
202 
203 void ExportFileRelations::loadXThetaYRadiusValues (const DocumentModelExportFormat &modelExportOverride,
204  const Document &document,
205  const MainWindowModel &modelMainWindow,
206  const QStringList &curvesIncluded,
207  const Transformation &transformation,
208  QVector<QVector<QString*> > &xThetaYRadiusValues) const
209 {
210  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValues";
211 
212  // The curve processing logic here is mirrored in maxColumnSizeAllocation so the array allocations are in sync
213  for (int ic = 0; ic < curvesIncluded.count(); ic++) {
214 
215  int colXTheta = 2 * ic;
216  int colYRadius = 2 * ic + 1;
217 
218  const QString curveName = curvesIncluded.at (ic);
219 
220  const Curve *curve = document.curveForCurveName (curveName);
221  const Points points = curve->points ();
222 
223  if (modelExportOverride.pointsSelectionRelations() == EXPORT_POINTS_SELECTION_RELATIONS_RAW) {
224 
225  // No interpolation. Raw points
226  loadXThetaYRadiusValuesForCurveRaw (document.modelCoords(),
227  modelMainWindow,
228  points,
229  xThetaYRadiusValues [colXTheta],
230  xThetaYRadiusValues [colYRadius],
231  transformation);
232  } else {
233 
234  const LineStyle &lineStyle = document.modelCurveStyles().lineStyle(curveName);
235 
236  // Interpolation. Points are taken approximately every every modelExport.pointsIntervalRelations
237  ExportValuesOrdinal ordinals = ordinalsAtIntervals (modelExportOverride.pointsIntervalRelations(),
238  modelExportOverride.pointsIntervalUnitsRelations(),
239  lineStyle.curveConnectAs(),
240  transformation,
241  points);
242 
243  if (curve->curveStyle().lineStyle().curveConnectAs() == CONNECT_AS_RELATION_SMOOTH) {
244 
245  loadXThetaYRadiusValuesForCurveInterpolatedSmooth (document.modelCoords(),
246  modelMainWindow,
247  points,
248  ordinals,
249  xThetaYRadiusValues [colXTheta],
250  xThetaYRadiusValues [colYRadius],
251  transformation);
252 
253  } else {
254 
255  loadXThetaYRadiusValuesForCurveInterpolatedStraight (document.modelCoords(),
256  modelMainWindow,
257  points,
258  ordinals,
259  xThetaYRadiusValues [colXTheta],
260  xThetaYRadiusValues [colYRadius],
261  transformation);
262  }
263  }
264  }
265 }
266 
267 void ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedSmooth (const DocumentModelCoords &modelCoords,
268  const MainWindowModel &modelMainWindow,
269  const Points &points,
270  const ExportValuesOrdinal &ordinals,
271  QVector<QString*> &xThetaValues,
272  QVector<QString*> &yRadiusValues,
273  const Transformation &transformation) const
274 {
275  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedSmooth";
276 
277  vector<double> t;
278  vector<SplinePair> xy;
279  ExportOrdinalsSmooth ordinalsSmooth;
280 
281  ordinalsSmooth.loadSplinePairsWithTransformation (points,
282  transformation,
283  t,
284  xy);
285 
286  // Spline class requires at least one point
287  if (xy.size() > 0) {
288 
289  // Fit a spline
290  Spline spline (t,
291  xy);
292 
293  FormatCoordsUnits format;
294 
295  // Extract the points
296  for (int row = 0; row < ordinals.count(); row++) {
297 
298  double ordinal = ordinals.at (row);
299  SplinePair splinePairFound = spline.interpolateCoeff(ordinal);
300  double xTheta = splinePairFound.x ();
301  double yRadius = splinePairFound.y ();
302 
303  // Save values for this row into xThetaValues and yRadiusValues, after appropriate formatting
304  format.unformattedToFormatted (xTheta,
305  yRadius,
306  modelCoords,
307  modelMainWindow,
308  *(xThetaValues [row]),
309  *(yRadiusValues [row]),
310  transformation);
311  }
312  }
313 }
314 
315 void ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedStraight (const DocumentModelCoords &modelCoords,
316  const MainWindowModel &modelMainWindow,
317  const Points &points,
318  const ExportValuesOrdinal &ordinals,
319  QVector<QString*> &xThetaValues,
320  QVector<QString*> &yRadiusValues,
321  const Transformation &transformation) const
322 {
323  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValuesForCurveInterpolatedStraight";
324 
325  FormatCoordsUnits format;
326 
327  // Get value at desired points
328  for (int row = 0; row < ordinals.count(); row++) {
329 
330  double ordinal = ordinals.at (row);
331 
332  QPointF pointInterpolated = linearlyInterpolate (points,
333  ordinal,
334  transformation);
335 
336  // Save values for this row into xThetaValues and yRadiusValues, after appropriate formatting
337  format.unformattedToFormatted (pointInterpolated.x(),
338  pointInterpolated.y(),
339  modelCoords,
340  modelMainWindow,
341  *(xThetaValues [row]),
342  *(yRadiusValues [row]),
343  transformation);
344  }
345 }
346 
347 void ExportFileRelations::loadXThetaYRadiusValuesForCurveRaw (const DocumentModelCoords &modelCoords,
348  const MainWindowModel &modelMainWindow,
349  const Points &points,
350  QVector<QString*> &xThetaValues,
351  QVector<QString*> &yRadiusValues,
352  const Transformation &transformation) const
353 {
354  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::loadXThetaYRadiusValuesForCurveRaw";
355 
356  FormatCoordsUnits format;
357 
358  for (int pt = 0; pt < points.count(); pt++) {
359 
360  const Point &point = points.at (pt);
361 
362  QPointF posGraph;
363  transformation.transformScreenToRawGraph (point.posScreen(),
364  posGraph);
365 
366  // Save values for this row into xThetaValues and yRadiusValues, after appropriate formatting
367  format.unformattedToFormatted (posGraph.x(),
368  posGraph.y(),
369  modelCoords,
370  modelMainWindow,
371  *(xThetaValues [pt]),
372  *(yRadiusValues [pt]),
373  transformation);
374  }
375 }
376 
377 int ExportFileRelations::maxColumnSizeAllocation (const DocumentModelExportFormat &modelExport,
378  const Document &document,
379  const Transformation &transformation,
380  const QStringList &curvesIncluded) const
381 {
382  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::maxColumnSizeAllocation";
383 
384  int maxColumnSize = 0;
385 
386  // The curve processing logic here is mirrored in loadXThetaYRadiusValues so the array allocations are in sync
387  for (int ic = 0; ic < curvesIncluded.count(); ic++) {
388 
389  const QString curveName = curvesIncluded.at (ic);
390 
391  const Curve *curve = document.curveForCurveName (curveName);
392  const Points points = curve->points ();
393 
394  if (modelExport.pointsSelectionRelations() == EXPORT_POINTS_SELECTION_RELATIONS_RAW) {
395 
396  // No interpolation. Raw points
397  maxColumnSize = qMax (maxColumnSize,
398  points.count());
399 
400  } else {
401 
402  const LineStyle &lineStyle = document.modelCurveStyles().lineStyle(curveName);
403 
404  // Interpolation. Points are taken approximately every every modelExport.pointsIntervalRelations
405  ExportValuesOrdinal ordinals = ordinalsAtIntervals (modelExport.pointsIntervalRelations(),
406  modelExport.pointsIntervalUnitsRelations(),
407  lineStyle.curveConnectAs(),
408  transformation,
409  points);
410 
411  maxColumnSize = qMax (maxColumnSize,
412  ordinals.count());
413  }
414  }
415 
416  return maxColumnSize;
417 }
418 
419 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervals (double pointsIntervalRelations,
420  ExportPointsIntervalUnits pointsIntervalUnits,
421  CurveConnectAs curveConnectAs,
422  const Transformation &transformation,
423  const Points &points) const
424 {
425  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervals";
426 
427  if (pointsIntervalUnits == EXPORT_POINTS_INTERVAL_UNITS_GRAPH) {
428  if (curveConnectAs == CONNECT_AS_RELATION_SMOOTH) {
429 
430  return ordinalsAtIntervalsSmoothGraph (pointsIntervalRelations,
431  transformation,
432  points);
433 
434  } else {
435 
436  return ordinalsAtIntervalsStraightGraph (pointsIntervalRelations,
437  transformation,
438  points);
439 
440  }
441  } else {
442 
443  if (curveConnectAs == CONNECT_AS_RELATION_SMOOTH) {
444 
445  return ordinalsAtIntervalsSmoothScreen (pointsIntervalRelations,
446  points);
447 
448  } else {
449 
450  return ordinalsAtIntervalsStraightScreen (pointsIntervalRelations,
451  points);
452 
453  }
454  }
455 }
456 
457 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsSmoothGraph (double pointsIntervalRelations,
458  const Transformation &transformation,
459  const Points &points) const
460 {
461  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervalsSmoothGraph";
462 
463  ExportValuesOrdinal ordinals;
464 
465  // Prevent infinite loop when there are no points or will be too many points
466  if ((pointsIntervalRelations > 0) &&
467  (points.count() > 0)) {
468 
469  vector<double> t;
470  vector<SplinePair> xy;
471  ExportOrdinalsSmooth ordinalsSmooth;
472 
473  ordinalsSmooth.loadSplinePairsWithTransformation (points,
474  transformation,
475  t,
476  xy);
477 
478  ordinals = ordinalsSmooth.ordinalsAtIntervalsGraph (t,
479  xy,
480  pointsIntervalRelations);
481  }
482 
483  return ordinals;
484 }
485 
486 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsSmoothScreen (double pointsIntervalRelations,
487  const Points &points) const
488 {
489  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervalsSmoothScreen"
490  << " pointCount=" << points.count();
491 
492  // Results
493  ExportValuesOrdinal ordinals;
494 
495  // Prevent infinite loop when there are no points or will be too many points
496  if ((pointsIntervalRelations > 0) &&
497  (points.count() > 0)) {
498 
499  vector<double> t;
500  vector<SplinePair> xy;
501  ExportOrdinalsSmooth ordinalsSmooth;
502 
503  ordinalsSmooth.loadSplinePairsWithoutTransformation (points,
504  t,
505  xy);
506 
507  ordinals = ordinalsSmooth.ordinalsAtIntervalsGraph (t,
508  xy,
509  pointsIntervalRelations);
510  }
511 
512  return ordinals;
513 }
514 
515 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsStraightGraph (double pointsIntervalRelations,
516  const Transformation &transformation,
517  const Points &points) const
518 {
519  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervalsStraightGraph";
520 
521  ExportValuesOrdinal ordinals;
522 
523  // Prevent infinite loop when there are no points or will be too many points
524  if ((pointsIntervalRelations > 0) &&
525  (points.count() > 0)) {
526 
527  ExportOrdinalsStraight ordinalsStraight;
528 
529  ordinals = ordinalsStraight.ordinalsAtIntervalsGraphWithTransformation (points,
530  transformation,
531  pointsIntervalRelations);
532  }
533 
534  return ordinals;
535 }
536 
537 ExportValuesOrdinal ExportFileRelations::ordinalsAtIntervalsStraightScreen (double pointsIntervalRelations,
538  const Points &points) const
539 {
540  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::ordinalsAtIntervalsStraightScreen"
541  << " pointCount=" << points.count();
542 
543  // Results
544  ExportValuesOrdinal ordinals;
545 
546  // Prevent infinite loop when there are no points or will be too many points
547  if ((pointsIntervalRelations > 0) &&
548  (points.count() > 0)) {
549 
550  ExportOrdinalsStraight ordinalsStraight;
551 
552  ordinals = ordinalsStraight.ordinalsAtIntervalsGraphWithoutTransformation (points,
553  pointsIntervalRelations);
554  }
555 
556  return ordinals;
557 }
558 
559 void ExportFileRelations::outputXThetaYRadiusValues (const DocumentModelExportFormat &modelExportOverride,
560  const QStringList &curvesIncluded,
561  QVector<QVector<QString*> > &xThetaYRadiusValues,
562  const QString &delimiter,
563  QTextStream &str) const
564 {
565  LOG4CPP_INFO_S ((*mainCat)) << "ExportFileRelations::outputXThetaYRadiusValues";
566 
567  // Header
568  if (modelExportOverride.header() != EXPORT_HEADER_NONE) {
569  if (modelExportOverride.header() == EXPORT_HEADER_GNUPLOT) {
570  str << curveSeparator(str.string());
571  str << gnuplotComment();
572  }
573  QString delimiterForRow;
574  QStringList::const_iterator itr;
575  for (itr = curvesIncluded.begin(); itr != curvesIncluded.end(); itr++) {
576  QString curveName = *itr;
577  str << delimiterForRow << modelExportOverride.xLabel();
578  delimiterForRow = delimiter;
579  str << delimiterForRow << curveName;
580  }
581  str << "\n";
582  }
583 
584  for (int row = 0; row < xThetaYRadiusValues [0].count(); row++) {
585 
586  QString delimiterForRow;
587  for (int col = 0; col < xThetaYRadiusValues.count(); col++) {
588 
589  str << delimiterForRow << *(xThetaYRadiusValues [col] [row]);
590  delimiterForRow = delimiter;
591  }
592 
593  str << "\n";
594  }
595 }
void transformScreenToRawGraph(const QPointF &coordScreen, QPointF &coordGraph) const
Transform from cartesian pixel screen coordinates to cartesian/polar graph coordinates.
ExportLayoutFunctions layoutFunctions() const
Get method for functions layout.
Cubic interpolation given independent and dependent value vectors.
Definition: Spline.h:21
ExportPointsIntervalUnits pointsIntervalUnitsRelations() const
Get method for points interval units for relations.
const Points points() const
Return a shallow copy of the Points.
Definition: Curve.cpp:393
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str) const
Export Document points according to the settings.
LineStyle lineStyle() const
Get method for LineStyle.
Definition: CurveStyle.cpp:26
DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
Definition: Document.cpp:646
double y() const
Get method for y.
Definition: SplinePair.cpp:71
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition: Point.h:23
QPointF posScreen() const
Accessor for screen position.
Definition: Point.cpp:392
ExportHeader header() const
Get method for header.
const LineStyle lineStyle(const QString &curveName) const
Get method for copying one line style in one step.
Definition: CurveStyles.cpp:97
void unformattedToFormatted(double xThetaUnformatted, double yRadiusUnformatted, const DocumentModelCoords &modelCoords, const MainWindowModel &mainWindowModel, QString &xThetaFormatted, QString &yRadiusFormatted, const Transformation &transformation) const
Convert unformatted numeric value to formatted string. Transformation is used to determine best resol...
Affine transformation between screen and graph coordinates, based on digitized axis points...
ExportValuesOrdinal ordinalsAtIntervalsGraphWithoutTransformation(const Points &points, double pointsInterval) const
Compute ordinals, without any conversion to graph coordinates.
QString xLabel() const
Get method for x label.
CurveStyles modelCurveStyles() const
Get method for CurveStyles.
Definition: Document.cpp:653
void loadSplinePairsWithTransformation(const Points &points, const Transformation &transformation, std::vector< double > &t, std::vector< SplinePair > &xy) const
Load t (=ordinal) and xy (=screen position) spline pairs, converting screen coordinates to graph coor...
Model for DlgSettingsMainWindow.
void loadSplinePairsWithoutTransformation(const Points &points, std::vector< double > &t, std::vector< SplinePair > &xy) const
Load t (=ordinal) and xy (=screen position) spline pairs, without any conversion to graph coordinates...
Utility class to interpolate points spaced evenly along a piecewise defined curve with fitted spline...
ExportDelimiter delimiter() const
Get method for delimiter.
Model for DlgSettingsCoords and CmdSettingsCoords.
double pointsIntervalRelations() const
Get method for relations interval for relations.
Storage of one imported image and the data attached to that image.
Definition: Document.h:41
Container for one set of digitized Points.
Definition: Curve.h:32
ExportValuesOrdinal ordinalsAtIntervalsGraph(const std::vector< double > &t, const std::vector< SplinePair > &xy, double pointsInterval) const
Perform the interpolation on the arrays loaded by the other methods.
Details for a specific Line.
Definition: LineStyle.h:19
QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
Definition: Document.cpp:317
Highest-level wrapper around other Formats classes.
Utility class to interpolate points spaced evenly along a piecewise defined curve with line segments ...
double x() const
Get method for x.
Definition: SplinePair.cpp:66
const Curve * curveForCurveName(const QString &curveName) const
See CurvesGraphs::curveForCurveNames, although this also works for AXIS_CURVE_NAME.
Definition: Document.cpp:303
CurveStyle curveStyle() const
Return the curve style.
Definition: Curve.cpp:139
double ordinal(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Get method for ordinal. Skip check if copying one instance to another.
Definition: Point.cpp:374
ExportFileRelations()
Single constructor.
CurveConnectAs curveConnectAs() const
Get method for connect type.
Definition: LineStyle.cpp:63
ExportValuesOrdinal ordinalsAtIntervalsGraphWithTransformation(const Points &points, const Transformation &transformation, double pointsInterval) const
Compute ordinals, converting screen coordinates to graph coordinates.
Single X/Y pair for cubic spline interpolation initialization and calculations.
Definition: SplinePair.h:11
ExportPointsSelectionRelations pointsSelectionRelations() const
Get method for point selection for relations.