Histogram Class Reference

Displays a histogram as a single plot object. More...

#include <Histogram.h>

Inheritance diagram for Histogram:

Inheritance graph

List of all members.

Public Member Functions

virtual bool setHistogramData (unsigned int binCount, const double *pBinCenters, const double *pValues, const double *pBinWidths=NULL, bool bAbove=true)=0
virtual void getHistogramData (std::vector< double > &binCenters, std::vector< double > &binValues, std::vector< double > &binWidths) const =0
virtual unsigned int getNumBins () const =0
virtual void setColor (const ColorType &histogramColor)=0
virtual ColorType getColor () const =0

Static Public Member Functions

static const std::string & signalHistogramChanged ()
static const std::string & signalColorChanged ()

Protected Member Functions

virtual ~Histogram ()


Detailed Description

Displays a histogram as a single plot object.

This subclass of Subject will notify upon the following conditions:

See also:
PlotObject

Definition at line 29 of file Histogram.h.


Constructor & Destructor Documentation

virtual Histogram::~Histogram (  )  [protected, virtual]

This should be destroyed by calling PlotView::deleteObject.

Definition at line 112 of file Histogram.h.


Member Function Documentation

static const std::string& Histogram::signalHistogramChanged (  )  [static]

Emitted when the histogram data changes.

Definition at line 35 of file Histogram.h.

static const std::string& Histogram::signalColorChanged (  )  [static]

Emitted with any<ColorType> when the bin color changes.

Definition at line 39 of file Histogram.h.

virtual bool Histogram::setHistogramData ( unsigned int  binCount,
const double *  pBinCenters,
const double *  pValues,
const double *  pBinWidths = NULL,
bool  bAbove = true 
) [pure virtual]

Sets the histogram data values.

Parameters:
binCount The number of data values in the histogram.
pBinCenters The histogram bin center values.
pValues The count values for each histogram bin.
pBinWidths The width of each histogram bin. If this value is NULL, a default bin width is calculated.
bAbove An optional flag to display the count values as either positive or negative. TRUE sets the values as positive.
Returns:
TRUE if the histogram data values were set successfully, otherwise FALSE.
Subject Notifications:
This method will notify signalHistogramChanged.

virtual void Histogram::getHistogramData ( std::vector< double > &  binCenters,
std::vector< double > &  binValues,
std::vector< double > &  binWidths 
) const [pure virtual]

Retrieves the histogram data values.

Parameters:
binCenters A vector populated with the location of each bin center. The size of the vector indicates the number of bins.
binValues A vector populated with the count value for each bin. The size of the vector indicates the number of bins.
binWidths A vector populated with the width of each bin. The size of the vector indicates the number of bins.
See also:
getNumBins()

virtual unsigned int Histogram::getNumBins (  )  const [pure virtual]

Returns the number of bins in the histogram.

Returns:
The number of bins in the histogram.

virtual void Histogram::setColor ( const ColorType histogramColor  )  [pure virtual]

Sets the histogram color.

Parameters:
histogramColor The new color for the histogram. Must be a valid color.
See also:
ColorType::isValid()
Subject Notifications:
This method will notify signalColorChanged with any<ColorType>.

virtual ColorType Histogram::getColor (  )  const [pure virtual]

Returns the histogram color.

Returns:
The current histogram color.


Software Development Kit - Opticks 4.9.0 Build 16218