HistogramWindow Class Reference

A specialized dock window to display histogram plots. More...

#include <HistogramWindow.h>

Inheritance diagram for HistogramWindow:

Inheritance graph

List of all members.

Public Member Functions

virtual PlotWidgetcreatePlot (Layer *pLayer, PlotSet *pPlotSet=NULL)=0
virtual PlotWidgetgetPlot (Layer *pLayer) const =0
virtual PlotWidgetgetPlot (Layer *pLayer, const RasterChannelType &eColor) const =0
virtual void setCurrentPlot (Layer *pLayer)=0
virtual bool setCurrentPlot (Layer *pLayer, const RasterChannelType &eColor)=0
virtual void deletePlot (Layer *pLayer)=0
virtual void createSubsetPlot (Layer *pLayer)=0

Static Public Member Functions

static bool getSettingLayerActivation ()
static bool hasSettingLayerActivation ()
static void setSettingLayerActivation (bool newValue, bool setIfSame=false)
static std::string getSettingLayerActivationKey ()

Protected Member Functions

virtual ~HistogramWindow ()


Detailed Description

A specialized dock window to display histogram plots.

The histogram window manages multiple histogram plots on potentially multple plot sets. A plot set is added for each spatial data view that contains layers. Histogram plot widgets are automatically added to the plot set when the layer is created. For plots created automatically, the name of the plot set is the same name as the view, and the name of the plot is the same name as the layer. Additional plot widgets can be added to any plot set in the window, using the basic functionality in PlotSet as desired.

This subclass of Subject will notify upon the following conditions:

See also:
DockWindow, PlotSetGroup, PlotSet, PlotWidget, HistogramPlot, Layer

Definition at line 38 of file HistogramWindow.h.


Constructor & Destructor Documentation

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

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

Definition at line 241 of file HistogramWindow.h.


Member Function Documentation

static bool HistogramWindow::getSettingLayerActivation (  )  [static]

Returns the current value for this setting.

If this setting does not exist in ConfigurationSettings, a verification error will be logged to the message log and potentially a verification error message box will be displayed to the user.

Please see Settings Macros for more details

Returns:
the current value for this setting.

Definition at line 51 of file HistogramWindow.h.

static bool HistogramWindow::hasSettingLayerActivation (  )  [static]

Returns true if this setting exists and has a value in ConfigurationSettings.

Please see Settings Macros for more details

Returns:
true if this setting exists, false otherwise.

Definition at line 58 of file HistogramWindow.h.

static void HistogramWindow::setSettingLayerActivation ( bool  newValue,
bool  setIfSame = false 
) [static]

Changes the current value of this setting to the new value.

Please see Settings Macros for more details

Parameters:
newValue the new value for this setting.
setIfSame If true, the value will be set into ConfigurationSettings even if the newValue and existing value are the same. This has the side-effect of making the value a per-user setting and stored in the user's configuration file. If false, this value will only be set if the newValue and existing value are different. Therefore the value will only be stored in the user's configuration file if the newValue is unique to the user.

Definition at line 74 of file HistogramWindow.h.

static std::string HistogramWindow::getSettingLayerActivationKey (  )  [static]

Returns the key for this setting that could be passed to ConfigurationSettings::getSetting() or ConfigurationSettings::setSetting().

Please see Settings Macros for more details

Returns:
the key used for this setting.

Definition at line 82 of file HistogramWindow.h.

virtual PlotWidget* HistogramWindow::createPlot ( Layer pLayer,
PlotSet pPlotSet = NULL 
) [pure virtual]

Creates a histogram plot widget for a given layer.

This method creates a new histogram plot widget to display the data in the given layer and adds it to a plot set with the same name as the view in which the layer is displayed.

Only layers that support histogram data can be used. Current valid layer types are as follows:

If the layer is a raster layer or cube layer, multiple plot widgets are added, one for each of the gray, red, green, and blue color components.

Parameters:
pLayer The layer for which to create a new histogram plot widget. Only layers that support histogram data can be used.
pPlotSet The plot set on which to create the new histogram plot widget. Passing in NULL will add the plot to the plot set representing the view in which the layer is displayed.
Returns:
The new plot widget for the given layer. If the given layer is a raster layer or a cube layer, the grayscale plot widget is returned. NULL is returned if a plot for the given layer already exists, or if the given layer does not support histogram data.
See also:
getPlot(Layer*) const

virtual PlotWidget* HistogramWindow::getPlot ( Layer pLayer  )  const [pure virtual]

Returns the histogram plot widget for a given layer.

This method returns the histogram plot widget for a given layer that is contained in the window, regardless of the active plot set.

If the layer is a raster layer or cube layer, which has multiple plot widgets for the gray, red, green, and blue components, the grayscale plot is returned if the layer is currently in grayscale display mode, and the red plot is returned if the layer is in RGB display mode. To get the plot of a specific color component, call the overloaded getPlot(Layer*, const RasterElement&) const function instead.

Parameters:
pLayer The layer for which to get its histogram plot widget.
Returns:
The histogram plot widget for the given layer. NULL is returned if the plot does not exist in any of the window's plot sets.
See also:
RasterLayer, DisplayMode

virtual PlotWidget* HistogramWindow::getPlot ( Layer pLayer,
const RasterChannelType eColor 
) const [pure virtual]

Returns the histogram plot widget for a given layer.

This method returns the histogram plot widget for a given layer with a given color component, regardless of the active plot set. This is primarily useful to get the plot of a specific color component for a raster layer.

Parameters:
pLayer The layer for which to get its histogram plot widget.
eColor The color component to use to get the plot. If the given layer is not a raster layer, this value is ignored.
Returns:
The histogram plot widget for the given layer. NULL is returned if the plot does not exist in any of the window's plot sets.
See also:
RasterLayer

virtual void HistogramWindow::setCurrentPlot ( Layer pLayer  )  [pure virtual]

Sets the active histogram plot widget in the window.

This method set the active histogram plot widget in the window based on a given layer. If the plot is contained on a plot set that is not active, that plot set is also activated.

If the layer is a raster layer, which has multiple plots for the gray, red, green, and blue components, the grayscale plot is activated if the layer is currently in grayscale display mode or the red plot is activated if the layer is in RGB display mode. To activate the specific gray, red, green, or blue component plots, call the overloaded setCurrentPlot(Layer*, const RasterChannelType&) function.

Parameters:
pLayer The layer for which to activate its plot widget in the window. If a plot displaying the given layer does not exist in the window, this method does nothing.
See also:
RasterLayer, DisplayMode

virtual bool HistogramWindow::setCurrentPlot ( Layer pLayer,
const RasterChannelType eColor 
) [pure virtual]

Sets the active histogram plot widget in the window.

This method set the active histogram plot widget in the window based on a given layer and color component. This is primarily useful to activate one of the multiple plots for a raster layer. If the plot is contained on a plot set that is not active, that plot set is also activated.

Parameters:
pLayer The layer for which to activate its plot widget in the window. If a plot displaying the given layer does not exist in the window, this method does nothing.
eColor The color component to use to activate the plot widget. If the given layer is not a raster layer or cube layer, this value is ignored.
Returns:
The method returns true if the histogram plot was successfully activated; otherwise returns false.
See also:
RasterLayer

virtual void HistogramWindow::deletePlot ( Layer pLayer  )  [pure virtual]

Deletes the histogram plot widget of a given layer.

This method destroys the histogram plot widget of the given layer, regardless of the active plot set.

Parameters:
pLayer The layer for which to delete its histogram plot widget.

virtual void HistogramWindow::createSubsetPlot ( Layer pLayer  )  [pure virtual]

Create a new histogram plot over a subset of the data in the specified layer.

This prompts the user for a spatial and band subset and creates a new histogram plot with the statistics data for that subset.

Parameters:
pLayer The subset will be calculated over this layer's data. This must be a layer which holds a RasterElement. The available AOIs for spatial subset will be the AoiLayers in the same view as pLayer.
Note:
Currently works with RasterLayer and ThresholdLayer only.


Software Development Kit - Opticks 4.9.0 Build 16218