qCC  version 2.5.4 (Qt) - 19 Apr. 2014
 All Classes Functions Variables Typedefs Enumerations
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ccHistogramWindow Class Reference

Histogram widget. More...

#include <ccHistogramWindow.h>

Inheritance diagram for ccHistogramWindow:
Inheritance graph
[legend]
Collaboration diagram for ccHistogramWindow:
Collaboration graph
[legend]

Public Member Functions

 ccHistogramWindow (QWidget *parent=0)
 Default constructor.
 
virtual ~ccHistogramWindow ()
 Destructor.
 
void setInfoStr (const QString &str)
 Sets first line.
 
void fromSF (ccScalarField *sf, unsigned initialNumberOfClasses=0, bool numberOfClassesCanBeChanged=true)
 Computes histogram from a scalar field. More...
 
void fromBinArray (unsigned *histoValues, unsigned numberOfClasses, double minVal, double maxVal, bool giveArrayOwnership=true)
 Creates histogram from a bin array (each bin = number of elements per class) More...
 
void setCurveValues (double *curveValues, unsigned numberOfCurvePoints, bool giveArrayOwnership=true)
 Sets overlay curve values. More...
 

Protected Member Functions

void setNumberOfClasses (unsigned n)
 Changes the current number of classes. More...
 
void mousePressEvent (QMouseEvent *event)
 
void mouseMoveEvent (QMouseEvent *event)
 
void wheelEvent (QWheelEvent *event)
 
void closeEvent (QCloseEvent *event)
 
void paintGL ()
 
unsigned getMaxHistoVal ()
 Returns current maximum bin size.
 
void clear ()
 Clears internal structures.
 
bool computeBinArrayFromSF ()
 Dynamically computes histogram bins from scalar field.
 

Protected Attributes

QString m_infoStr
 1st line
 
bool m_viewInitialized
 
bool m_numberOfClassesCanBeChanged
 
ccScalarField * m_associatedSF
 
unsigned m_numberOfClasses
 
unsigned * m_histoValues
 
bool m_ownHistoValues
 
double m_minVal
 
double m_maxVal
 
unsigned m_maxHistoVal
 
double * m_curveValues
 
double m_maxCurveValue
 
unsigned m_numberOfCurvePoints
 
bool m_ownCurveValues
 
int m_roi [4]
 
int m_xMinusButton
 
int m_yMinusButton
 
int m_xPlusButton
 
int m_yPlusButton
 
int m_buttonSize
 
bool m_drawVerticalIndicator
 
double m_verticalIndicatorPositionPercent
 
QFont m_renderingFont
 

Detailed Description

Histogram widget.

Member Function Documentation

void ccHistogramWindow::fromBinArray ( unsigned *  histoValues,
unsigned  numberOfClasses,
double  minVal,
double  maxVal,
bool  giveArrayOwnership = true 
)

Creates histogram from a bin array (each bin = number of elements per class)

Number of classes can't be modified.

Parameters
histoValuesarray of bins (number of points per class)
numberOfClassescorresponding number of classes
minValminimum value
maxValmaximum value
giveArrayOwnershipwhether array ownership is passed to the dialog or not
Returns
success
void ccHistogramWindow::fromSF ( ccScalarField *  sf,
unsigned  initialNumberOfClasses = 0,
bool  numberOfClassesCanBeChanged = true 
)

Computes histogram from a scalar field.

Number of classes can be freely modified afterwards (if enabled).

Parameters
sfassociated scalar field
initialNumberOfClassesinitial number of classes
numberOfClassesCanBeChangedwhether to allow the user to modify the number of classes
Returns
success
void ccHistogramWindow::setCurveValues ( double *  curveValues,
unsigned  numberOfCurvePoints,
bool  giveArrayOwnership = true 
)

Sets overlay curve values.

Curve will only appear if the number of points matches the current number of classes)

Parameters
curveValuescurve points 'Y' coordinates (points will be regularly spread over histogram span)
numberOfCurvePointsnumber of points
giveArrayOwnershipwhether array ownership is passed to the dialog or not
void ccHistogramWindow::setNumberOfClasses ( unsigned  n)
protected

Changes the current number of classes.

Warning: n should be a multiple of 4.


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