6#ifndef HUV_H_6014714286
7#define HUV_H_6014714286
9#include <Carna/Carna.h>
45 operator signed short()
const;
67 template<
typename T >
73 template<
typename T >
89inline HUV::operator
signed short()
const
100 if( this->value < -1024 ) this->value = -1024;
101 if( this->value > 3071 ) this->value = 3071;
108 const static float huvMax = 3071;
123 return (
value + 1024 ) / 4095.f;
129 return value / 4095.f;
133template<
typename T >
140template<
typename T >
Defines Carna::base::CarnaException, Carna::base::AssertionFailure.
Represents an association.
signed short value
Holds the HU value.
float relIntensity() const
Returns the corresponding relative intensity.
static HUV rel(T value)
Wraps a relative HU value.
HUV()=default
Constructor.
float absIntensity() const
Returns the corresponding absolute intensity.
static HUV abs(T value)
Wraps an absolute HU value.