|
Isis 3 Programmer Reference
|
1 #ifndef ScatterPlotData_h
2 #define ScatterPlotData_h
4 #include <qwt_raster_data.h>
6 #include <QScopedPointer>
11 template <
typename A,
typename B>
struct QPair;
12 template <
typename T>
class QVector;
31 Cube *yCube,
int yCubeBand,
int yBinCount,
32 QwtInterval sampleRange, QwtInterval lineRange);
37 virtual double value(
double x,
double y)
const;
52 void alarm(
double x,
double y);
55 QRectF
pixelHint(
const QRectF &area)
const;
60 int binCount(
int xIndex,
int yIndex)
const;
61 int binIndex(
int xIndex,
int yIndex)
const;
62 int binIndex(
double x,
double y)
const;
73 QScopedPointer< QVector< QVector<int> > >
m_counts;
QScopedPointer< QMap< int, bool > > m_alarmedBins
map from bin index to alarm state (true for alarmed)
int binIndex(int xIndex, int yIndex) const
Get the single-index position given an x/y index position.
double m_xCubeMax
The maximum DN value for the x cube.
QScopedPointer< Stretch > m_yDnToBinStretch
Stretch 2.
double m_yCubeMin
The minimum DN value for the y cube.
int m_maxCount
The maximum value in m_counts, stored for efficiency.
double m_yCubeMax
The maximum DN value for the y cube.
QScopedPointer< Stretch > m_xDnToBinStretch
Stretch 1.
QScopedPointer< QVector< QVector< int > > > m_counts
The bin counts stored by 2D (x/y) index position.
double xCubeMax() const
Return the max DN value for the y-axis cube's data range.
void clearAlarms()
Forget all alarmed bins (viewport->plot).
ScatterPlotData(Cube *xCube, int xCubeBand, int xBinCount, Cube *yCube, int yCubeBand, int yBinCount, QwtInterval sampleRange, QwtInterval lineRange)
ScatterPlotDataConstructor.
void swap(ScatterPlotData &other)
This is part of the copy-and-swap paradigm.
ScatterPlotData & operator=(const ScatterPlotData &other)
Take the data from other and copy it into this.
QPair< double, double > binXY(int binIndex) const
Get the center X/Y Dn values for the bin at index.
virtual QwtRasterData * copy() const
Returns a copy of the ScatterPlotData object.
int numberOfBins() const
Get the total number of bins (bin count in x * bin count in y).
QRectF pixelHint(const QRectF &area) const
This is a hint given to qwt for how to render a pixel in the spectrogram.
double yCubeMin() const
Return the min DN value for the y-axis cube's data range.
This is the QwtRasterData for a scatter plot.
IO Handler for Isis Cubes.
double xCubeMin() const
Return the min DN value for the x-axis cube's data range.
QVector< double > discreteXValues() const
Get a list of all of the x-bin center values for this scatter plot.
virtual double value(double x, double y) const
This gets called every time the scatter plot is re-drawn.
double m_xCubeMin
The minimum DN value for the x cube.
double yCubeMax() const
Return the max DN value for the y-axis cube's data range.
int binCount(int binIndex) const
Get the count (number of values) which fall into the bin at index.
This is free and unencumbered software released into the public domain.
~ScatterPlotData()
Destructor.
QPair< int, int > binXYIndices(int binIndex) const
Get the 2D index index position given a 1D (flat) index position.
This is free and unencumbered software released into the public domain.
This is free and unencumbered software released into the public domain.
void alarm(double x, double y)
Alarm the bin (highlight it) at the given x/y DN value.