Isis Developer Reference
Isis::ScatterPlotData Class Reference

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

#include <ScatterPlotData.h>

Inheritance diagram for Isis::ScatterPlotData:
Inheritance graph
Collaboration diagram for Isis::ScatterPlotData:
Collaboration graph

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 QwtRasterDatacopy () 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...
 
ScatterPlotDataoperator= (const ScatterPlotData &other)
 Take the data from other and copy it into this. More...
 

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

◆ ScatterPlotData() [1/2]

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(), Isis::Brick::SetBasePosition(), Isis::Buffer::size(), and value().

Referenced by copy().

◆ ScatterPlotData() [2/2]

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.

◆ ~ScatterPlotData()

Isis::ScatterPlotData::~ScatterPlotData ( )

Destructor.

Member Function Documentation

◆ alarm()

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().

◆ binCount()

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().

◆ binXY()

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.

◆ clearAlarms()

void Isis::ScatterPlotData::clearAlarms ( )

Forget all alarmed bins (viewport->plot).

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

◆ copy()

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

Returns a copy of the ScatterPlotData object.

Returns
A new instance this this class

References ScatterPlotData().

◆ discreteXValues()

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().

◆ numberOfBins()

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().

◆ operator=()

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().

◆ pixelHint()

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

◆ swap()

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=().

◆ value()

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().

◆ xCubeMax()

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().

◆ xCubeMin()

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().

◆ yCubeMax()

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().

◆ yCubeMin()

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: