Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Isis Developer Reference
ScatterPlotData.h
Go to the documentation of this file.
1#ifndef ScatterPlotData_h
2#define ScatterPlotData_h
3
4#include <qwt_matrix_raster_data.h>
5
6#include <QScopedPointer>
7#include <QVector>
8
9#include "Stretch.h"
10
11class QwtInterval;
12
13namespace Isis {
14 class Cube;
15
26 public:
27 ScatterPlotData(Cube *xCube, int xCubeBand, int xBinCount,
28 Cube *yCube, int yCubeBand, int yBinCount,
29 QwtInterval sampleRange, QwtInterval lineRange);
30 ScatterPlotData(const ScatterPlotData &other);
31
33 virtual QwtRasterData *copy() const;
34 virtual double value(double x, double y) const;
35
36 double xCubeMin() const;
37 double xCubeMax() const;
38 double yCubeMin() const;
39 double yCubeMax() const;
40
41 void swap(ScatterPlotData &other);
42
43 QPair<double, double> binXY(int binIndex) const;
44 int binCount(int binIndex) const;
45 int numberOfBins() const;
46
48
49 void alarm(double x, double y);
50 void clearAlarms();
51
52 QRectF pixelHint(const QRectF &area) const;
53
55
56 private:
57 int binCount(int xIndex, int yIndex) const;
58 int binIndex(int xIndex, int yIndex) const;
59 int binIndex(double x, double y) const;
60 QPair<int, int> binXYIndices(int binIndex) const;
61 QPair<int, int> binXYIndices(double x, double y) const;
62
63 QScopedPointer<Stretch> m_xDnToBinStretch;
64 QScopedPointer<Stretch> m_yDnToBinStretch;
65
70 QScopedPointer< QVector< QVector<int> > > m_counts;
71
73 int m_maxCount;
74
78 QScopedPointer< QMap<int, bool> > m_alarmedBins;
79
81 double m_xCubeMin;
83 double m_xCubeMax;
85 double m_yCubeMin;
87 double m_yCubeMax;
88 };
89};
90
91#endif
IO Handler for Isis Cubes.
Definition Cube.h:168
~ScatterPlotData()
Destructor.
Definition ScatterPlotData.cpp:128
QVector< double > discreteXValues() const
Get a list of all of the x-bin center values for this scatter plot.
Definition ScatterPlotData.cpp:296
ScatterPlotData & operator=(const ScatterPlotData &other)
Take the data from other and copy it into this.
Definition ScatterPlotData.cpp:364
void clearAlarms()
Forget all alarmed bins (viewport->plot).
Definition ScatterPlotData.cpp:332
double xCubeMax() const
Return the max DN value for the y-axis cube's data range.
Definition ScatterPlotData.cpp:181
int binCount(int binIndex) const
Get the count (number of values) which fall into the bin at index.
Definition ScatterPlotData.cpp:268
double yCubeMin() const
Return the min DN value for the y-axis cube's data range.
Definition ScatterPlotData.cpp:191
ScatterPlotData(Cube *xCube, int xCubeBand, int xBinCount, Cube *yCube, int yCubeBand, int yBinCount, QwtInterval sampleRange, QwtInterval lineRange)
ScatterPlotDataConstructor.
Definition ScatterPlotData.cpp:28
double xCubeMin() const
Return the min DN value for the x-axis cube's data range.
Definition ScatterPlotData.cpp:171
virtual double value(double x, double y) const
This gets called every time the scatter plot is re-drawn.
Definition ScatterPlotData.cpp:151
void swap(ScatterPlotData &other)
This is part of the copy-and-swap paradigm.
Definition ScatterPlotData.cpp:211
double yCubeMax() const
Return the max DN value for the y-axis cube's data range.
Definition ScatterPlotData.cpp:201
QPair< double, double > binXY(int binIndex) const
Get the center X/Y Dn values for the bin at index.
Definition ScatterPlotData.cpp:231
QRectF pixelHint(const QRectF &area) const
This is a hint given to qwt for how to render a pixel in the spectrogram.
Definition ScatterPlotData.cpp:343
void alarm(double x, double y)
Alarm the bin (highlight it) at the given x/y DN value.
Definition ScatterPlotData.cpp:322
int numberOfBins() const
Get the total number of bins (bin count in x * bin count in y).
Definition ScatterPlotData.cpp:279
virtual QwtRasterData * copy() const
Returns a copy of the ScatterPlotData object.
Definition ScatterPlotData.cpp:137
This is free and unencumbered software released into the public domain.
Definition Apollo.h:16