Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes

EventTracker Class Reference

Inheritance diagram for EventTracker:
ValSeriesTracker

List of all members.

Public Member Functions

 EventTracker ()
const char * type ()
virtual bool isOK () const
void setSource (const ValueSeries< float > *, int sz, float depth)
 Will set sourceampl to udf.
void setSourceAmpl (float v)
float getSourceAmpl () const
void setRangeStep (float step)
float getRangeStep () const
void setPermittedRange (const Interval< float > &rg)
const Interval< float > & permittedRange () const
void setTrackEvent (VSEvent::Type ev)
VSEvent::Type trackEvent () const
bool snap (float threshold)
void useSimilarity (bool yn)
bool usesSimilarity () const
void normalizeSimilarityValues (bool yn)
bool normalizesSimilarityValues () const
void setUseAbsThreshold (bool abs)
bool useAbsThreshold () const
void setAmplitudeThreshold (float th)
 Must be set if using absolute threshold.
float amplitudeThreshold () const
void setAmplitudeThresholds (const TypeSet< float > &)
TypeSet< float > & getAmplitudeThresholds ()
void setAllowedVariance (float v)
 Only used if not using absolute threshold.
float allowedVariance () const
void setAllowedVariances (const TypeSet< float > &avs)
TypeSet< float > & getAllowedVariances ()
void setSimilarityWindow (const Interval< float > &rg)
const Interval< float > & similarityWindow () const
void setSimilarityThreshold (float th)
float similarityThreshold () const
bool track ()
float quality () const
void fillPar (IOPar &par) const
bool usePar (const IOPar &par)

Static Public Member Functions

static const char * sType ()
static const char ** sEventNames ()
static const VSEvent::TypecEventTypes ()
static int getEventTypeIdx (VSEvent::Type)

Protected Member Functions

ValueSeriesEvent< float, float > findExtreme (const ValueSeriesEvFinder< float, float > &, const Interval< float > &, float, float &, bool &, float &) const
bool findMaxSimilarity (int nrtests, int step, int nrgracetests, float &res, float &maxsim, bool &flatstart) const

Static Protected Member Functions

static const char * sKeyPermittedRange ()
static const char * sKeyValueThreshold ()
static const char * sKeyValueThresholds ()
static const char * sKeyAllowedVariance ()
static const char * sKeyAllowedVariances ()
static const char * sKeyUseAbsThreshold ()
static const char * sKeySimWindow ()
static const char * sKeySimThreshold ()
static const char * sKeyNormSimi ()
static const char * sKeyTrackByValue ()
static const char * sKeyTrackEvent ()
static const char * sKeyAttribID ()

Protected Attributes

VSEvent::Type evtype_
Interval< float > permrange_
float ampthreshold_
TypeSet< float > ampthresholds_
float allowedvar_
TypeSet< float > allowedvars_
bool useabsthreshold_
Interval< float > similaritywin_
float rangestep_
float similaritythreshold_
bool usesimilarity_
bool normalizesimi_
bool sourceampl_
float quality_

Detailed Description

Tracker that tracks Min/Max & Zero crossings between valueseries.


Constructor & Destructor Documentation

EventTracker::EventTracker (  ) 

Member Function Documentation

float EventTracker::allowedVariance (  )  const
float EventTracker::amplitudeThreshold (  )  const
static const VSEvent::Type* EventTracker::cEventTypes (  )  [static]
void EventTracker::fillPar ( IOPar par  )  const [virtual]

Reimplemented from ValSeriesTracker.

ValueSeriesEvent<float,float> EventTracker::findExtreme ( const ValueSeriesEvFinder< float, float > &  ,
const Interval< float > &  ,
float  ,
float &  ,
bool &  ,
float &   
) const [protected]
bool EventTracker::findMaxSimilarity ( int  nrtests,
int  step,
int  nrgracetests,
float &  res,
float &  maxsim,
bool &  flatstart 
) const [protected]
TypeSet<float>& EventTracker::getAllowedVariances (  ) 
TypeSet<float>& EventTracker::getAmplitudeThresholds (  ) 
static int EventTracker::getEventTypeIdx ( VSEvent::Type   )  [static]
float EventTracker::getRangeStep (  )  const [inline]
float EventTracker::getSourceAmpl (  )  const [inline]
virtual bool EventTracker::isOK (  )  const [virtual]
Returns:
whether the settings are OK, and it is possible to track.

Reimplemented from ValSeriesTracker.

void EventTracker::normalizeSimilarityValues ( bool  yn  ) 
bool EventTracker::normalizesSimilarityValues (  )  const
const Interval<float>& EventTracker::permittedRange (  )  const
float EventTracker::quality (  )  const [inline, virtual]

Reimplemented from ValSeriesTracker.

void EventTracker::setAllowedVariance ( float  v  ) 

Only used if not using absolute threshold.

void EventTracker::setAllowedVariances ( const TypeSet< float > &  avs  ) 
void EventTracker::setAmplitudeThreshold ( float  th  ) 

Must be set if using absolute threshold.

void EventTracker::setAmplitudeThresholds ( const TypeSet< float > &   ) 
void EventTracker::setPermittedRange ( const Interval< float > &  rg  ) 
void EventTracker::setRangeStep ( float  step  )  [inline]
void EventTracker::setSimilarityThreshold ( float  th  ) 
void EventTracker::setSimilarityWindow ( const Interval< float > &  rg  ) 
void EventTracker::setSource ( const ValueSeries< float > *  ,
int  sz,
float  depth 
) [virtual]

Will set sourceampl to udf.

Reimplemented from ValSeriesTracker.

void EventTracker::setSourceAmpl ( float  v  )  [inline]

If udf, sourceampl will be extracted from source vs.

void EventTracker::setTrackEvent ( VSEvent::Type  ev  ) 
  • VSEvent::Max Will find max event within the permitted range where the amplitude is higher than the threshold.
  • VSEvent::Min Will find minimum event within the permitted range where the amplitude is lower than the threshold.
  • VSEvent::ZCNegPos Will find zerocrossing (Neg to Pos ) event within the permitted range. No amplitude threshold is used.
  • VSEvent::ZCPosNeg Will find zerocrossing (Pos to Neg) event within the permitted range. No amplitude threshold is used.
void EventTracker::setUseAbsThreshold ( bool  abs  ) 

If on, the amplitude threshold is set by setAmplitudeThreshold(). If off, the amplitude threshold is set by (1-allowedVariance()) * sourceamplitude. The source amplitude is either set by setSourceAmpl or extracted from source valseries.

static const char** EventTracker::sEventNames (  )  [static]
float EventTracker::similarityThreshold (  )  const
const Interval<float>& EventTracker::similarityWindow (  )  const
static const char* EventTracker::sKeyAllowedVariance (  )  [inline, static, protected]
static const char* EventTracker::sKeyAllowedVariances (  )  [inline, static, protected]
static const char* EventTracker::sKeyAttribID (  )  [inline, static, protected]
static const char* EventTracker::sKeyNormSimi (  )  [inline, static, protected]
static const char* EventTracker::sKeyPermittedRange (  )  [inline, static, protected]
static const char* EventTracker::sKeySimThreshold (  )  [inline, static, protected]
static const char* EventTracker::sKeySimWindow (  )  [inline, static, protected]
static const char* EventTracker::sKeyTrackByValue (  )  [inline, static, protected]
static const char* EventTracker::sKeyTrackEvent (  )  [inline, static, protected]
static const char* EventTracker::sKeyUseAbsThreshold (  )  [inline, static, protected]
static const char* EventTracker::sKeyValueThreshold (  )  [inline, static, protected]
static const char* EventTracker::sKeyValueThresholds (  )  [inline, static, protected]
bool EventTracker::snap ( float  threshold  ) 
static const char* EventTracker::sType (  )  [inline, static]
bool EventTracker::track (  )  [virtual]

Calculates a new value for targetdepth_.

Implements ValSeriesTracker.

VSEvent::Type EventTracker::trackEvent (  )  const
const char* EventTracker::type (  )  [inline, virtual]

Implements ValSeriesTracker.

bool EventTracker::useAbsThreshold (  )  const
bool EventTracker::usePar ( const IOPar par  )  [virtual]

Reimplemented from ValSeriesTracker.

void EventTracker::useSimilarity ( bool  yn  ) 

Snaps at nearest event that is in permitted range and where the amplitude meets the threshold criterion. Only needs target data.

bool EventTracker::usesSimilarity (  )  const

Member Data Documentation

float EventTracker::allowedvar_ [protected]
TypeSet<float> EventTracker::allowedvars_ [protected]
float EventTracker::ampthreshold_ [protected]
bool EventTracker::normalizesimi_ [protected]
Interval<float> EventTracker::permrange_ [protected]
float EventTracker::quality_ [protected]
float EventTracker::rangestep_ [protected]
bool EventTracker::sourceampl_ [protected]
bool EventTracker::usesimilarity_ [protected]