Isis Developer Reference
|
This is the QwtRasterData for a scatter plot. More...
#include <ScatterPlotData.h>
Public Member Functions | |
ScatterPlotData (Cube *xCube, int xCubeBand, int xBinCount, Cube *yCube, int yCubeBand, int yBinCount, QwtInterval sampleRange, QwtInterval lineRange) | |
ScatterPlotDataConstructor. More... | |
ScatterPlotData (const ScatterPlotData &other) | |
This is an optimized copy constructor. More... | |
~ScatterPlotData () | |
Destructor. More... | |
virtual QwtRasterData * | copy () const |
Returns a copy of the ScatterPlotData object. More... | |
virtual double | value (double x, double y) const |
This gets called every time the scatter plot is re-drawn. More... | |
double | xCubeMin () const |
Return the min DN value for the x-axis cube's data range. More... | |
double | xCubeMax () const |
Return the max DN value for the y-axis cube's data range. More... | |
double | yCubeMin () const |
Return the min DN value for the y-axis cube's data range. More... | |
double | yCubeMax () const |
Return the max DN value for the y-axis cube's data range. More... | |
void | swap (ScatterPlotData &other) |
This is part of the copy-and-swap paradigm. More... | |
QPair< double, double > | binXY (int binIndex) const |
Get the center X/Y Dn values for the bin at index. More... | |
int | binCount (int binIndex) const |
Get the count (number of values) which fall into the bin at index. More... | |
int | numberOfBins () const |
Get the total number of bins (bin count in x * bin count in y). More... | |
QVector< double > | discreteXValues () const |
Get a list of all of the x-bin center values for this scatter plot. More... | |
void | alarm (double x, double y) |
Alarm the bin (highlight it) at the given x/y DN value. More... | |
void | clearAlarms () |
Forget all alarmed bins (viewport->plot). More... | |
QRectF | pixelHint (const QRectF &area) const |
This is a hint given to qwt for how to render a pixel in the spectrogram. More... | |
ScatterPlotData & | operator= (const ScatterPlotData &other) |
Take the data from other and copy it into this. More... | |
This is the QwtRasterData for a scatter plot.
This gives Qwt values to put in each bin for a spectrogram, effectively making the scatter plot.
Isis::ScatterPlotData::ScatterPlotData | ( | Cube * | xCube, |
int | xCubeBand, | ||
int | xBinCount, | ||
Cube * | yCube, | ||
int | yCubeBand, | ||
int | yBinCount, | ||
QwtInterval | sampleRange, | ||
QwtInterval | lineRange | ||
) |
ScatterPlotDataConstructor.
xCube | The x-axis cube |
xCubeBand | The x-axis cube's band to get DN values from |
xBinCount | The resolution of the x-axis |
yCube | The y-axis cube |
yCubeBand | The y-axis cube's band to get DN values from |
yBinCount | The resolution of the y-axis |
sampleRange | The sample range to gather the histogram from, this is the same for the x cube and y cube. |
lineRange | The line range to gather the histogram from, this is the same for the x cube and y cube. |
References ASSERT, Isis::IsSpecial(), Isis::Cube::lineCount(), Isis::Statistics::Maximum(), Isis::Statistics::Minimum(), Isis::Cube::pixelType(), Isis::Cube::read(), Isis::Cube::sampleCount(), Isis::Brick::SetBasePosition(), Isis::Buffer::size(), and value().
Referenced by copy().
Isis::ScatterPlotData::ScatterPlotData | ( | const ScatterPlotData & | other | ) |
This is an optimized copy constructor.
Copies are not zero-time, but they are pretty quick.
other | The ScatterPlotData to copy. |
Isis::ScatterPlotData::~ScatterPlotData | ( | ) |
Destructor.
void Isis::ScatterPlotData::alarm | ( | double | x, |
double | y | ||
) |
Alarm the bin (highlight it) at the given x/y DN value.
This is for viewport->plot alarming.
x | The x-dn value of the bin to alarm |
y | The y-dn value of the bin to alarm |
Referenced by Isis::ScatterPlotWindow::setMousePosition().
int Isis::ScatterPlotData::binCount | ( | int | binIndex | ) | const |
Get the count (number of values) which fall into the bin at index.
binIndex | The bin we're getting the data from |
Referenced by value().
QPair< double, double > Isis::ScatterPlotData::binXY | ( | int | index | ) | const |
Get the center X/Y Dn values for the bin at index.
index | The bin to get the center X/Y DN Values for |
References _FILEINFO_, numberOfBins(), and Isis::IException::Programmer.
void Isis::ScatterPlotData::clearAlarms | ( | ) |
Forget all alarmed bins (viewport->plot).
Referenced by Isis::ScatterPlotWindow::setMousePosition().
|
virtual |
Returns a copy of the ScatterPlotData object.
References ScatterPlotData().
QVector< double > Isis::ScatterPlotData::discreteXValues | ( | ) | const |
Get a list of all of the x-bin center values for this scatter plot.
Referenced by Isis::PlotWindowBestFitDialog::createBestFitLine().
int Isis::ScatterPlotData::numberOfBins | ( | ) | const |
Get the total number of bins (bin count in x * bin count in y).
Referenced by binXY().
ScatterPlotData & Isis::ScatterPlotData::operator= | ( | const ScatterPlotData & | other | ) |
Take the data from other and copy it into this.
This uses the copy-and-swap paradigm for exception safety.
other | The scatter plot data which needs copied to this |
References swap().
QRectF Isis::ScatterPlotData::pixelHint | ( | const QRectF & | area | ) | const |
This is a hint given to qwt for how to render a pixel in the spectrogram.
area | This is ignored |
void Isis::ScatterPlotData::swap | ( | ScatterPlotData & | other | ) |
This is part of the copy-and-swap paradigm.
Swap member data with other.
other | The class to trade member data with |
Referenced by operator=().
|
virtual |
This gets called every time the scatter plot is re-drawn.
This returns the counts for each DN (x), DN (y), or if the bin is alarmed this returns the max count.
x | The X-Dn value |
y | The Y-Dn value |
References binCount().
Referenced by ScatterPlotData().
double Isis::ScatterPlotData::xCubeMax | ( | ) | const |
Return the max DN value for the y-axis cube's data range.
Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().
double Isis::ScatterPlotData::xCubeMin | ( | ) | const |
Return the min DN value for the x-axis cube's data range.
Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().
double Isis::ScatterPlotData::yCubeMax | ( | ) | const |
Return the max DN value for the y-axis cube's data range.
Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().
double Isis::ScatterPlotData::yCubeMin | ( | ) | const |
Return the min DN value for the y-axis cube's data range.
Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().