USGS

Isis 3.0 Developer's Reference (API)

Home

Isis::ScatterPlotData Class Reference

This is the QwtRasterData for a scatter plot. More...

#include <ScatterPlotData.h>

Inherits QwtRasterData.

Public Member Functions

 ScatterPlotData (Cube *xCube, int xCubeBand, int xBinCount, Cube *yCube, int yCubeBand, int yBinCount, QwtInterval sampleRange, QwtInterval lineRange)
 ScatterPlotDataConstructor.
 
 ScatterPlotData (const ScatterPlotData &other)
 This is an optimized copy constructor.
 
 ~ScatterPlotData ()
 Destructor.
 
virtual QwtRasterDatacopy () const
 Returns a copy of the ScatterPlotData object.
 
virtual double value (double x, double y) const
 This gets called every time the scatter plot is re-drawn.
 
double xCubeMin () const
 Return the min DN value for the x-axis cube's data range.
 
double xCubeMax () const
 Return the max DN value for the y-axis cube's data range.
 
double yCubeMin () const
 Return the min DN value for the y-axis cube's data range.
 
double yCubeMax () const
 Return the max DN value for the y-axis cube's data range.
 
void swap (ScatterPlotData &other)
 This is part of the copy-and-swap paradigm.
 
QPair< double, double > binXY (int binIndex) const
 Get the center X/Y Dn values for the bin at index.
 
int binCount (int binIndex) const
 Get the count (number of values) which fall into the bin at index.
 
int numberOfBins () const
 Get the total number of bins (bin count in x * bin count in y).
 
QVector< double > discreteXValues () const
 Get a list of all of the x-bin center values for this scatter plot.
 
void alarm (double x, double y)
 Alarm the bin (highlight it) at the given x/y DN value.
 
void clearAlarms ()
 Forget all alarmed bins (viewport->plot).
 
QRectF pixelHint (const QRectF &area) const
 This is a hint given to qwt for how to render a pixel in the spectrogram.
 
ScatterPlotDataoperator= (const ScatterPlotData &other)
 Take the data from other and copy it into this.
 

Detailed Description

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.

Author
????-??-?? Unknown

Constructor & Destructor Documentation

Isis::ScatterPlotData::ScatterPlotData ( Cube xCube,
int  xCubeBand,
int  xBinCount,
Cube yCube,
int  yCubeBand,
int  yBinCount,
QwtInterval  sampleRange,
QwtInterval  lineRange 
)

ScatterPlotDataConstructor.

Parameters
xCubeThe x-axis cube
xCubeBandThe x-axis cube's band to get DN values from
xBinCountThe resolution of the x-axis
yCubeThe y-axis cube
yCubeBandThe y-axis cube's band to get DN values from
yBinCountThe resolution of the y-axis
sampleRangeThe sample range to gather the histogram from, this is the same for the x cube and y cube.
lineRangeThe 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(), 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.

Parameters
otherThe ScatterPlotData to copy.
Isis::ScatterPlotData::~ScatterPlotData ( )

Destructor.

Member Function Documentation

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.

Parameters
xThe x-dn value of the bin to alarm
yThe 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.

Parameters
binIndexThe bin we're getting the data from
Returns
The total number of cube DNs which fall into the given bin

Referenced by value().

QPair< double, double > Isis::ScatterPlotData::binXY ( int  index) const

Get the center X/Y Dn values for the bin at index.

Parameters
indexThe bin to get the center X/Y DN Values for
Returns
The center DN value of the given bin

References _FILEINFO_, numberOfBins(), and Isis::IException::Programmer.

void Isis::ScatterPlotData::clearAlarms ( )

Forget all alarmed bins (viewport->plot).

Referenced by Isis::ScatterPlotWindow::setMousePosition().

QwtRasterData * Isis::ScatterPlotData::copy ( ) const
virtual

Returns a copy of the ScatterPlotData object.

Returns
A new instance this this class

References ScatterPlotData().

QVector< double > Isis::ScatterPlotData::discreteXValues ( ) const

Get a list of all of the x-bin center values for this scatter plot.

Returns
A set of discrete x values, useful for things like fitting a line

Referenced by Isis::PlotWindowBestFitDialog::createBestFitLine().

int Isis::ScatterPlotData::numberOfBins ( ) const

Get the total number of bins (bin count in x * bin count in y).

Returns
The total number of bins

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.

Parameters
otherThe scatter plot data which needs copied to this
Returns
This returns *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.

Parameters
areaThis is ignored
Returns
The size of a pixel in the scatter plot
void Isis::ScatterPlotData::swap ( ScatterPlotData other)

This is part of the copy-and-swap paradigm.

Swap member data with other.

Parameters
otherThe class to trade member data with

Referenced by operator=().

double Isis::ScatterPlotData::value ( double  x,
double  y 
) const
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.

Parameters
xThe X-Dn value
yThe Y-Dn value
Returns
The bin's colorizable-value

References binCount().

Referenced by ScatterPlotData().

double Isis::ScatterPlotData::xCubeMax ( ) const

Return the max DN value for the y-axis cube's data range.

Returns
x axis cube data max DN value

Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().

double Isis::ScatterPlotData::xCubeMin ( ) const

Return the min DN value for the x-axis cube's data range.

Returns
x axis cube data min DN value

Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().

double Isis::ScatterPlotData::yCubeMax ( ) const

Return the max DN value for the y-axis cube's data range.

Returns
x axis cube data max DN value

Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().

double Isis::ScatterPlotData::yCubeMin ( ) const

Return the min DN value for the y-axis cube's data range.

Returns
y axis cube data min DN value

Referenced by Isis::ScatterPlotWindow::ScatterPlotWindow().


The documentation for this class was generated from the following files: