PseudocolorLayer Class Reference

Adjusts the properties of a pseudocolor layer. More...

#include <PseudocolorLayer.h>

Inheritance diagram for PseudocolorLayer:

Inheritance graph

List of all members.

Public Member Functions

virtual int addClass ()=0
virtual int addInitializedClass (const std::string &className, int iValue, const ColorType &classColor, bool bDisplayed=true)=0
virtual void getClassIDs (std::vector< int > &classIds) const =0
virtual unsigned int getClassCount () const =0
virtual bool removeClass (int iID)=0
virtual void clear ()=0
virtual bool setClassProperties (int iID, const std::string &className, int iValue, const ColorType &classColor, bool bDisplayed)=0
virtual bool setClassName (int iID, const std::string &className)=0
virtual bool getClassName (int iID, std::string &className) const =0
virtual bool setClassValue (int iID, int iValue)=0
virtual int getClassValue (int iID) const =0
virtual bool setClassColor (int iID, const ColorType &classColor)=0
virtual ColorType getClassColor (int iID) const =0
virtual bool setClassDisplayed (int iID, bool bDisplayed)=0
virtual bool isClassDisplayed (int iID) const =0
virtual SymbolType getSymbol () const =0
virtual void setSymbol (SymbolType symbol)=0

Static Public Member Functions

static SymbolType getSettingMarkerSymbol ()
static bool hasSettingMarkerSymbol ()
static void setSettingMarkerSymbol (SymbolType newValue, bool setIfSame=false)
static std::string getSettingMarkerSymbolKey ()
static const std::string & signalSymbolChanged ()
static const std::string & signalCleared ()

Protected Member Functions

virtual ~PseudocolorLayer ()


Detailed Description

Adjusts the properties of a pseudocolor layer.

A pseudocolor layer consists of sets of markers identifying pixels in a scene. Each set of markers is called a class, and each class has four properties: name, inclusion value, color, and a display flag. The inclusion value defines which pixels are included in the class. The value corresponds with the data value of the underlying spectral element. Element values in float or double values are truncated for the inclusion value. This class manages the pseudocolor classes and their properties, where each class is identified by a unique ID value. The pixel marker is drawn with a symbol based on the layer properties.

This subclass of Subject will notify upon the following conditions:

See also:
Layer

Definition at line 43 of file PseudocolorLayer.h.


Constructor & Destructor Documentation

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

This should be destroyed by calling SpatialDataView::deleteLayer.

Definition at line 313 of file PseudocolorLayer.h.


Member Function Documentation

static SymbolType PseudocolorLayer::getSettingMarkerSymbol (  )  [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 56 of file PseudocolorLayer.h.

static bool PseudocolorLayer::hasSettingMarkerSymbol (  )  [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 63 of file PseudocolorLayer.h.

static void PseudocolorLayer::setSettingMarkerSymbol ( SymbolType  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 79 of file PseudocolorLayer.h.

static std::string PseudocolorLayer::getSettingMarkerSymbolKey (  )  [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 87 of file PseudocolorLayer.h.

static const std::string& PseudocolorLayer::signalSymbolChanged (  )  [static]

Emitted with any<SymbolType> when the symbol style is changed.

Definition at line 92 of file PseudocolorLayer.h.

static const std::string& PseudocolorLayer::signalCleared (  )  [static]

Emitted when the list of classes is cleared.

Definition at line 96 of file PseudocolorLayer.h.

virtual int PseudocolorLayer::addClass (  )  [pure virtual]

Adds a new class to the current pseudocolor layer.

Returns:
The unique class ID on success. Otherwise, -1.
Subject Notifications:
This method will notify Subject::signalModified.
See also:
addInitializedClass(), removeClass()

virtual int PseudocolorLayer::addInitializedClass ( const std::string &  className,
int  iValue,
const ColorType classColor,
bool  bDisplayed = true 
) [pure virtual]

Adds a new class to the current pseudocolor layer.

Parameters:
className The new class name.
iValue The new class value.
classColor The new class RGB color.
bDisplayed TRUE if the new class should initially be displayed, otherwise FALSE.
Returns:
The unique class ID on success. Otherwise, -1.
Subject Notifications:
This method will notify Subject::signalModified.
See also:
addClass()

virtual void PseudocolorLayer::getClassIDs ( std::vector< int > &  classIds  )  const [pure virtual]

Retrieves the unique IDs for all classes.

Parameters:
classIds A reference to a vector in which to put the class IDs. This vector should be allocated by the studio. A plug-in can do this via the ObjectFactory.

virtual unsigned int PseudocolorLayer::getClassCount (  )  const [pure virtual]

Returns the number of classes in the pseudocolor layer.

Returns:
The number of classes.
See also:
getClassIDs()

virtual bool PseudocolorLayer::removeClass ( int  iID  )  [pure virtual]

Removes a class from the pseudocolor layer.

Parameters:
iID The unique ID of the class to remove.
Returns:
TRUE if the class was successfully removed. FALSE if no class exists with the given ID or if an error occurred.
Subject Notifications:
This method will notify Subject::signalModified.
See also:
clear()

virtual void PseudocolorLayer::clear (  )  [pure virtual]

Removes all classes from the current pseudocolor layer.

Subject Notifications:
This method will notify signalCleared.
See also:
removeClass()

virtual bool PseudocolorLayer::setClassProperties ( int  iID,
const std::string &  className,
int  iValue,
const ColorType classColor,
bool  bDisplayed 
) [pure virtual]

Sets all properties for an existing class on the current pseudocolor layer.

Parameters:
iID The unique ID of the class.
className The new class name.
iValue The new class value.
classColor The new class RGB color.
bDisplayed TRUE if the new class should be displayed, otherwise FALSE.
Returns:
TRUE if the properties were set successfully, otherwise FALSE.

virtual bool PseudocolorLayer::setClassName ( int  iID,
const std::string &  className 
) [pure virtual]

Sets the name of a pseudocolor class.

Parameters:
iID The unique ID of the class.
className The new name.
Returns:
TRUE if the class name was successfully set. FALSE if no class exists with the given ID or if an error occurred.
See also:
getClassName()

virtual bool PseudocolorLayer::getClassName ( int  iID,
std::string &  className 
) const [pure virtual]

Retrieves the name of a pseudocolor class.

Parameters:
iID The unique ID of the class.
className A string that is populated with the class name
Returns:
True if the class name was successfully populated, otherwise false.
See also:
setClassName()

virtual bool PseudocolorLayer::setClassValue ( int  iID,
int  iValue 
) [pure virtual]

Sets the value of a pseudocolor class.

Parameters:
iID The unique ID of the class.
iValue The new value.
Returns:
TRUE if the class value was successfully set. FALSE if no class exists with the given ID or if an error occurred.
See also:
getClassValue()

virtual int PseudocolorLayer::getClassValue ( int  iID  )  const [pure virtual]

Retrieves the value of a pseudocolor class.

Parameters:
iID The unique ID of the class.
Returns:
The class value. A value of -1 is returned if no class exists with the given ID or if an error occurred.
See also:
setClassValue()

virtual bool PseudocolorLayer::setClassColor ( int  iID,
const ColorType classColor 
) [pure virtual]

Sets the color of a pseudocolor class.

Parameters:
iID The unique ID of the class.
classColor The new RGB color for the class.
Returns:
TRUE if the class color was successfully set. FALSE if no class exists with the given ID or if an error occurred.
See also:
getClassColor()

virtual ColorType PseudocolorLayer::getClassColor ( int  iID  )  const [pure virtual]

Retrieves the color of a pseudocolor class.

Parameters:
iID The unique ID of the class.
Returns:
The class color.
See also:
setClassColor()

virtual bool PseudocolorLayer::setClassDisplayed ( int  iID,
bool  bDisplayed 
) [pure virtual]

Sets the display state of a pseudocolor class.

Parameters:
iID The unique ID of the class.
bDisplayed TRUE if the class should be displayed. FALSE if the class should not be displayed.
Returns:
TRUE if the class display state was successfully set. FALSE if no class exists with the given ID or if an error occurred.
See also:
isClassDisplayed()

virtual bool PseudocolorLayer::isClassDisplayed ( int  iID  )  const [pure virtual]

Retrieves the display state of a pseudocolor class.

Parameters:
iID The unique ID of the class.
Returns:
TRUE if the class if displayed. FALSE if the class is not displayed or if no class exists with the given ID
See also:
setClassDisplayed()

virtual SymbolType PseudocolorLayer::getSymbol (  )  const [pure virtual]

virtual void PseudocolorLayer::setSymbol ( SymbolType  symbol  )  [pure virtual]


Software Development Kit - Opticks 4.9.0 Build 16218