|
| Encoding (const std::type_info &t=typeid(unsigned char)) |
|
| Encoding (const Encoding &encoding) |
|
const Encoding & | getEncoding () const |
| Return type and scaling.
|
|
Encoding & | getEncoding () |
| Return type and scaling.
|
|
void | setEncoding (const Encoding &e) |
| Set type and scaling.
|
|
Encoding & | operator= (const Encoding &e) |
|
const std::type_info & | getType () const |
| Linear scaling. More...
|
|
bool | typeIsSet () const |
| Get the storage type.
|
|
void | setType (const std::type_info &t) |
| Set storage type.
|
|
template<class T > |
void | setType () |
| Convenience.
|
|
template<class T > |
drain::typeLimiter< T >::value_t | getLimiter () const |
|
size_t | getElementSize () const |
| Returns the size in bytes of the storage type (1 for unsigned char, 2 for 16-bit types, etc.)
|
|
void | setPhysicalRange (const Range< double > &range, bool rescale=false) |
| Sets channel specific scaling instead of shared (image-level) scaling. More...
|
|
void | setPhysicalRange (double min, double max, bool rescale=false) |
| Sets the supported range for physical values. Does not change scaling or type.
|
|
void | setOptimalScale () |
|
void | setOptimalPhysicalScale (double min, double max) |
|
template<class T > |
T | getTypeMin () const |
| Returns the minimum value supported by the current storage type. More...
|
|
template<class T > |
T | getTypeMax () const |
| Returns the maximum value supported by the current storage type. More...
|
|
double | requestPhysicalMax (double defaultMax=static_cast< double >(std::numeric_limits< short int >::max())) const |
| Returns the actual or guessed maximum physical value,. More...
|
|
double | requestPhysicalMin (double defaultMin=static_cast< double >(std::numeric_limits< short int >::min())) const |
| Returns the actual or guessed minimum physical value,. More...
|
|
| ValueScaling (double scale=1.0, double offset=0.0) |
|
| ValueScaling (double scale, double offset, const drain::Range< double > &range) |
|
| ValueScaling (const drain::ValueScaling &scaling) |
|
| ValueScaling (const drain::UniTuple< double, 2 > &scaling) |
|
| ValueScaling (const drain::ValueScaling &scalingIn, const drain::ValueScaling &scalingOut) |
|
ValueScaling & | operator= (const drain::ValueScaling &scaling) |
|
virtual void | setScaling (double scale, double offset) |
| Set linear scaling.
|
|
virtual void | setScaling (const ValueScaling &scaling) |
|
virtual const ValueScaling & | getScaling () const |
| Get linear scaling.
|
|
virtual ValueScaling & | getScaling () |
| Get linear scaling.
|
|
void | setAbsoluteScale () |
| If the intensities of the image correspond to an absolute value (like count) then the scale should be reset to unity with this function.
|
|
void | setNormalScale (const std::type_info &t) |
| For "small integer" types, resets offset and scale such that maximum code value corresponds to 1.0 (100% intensity). More...
|
|
void | setConversionScale (double scale, double offset=0.0, double scaleOut=1.0, double offsetOut=0.0) |
| If the intensities of the image correspond to a physical value (like temperature), then the scaling coefficient should be set with this function.
|
|
void | setConversionScale (const drain::ValueScaling &s1, const drain::ValueScaling &s2) |
| Set scaling for which scaling.inv(x) = s2.inv(s1.fwd(x))
|
|
void | setConversionScale (const Range< double > &r1, const Range< double > &r2) |
|
void | setOptimalScale (const std::type_info &t) |
| If storage type is integer, adjust scale such that resolution is maximized.
|
|
void | setPhysicalScale (const std::type_info &t, double min, double max) |
| Sets physical range (min, max) and scales storage type accordingly.
|
|
void | setPhysicalScale (const std::type_info &t, const drain::ValueScaling &scaling) |
| Sets physical range (min, max) and scales storage type accordingly.
|
|
const Range< double > & | getPhysicalRange () const |
| Returns a typical or supported range for physical values.
|
|
Range< double > & | getPhysicalRange () |
| Returns a typical or supported range for physical values. Modifying the range will not change scaling.
|
|
void | setPhysicalMax (double max) |
| In integer-valued images, set the physical values corresponding to [0, maxCodeValue].
|
|
template<class T > |
void | setPhysicalRange (const Range< T > &range) |
| Sets the supported range for physical values. Does not change scaling or type.
|
|
void | setPhysicalRange (double min, double max) |
| Sets the supported range for physical values. Does not change scaling or type.
|
|
double | getScale () const |
| Returns the intensity scaling factor. See set setScale()
|
|
double | getOffset () const |
| Returns the intensity scaling offset, ie. b in a*x + b . See set setScale()
|
|
bool | isScaled () const |
| Returns true, if scaling has effect ie. scale!=1.0 or offset!=0.0. More...
|
|
double | getMinPhys () const |
| Returns the minimum physical value.
|
|
double | getMaxPhys () const |
| Returns the maximum physical value.
|
|
bool | isPhysical () const |
| Returns true, physical intensity range has been set.
|
|
void | adoptScaling (const drain::ValueScaling &srcScaling, const std::type_info &srcType, const std::type_info &dstType=typeid(void)) |
| Sets scale and offset according to physical range and current type.
|
|
double | fwd (double x) const |
| Forward scaling: given encoded value x, returns corresponding value (possibly physically meaningful).
|
|
double | inv (double y) const |
| Inverse scaling: given physically meaningful value y, returns the corresponding code value.
|
|
void | toStream (std::ostream &ostr) const |
|
std::string | str () const |
|
| UniTuple (const TT &... args) |
|
| UniTuple (const UniTuple< double, N > &t) |
| Copy constructor.
|
|
| UniTuple (std::initializer_list< S > l) |
|
tuple_t & | operator= (const tuple_t &t) |
|
tuple_t & | operator= (const value_type &value) |
|
tuple_t & | operator= (std::initializer_list< S > l) |
|
virtual const_iterator | begin () const override final |
|
virtual iterator | begin () override final |
|
virtual const_iterator | end () const override final |
|
virtual iterator | end () override final |
|
tuple_t & | tuple () |
|
const tuple_t & | tuple () const |
|
void | debug (std::ostream &ostr) const |
|
const S & | at (size_t i) const |
| Return const reference to element i. More...
|
|
const S & | operator[] (size_t i) const |
|
S & | at (size_t i) |
| Return reference to element i. More...
|
|
S & | operator[] (size_t i) |
|
bool | operator== (const tuplebase_t &t) const |
| Equality operator.
|
|
bool | operator!= (const tuplebase_t &t) const |
| Inequality operator.
|
|
template<class T > |
T & | toSequence (T &sequence) const |
| Copy elements to a Sequence, like stl::list, stl::set or stl::vector.
|
|
void | set (const tuplebase_t &t) |
|
template<class T2 , size_t N2 = 2> |
void | set (const TupleBase< T2, N2 > &t) |
| Assign tuple of different type and/or size.
|
|
void | set (const S &arg) |
|
template<typename ... SS> |
void | set (const S &arg, const SS &... rest) |
| Set element(s).
|
|
template<typename T > |
void | set (std::initializer_list< T > l) |
|
template<class T > |
tuplebase_t & | assignSequence (T &sequence, bool LENIENT=false) |
| Proposed for tuples only; derived classes should not shadow this. More...
|
|
void | fill (S i) |
| Set all the elements to i.
|
|
void | clear () |
|
virtual std::ostream & | toStream (std::ostream &ostr, char separator=',') const |
|
std::string | toStr (char separator=',') const |
|
virtual void | updateTuple () |
|