OpendTect-6_4
6.4
|
A DataClipper gets a bunch of data and determines at what value to clip if a certain clip percentage is desired. More...
Public Member Functions | |
DataClipper () | |
bool | isEmpty () const |
void | setApproxNrValues (od_int64 nrsamples, int statsize=2000) |
void | putData (float) |
void | putData (const float *, od_int64 sz) |
void | putData (const ValueSeries< float > &, od_int64 sz) |
void | putData (const ArrayND< float > &) |
bool | calculateRange (float cliprate, Interval< float > &) |
bool | calculateRange (float lowcliprate, float highcliprate, Interval< float > &) |
bool | fullSort () |
bool | getRange (float cliprate, Interval< float > &) const |
bool | getRange (float lowcliprate, float highcliprate, Interval< float > &) const |
bool | getSymmetricRange (float cliprate, float midval, Interval< float > &) const |
void | reset () |
const LargeValVec< float > & | statPts () const |
Static Public Member Functions | |
static bool | calculateRange (float *vals, od_int64 nrvals, float lowcliprate, float highcliprate, Interval< float > &) |
Protected Attributes | |
int | approxstatsize_ |
float | sampleprob_ |
bool | subselect_ |
LargeValVec< float > | samples_ |
Interval< float > | absoluterg_ |
A DataClipper gets a bunch of data and determines at what value to clip if a certain clip percentage is desired.
For simple cases, where no subselection is needed (i.e. the stats will be performed on all values, and only one dataset is used) the static function calculateRange is good enough:
If there are more than one dataset, or if a subselection is wanted, the class is used as follows:
Example
DataClipper::DataClipper | ( | ) |
cliprate is between 0 and 0.5, cliprate0 is the bottom cliprate, cliprate1 is the top cliprate, when cliprate1 is -1, it will get the value of cliprate0
bool DataClipper::calculateRange | ( | float | cliprate, |
Interval< float > & | |||
) |
Does not do a full sort. Also performes reset
bool DataClipper::calculateRange | ( | float | lowcliprate, |
float | highcliprate, | ||
Interval< float > & | |||
) |
Does not do a full sort. Also performes reset
|
static |
Does not do a full sort.
bool DataClipper::fullSort | ( | ) |
bool DataClipper::getRange | ( | float | cliprate, |
Interval< float > & | |||
) | const |
bool DataClipper::getRange | ( | float | lowcliprate, |
float | highcliprate, | ||
Interval< float > & | |||
) | const |
bool DataClipper::getSymmetricRange | ( | float | cliprate, |
float | midval, | ||
Interval< float > & | |||
) | const |
|
inline |
void DataClipper::putData | ( | float | ) |
void DataClipper::putData | ( | const float * | , |
od_int64 | sz | ||
) |
void DataClipper::putData | ( | const ValueSeries< float > & | , |
od_int64 | sz | ||
) |
void DataClipper::putData | ( | const ArrayND< float > & | ) |
void DataClipper::reset | ( | ) |
void DataClipper::setApproxNrValues | ( | od_int64 | nrsamples, |
int | statsize = 2000 |
||
) |
Will make it faster if large amount of data is used. The Object will then randomly subselect on the input to get about statsize samples to do the stats on.
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019