Isis 3 Programmer Reference
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. More...
 
void setSample (const QString st)
 Signal to set the Sample label to st. More...
 
void setLine (const QString st)
 Signal to set the Line label to st. More...
 

Public Member Functions

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

Protected Slots

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

Protected Member Functions

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

Private Attributes

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

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.
History:
2010-06-26 Eric Hyer - Now uses MdiCubeViewport
History:
2012-06-29 Steven Lambright - Improved handling of special pixels so that they are reported correctly. Fixes #199.

Definition at line 48 of file StatisticsTool.h.

Constructor & Destructor Documentation

◆ VisualDisplay()

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

Member Function Documentation

◆ leaveEvent()

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

Mouse left widget, update labels.

Parameters
event

Definition at line 745 of file StatisticsTool.cpp.

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

◆ mouseMoveEvent()

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

Called when the mouse moves over this widget.

Parameters
event

Definition at line 717 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().

◆ paintEvent()

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

Paint pixmap to the widget.

Parameters
event

Definition at line 702 of file StatisticsTool.cpp.

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

◆ paintPixmap()

◆ setBoxSize

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

Set box size in pixels.

Parameters
size

Definition at line 493 of file StatisticsTool.cpp.

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

◆ setDn

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

Signal to set the DN label to st.

Parameters
st

Referenced by leaveEvent(), and mouseMoveEvent().

◆ setLine

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

Signal to set the Line label to st.

Parameters
st

Referenced by leaveEvent(), and mouseMoveEvent().

◆ setLines()

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

Set box line size.

Parameters
lines

Definition at line 479 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().

◆ setPixelData()

void Isis::VisualDisplay::setPixelData ( QVector< QVector< double > >  data,
int  samp,
int  line 
)

◆ setSample

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

Signal to set the Sample label to st.

Parameters
st

Referenced by leaveEvent(), and mouseMoveEvent().

◆ setSamples()

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

Set box sample size.

Parameters
samps

Definition at line 465 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().

◆ showDeviation

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

Show/Hide deviation.

Parameters
b

Definition at line 562 of file StatisticsTool.cpp.

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

◆ showPixels

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

Show/Hide pixels.

Parameters
b

Definition at line 546 of file StatisticsTool.cpp.

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

◆ showText

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

Show/Hide text.

Parameters
b

Definition at line 529 of file StatisticsTool.cpp.

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

◆ sizeHint()

QSize Isis::VisualDisplay::sizeHint ( ) const

Size hint for this widget.

Returns
QSize

Definition at line 456 of file StatisticsTool.cpp.

Referenced by updateSize().

◆ updateSize()

void Isis::VisualDisplay::updateSize ( )

Update the size of the box.

Definition at line 505 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

◆ p_boxHeight

int Isis::VisualDisplay::p_boxHeight
private

Box height in pixels.

Definition at line 99 of file StatisticsTool.h.

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

◆ p_boxLines

int Isis::VisualDisplay::p_boxLines
private

Line size for box.

Definition at line 97 of file StatisticsTool.h.

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

◆ p_boxSamps

int Isis::VisualDisplay::p_boxSamps
private

Sample size for box.

Definition at line 96 of file StatisticsTool.h.

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

◆ p_boxWidth

int Isis::VisualDisplay::p_boxWidth
private

Box width in pixels.

Definition at line 98 of file StatisticsTool.h.

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

◆ p_oldHeight

int Isis::VisualDisplay::p_oldHeight
private

Previous box height in pixels.

Definition at line 101 of file StatisticsTool.h.

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

◆ p_oldWidth

int Isis::VisualDisplay::p_oldWidth
private

Previous box width in pixels.

Definition at line 100 of file StatisticsTool.h.

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

◆ p_pixelData

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

Stored pixel values.

Definition at line 112 of file StatisticsTool.h.

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

◆ p_pixmap

QPixmap Isis::VisualDisplay::p_pixmap
private

Pixmap used for drawing.

Definition at line 109 of file StatisticsTool.h.

Referenced by paintEvent(), and paintPixmap().

◆ p_set

bool Isis::VisualDisplay::p_set
private

Boolean to see if data is set.

Definition at line 104 of file StatisticsTool.h.

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

◆ p_showDeviation

bool Isis::VisualDisplay::p_showDeviation
private

Display deviation?

Definition at line 107 of file StatisticsTool.h.

Referenced by paintPixmap(), and showDeviation().

◆ p_showPixels

bool Isis::VisualDisplay::p_showPixels
private

Display pixels?

Definition at line 106 of file StatisticsTool.h.

Referenced by paintPixmap(), and showPixels().

◆ p_showText

bool Isis::VisualDisplay::p_showText
private

Display text?

Definition at line 105 of file StatisticsTool.h.

Referenced by paintPixmap(), and showText().

◆ p_stats

Statistics Isis::VisualDisplay::p_stats
private

Stats used for calculating stretch and deviation.

Definition at line 111 of file StatisticsTool.h.

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

◆ p_stretch

Stretch Isis::VisualDisplay::p_stretch
private

Stretch used to display pixels.

Definition at line 110 of file StatisticsTool.h.

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

◆ p_ulLine

int Isis::VisualDisplay::p_ulLine
private

Upper left line of region captured.

Definition at line 103 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), and setPixelData().

◆ p_ulSamp

int Isis::VisualDisplay::p_ulSamp
private

Upper left sample of region captured.

Definition at line 102 of file StatisticsTool.h.

Referenced by mouseMoveEvent(), and setPixelData().


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