Inviwo
0.9.10.1
Inviwo documentation
|
Map values into data or value ranges. Data range refer to the range of the data type, i.e. [0 4095] for 12-bit unsigned integer data. Value range refer to the physical meaning of the value, i.e. Hounsfield value range is from [-1000 3000]. It is important that the data range is specified for data types with a large range (for example 32/64-bit float and integer) since the data is often normalized to [0 1], when for example performing color mapping, i.e. applying a transfer function. More...
#include <datamapper.h>
Public Member Functions | |
DataMapper (const DataFormatBase *format) | |
DataMapper (const DataMapper &rhs) | |
DataMapper & | operator= (const DataMapper &that) |
void | initWithFormat (const DataFormatBase *format) |
template<typename T > | |
T | mapFromDataToValue (T val) const |
template<typename T > | |
T | mapFromValueToData (T val) const |
template<typename T > | |
T | mapFromValueToNormalized (T val) const |
template<typename T > | |
T | mapFromNormalizedToValue (T val) const |
Public Attributes | |
dvec2 | dataRange |
Minimum and maximum data range. | |
dvec2 | valueRange |
Minimum and maximum value range. | |
std::string | valueUnit |
Unit, i.e. Hounsfield/absorption/W. | |
Map values into data or value ranges. Data range refer to the range of the data type, i.e. [0 4095] for 12-bit unsigned integer data. Value range refer to the physical meaning of the value, i.e. Hounsfield value range is from [-1000 3000]. It is important that the data range is specified for data types with a large range (for example 32/64-bit float and integer) since the data is often normalized to [0 1], when for example performing color mapping, i.e. applying a transfer function.