Isis 3 Programmer Reference
|
Tool to visualize statistics in an n * m box. More...
#include <StatisticsTool.h>
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... | |
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.
Definition at line 48 of file StatisticsTool.h.
Isis::VisualDisplay::VisualDisplay | ( | QWidget * | parent = 0 | ) |
Constructor for visual display.
parent |
Definition at line 422 of file StatisticsTool.cpp.
References Isis::Null, p_boxLines, p_boxSamps, p_pixelData, p_stretch, paintPixmap(), Isis::Stretch::SetHis(), Isis::Stretch::SetHrs(), Isis::Stretch::SetLis(), Isis::Stretch::SetLrs(), and Isis::Stretch::SetNull().
|
protected |
Mouse left widget, update labels.
event |
Definition at line 745 of file StatisticsTool.cpp.
References setDn(), setLine(), and setSample().
|
protected |
Called when the mouse moves over this widget.
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().
|
protected |
Paint pixmap to the widget.
event |
Definition at line 702 of file StatisticsTool.cpp.
References p_boxHeight, p_boxLines, p_boxSamps, p_boxWidth, and p_pixmap.
|
protected |
Paint the pixmap.
Definition at line 624 of file StatisticsTool.cpp.
References Isis::Statistics::Average(), Isis::IsSpecial(), Isis::Stretch::Map(), Isis::Statistics::Maximum(), Isis::Statistics::Minimum(), p_boxHeight, p_boxLines, p_boxSamps, p_boxWidth, p_pixelData, p_pixmap, p_showDeviation, p_showPixels, p_showText, p_stats, p_stretch, Isis::PixelToString(), Isis::Statistics::StandardDeviation(), and Isis::Statistics::TotalPixels().
Referenced by setPixelData(), updateSize(), and VisualDisplay().
|
protectedslot |
Set box size in pixels.
size |
Definition at line 493 of file StatisticsTool.cpp.
References p_boxHeight, p_boxWidth, p_oldHeight, p_oldWidth, and updateSize().
|
signal |
|
signal |
void Isis::VisualDisplay::setLines | ( | int | lines | ) |
Set box line size.
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().
Set pixel data and upper left sample/line.
data | |
samp | |
line |
Definition at line 580 of file StatisticsTool.cpp.
References Isis::Histogram::AddData(), Isis::Statistics::AddData(), Isis::Stretch::AddPair(), Isis::Statistics::BestMaximum(), Isis::Statistics::BestMinimum(), Isis::Stretch::ClearPairs(), p_pixelData, p_set, p_stats, p_stretch, p_ulLine, p_ulSamp, paintPixmap(), Isis::Histogram::Percent(), and Isis::Statistics::Reset().
Referenced by Isis::StatisticsTool::getStatistics().
|
signal |
Signal to set the Sample label to st.
st |
Referenced by leaveEvent(), and mouseMoveEvent().
void Isis::VisualDisplay::setSamples | ( | int | samps | ) |
Set box sample size.
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().
|
protectedslot |
Show/Hide deviation.
b |
Definition at line 562 of file StatisticsTool.cpp.
References p_boxHeight, p_boxWidth, p_oldHeight, p_oldWidth, p_showDeviation, and updateSize().
|
protectedslot |
Show/Hide pixels.
b |
Definition at line 546 of file StatisticsTool.cpp.
References p_boxHeight, p_boxWidth, p_oldHeight, p_oldWidth, p_showPixels, and updateSize().
|
protectedslot |
Show/Hide text.
b |
Definition at line 529 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.
Definition at line 456 of file StatisticsTool.cpp.
Referenced by 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().
|
private |
Box height in pixels.
Definition at line 99 of file StatisticsTool.h.
Referenced by mouseMoveEvent(), paintEvent(), paintPixmap(), setBoxSize(), showDeviation(), showPixels(), showText(), and updateSize().
|
private |
Line size for box.
Definition at line 97 of file StatisticsTool.h.
Referenced by mouseMoveEvent(), paintEvent(), paintPixmap(), setLines(), setSamples(), updateSize(), and VisualDisplay().
|
private |
Sample size for box.
Definition at line 96 of file StatisticsTool.h.
Referenced by mouseMoveEvent(), paintEvent(), paintPixmap(), setLines(), setSamples(), updateSize(), and VisualDisplay().
|
private |
Box width in pixels.
Definition at line 98 of file StatisticsTool.h.
Referenced by mouseMoveEvent(), paintEvent(), paintPixmap(), setBoxSize(), showDeviation(), showPixels(), showText(), and updateSize().
|
private |
Previous box height in pixels.
Definition at line 101 of file StatisticsTool.h.
Referenced by setBoxSize(), showDeviation(), showPixels(), and showText().
|
private |
Previous box width in pixels.
Definition at line 100 of file StatisticsTool.h.
Referenced by setBoxSize(), showDeviation(), showPixels(), and showText().
Stored pixel values.
Definition at line 112 of file StatisticsTool.h.
Referenced by mouseMoveEvent(), paintPixmap(), setLines(), setPixelData(), setSamples(), and VisualDisplay().
|
private |
Pixmap used for drawing.
Definition at line 109 of file StatisticsTool.h.
Referenced by paintEvent(), and paintPixmap().
|
private |
Boolean to see if data is set.
Definition at line 104 of file StatisticsTool.h.
Referenced by mouseMoveEvent(), setLines(), setPixelData(), and setSamples().
|
private |
Display deviation?
Definition at line 107 of file StatisticsTool.h.
Referenced by paintPixmap(), and showDeviation().
|
private |
Display pixels?
Definition at line 106 of file StatisticsTool.h.
Referenced by paintPixmap(), and showPixels().
|
private |
Display text?
Definition at line 105 of file StatisticsTool.h.
Referenced by paintPixmap(), and showText().
|
private |
Stats used for calculating stretch and deviation.
Definition at line 111 of file StatisticsTool.h.
Referenced by paintPixmap(), setLines(), setPixelData(), and setSamples().
|
private |
Stretch used to display pixels.
Definition at line 110 of file StatisticsTool.h.
Referenced by paintPixmap(), setPixelData(), and VisualDisplay().
|
private |
Upper left line of region captured.
Definition at line 103 of file StatisticsTool.h.
Referenced by mouseMoveEvent(), and setPixelData().
|
private |
Upper left sample of region captured.
Definition at line 102 of file StatisticsTool.h.
Referenced by mouseMoveEvent(), and setPixelData().