USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::VisualDisplay Class Reference

Tool to visualize statistics in an n * m box. More...

#include <StatisticsTool.h>

Inheritance diagram for Isis::VisualDisplay:
Inheritance graph
Collaboration diagram for Isis::VisualDisplay:
Collaboration graph

Signals

void setDn (const QString st)
 Signal to set the DN label to st.
 
void setSample (const QString st)
 Signal to set the Sample label to st.
 
void setLine (const QString st)
 Signal to set the Line label to st.
 

Public Member Functions

 VisualDisplay (QWidget *parent=0)
 Constructor for visual display.
 
QSize sizeHint () const
 Size hint for this widget.
 
void setSamples (int samps)
 Set box sample size.
 
void setLines (int lines)
 Set box line size.
 
void updateSize ()
 Update the size of the box.
 
void setPixelData (QVector< QVector< double > > data, int samp, int line)
 Set pixel data and upper left sample/line.
 

Protected Slots

void setBoxSize (int size)
 Set box size in pixels.
 
void showText (bool b)
 Show/Hide text.
 
void showPixels (bool b)
 Show/Hide pixels.
 
void showDeviation (bool b)
 Show/Hide deviation.
 

Protected Member Functions

void paintPixmap ()
 Paint the pixmap.
 
void paintEvent (QPaintEvent *event)
 Paint pixmap to the widget.
 
void mouseMoveEvent (QMouseEvent *event)
 Called when the mouse moves over this widget.
 
void leaveEvent (QEvent *event)
 Mouse left widget, update labels.
 

Private Attributes

int p_boxSamps
 Sample size for box.
 
int p_boxLines
 Line size for box.
 
int p_boxWidth
 Box width in pixels.
 
int p_boxHeight
 Box height in pixels.
 
int p_oldWidth
 Previous box width in pixels.
 
int p_oldHeight
 Previous box height in pixels.
 
int p_ulSamp
 Upper left sample of region captured.
 
int p_ulLine
 Upper left line of region captured.
 
bool p_set
 Boolean to see if data is set.
 
bool p_showText
 Display text?
 
bool p_showPixels
 Display pixels?
 
bool p_showDeviation
 Display deviation?
 
QPixmap p_pixmap
 Pixmap used for drawing.
 
Stretch p_stretch
 Stretch used to display pixels.
 
Statistics p_stats
 Stats used for calculating stretch and deviation.
 
QVector< QVector< double > > p_pixelData
 Stored pixel values.
 

Detailed Description

Tool to visualize statistics in an n * m box.

This tool is used to visualize statistics in an n * m box specified by the user. It allows for textual and visual representation of the DN values in the region as well as the standard deviation over the box.

Author
2009-10-07 Noah Hilt
History:

2009-10-07 Noah Hilt - Original version.

2010-06-26 Eric Hyer - Now uses MdiCubeViewport

2012-06-29 Steven Lambright - Improved handling of special pixels so that they are reported correctly. Fixes #199.

Definition at line 59 of file StatisticsTool.h.

Constructor & Destructor Documentation

Isis::VisualDisplay::VisualDisplay ( QWidget parent = 0)

Member Function Documentation

void Isis::VisualDisplay::leaveEvent ( QEvent *  event)
protected

Mouse left widget, update labels.

Parameters
event

Definition at line 744 of file StatisticsTool.cpp.

References setDn(), setLine(), and setSample().

void Isis::VisualDisplay::mouseMoveEvent ( QMouseEvent *  event)
protected

Called when the mouse moves over this widget.

Parameters
event

Definition at line 716 of file StatisticsTool.cpp.

References Isis::IsSpecial(), p_boxHeight, p_boxLines, p_boxSamps, p_boxWidth, p_pixelData, p_set, p_ulLine, p_ulSamp, Isis::PixelToString(), setDn(), setLine(), and setSample().

void Isis::VisualDisplay::paintEvent ( QPaintEvent *  event)
protected

Paint pixmap to the widget.

Parameters
event

Definition at line 701 of file StatisticsTool.cpp.

References p_boxHeight, p_boxLines, p_boxSamps, p_boxWidth, and p_pixmap.

void Isis::VisualDisplay::setBoxSize ( int  size)
protectedslot

Set box size in pixels.

Parameters
size

Definition at line 492 of file StatisticsTool.cpp.

References p_boxHeight, p_boxWidth, p_oldHeight, p_oldWidth, and updateSize().

void Isis::VisualDisplay::setDn ( const QString  st)
signal

Signal to set the DN label to st.

Parameters
st

Referenced by leaveEvent(), and mouseMoveEvent().

void Isis::VisualDisplay::setLine ( const QString  st)
signal

Signal to set the Line label to st.

Parameters
st

Referenced by leaveEvent(), and mouseMoveEvent().

void Isis::VisualDisplay::setLines ( int  lines)

Set box line size.

Parameters
lines

Definition at line 478 of file StatisticsTool.cpp.

References p_boxLines, p_boxSamps, p_pixelData, p_set, p_stats, Isis::Statistics::Reset(), and updateSize().

Referenced by Isis::StatisticsTool::changeBoxLines().

void Isis::VisualDisplay::setPixelData ( QVector< QVector< double > >  data,
int  samp,
int  line 
)
void Isis::VisualDisplay::setSample ( const QString  st)
signal

Signal to set the Sample label to st.

Parameters
st

Referenced by leaveEvent(), and mouseMoveEvent().

void Isis::VisualDisplay::setSamples ( int  samps)

Set box sample size.

Parameters
samps

Definition at line 464 of file StatisticsTool.cpp.

References p_boxLines, p_boxSamps, p_pixelData, p_set, p_stats, Isis::Statistics::Reset(), and updateSize().

Referenced by Isis::StatisticsTool::changeBoxSamples().

void Isis::VisualDisplay::showDeviation ( bool  b)
protectedslot

Show/Hide deviation.

Parameters
b

Definition at line 561 of file StatisticsTool.cpp.

References p_boxHeight, p_boxWidth, p_oldHeight, p_oldWidth, p_showDeviation, and updateSize().

void Isis::VisualDisplay::showPixels ( bool  b)
protectedslot

Show/Hide pixels.

Parameters
b

Definition at line 545 of file StatisticsTool.cpp.

References p_boxHeight, p_boxWidth, p_oldHeight, p_oldWidth, p_showPixels, and updateSize().

void Isis::VisualDisplay::showText ( bool  b)
protectedslot

Show/Hide text.

Parameters
b

Definition at line 528 of file StatisticsTool.cpp.

References p_boxHeight, p_boxWidth, p_oldHeight, p_oldWidth, p_showText, and updateSize().

QSize Isis::VisualDisplay::sizeHint ( ) const

Size hint for this widget.

Returns
QSize

Definition at line 455 of file StatisticsTool.cpp.

Referenced by updateSize().

void Isis::VisualDisplay::updateSize ( )

Update the size of the box.

Definition at line 504 of file StatisticsTool.cpp.

References p_boxHeight, p_boxLines, p_boxSamps, p_boxWidth, paintPixmap(), and sizeHint().

Referenced by setBoxSize(), setLines(), setSamples(), showDeviation(), showPixels(), and showText().

Member Data Documentation

int Isis::VisualDisplay::p_boxHeight
private

Box height in pixels.

Definition at line 110 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), paintEvent(), paintPixmap(), setBoxSize(), showDeviation(), showPixels(), showText(), and updateSize().

int Isis::VisualDisplay::p_boxLines
private

Line size for box.

Definition at line 108 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), paintEvent(), paintPixmap(), setLines(), setSamples(), updateSize(), and VisualDisplay().

int Isis::VisualDisplay::p_boxSamps
private

Sample size for box.

Definition at line 107 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), paintEvent(), paintPixmap(), setLines(), setSamples(), updateSize(), and VisualDisplay().

int Isis::VisualDisplay::p_boxWidth
private

Box width in pixels.

Definition at line 109 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), paintEvent(), paintPixmap(), setBoxSize(), showDeviation(), showPixels(), showText(), and updateSize().

int Isis::VisualDisplay::p_oldHeight
private

Previous box height in pixels.

Definition at line 112 of file StatisticsTool.h.

Referenced by setBoxSize(), showDeviation(), showPixels(), and showText().

int Isis::VisualDisplay::p_oldWidth
private

Previous box width in pixels.

Definition at line 111 of file StatisticsTool.h.

Referenced by setBoxSize(), showDeviation(), showPixels(), and showText().

QVector<QVector<double> > Isis::VisualDisplay::p_pixelData
private

Stored pixel values.

Definition at line 123 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), paintPixmap(), setLines(), setPixelData(), setSamples(), and VisualDisplay().

QPixmap Isis::VisualDisplay::p_pixmap
private

Pixmap used for drawing.

Definition at line 120 of file StatisticsTool.h.

Referenced by paintEvent(), and paintPixmap().

bool Isis::VisualDisplay::p_set
private

Boolean to see if data is set.

Definition at line 115 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), setLines(), setPixelData(), and setSamples().

bool Isis::VisualDisplay::p_showDeviation
private

Display deviation?

Definition at line 118 of file StatisticsTool.h.

Referenced by paintPixmap(), and showDeviation().

bool Isis::VisualDisplay::p_showPixels
private

Display pixels?

Definition at line 117 of file StatisticsTool.h.

Referenced by paintPixmap(), and showPixels().

bool Isis::VisualDisplay::p_showText
private

Display text?

Definition at line 116 of file StatisticsTool.h.

Referenced by paintPixmap(), and showText().

Statistics Isis::VisualDisplay::p_stats
private

Stats used for calculating stretch and deviation.

Definition at line 122 of file StatisticsTool.h.

Referenced by paintPixmap(), setLines(), setPixelData(), and setSamples().

Stretch Isis::VisualDisplay::p_stretch
private

Stretch used to display pixels.

Definition at line 121 of file StatisticsTool.h.

Referenced by paintPixmap(), setPixelData(), and VisualDisplay().

int Isis::VisualDisplay::p_ulLine
private

Upper left line of region captured.

Definition at line 114 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), and setPixelData().

int Isis::VisualDisplay::p_ulSamp
private

Upper left sample of region captured.

Definition at line 113 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), and setPixelData().


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