MeVisLabToolboxReference
ml::WEMPrimitiveValueList Class Reference

Stores a value list where the values are associated to primitives (WEMNode, WEMEdge, and WEMFace). More...

#include <WEMPrimitiveValueList.h>

List of all members.

Public Member Functions

 WEMPrimitiveValueList ()
 Constructor.
 WEMPrimitiveValueList (std::string description)
 Constructor.
 WEMPrimitiveValueList (const WEMPrimitiveValueList &valueList)
 Copy constructor.
 ~WEMPrimitiveValueList ()
 Destructor.
void copyProperties (const WEMPrimitiveValueList &valueList)
 Copies properties of the given primitive value list.
std::string getDescription () const
 Returns the description of this PVL.
std::string getUnits () const
 Returns the units string.
void setUnits (std::string units)
 Sets the units string.
PrimitiveValueListTypes getPrimitiveValueListType () const
 Returns the primitive mode.
void setPrimitiveValueListType (PrimitiveValueListTypes primitiveValueListType)
 Sets the primitive mode.
bool isValid () const
 Returns whether the values are valid? The description should be non-empty, the list should contain values and the minimum and maximum values should be set.
unsigned int getNumValues () const
 Returns the number of values.
bool isPersistent () const
 Returns whether this PVL should be saved when saving the WEM?
void setPersistence (bool persistent)
 Sets whether the value list should be saved when saving the WEM.
MLDataType getDataType () const
 Returns the data type.
void setDataType (MLDataType dataType)
 Sets the data type.
double getMinValue () const
 Returns the minimum value.
double getMaxValue () const
 Returns the maximum value.
double getMeanValue () const
 Returns the mean value. Make sure to have called updateStatistics() before!
double getStandardDeviationValue () const
 Returns the standard deviation value. Make sure to have called updateStatistics() before!
double getRootMeanSquareDeviationValue () const
 Returns the root mean sqaure deviation value. Make sure to have called updateStatistics() before!
void setMinMaxValue (double minValue, double maxValue)
 Sets the min and max values, switches to fixed values.
void computeAndSetMinMaxFixedValues ()
 Computes the min and max values, sets them and switches to fixed values.
void clampMinValue (double minValue)
 Clamps all values to the given min value.
void clampMaxValue (double maxValue)
 Clamps all values to the given max value.
void updateStatistics ()
 Update statistics: mean, standard deviation, and root mean square deviation.
double getValue (unsigned int index) const
 Returns the value at the given index.
void setValue (unsigned int index, double value)
 Sets the given value at the given index.
void appendValue (double value)
 Appends the given value.
void setValueFrom (unsigned int index, unsigned int source)
 Copies the value from the index source to the given index.
void addValueFrom (unsigned int index, unsigned int source, double modifier)
 Adds the value from the index source to the given index. The min and max values are not adjusted.
void resetValues ()
 Clears the internal values and resets the min/max and statistical values.
void initializeValues (unsigned int number, double value)
 Initializes the first number of values with the given value.
void multiplyValues (double modifier)
 Multiplies all values with the given modifier.
void extendValues (unsigned int number, double value)
 Extends the list with the given amount and initializes new values with that given value.
void saveTo (std::ostream &outstream)
 Saves attributes to the given output stream.
unsigned int loadFrom (std::istream &instream, short version, bool swapBytes)
 Loads attributes from the given input stream.
unsigned int loadFrom (char *map, short version, bool swapBytes)
 Loads attributes from the given memory map,.
Deprecated.
double getStdValue () const
double getRMSDValue () const
 Use getRootMeanSquareDeviationValue() instead.

Detailed Description

Stores a value list where the values are associated to primitives (WEMNode, WEMEdge, and WEMFace).

Most commonly, values are associated with WEMNodes.

Definition at line 25 of file WEMPrimitiveValueList.h.


Constructor & Destructor Documentation

ml::WEMPrimitiveValueList::WEMPrimitiveValueList ( )

Constructor.

ml::WEMPrimitiveValueList::WEMPrimitiveValueList ( std::string  description)

Constructor.

ml::WEMPrimitiveValueList::WEMPrimitiveValueList ( const WEMPrimitiveValueList valueList)

Copy constructor.

ml::WEMPrimitiveValueList::~WEMPrimitiveValueList ( )

Destructor.


Member Function Documentation

void ml::WEMPrimitiveValueList::addValueFrom ( unsigned int  index,
unsigned int  source,
double  modifier 
) [inline]

Adds the value from the index source to the given index. The min and max values are not adjusted.

Definition at line 108 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::appendValue ( double  value) [inline]

Appends the given value.

Use with caution! The method does not adjust min and max values! WEMPatch already adds a default value when a primitive is added, so use with caution!

Definition at line 104 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::clampMaxValue ( double  maxValue)

Clamps all values to the given max value.

void ml::WEMPrimitiveValueList::clampMinValue ( double  minValue)

Clamps all values to the given min value.

void ml::WEMPrimitiveValueList::computeAndSetMinMaxFixedValues ( )

Computes the min and max values, sets them and switches to fixed values.

void ml::WEMPrimitiveValueList::copyProperties ( const WEMPrimitiveValueList valueList)

Copies properties of the given primitive value list.

void ml::WEMPrimitiveValueList::extendValues ( unsigned int  number,
double  value 
)

Extends the list with the given amount and initializes new values with that given value.

Does not update the statistical values!

MLDataType ml::WEMPrimitiveValueList::getDataType ( void  ) const [inline]

Returns the data type.

Definition at line 70 of file WEMPrimitiveValueList.h.

std::string ml::WEMPrimitiveValueList::getDescription ( ) const [inline]

Returns the description of this PVL.

Definition at line 46 of file WEMPrimitiveValueList.h.

double ml::WEMPrimitiveValueList::getMaxValue ( ) const [inline]

Returns the maximum value.

Definition at line 77 of file WEMPrimitiveValueList.h.

Referenced by ml::WEMPatch::getLUTMax().

double ml::WEMPrimitiveValueList::getMeanValue ( ) const [inline]

Returns the mean value. Make sure to have called updateStatistics() before!

Definition at line 79 of file WEMPrimitiveValueList.h.

double ml::WEMPrimitiveValueList::getMinValue ( ) const [inline]

Returns the minimum value.

Definition at line 75 of file WEMPrimitiveValueList.h.

Referenced by ml::WEMPatch::getLUTMin().

unsigned int ml::WEMPrimitiveValueList::getNumValues ( ) const [inline]

Returns the number of values.

Definition at line 62 of file WEMPrimitiveValueList.h.

PrimitiveValueListTypes ml::WEMPrimitiveValueList::getPrimitiveValueListType ( ) const [inline]

Returns the primitive mode.

Definition at line 54 of file WEMPrimitiveValueList.h.

double ml::WEMPrimitiveValueList::getRMSDValue ( ) const [inline]

Use getRootMeanSquareDeviationValue() instead.

Definition at line 135 of file WEMPrimitiveValueList.h.

double ml::WEMPrimitiveValueList::getRootMeanSquareDeviationValue ( ) const [inline]

Returns the root mean sqaure deviation value. Make sure to have called updateStatistics() before!

Definition at line 83 of file WEMPrimitiveValueList.h.

double ml::WEMPrimitiveValueList::getStandardDeviationValue ( ) const [inline]

Returns the standard deviation value. Make sure to have called updateStatistics() before!

Definition at line 81 of file WEMPrimitiveValueList.h.

double ml::WEMPrimitiveValueList::getStdValue ( ) const [inline]

Use getStandardDeviationValue() instead.

Definition at line 133 of file WEMPrimitiveValueList.h.

std::string ml::WEMPrimitiveValueList::getUnits ( ) const [inline]

Returns the units string.

Definition at line 49 of file WEMPrimitiveValueList.h.

double ml::WEMPrimitiveValueList::getValue ( unsigned int  index) const [inline]

Returns the value at the given index.

Definition at line 98 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::initializeValues ( unsigned int  number,
double  value 
)

Initializes the first number of values with the given value.

bool ml::WEMPrimitiveValueList::isPersistent ( ) const [inline]

Returns whether this PVL should be saved when saving the WEM?

Definition at line 65 of file WEMPrimitiveValueList.h.

bool ml::WEMPrimitiveValueList::isValid ( ) const

Returns whether the values are valid? The description should be non-empty, the list should contain values and the minimum and maximum values should be set.

unsigned int ml::WEMPrimitiveValueList::loadFrom ( std::istream &  instream,
short  version,
bool  swapBytes 
)

Loads attributes from the given input stream.

unsigned int ml::WEMPrimitiveValueList::loadFrom ( char *  map,
short  version,
bool  swapBytes 
)

Loads attributes from the given memory map,.

void ml::WEMPrimitiveValueList::multiplyValues ( double  modifier)

Multiplies all values with the given modifier.

Adjusts min and max values, but does not update the statistical values.

void ml::WEMPrimitiveValueList::resetValues ( )

Clears the internal values and resets the min/max and statistical values.

void ml::WEMPrimitiveValueList::saveTo ( std::ostream &  outstream)

Saves attributes to the given output stream.

void ml::WEMPrimitiveValueList::setDataType ( MLDataType  dataType) [inline]

Sets the data type.

Definition at line 72 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::setMinMaxValue ( double  minValue,
double  maxValue 
) [inline]

Sets the min and max values, switches to fixed values.

Definition at line 86 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::setPersistence ( bool  persistent) [inline]

Sets whether the value list should be saved when saving the WEM.

Definition at line 67 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::setPrimitiveValueListType ( PrimitiveValueListTypes  primitiveValueListType) [inline]

Sets the primitive mode.

Definition at line 56 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::setUnits ( std::string  units) [inline]

Sets the units string.

Definition at line 51 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::setValue ( unsigned int  index,
double  value 
)

Sets the given value at the given index.

If index exceeds the size of the vector, the value is appended.

void ml::WEMPrimitiveValueList::setValueFrom ( unsigned int  index,
unsigned int  source 
) [inline]

Copies the value from the index source to the given index.

Definition at line 106 of file WEMPrimitiveValueList.h.

void ml::WEMPrimitiveValueList::updateStatistics ( )

Update statistics: mean, standard deviation, and root mean square deviation.


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