MeVisLab Toolbox 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. | |
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 | resize (unsigned int numValues) |
Resizes the PVL to the given number of values. | |
void | saveTo (OutStreamWrapper &ostreamWrapper) |
Saves attributes to the given output stream. | |
void | loadFrom (FileMapWrapper &mapper, short version) |
Loads attributes from the given memory map. | |
std::vector< double > & | values () |
Get access to the underlying array. | |
const std::vector< double > & | constValues () const |
Get access to the underlying array. | |
void | removeLastEntry () |
Removes the last entry, shortens the list. | |
Deprecated. | |
double | getStdValue () const |
double | getRMSDValue () const |
Use getRootMeanSquareDeviationValue() instead. | |
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.
ml::WEMPrimitiveValueList::WEMPrimitiveValueList | ( | ) |
Constructor.
ml::WEMPrimitiveValueList::WEMPrimitiveValueList | ( | std::string | description | ) |
Constructor.
ml::WEMPrimitiveValueList::WEMPrimitiveValueList | ( | const WEMPrimitiveValueList & | valueList | ) |
Copy constructor.
ml::WEMPrimitiveValueList::~WEMPrimitiveValueList | ( | ) |
Destructor.
|
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 mlrange_cast().
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.
Clamps all values to the given max value.
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.
Get access to the underlying array.
Definition at line 142 of file WEMPrimitiveValueList.h.
void ml::WEMPrimitiveValueList::copyProperties | ( | const WEMPrimitiveValueList & | valueList | ) |
Copies properties of the given primitive value list.
Extends the list with the given amount and initializes new values with that given value.
Does not update the statistical values!
|
inline |
Returns the data type.
Definition at line 68 of file WEMPrimitiveValueList.h.
|
inline |
Returns the description of this PVL.
Definition at line 44 of file WEMPrimitiveValueList.h.
|
inline |
Returns the maximum value.
Definition at line 75 of file WEMPrimitiveValueList.h.
|
inline |
Returns the mean value. Make sure to have called updateStatistics() before!
Definition at line 77 of file WEMPrimitiveValueList.h.
|
inline |
Returns the minimum value.
Definition at line 73 of file WEMPrimitiveValueList.h.
Returns the number of values.
Definition at line 60 of file WEMPrimitiveValueList.h.
|
inline |
Returns the primitive mode.
Definition at line 52 of file WEMPrimitiveValueList.h.
|
inline |
Use getRootMeanSquareDeviationValue() instead.
Definition at line 135 of file WEMPrimitiveValueList.h.
|
inline |
Returns the root mean sqaure deviation value. Make sure to have called updateStatistics() before!
Definition at line 81 of file WEMPrimitiveValueList.h.
|
inline |
Returns the standard deviation value. Make sure to have called updateStatistics() before!
Definition at line 79 of file WEMPrimitiveValueList.h.
|
inline |
Use getStandardDeviationValue() instead.
Definition at line 133 of file WEMPrimitiveValueList.h.
|
inline |
Returns the units string.
Definition at line 47 of file WEMPrimitiveValueList.h.
Returns the value at the given index.
Definition at line 96 of file WEMPrimitiveValueList.h.
Initializes the first number
of values with the given value.
|
inline |
Returns whether this PVL should be saved when saving the WEM?
Definition at line 63 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.
void ml::WEMPrimitiveValueList::loadFrom | ( | FileMapWrapper & | mapper, |
short | version ) |
Loads attributes from the given memory map.
Multiplies all values with the given modifier.
Adjusts min and max values, but does not update the statistical values.
void ml::WEMPrimitiveValueList::removeLastEntry | ( | ) |
Removes the last entry, shortens the list.
void ml::WEMPrimitiveValueList::resetValues | ( | ) |
Clears the internal values and resets the min/max and statistical values.
Resizes the PVL to the given number of values.
Statistics and min/max values are not adapted.
void ml::WEMPrimitiveValueList::saveTo | ( | OutStreamWrapper & | ostreamWrapper | ) |
Saves attributes to the given output stream.
|
inline |
Sets the data type.
Definition at line 70 of file WEMPrimitiveValueList.h.
Sets the min and max values, switches to fixed values.
Definition at line 84 of file WEMPrimitiveValueList.h.
References mlrange_cast().
Sets whether the value list should be saved when saving the WEM.
Definition at line 65 of file WEMPrimitiveValueList.h.
References mlrange_cast().
|
inline |
Sets the primitive mode.
Definition at line 54 of file WEMPrimitiveValueList.h.
References mlrange_cast().
|
inline |
Sets the units string.
Definition at line 49 of file WEMPrimitiveValueList.h.
Sets the given value at the given index.
If index exceeds the size of the vector, the value is appended.
Copies the value from the index source to the given index.
Definition at line 104 of file WEMPrimitiveValueList.h.
void ml::WEMPrimitiveValueList::updateStatistics | ( | ) |
Update statistics: mean, standard deviation, and root mean square deviation.
|
inline |
Get access to the underlying array.
Definition at line 139 of file WEMPrimitiveValueList.h.