#include <histogramdlg.h>
This results in contrast stretching in the views. The user can select between the different color channels in the image or all at the same time.
Definition at line 102 of file histogramdlg.h.
Public Slots | |
void | changeToRed () |
void | changeToBlue () |
void | changeToGreen () |
void | changeToAll () |
void | changeDataSource () |
void | bestFit () |
void | mergeAll () |
void | clearPoints () |
void | undoToLast () |
void | redoToPrev () |
void | reloadHistSet () |
void | calcPercent () |
Public Member Functions | |
HistogramDlg (QWidget *parent) | |
HistogramDlg (QWidget *parent, vector< HistogramDataSource * > hds, HistogramUser *huser=NULL) | |
void | mousePressEvent (QMouseEvent *) |
void | mouseReleaseEvent (QMouseEvent *) |
void | mouseMoveEvent (QMouseEvent *) |
void | mouseDoubleClickEvent (QMouseEvent *) |
void | paintEvent (QPaintEvent *pe) |
void | resizeEvent (QResizeEvent *re) |
void | addHDS (HistogramDataSource *hds) |
void | setHDS (vector< HistogramDataSource * > hds) |
void | setUser (HistogramUser *user) |
Protected Member Functions | |
DspDims | calcDspDims () |
void | init () |
void | buildMenuBar () |
bool | mouseInGraph () |
int | mouseOnPoint () |
void | createDataPnts () |
void | alertUser () |
void | initPntsFromUser () |
Protected Attributes | |
QMenuBar * | mMenuBar |
the menubar | |
MouseState | mMouse |
mouse state | |
StretchLineSet | mSLSet |
stretch lines | |
HDSSet | mHDS |
datasource set | |
HistogramUser * | mHistUser |
the user of this histogram | |
vector< QAction * > | mPercentAct |
the stretch % selection in menu | |
QAction * | mMergeAct |
the merge toggle action in menu | |
QActionGroup * | mDSActGroup |
QPopupMenu * | mDSMenu |
vector< QAction * > | mColorAct |
the color selection action in menu | |
DspDims | mDspDims |
display dimensions | |
DspDims | mOldDspDims |
previous display dimension if resized |
HistogramDlg::HistogramDlg | ( | QWidget * | parent | ) |
Definition at line 3 of file histogramdlg.cpp.
References init(), and mHistUser.
HistogramDlg::HistogramDlg | ( | QWidget * | parent, | |
vector< HistogramDataSource * > | hds, | |||
HistogramUser * | huser = NULL | |||
) |
DspDims HistogramDlg::calcDspDims | ( | ) | [protected] |
Definition at line 407 of file histogramdlg.cpp.
References DspDims::graphBorderW, DspDims::graphH, DspDims::graphMaxX, DspDims::graphMaxY, DspDims::graphW, DspDims::graphZeroX, DspDims::graphZeroY, mMenuBar, DspDims::scaleW, DspDims::topY, DspDims::winH, and DspDims::winW.
Referenced by createDataPnts(), and resizeEvent().
void HistogramDlg::init | ( | ) | [protected] |
Definition at line 24 of file histogramdlg.cpp.
References buildMenuBar(), changeDataSource(), StretchLineSet::curArr, HDSSet::curHDS, StretchLineSet::curLine, initPntsFromUser(), StretchLineSet::isChanging, StretchLineSet::isMerged, mHDS, MouseState::mLeftDown, MouseState::mMidDown, mMouse, MouseState::mMouseX, MouseState::mMouseY, MouseState::mPointMoving, MouseState::mRightDown, and mSLSet.
Referenced by HistogramDlg().
void HistogramDlg::buildMenuBar | ( | ) | [protected] |
Definition at line 50 of file histogramdlg.cpp.
References HDSSet::actSet, bestFit(), calcPercent(), changeDataSource(), changeToBlue(), changeToGreen(), changeToRed(), clearPoints(), HDSSet::HDS, mColorAct, mDSActGroup, mDSMenu, mergeAll(), mHDS, mMenuBar, mMergeAct, mPercentAct, redoToPrev(), and undoToLast().
Referenced by init().
bool HistogramDlg::mouseInGraph | ( | ) | [protected] |
Definition at line 504 of file histogramdlg.cpp.
References DspDims::graphMaxX, DspDims::graphMaxY, DspDims::graphZeroX, DspDims::graphZeroY, mDspDims, mMouse, MouseState::mMouseX, and MouseState::mMouseY.
Referenced by mouseDoubleClickEvent().
int HistogramDlg::mouseOnPoint | ( | ) | [protected] |
Definition at line 514 of file histogramdlg.cpp.
References StretchLineSet::curArr, mMouse, MouseState::mMouseX, MouseState::mMouseY, and mSLSet.
Referenced by mouseDoubleClickEvent(), mouseMoveEvent(), and mousePressEvent().
void HistogramDlg::createDataPnts | ( | ) | [protected] |
Definition at line 686 of file histogramdlg.cpp.
References calcDspDims(), HDSSet::dataPnts, Histogram::getHist(), Histogram::getMax(), Histogram::getMaxCnt(), Histogram::getMin(), DspDims::graphMaxX, DspDims::graphMaxY, DspDims::graphZeroX, DspDims::graphZeroY, HDSSet::HDS, HDSSet::histSet, HistogramSet::isColor(), mDspDims, and mHDS.
Referenced by changeDataSource(), and resizeEvent().
void HistogramDlg::alertUser | ( | ) | [protected] |
Definition at line 968 of file histogramdlg.cpp.
References HistogramSet::getHist(), Histogram::getMax(), Histogram::getMin(), DspDims::graphMaxX, DspDims::graphMaxY, DspDims::graphZeroX, DspDims::graphZeroY, HDSSet::histSet, HistogramSet::isColor(), StretchLineSet::lineSet, mDspDims, mHDS, mHistUser, mSLSet, DspDims::scaleW, and HistogramUser::setHistPnts().
Referenced by calcPercent(), clearPoints(), mouseDoubleClickEvent(), mouseReleaseEvent(), and paintEvent().
void HistogramDlg::initPntsFromUser | ( | ) | [protected] |
Definition at line 952 of file histogramdlg.cpp.
References HistogramUser::getHistPnts(), StretchLineSet::lineSet, mHistUser, mSLSet, and StretchLineSet::redoSet.
Referenced by init().
void HistogramDlg::mousePressEvent | ( | QMouseEvent * | ) |
Definition at line 424 of file histogramdlg.cpp.
References HDSSet::curHDS, HDSSet::HDS, mHDS, mMouse, mouseOnPoint(), and MouseState::mPointMoving.
void HistogramDlg::mouseReleaseEvent | ( | QMouseEvent * | ) |
Definition at line 430 of file histogramdlg.cpp.
References alertUser(), HDSSet::curHDS, HDSSet::HDS, StretchLineSet::isChanging, mHDS, mMouse, MouseState::mPointMoving, and mSLSet.
void HistogramDlg::mouseMoveEvent | ( | QMouseEvent * | me | ) |
Definition at line 442 of file histogramdlg.cpp.
References StretchLineSet::curArr, HDSSet::curHDS, StretchLineSet::curLine, DspDims::graphMaxX, DspDims::graphMaxY, DspDims::graphZeroX, DspDims::graphZeroY, HDSSet::HDS, StretchLineSet::isChanging, StretchLineSet::isMerged, StretchLineSet::lineSet, mDspDims, mHDS, mMouse, MouseState::mMouseX, MouseState::mMouseY, mouseOnPoint(), MouseState::mPointMoving, mSLSet, StretchLineSet::redoSet, and DspDims::topY.
void HistogramDlg::mouseDoubleClickEvent | ( | QMouseEvent * | ) |
Definition at line 524 of file histogramdlg.cpp.
References alertUser(), StretchLineSet::curArr, StretchLineSet::curLine, StretchLineSet::isMerged, StretchLineSet::lineSet, mMouse, MouseState::mMouseX, MouseState::mMouseY, mouseInGraph(), mouseOnPoint(), MouseState::mPointMoving, mSLSet, and StretchLineSet::redoSet.
void HistogramDlg::paintEvent | ( | QPaintEvent * | pe | ) |
Definition at line 163 of file histogramdlg.cpp.
References alertUser(), StretchLineSet::curArr, HDSSet::curHDS, HDSSet::curHist, HDSSet::dataPnts, Histogram::getMax(), Histogram::getMin(), DspDims::graphBorderW, DspDims::graphH, DspDims::graphMaxX, DspDims::graphMaxY, DspDims::graphW, DspDims::graphZeroX, DspDims::graphZeroY, HDSSet::HDS, HDSSet::histSet, HistogramSet::isColor(), StretchLineSet::isMerged, StretchLineSet::lineSet, mDspDims, mHDS, mMouse, MouseState::mPointMoving, mSLSet, DspDims::scaleW, DspDims::topY, DspDims::winH, and DspDims::winW.
void HistogramDlg::resizeEvent | ( | QResizeEvent * | re | ) |
Definition at line 307 of file histogramdlg.cpp.
References calcDspDims(), createDataPnts(), StretchLineSet::curArr, StretchLineSet::curLine, DspDims::graphMaxX, DspDims::graphMaxY, DspDims::graphZeroX, DspDims::graphZeroY, StretchLineSet::lineSet, mDspDims, mOldDspDims, mSLSet, and StretchLineSet::redoSet.
void HistogramDlg::addHDS | ( | HistogramDataSource * | hds | ) |
Definition at line 604 of file histogramdlg.cpp.
References HDSSet::actSet, changeDataSource(), HistogramDataSource::getHistName(), HDSSet::HDS, mDSActGroup, mDSMenu, mHDS, and HistogramDataSource::setHistogramDlg().
Referenced by MainToolbar::buildViews().
void HistogramDlg::setHDS | ( | vector< HistogramDataSource * > | hds | ) |
void HistogramDlg::setUser | ( | HistogramUser * | user | ) |
Definition at line 600 of file histogramdlg.cpp.
References mHistUser.
Referenced by MainToolbar::MainToolbar().
void HistogramDlg::changeToRed | ( | ) | [slot] |
Definition at line 618 of file histogramdlg.cpp.
References StretchLineSet::curArr, HDSSet::curHist, StretchLineSet::curLine, StretchLineSet::lineSet, mHDS, mSLSet, and StretchLineSet::redoSet.
Referenced by buildMenuBar().
void HistogramDlg::changeToBlue | ( | ) | [slot] |
Definition at line 634 of file histogramdlg.cpp.
References StretchLineSet::curArr, HDSSet::curHist, StretchLineSet::curLine, StretchLineSet::lineSet, mHDS, mSLSet, and StretchLineSet::redoSet.
Referenced by buildMenuBar().
void HistogramDlg::changeToGreen | ( | ) | [slot] |
Definition at line 626 of file histogramdlg.cpp.
References StretchLineSet::curArr, HDSSet::curHist, StretchLineSet::curLine, StretchLineSet::lineSet, mHDS, mSLSet, and StretchLineSet::redoSet.
Referenced by buildMenuBar().
void HistogramDlg::changeToAll | ( | ) | [slot] |
Definition at line 642 of file histogramdlg.cpp.
void HistogramDlg::changeDataSource | ( | ) | [slot] |
Definition at line 646 of file histogramdlg.cpp.
References HDSSet::actSet, createDataPnts(), HDSSet::curHDS, HDSSet::curHist, StretchLineSet::curLine, HDSSet::HDS, HDSSet::histSet, HistogramSet::isColor(), StretchLineSet::isMerged, mColorAct, mHDS, mMergeAct, and mSLSet.
Referenced by addHDS(), buildMenuBar(), init(), and reloadHistSet().
void HistogramDlg::bestFit | ( | ) | [slot] |
void HistogramDlg::mergeAll | ( | ) | [slot] |
Definition at line 748 of file histogramdlg.cpp.
References StretchLineSet::curArr, StretchLineSet::curLine, StretchLineSet::isMerged, StretchLineSet::lineSet, and mSLSet.
Referenced by buildMenuBar().
void HistogramDlg::clearPoints | ( | ) | [slot] |
Definition at line 763 of file histogramdlg.cpp.
References alertUser(), StretchLineSet::curArr, StretchLineSet::curLine, StretchLineSet::lineSet, mSLSet, and StretchLineSet::redoSet.
Referenced by buildMenuBar().
void HistogramDlg::undoToLast | ( | ) | [slot] |
Definition at line 776 of file histogramdlg.cpp.
References StretchLineSet::curArr, StretchLineSet::curLine, StretchLineSet::lineSet, mSLSet, and StretchLineSet::redoSet.
Referenced by buildMenuBar().
void HistogramDlg::redoToPrev | ( | ) | [slot] |
Definition at line 787 of file histogramdlg.cpp.
References StretchLineSet::curArr, StretchLineSet::curLine, StretchLineSet::lineSet, mSLSet, and StretchLineSet::redoSet.
Referenced by buildMenuBar().
void HistogramDlg::reloadHistSet | ( | ) | [slot] |
Definition at line 1010 of file histogramdlg.cpp.
References changeDataSource().
Referenced by View::paintEvent().
void HistogramDlg::calcPercent | ( | ) | [slot] |
Definition at line 799 of file histogramdlg.cpp.
References alertUser(), StretchLineSet::curArr, HDSSet::curHDS, StretchLineSet::curLine, HistogramSet::getHist(), DspDims::graphMaxX, DspDims::graphMaxY, DspDims::graphZeroX, DspDims::graphZeroY, HDSSet::histSet, HistogramSet::isColor(), StretchLineSet::isMerged, StretchLineSet::lineSet, mDspDims, mHDS, mMergeAct, mPercentAct, mSLSet, and StretchLineSet::redoSet.
Referenced by buildMenuBar().
QMenuBar* HistogramDlg::mMenuBar [protected] |
the menubar
Definition at line 107 of file histogramdlg.h.
Referenced by buildMenuBar(), and calcDspDims().
MouseState HistogramDlg::mMouse [protected] |
mouse state
Definition at line 109 of file histogramdlg.h.
Referenced by init(), mouseDoubleClickEvent(), mouseInGraph(), mouseMoveEvent(), mouseOnPoint(), mousePressEvent(), mouseReleaseEvent(), and paintEvent().
StretchLineSet HistogramDlg::mSLSet [protected] |
stretch lines
Definition at line 110 of file histogramdlg.h.
Referenced by alertUser(), calcPercent(), changeDataSource(), changeToBlue(), changeToGreen(), changeToRed(), clearPoints(), init(), initPntsFromUser(), mergeAll(), mouseDoubleClickEvent(), mouseMoveEvent(), mouseOnPoint(), mouseReleaseEvent(), paintEvent(), redoToPrev(), resizeEvent(), and undoToLast().
HDSSet HistogramDlg::mHDS [protected] |
datasource set
Definition at line 111 of file histogramdlg.h.
Referenced by addHDS(), alertUser(), buildMenuBar(), calcPercent(), changeDataSource(), changeToBlue(), changeToGreen(), changeToRed(), createDataPnts(), HistogramDlg(), init(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), paintEvent(), and setHDS().
HistogramUser* HistogramDlg::mHistUser [protected] |
the user of this histogram
Definition at line 113 of file histogramdlg.h.
Referenced by alertUser(), HistogramDlg(), initPntsFromUser(), and setUser().
vector<QAction*> HistogramDlg::mPercentAct [protected] |
the stretch % selection in menu
Definition at line 115 of file histogramdlg.h.
Referenced by buildMenuBar(), and calcPercent().
QAction* HistogramDlg::mMergeAct [protected] |
the merge toggle action in menu
Definition at line 116 of file histogramdlg.h.
Referenced by buildMenuBar(), calcPercent(), and changeDataSource().
QActionGroup* HistogramDlg::mDSActGroup [protected] |
QPopupMenu* HistogramDlg::mDSMenu [protected] |
vector<QAction*> HistogramDlg::mColorAct [protected] |
the color selection action in menu
Definition at line 119 of file histogramdlg.h.
Referenced by buildMenuBar(), and changeDataSource().
DspDims HistogramDlg::mDspDims [protected] |
display dimensions
Definition at line 121 of file histogramdlg.h.
Referenced by alertUser(), calcPercent(), createDataPnts(), mouseInGraph(), mouseMoveEvent(), paintEvent(), and resizeEvent().
DspDims HistogramDlg::mOldDspDims [protected] |
previous display dimension if resized
Definition at line 122 of file histogramdlg.h.
Referenced by resizeEvent().
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |