OpendTect  7.0
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)
 
 DataSqueezer (T l0, T l1)
 
const Interval< T > & range (bool lim) const
 
void setRange (const Interval< T > &, bool lim)
 
void setUntouchedRange (const Interval< T > &r)
 
void setUntouchedRange (T u0, T u1)
 
value (T) const
 

Protected Attributes

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

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

◆ DataSqueezer() [1/2]

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

◆ DataSqueezer() [2/2]

template<class T >
DataSqueezer< T >::DataSqueezer ( l0,
l1 
)
inline

Member Function Documentation

◆ range()

template<class T >
const Interval<T>& DataSqueezer< T >::range ( bool  lim) const
inline

◆ setRange()

template<class T >
void DataSqueezer< T >::setRange ( const Interval< T > &  inprg,
bool  lim 
)
inline

◆ setUntouchedRange() [1/2]

template<class T >
void DataSqueezer< T >::setUntouchedRange ( const Interval< T > &  r)
inline

◆ setUntouchedRange() [2/2]

template<class T >
void DataSqueezer< T >::setUntouchedRange ( u0,
u1 
)
inline

◆ value()

template<class T >
T DataSqueezer< T >::value ( v) const
inline

Member Data Documentation

◆ rg_

template<class T >
Interval<T> DataSqueezer< T >::rg_
protected

◆ udfstart_

template<class T >
bool DataSqueezer< T >::udfstart_
protected

◆ udfstop_

template<class T >
bool DataSqueezer< T >::udfstop_
protected

◆ udfustart_

template<class T >
bool DataSqueezer< T >::udfustart_
protected

◆ udfustop_

template<class T >
bool DataSqueezer< T >::udfustop_
protected

◆ urg_

template<class T >
Interval<T> DataSqueezer< T >::urg_
protected

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