HistogramPlot Class Reference

Sets the data and adjusts the properties of a histogram plot. More...

#include <HistogramPlot.h>

Inheritance diagram for HistogramPlot:

Inheritance graph

List of all members.

Public Member Functions

virtual std::list
< ContextMenuAction
getContextMenuActions () const =0
virtual bool setHistogram (Layer *pLayer)=0
virtual bool setHistogram (Layer *pLayer, RasterChannelType color)=0
virtual bool setHistogram (unsigned int binCount, const double *pBinCenters, const double *pValues, const double *pBinWidths=NULL, bool bAbove=true)=0
virtual void setHistogramColor (const ColorType &histogramColor)=0
virtual ColorType getHistogramColor () const =0
virtual void enableAutoZoom (bool enable)=0
virtual bool isAutoZoomEnabled () const =0

Protected Member Functions

virtual ~HistogramPlot ()


Detailed Description

Sets the data and adjusts the properties of a histogram plot.

The histogram data to display in the plot can be derived from a layer by calling setHistogram(Layer*) or can be set by passing in raw histogram values into setHistogram(unsigned int,const double*,const double*,const double*,bool).

This subclass of Subject will notify upon the following conditions:

See also:
CartesianPlot

Definition at line 33 of file HistogramPlot.h.


Constructor & Destructor Documentation

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

This object should be destroyed by calling DesktopServices::deleteView().

Definition at line 169 of file HistogramPlot.h.


Member Function Documentation

virtual std::list<ContextMenuAction> HistogramPlot::getContextMenuActions (  )  const [pure virtual]

Returns the context menu actions available for this session item.

Returns:
The list of context menu actions that should be displayed when the user right-clicks on a widget displaying or containing the session item.
See also:
ContextMenuAction

Default Implementation:
The default implementation returns the context menu actions listed here. The default actions can be removed or additional actions can be added by attaching to the signalAboutToShowContextMenu() signal.

Implements CartesianPlot.

virtual bool HistogramPlot::setHistogram ( Layer pLayer  )  [pure virtual]

Sets the histogram data values to those of the data element for a given layer.

Parameters:
pLayer The layer for which to display the histogram of its data. If pLayer is NULL or not a RasterLayer or ThresholdLayer, the existing histogram is cleared. If pLayer is a RasterLayer, the histogram of the data currently displayed in grayscale mode is set. To set the histogram for a different display color, call setHistogram(Layer*, RasterChannelType) instead.
Subject Notifications:
This method will notify Subject::signalModified().
Returns:
Returns true if the histogram for the layer was set successfully, otherwise returns false.

virtual bool HistogramPlot::setHistogram ( Layer pLayer,
RasterChannelType  color 
) [pure virtual]

Sets the histogram data values to those of the data element for a given layer with a given display color.

Parameters:
pLayer The layer for which to display the histogram of its data. See setHistogram(Layer*) for restrictions on the layer type.
color The display color for which to get the histogram to set. If pLayer is not a RasterLayer, this parameter is ignored.
Subject Notifications:
This method will notify Subject::signalModified().
Returns:
Returns true if the histogram for the layer and display color was set successfully, otherwise returns false.

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

Sets the histogram data values.

The histogram plot contains a default properties page widget that allows users to set the histogram color. The page only appears in the properties dialog when the histogram data contains at least one bin. Calling this method creates the default properties page widget if a properties widget has not yet been set and binCount is greater than zero. If the number of bins is zero and the properties page widget is the default widget, the widget is deleted.

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. Set this parameter to true to count the values as a positive number.
Subject Notifications:
This method will notify Subject::signalModified().
Returns:
Returns true if the histogram data values were set successfully; otherwise returns false.
See also:
getPropertiesWidget()

virtual void HistogramPlot::setHistogramColor ( const ColorType histogramColor  )  [pure virtual]

Sets the histogram color.

Parameters:
histogramColor The new color for the histogram. If histogramColor is invalid, the method does nothing.
See also:
ColorType::isValid()

virtual ColorType HistogramPlot::getHistogramColor (  )  const [pure virtual]

Returns the histogram color.

Returns:
The current histogram color.

virtual void HistogramPlot::enableAutoZoom ( bool  enable  )  [pure virtual]

Toggles the capability of the plot to update its zoom when the histogram data changes.

This method toggles the capability to automatically zoom RasterLayer plots to the extents of the histogram data when the displayed band changes. This capability is only available for plots displaying RasterLayer histograms.

Parameters:
enable Set this value to true to automatically zoom a RasterLayer plot when the displayed band changes. Set this value to false to not modify the zoom level when the displayed band changes.

virtual bool HistogramPlot::isAutoZoomEnabled (  )  const [pure virtual]

Queries whether the plot updates its zoom when the histogram data changes.

Returns:
Returns true if a RasterLayer plot automatically zooms to the extents of the histogram data when the displayed band Returns false if the zoom level is not modified when the displayed band changes.


Software Development Kit - Opticks 4.9.0 Build 16218