casa::BinPlotWidget Class Reference

Display a histogram of intensity vs count. More...

#include <BinPlotWidget.qo.h>

Inheritance diagram for casa::BinPlotWidget:
casa::HeightSource

List of all members.

Public Slots

void fitModeChanged ()
void plotModeChanged (int mode)
void setDisplayStep (bool display)
void setDisplayLogY (bool display)
void clearFit ()
void clearAll ()
void toAscii (const QString &filePath)
 Saving the Histogram.
void toPing (const QString &filtPath, int width, int height)
void channelRangeChanged (int minValue, int maxValue, bool allChannels, bool automatic, int specIndex=-1)
 The channel has changed value.
void imageModeSelected (bool enabled)
 Histogramming an image versus a region.
void regionModeSelected (bool enabled)

Signals

void postStatusMessage (const QString &msg)
void rangeChanged ()

Public Member Functions

 BinPlotWidget (bool fitControls, bool rangeControls, bool plotModeControls, QWidget *parent)
 fitControls: true allows the user to fit curves to the Histogram.
bool setImage (const SHARED_PTR< const ImageInterface< Float > > img, bool waitOnHistogram=false)
bool setImageRegion (ImageRegion *imageRegion, int id)
void deleteImageRegion (int id)
void imageRegionSelected (int id)
virtual void postMessage (const QString &msg)
std::vector< float > getXValues () const
pair< double, double > getMinMaxValues () const
void setMinMaxValues (double minValue, double maxValue, bool updateGraph=true)
void hideMaximumRange ()
 Customizing the display.
void setColorLookups (const Vector< uInt > &lookups)
void setColorMap (QwtLinearColorMap *colorMap)
void setColorScaleMax (int max)
void setMultiColored (bool multipleColors)
void setLineMode (bool lineMode)
void setDisplayPlotTitle (bool display)
void setDisplayAxisTitles (bool display)
void setHistogramColor (QColor color)
void setFitEstimateColor (QColor color)
void setFitCurveColor (QColor color)
void setMultipleHistogramColors (const QList< QColor > &colors)
void setAxisLabelFont (int size)
void setChannelCount (int count)
void setChannelValue (int value)
void addZoomActions (bool rangeControl, QMenu *zoomMenu)
void addDisplayActions (QMenu *menu, QWidgetAction *binCountAction)
void addPlotModeActions (QMenu *menu, QWidgetAction *channelRangeAction=NULL, QWidgetAction *footPrintAction=NULL)
void setPlotMode (int mode)
bool isEmpty () const
 ~BinPlotWidget ()

Protected Member Functions

virtual void resizeEvent (QResizeEvent *event)
virtual void keyPressEvent (QKeyEvent *event)
virtual void enterEvent (QEvent *event)
virtual void mousePressEvent (QMouseEvent *event)

Private Types

enum  ContextMenuMode {
  ZOOM_CONTEXT,
  DISPLAY_CONTEXT,
  FIT_CONTEXT
}
enum  HistogramOptions {
  HISTOGRAM_FILLED,
  HISTOGRAM_OUTLINE,
  HISTOGRAM_LINE
}

Private Slots

void lineMoved (const QPoint &pt)
void lineSelected ()
void clearRange ()
void defineCurve (int id, const QColor &curveColor, bool clear=true)
void minMaxChanged ()
void showContextMenu (const QPoint &pt)
void centerPeakSpecified ()
void lambdaSpecified ()
void fwhmSpecified ()
void fitDone (const QString &msg)
void zoomContextFinished ()
void zoomMenuFinished ()
void resetGaussianFitMarker ()
void resetPoissonFitMarker ()
void zoomNeutral ()
void zoomRange ()
 Zoom based on an intensity range specified by the user using the range controls widget.
void zoomPercentage (float minValue, float maxValue)
 Zoom based on an intensity range specified by the user using the zoom context menu.
void binCountChanged (int count)
void regionAllModeSelected (bool enabled)

Private Member Functions

 BinPlotWidget (const BinPlotWidget &)
BinPlotWidgetoperator= (const BinPlotWidget &)
void initializeFitWidget (bool fitControls)
void initializeDisplayActions ()
void initializeZoomControls (bool rangeControls)
void initializePlotModeControls (bool enable)
void initializeGaussianFitMarker ()
void initializePoissonFitMarker ()
void initializeRangeControls (bool rangeControls)
void connectZoomActions (ZoomWidget *zoomWidget)
void clearGaussianFitMarker ()
void clearPoissonFitMarker ()
void clearHistograms ()
void clearCurves ()
void makeHistogram (int id, const QColor &histogramColor, bool clearCurve=true)
void rectangleSizeChanged ()
void resetAxisTitles ()
void resetPlotTitle ()
void reset ()
bool resetImage (bool waitOnHistogram=false)
void resetRegion ()
void resetRectangleMarker ()
void defineCurveLine (int id, const QColor &lineColor)
void defineCurveHistogram (int id, const QColor &histogramColor)
QwtPlotCurve * addCurve (QVector< double > &xValues, QVector< double > &yValues, const QColor &curveColor)
bool isPrintOut (int id) const
bool isPrincipalHistogram (int id) const
bool isPlotContains (int x, int y)
virtual int getCanvasHeight ()
HistogramfindHistogramFor (int id)
int getSelectedId () const
QColor getPieceColor (int index, const QColor &defaultColor) const
void zoom (float percent)
void zoomRangeMarker (double startValue, double endValue)

Private Attributes

Ui::BinPlotWidgetClass ui
ContextMenuMode contextMenuMode
bool displayPlotTitle
bool displayAxisTitles
bool multiColored
bool allChannels
int spectralIndex
int minChannel
int maxChannel
QColor curveColor
QColor selectionColor
QColor fitEstimateColor
QColor fitCurveColor
QList< QColor > multipleHistogramColors
QwtLinearColorMap * colorMap
Vector< uInt > colorLookups
int colorScaleMax
QList< QwtPlotCurve * > curves
 Histogram & data.
QMap< int, Histogram * > histogramMap
SHARED_PTR< const
ImageInterface< Float > > 
image
QwtPlot binPlot
const QString NO_DATA
const QString NO_DATA_MESSAGE
const int IMAGE_ID
int selectedId
QwtPlotPicker * dragLine
 Specifying a range with the histogram.
RangePickerrectMarker
ToolTipPickertoolTipPicker
RangeControlsWidgetrangeControlWidget
QMenu contextMenuZoom
QWidgetAction * zoomActionContext
ZoomWidgetzoomWidgetContext
QWidgetAction * zoomActionMenu
ZoomWidgetzoomWidgetMenu
double rectX
double rectWidth
QAction lambdaAction
 Fitting the histogram.
QAction centerPeakAction
QAction fwhmAction
QMenu contextMenu
FitWidgetfitWidget
QwtPlotCurve * fitCurve
QPoint fitPosition
HistogramMarkerGaussianfitEstimateMarkerGaussian
HistogramMarkerPoissonfitEstimateMarkerPoisson
const QString LOG_COUNT
 Plot Display.
QAction stepFunctionNoneAction
QAction stepFunctionAction
QAction stepFunctionFilledAction
QAction logActionY
QAction clearAction
bool displayLogY
QMenu contextMenuDisplay
QWidgetAction * binCountActionContext
 Plot Control We should be able to use just one binCountAction and binCountWidget However, to appear, the constructor has to take the appropriate menu as a parent.
QWidgetAction * channelRangeActionContext
QWidgetAction * footPrintActionContext
QWidgetAction * binCountActionMenu
QWidgetAction * channelRangeActionMenu
QWidgetAction * footPrintActionMenu
BinCountWidgetbinCountWidgetContext
ChannelRangeWidgetchannelRangeWidgetContext
FootPrintWidgetfootPrintWidgetContext
BinCountWidgetbinCountWidgetMenu
ChannelRangeWidgetchannelRangeWidgetMenu
FootPrintWidgetfootPrintWidgetMenu
QMenu contextMenuConfigure
FootPrintWidget::PlotMode plotMode

Friends

class RangePicker

Detailed Description

Display a histogram of intensity vs count.

Functionality is pluggable and can either be put in or left out: selection of a range along the intensity axis of the histogram (rangeControls), fitting a curve to the histogram (fitControls), changing how the histogram is displayed (plotControls). HeightSource is intended to be an interface to reduce the coupling being this class and a subclass that needs to know the height of the plot in order to correctly draw a marker.

Definition at line 77 of file BinPlotWidget.qo.h.


Member Enumeration Documentation

Enumerator:
ZOOM_CONTEXT 
DISPLAY_CONTEXT 
FIT_CONTEXT 

Definition at line 225 of file BinPlotWidget.qo.h.

Enumerator:
HISTOGRAM_FILLED 
HISTOGRAM_OUTLINE 
HISTOGRAM_LINE 

Definition at line 287 of file BinPlotWidget.qo.h.


Constructor & Destructor Documentation

casa::BinPlotWidget::BinPlotWidget ( bool  fitControls,
bool  rangeControls,
bool  plotModeControls,
QWidget *  parent 
)

fitControls: true allows the user to fit curves to the Histogram.

rangeControls: true allows the user to specify a min/max value on the histogram. plotModeControls: true allows the user to specify whether a histogram should be created for an image, a region, or multiple regions.

casa::BinPlotWidget::~BinPlotWidget (  ) 
casa::BinPlotWidget::BinPlotWidget ( const BinPlotWidget  )  [private]

Member Function Documentation

QwtPlotCurve* casa::BinPlotWidget::addCurve ( QVector< double > &  xValues,
QVector< double > &  yValues,
const QColor &  curveColor 
) [private]
void casa::BinPlotWidget::addDisplayActions ( QMenu *  menu,
QWidgetAction *  binCountAction 
)
void casa::BinPlotWidget::addPlotModeActions ( QMenu *  menu,
QWidgetAction *  channelRangeAction = NULL,
QWidgetAction *  footPrintAction = NULL 
)
void casa::BinPlotWidget::addZoomActions ( bool  rangeControl,
QMenu *  zoomMenu 
)
void casa::BinPlotWidget::binCountChanged ( int  count  )  [private, slot]
void casa::BinPlotWidget::centerPeakSpecified (  )  [private, slot]
void casa::BinPlotWidget::channelRangeChanged ( int  minValue,
int  maxValue,
bool  allChannels,
bool  automatic,
int  specIndex = -1 
) [slot]

The channel has changed value.

void casa::BinPlotWidget::clearAll (  )  [slot]
void casa::BinPlotWidget::clearCurves (  )  [private]
void casa::BinPlotWidget::clearFit (  )  [slot]
void casa::BinPlotWidget::clearGaussianFitMarker (  )  [private]
void casa::BinPlotWidget::clearHistograms (  )  [private]
void casa::BinPlotWidget::clearPoissonFitMarker (  )  [private]
void casa::BinPlotWidget::clearRange (  )  [private, slot]
void casa::BinPlotWidget::connectZoomActions ( ZoomWidget zoomWidget  )  [private]
void casa::BinPlotWidget::defineCurve ( int  id,
const QColor &  curveColor,
bool  clear = true 
) [private, slot]
void casa::BinPlotWidget::defineCurveHistogram ( int  id,
const QColor &  histogramColor 
) [private]
void casa::BinPlotWidget::defineCurveLine ( int  id,
const QColor &  lineColor 
) [private]
void casa::BinPlotWidget::deleteImageRegion ( int  id  ) 
virtual void casa::BinPlotWidget::enterEvent ( QEvent *  event  )  [protected, virtual]
Histogram* casa::BinPlotWidget::findHistogramFor ( int  id  )  [private]
void casa::BinPlotWidget::fitDone ( const QString &  msg  )  [private, slot]
void casa::BinPlotWidget::fitModeChanged (  )  [slot]
void casa::BinPlotWidget::fwhmSpecified (  )  [private, slot]
virtual int casa::BinPlotWidget::getCanvasHeight (  )  [private, virtual]

Implements casa::HeightSource.

pair<double,double> casa::BinPlotWidget::getMinMaxValues (  )  const
QColor casa::BinPlotWidget::getPieceColor ( int  index,
const QColor &  defaultColor 
) const [private]
int casa::BinPlotWidget::getSelectedId (  )  const [private]
std::vector<float> casa::BinPlotWidget::getXValues (  )  const
void casa::BinPlotWidget::hideMaximumRange (  ) 

Customizing the display.

void casa::BinPlotWidget::imageModeSelected ( bool  enabled  )  [slot]

Histogramming an image versus a region.

void casa::BinPlotWidget::imageRegionSelected ( int  id  ) 
void casa::BinPlotWidget::initializeDisplayActions (  )  [private]
void casa::BinPlotWidget::initializeFitWidget ( bool  fitControls  )  [private]
void casa::BinPlotWidget::initializeGaussianFitMarker (  )  [private]
void casa::BinPlotWidget::initializePlotModeControls ( bool  enable  )  [private]
void casa::BinPlotWidget::initializePoissonFitMarker (  )  [private]
void casa::BinPlotWidget::initializeRangeControls ( bool  rangeControls  )  [private]
void casa::BinPlotWidget::initializeZoomControls ( bool  rangeControls  )  [private]
bool casa::BinPlotWidget::isEmpty (  )  const
bool casa::BinPlotWidget::isPlotContains ( int  x,
int  y 
) [private]
bool casa::BinPlotWidget::isPrincipalHistogram ( int  id  )  const [private]
bool casa::BinPlotWidget::isPrintOut ( int  id  )  const [private]
virtual void casa::BinPlotWidget::keyPressEvent ( QKeyEvent *  event  )  [protected, virtual]
void casa::BinPlotWidget::lambdaSpecified (  )  [private, slot]
void casa::BinPlotWidget::lineMoved ( const QPoint &  pt  )  [private, slot]
void casa::BinPlotWidget::lineSelected (  )  [private, slot]
void casa::BinPlotWidget::makeHistogram ( int  id,
const QColor &  histogramColor,
bool  clearCurve = true 
) [private]
void casa::BinPlotWidget::minMaxChanged (  )  [private, slot]
virtual void casa::BinPlotWidget::mousePressEvent ( QMouseEvent *  event  )  [protected, virtual]
BinPlotWidget& casa::BinPlotWidget::operator= ( const BinPlotWidget  )  [private]
void casa::BinPlotWidget::plotModeChanged ( int  mode  )  [slot]
virtual void casa::BinPlotWidget::postMessage ( const QString &  msg  )  [virtual]

Implements casa::HeightSource.

void casa::BinPlotWidget::postStatusMessage ( const QString &  msg  )  [signal]
void casa::BinPlotWidget::rangeChanged (  )  [signal]
void casa::BinPlotWidget::rectangleSizeChanged (  )  [private]
void casa::BinPlotWidget::regionAllModeSelected ( bool  enabled  )  [private, slot]
void casa::BinPlotWidget::regionModeSelected ( bool  enabled  )  [slot]
void casa::BinPlotWidget::reset (  )  [private]
void casa::BinPlotWidget::resetAxisTitles (  )  [private]
void casa::BinPlotWidget::resetGaussianFitMarker (  )  [private, slot]
bool casa::BinPlotWidget::resetImage ( bool  waitOnHistogram = false  )  [private]
void casa::BinPlotWidget::resetPlotTitle (  )  [private]
void casa::BinPlotWidget::resetPoissonFitMarker (  )  [private, slot]
void casa::BinPlotWidget::resetRectangleMarker (  )  [private]
void casa::BinPlotWidget::resetRegion (  )  [private]
virtual void casa::BinPlotWidget::resizeEvent ( QResizeEvent *  event  )  [protected, virtual]
void casa::BinPlotWidget::setAxisLabelFont ( int  size  ) 
void casa::BinPlotWidget::setChannelCount ( int  count  ) 
void casa::BinPlotWidget::setChannelValue ( int  value  ) 
void casa::BinPlotWidget::setColorLookups ( const Vector< uInt > &  lookups  ) 
void casa::BinPlotWidget::setColorMap ( QwtLinearColorMap *  colorMap  ) 
void casa::BinPlotWidget::setColorScaleMax ( int  max  ) 
void casa::BinPlotWidget::setDisplayAxisTitles ( bool  display  ) 
void casa::BinPlotWidget::setDisplayLogY ( bool  display  )  [slot]
void casa::BinPlotWidget::setDisplayPlotTitle ( bool  display  ) 
void casa::BinPlotWidget::setDisplayStep ( bool  display  )  [slot]
void casa::BinPlotWidget::setFitCurveColor ( QColor  color  ) 
void casa::BinPlotWidget::setFitEstimateColor ( QColor  color  ) 
void casa::BinPlotWidget::setHistogramColor ( QColor  color  ) 
bool casa::BinPlotWidget::setImage ( const SHARED_PTR< const ImageInterface< Float > >  img,
bool  waitOnHistogram = false 
)
bool casa::BinPlotWidget::setImageRegion ( ImageRegion *  imageRegion,
int  id 
)
void casa::BinPlotWidget::setLineMode ( bool  lineMode  ) 
void casa::BinPlotWidget::setMinMaxValues ( double  minValue,
double  maxValue,
bool  updateGraph = true 
)
void casa::BinPlotWidget::setMultiColored ( bool  multipleColors  ) 
void casa::BinPlotWidget::setMultipleHistogramColors ( const QList< QColor > &  colors  ) 
void casa::BinPlotWidget::setPlotMode ( int  mode  ) 
void casa::BinPlotWidget::showContextMenu ( const QPoint &  pt  )  [private, slot]
void casa::BinPlotWidget::toAscii ( const QString &  filePath  )  [slot]

Saving the Histogram.

void casa::BinPlotWidget::toPing ( const QString &  filtPath,
int  width,
int  height 
) [slot]
void casa::BinPlotWidget::zoom ( float  percent  )  [private]
void casa::BinPlotWidget::zoomContextFinished (  )  [private, slot]
void casa::BinPlotWidget::zoomMenuFinished (  )  [private, slot]
void casa::BinPlotWidget::zoomNeutral (  )  [private, slot]
void casa::BinPlotWidget::zoomPercentage ( float  minValue,
float  maxValue 
) [private, slot]

Zoom based on an intensity range specified by the user using the zoom context menu.

void casa::BinPlotWidget::zoomRange (  )  [private, slot]

Zoom based on an intensity range specified by the user using the range controls widget.

void casa::BinPlotWidget::zoomRangeMarker ( double  startValue,
double  endValue 
) [private]

Friends And Related Function Documentation

friend class RangePicker [friend]

Definition at line 80 of file BinPlotWidget.qo.h.


Member Data Documentation

Definition at line 231 of file BinPlotWidget.qo.h.

Plot Control We should be able to use just one binCountAction and binCountWidget However, to appear, the constructor has to take the appropriate menu as a parent.

Definition at line 295 of file BinPlotWidget.qo.h.

QWidgetAction* casa::BinPlotWidget::binCountActionMenu [private]

Definition at line 299 of file BinPlotWidget.qo.h.

Definition at line 303 of file BinPlotWidget.qo.h.

Definition at line 307 of file BinPlotWidget.qo.h.

QwtPlot casa::BinPlotWidget::binPlot [private]

Definition at line 249 of file BinPlotWidget.qo.h.

Definition at line 271 of file BinPlotWidget.qo.h.

Definition at line 296 of file BinPlotWidget.qo.h.

Definition at line 300 of file BinPlotWidget.qo.h.

Definition at line 304 of file BinPlotWidget.qo.h.

Definition at line 308 of file BinPlotWidget.qo.h.

Definition at line 286 of file BinPlotWidget.qo.h.

Vector<uInt> casa::BinPlotWidget::colorLookups [private]

Definition at line 242 of file BinPlotWidget.qo.h.

QwtLinearColorMap* casa::BinPlotWidget::colorMap [private]

Definition at line 241 of file BinPlotWidget.qo.h.

Definition at line 243 of file BinPlotWidget.qo.h.

Definition at line 273 of file BinPlotWidget.qo.h.

Definition at line 310 of file BinPlotWidget.qo.h.

Definition at line 289 of file BinPlotWidget.qo.h.

Definition at line 226 of file BinPlotWidget.qo.h.

Definition at line 260 of file BinPlotWidget.qo.h.

Definition at line 236 of file BinPlotWidget.qo.h.

QList<QwtPlotCurve*> casa::BinPlotWidget::curves [private]

Histogram & data.

Definition at line 246 of file BinPlotWidget.qo.h.

Definition at line 229 of file BinPlotWidget.qo.h.

Definition at line 288 of file BinPlotWidget.qo.h.

Definition at line 228 of file BinPlotWidget.qo.h.

QwtPlotPicker* casa::BinPlotWidget::dragLine [private]

Specifying a range with the histogram.

Definition at line 256 of file BinPlotWidget.qo.h.

QwtPlotCurve* casa::BinPlotWidget::fitCurve [private]

Definition at line 275 of file BinPlotWidget.qo.h.

Definition at line 239 of file BinPlotWidget.qo.h.

Definition at line 238 of file BinPlotWidget.qo.h.

Definition at line 277 of file BinPlotWidget.qo.h.

Definition at line 278 of file BinPlotWidget.qo.h.

Definition at line 276 of file BinPlotWidget.qo.h.

Definition at line 274 of file BinPlotWidget.qo.h.

Definition at line 297 of file BinPlotWidget.qo.h.

QWidgetAction* casa::BinPlotWidget::footPrintActionMenu [private]

Definition at line 301 of file BinPlotWidget.qo.h.

Definition at line 305 of file BinPlotWidget.qo.h.

Definition at line 309 of file BinPlotWidget.qo.h.

Definition at line 272 of file BinPlotWidget.qo.h.

Definition at line 247 of file BinPlotWidget.qo.h.

SHARED_PTR<const ImageInterface<Float> > casa::BinPlotWidget::image [private]

Definition at line 248 of file BinPlotWidget.qo.h.

const int casa::BinPlotWidget::IMAGE_ID [private]

Definition at line 252 of file BinPlotWidget.qo.h.

Fitting the histogram.

Definition at line 270 of file BinPlotWidget.qo.h.

const QString casa::BinPlotWidget::LOG_COUNT [private]

Plot Display.

Definition at line 281 of file BinPlotWidget.qo.h.

Definition at line 285 of file BinPlotWidget.qo.h.

Definition at line 234 of file BinPlotWidget.qo.h.

Definition at line 233 of file BinPlotWidget.qo.h.

Definition at line 230 of file BinPlotWidget.qo.h.

Definition at line 240 of file BinPlotWidget.qo.h.

const QString casa::BinPlotWidget::NO_DATA [private]

Definition at line 250 of file BinPlotWidget.qo.h.

const QString casa::BinPlotWidget::NO_DATA_MESSAGE [private]

Definition at line 251 of file BinPlotWidget.qo.h.

Definition at line 311 of file BinPlotWidget.qo.h.

Definition at line 259 of file BinPlotWidget.qo.h.

Definition at line 257 of file BinPlotWidget.qo.h.

Definition at line 267 of file BinPlotWidget.qo.h.

double casa::BinPlotWidget::rectX [private]

Definition at line 266 of file BinPlotWidget.qo.h.

Definition at line 253 of file BinPlotWidget.qo.h.

Definition at line 237 of file BinPlotWidget.qo.h.

Definition at line 232 of file BinPlotWidget.qo.h.

Definition at line 283 of file BinPlotWidget.qo.h.

Definition at line 284 of file BinPlotWidget.qo.h.

Definition at line 282 of file BinPlotWidget.qo.h.

Definition at line 258 of file BinPlotWidget.qo.h.

Ui::BinPlotWidgetClass casa::BinPlotWidget::ui [private]

Definition at line 223 of file BinPlotWidget.qo.h.

QWidgetAction* casa::BinPlotWidget::zoomActionContext [private]

Definition at line 262 of file BinPlotWidget.qo.h.

QWidgetAction* casa::BinPlotWidget::zoomActionMenu [private]

Definition at line 264 of file BinPlotWidget.qo.h.

Definition at line 263 of file BinPlotWidget.qo.h.

Definition at line 265 of file BinPlotWidget.qo.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1