MeVisLab Toolbox Reference
ml::WEMPrimitiveValueList Class Reference

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

#include <WEMPrimitiveValueList.h>

Public Member Functions

 WEMPrimitiveValueList ()
 Constructor. More...
 
 WEMPrimitiveValueList (std::string description)
 Constructor. More...
 
 WEMPrimitiveValueList (const WEMPrimitiveValueList &valueList)
 Copy constructor. More...
 
 ~WEMPrimitiveValueList ()
 Destructor. More...
 
void copyProperties (const WEMPrimitiveValueList &valueList)
 Copies properties of the given primitive value list. More...
 
std::string getDescription () const
 Returns the description of this PVL. More...
 
std::string getUnits () const
 Returns the units string. More...
 
void setUnits (std::string units)
 Sets the units string. More...
 
PrimitiveValueListTypes getPrimitiveValueListType () const
 Returns the primitive mode. More...
 
void setPrimitiveValueListType (PrimitiveValueListTypes primitiveValueListType)
 Sets the primitive mode. More...
 
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. More...
 
unsigned int getNumValues () const
 Returns the number of values. More...
 
bool isPersistent () const
 Returns whether this PVL should be saved when saving the WEM? More...
 
void setPersistence (bool persistent)
 Sets whether the value list should be saved when saving the WEM. More...
 
MLDataType getDataType () const
 Returns the data type. More...
 
void setDataType (MLDataType dataType)
 Sets the data type. More...
 
double getMinValue () const
 Returns the minimum value. More...
 
double getMaxValue () const
 Returns the maximum value. More...
 
double getMeanValue () const
 Returns the mean value. Make sure to have called updateStatistics() before! More...
 
double getStandardDeviationValue () const
 Returns the standard deviation value. Make sure to have called updateStatistics() before! More...
 
double getRootMeanSquareDeviationValue () const
 Returns the root mean sqaure deviation value. Make sure to have called updateStatistics() before! More...
 
void setMinMaxValue (double minValue, double maxValue)
 Sets the min and max values, switches to fixed values. More...
 
void computeAndSetMinMaxFixedValues ()
 Computes the min and max values, sets them and switches to fixed values. More...
 
void clampMinValue (double minValue)
 Clamps all values to the given min value. More...
 
void clampMaxValue (double maxValue)
 Clamps all values to the given max value. More...
 
void updateStatistics ()
 Update statistics: mean, standard deviation, and root mean square deviation. More...
 
double getValue (unsigned int index) const
 Returns the value at the given index. More...
 
void setValue (unsigned int index, double value)
 Sets the given value at the given index. More...
 
void appendValue (double value)
 Appends the given value. More...
 
void setValueFrom (unsigned int index, unsigned int source)
 Copies the value from the index source to the given index. More...
 
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. More...
 
void resetValues ()
 Clears the internal values and resets the min/max and statistical values. More...
 
void initializeValues (unsigned int number, double value)
 Initializes the first number of values with the given value. More...
 
void multiplyValues (double modifier)
 Multiplies all values with the given modifier. More...
 
void extendValues (unsigned int number, double value)
 Extends the list with the given amount and initializes new values with that given value. More...
 
void resize (unsigned int numValues)
 Resizes the PVL to the given number of values. More...
 
void saveTo (OutStreamWrapper &ostreamWrapper)
 Saves attributes to the given output stream. More...
 
void loadFrom (FileMapWrapper &mapper, short version)
 Loads attributes from the given memory map. More...
 
std::vector< double > & values ()
 Get access to the underlying array. More...
 
const std::vector< double > & constValues () const
 Get access to the underlying array. More...
 
void removeLastEntry ()
 Removes the last entry, shortens the list. More...
 
Deprecated.
double getStdValue () const
 
double getRMSDValue () const
 Use getRootMeanSquareDeviationValue() instead. More...
 

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 24 of file WEMPrimitiveValueList.h.

Constructor & Destructor Documentation

◆ WEMPrimitiveValueList() [1/3]

ml::WEMPrimitiveValueList::WEMPrimitiveValueList ( )

Constructor.

◆ WEMPrimitiveValueList() [2/3]

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

Constructor.

◆ WEMPrimitiveValueList() [3/3]

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

Copy constructor.

◆ ~WEMPrimitiveValueList()

ml::WEMPrimitiveValueList::~WEMPrimitiveValueList ( )

Destructor.

Member Function Documentation

◆ addValueFrom()

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 106 of file WEMPrimitiveValueList.h.

References boost::source().

◆ appendValue()

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 102 of file WEMPrimitiveValueList.h.

◆ clampMaxValue()

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

Clamps all values to the given max value.

◆ clampMinValue()

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

Clamps all values to the given min value.

◆ computeAndSetMinMaxFixedValues()

void ml::WEMPrimitiveValueList::computeAndSetMinMaxFixedValues ( )

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

◆ constValues()

const std::vector<double>& ml::WEMPrimitiveValueList::constValues ( ) const
inline

Get access to the underlying array.

Definition at line 142 of file WEMPrimitiveValueList.h.

◆ copyProperties()

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

Copies properties of the given primitive value list.

◆ extendValues()

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!

◆ getDataType()

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

Returns the data type.

Definition at line 68 of file WEMPrimitiveValueList.h.

◆ getDescription()

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

Returns the description of this PVL.

Definition at line 44 of file WEMPrimitiveValueList.h.

◆ getMaxValue()

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

Returns the maximum value.

Definition at line 75 of file WEMPrimitiveValueList.h.

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

◆ getMeanValue()

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

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

Definition at line 77 of file WEMPrimitiveValueList.h.

◆ getMinValue()

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

Returns the minimum value.

Definition at line 73 of file WEMPrimitiveValueList.h.

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

◆ getNumValues()

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

Returns the number of values.

Definition at line 60 of file WEMPrimitiveValueList.h.

◆ getPrimitiveValueListType()

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

Returns the primitive mode.

Definition at line 52 of file WEMPrimitiveValueList.h.

◆ getRMSDValue()

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

Use getRootMeanSquareDeviationValue() instead.

Definition at line 135 of file WEMPrimitiveValueList.h.

◆ getRootMeanSquareDeviationValue()

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

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

Definition at line 81 of file WEMPrimitiveValueList.h.

◆ getStandardDeviationValue()

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

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

Definition at line 79 of file WEMPrimitiveValueList.h.

◆ getStdValue()

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

Use getStandardDeviationValue() instead.

Definition at line 133 of file WEMPrimitiveValueList.h.

◆ getUnits()

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

Returns the units string.

Definition at line 47 of file WEMPrimitiveValueList.h.

◆ getValue()

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

Returns the value at the given index.

Definition at line 96 of file WEMPrimitiveValueList.h.

◆ initializeValues()

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

Initializes the first number of values with the given value.

◆ isPersistent()

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

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

Definition at line 63 of file WEMPrimitiveValueList.h.

◆ isValid()

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.

◆ loadFrom()

void ml::WEMPrimitiveValueList::loadFrom ( FileMapWrapper mapper,
short  version 
)

Loads attributes from the given memory map.

◆ multiplyValues()

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.

◆ removeLastEntry()

void ml::WEMPrimitiveValueList::removeLastEntry ( )

Removes the last entry, shortens the list.

◆ resetValues()

void ml::WEMPrimitiveValueList::resetValues ( )

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

◆ resize()

void ml::WEMPrimitiveValueList::resize ( unsigned int  numValues)

Resizes the PVL to the given number of values.

Statistics and min/max values are not adapted.

◆ saveTo()

void ml::WEMPrimitiveValueList::saveTo ( OutStreamWrapper ostreamWrapper)

Saves attributes to the given output stream.

◆ setDataType()

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

Sets the data type.

Definition at line 70 of file WEMPrimitiveValueList.h.

◆ setMinMaxValue()

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

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

Definition at line 84 of file WEMPrimitiveValueList.h.

◆ setPersistence()

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

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

Definition at line 65 of file WEMPrimitiveValueList.h.

◆ setPrimitiveValueListType()

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

Sets the primitive mode.

Definition at line 54 of file WEMPrimitiveValueList.h.

◆ setUnits()

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

Sets the units string.

Definition at line 49 of file WEMPrimitiveValueList.h.

◆ setValue()

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.

◆ setValueFrom()

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 104 of file WEMPrimitiveValueList.h.

References boost::source().

◆ updateStatistics()

void ml::WEMPrimitiveValueList::updateStatistics ( )

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

◆ values()

std::vector<double>& ml::WEMPrimitiveValueList::values ( )
inline

Get access to the underlying array.

Definition at line 139 of file WEMPrimitiveValueList.h.


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