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. 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... | |
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 boost::source().
|
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.
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.
|
inline |
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.
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!
|
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.
Referenced by ml::WEMPatch::getLUTMax().
|
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.
Referenced by ml::WEMPatch::getLUTMin().
|
inline |
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.
|
inline |
Returns the value at the given index.
Definition at line 96 of file WEMPrimitiveValueList.h.
void ml::WEMPrimitiveValueList::initializeValues | ( | unsigned int | number, |
double | value | ||
) |
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.
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::removeLastEntry | ( | ) |
Removes the last entry, shortens the list.
void ml::WEMPrimitiveValueList::resetValues | ( | ) |
Clears the internal values and resets the min/max and statistical values.
void ml::WEMPrimitiveValueList::resize | ( | unsigned int | numValues | ) |
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.
|
inline |
Sets the min and max values, switches to fixed values.
Definition at line 84 of file WEMPrimitiveValueList.h.
|
inline |
Sets whether the value list should be saved when saving the WEM.
Definition at line 65 of file WEMPrimitiveValueList.h.
|
inline |
Sets the primitive mode.
Definition at line 54 of file WEMPrimitiveValueList.h.
|
inline |
Sets the units string.
Definition at line 49 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.
|
inline |
Copies the value from the index source to the given index.
Definition at line 104 of file WEMPrimitiveValueList.h.
References boost::source().
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.