OpendTect-6_4  6.4
Public Member Functions | Protected Attributes | List of all members
DataSqueezer< T > Class Template Reference

Fits values into a pre-defined range. More...

Public Member Functions

 DataSqueezer (const Interval< T > &l)
 
void setUntouchedRange (const Interval< T > &r)
 
 DataSqueezer (T l0, T l1)
 
void setUntouchedRange (T u0, T u1)
 
value (T) const
 
const Interval< T > & range (bool lim) const
 
void setRange (const Interval< T > &, bool lim)
 

Protected Attributes

Interval< T > rg_
 
Interval< T > urg_
 
bool udfstart_
 
bool udfstop_
 
bool udfustart_
 
bool udfustop_
 

Detailed Description

template<class T>
class DataSqueezer< T >

Fits values into a pre-defined range.

The Squeezer has 2 ranges: The limits The 'untouched' limits

No data will go outside the limits. If you only want a one-sided squeeze, pass an undefined value (not a very large number!). For good squeezing, you have to give the squeezer some 'work space'. You can do this by defining an 'untouched' range. In that range, output will be the same as input. In the zone outside that range, the Squeezer will return a value between the limit value and the input value, in such a way that the output will be nicely continuous - up to first derivative.

For example: DataSqueezer<float> sq( Interval<float>(mUdf(float),10) ); sq.setUntouchedRange( Interval<float>(mUdf(float),8) ); will map values in range [8,Inf] on [8,10].

By default, the Squeezer will behave like a 'Clipper'. You have to use setUntouchedRange() to get proper squeezing behaviour.

Constructor & Destructor Documentation

template<class T >
DataSqueezer< T >::DataSqueezer ( const Interval< T > &  l)
inline
template<class T >
DataSqueezer< T >::DataSqueezer ( l0,
l1 
)
inline

Member Function Documentation

template<class T >
const Interval<T>& DataSqueezer< T >::range ( bool  lim) const
inline
template<class T >
void DataSqueezer< T >::setRange ( const Interval< T > &  inprg,
bool  lim 
)
inline
template<class T >
void DataSqueezer< T >::setUntouchedRange ( const Interval< T > &  r)
inline
template<class T >
void DataSqueezer< T >::setUntouchedRange ( u0,
u1 
)
inline
template<class T >
T DataSqueezer< T >::value ( v) const
inline

Member Data Documentation

template<class T >
Interval<T> DataSqueezer< T >::rg_
protected
template<class T >
bool DataSqueezer< T >::udfstart_
protected
template<class T >
bool DataSqueezer< T >::udfstop_
protected
template<class T >
bool DataSqueezer< T >::udfustart_
protected
template<class T >
bool DataSqueezer< T >::udfustop_
protected
template<class T >
Interval<T> DataSqueezer< T >::urg_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019