UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
WaveField Class Reference

#include <wave_field.hpp>

Classes

struct  Window
 

Public Types

typedef std::vector< TraceTracesStorageT
 
typedef TracesStorageT::iterator iterator
 
typedef
TracesStorageT::const_iterator 
const_iterator
 

Public Member Functions

WaveField operator+ (const WaveField &wf) const
 
WaveField operator- (const WaveField &wf) const
 
 WaveField ()
 
 WaveField (const Trace::Header &hdr, size_t size, size_t length, Trace::AmplT value)
 
template<typename Iterator >
 WaveField (Iterator first, Iterator last)
 
 WaveField (const WaveField &that)
 
virtual ~WaveField ()
 
const_iterator begin () const
 
const_iterator end () const
 
const Traceat (size_t n) const
 
const Traceoperator[] (size_t n) const
 
size_t size () const
 
bool empty () const
 
size_t length () const
 
Trace::TimeT timestep () const
 
Trace::TimeT duration () const
 
iterator begin ()
 
iterator end ()
 
Traceat (size_t n)
 
Traceoperator[] (size_t n)
 
iterator erase (iterator first, iterator last)
 
void clear ()
 
void insert (iterator pos, size_t n, const Trace &tr=Trace())
 
void push_back (const Trace &t)
 
void resize (size_t n, const Trace &tr=Trace())
 
WaveFieldfill (const Trace::AmplT &ampl)
 
void shift (Trace::TimeT s)
 
void shift (const std::vector< Trace::TimeT > &shifts)
 
WaveFieldset_window (size_t trace, size_t traces, Trace::TimeT start, Trace::TimeT duration)
 
const WaveFieldset_window (size_t trace, size_t traces, Trace::TimeT start, Trace::TimeT duration) const
 
Trace::TimeT get_window_timestart () const
 
Trace::TimeT get_window_duration () const
 
void remove_window () const
 
bool is_windowed () const
 
bool hasNAN ()
 
bool hasInf ()
 
bool hasNANInf ()
 

Protected Attributes

TracesStorageT m_data
 
std::vector< Windowm_win_stack
 

Detailed Description

Container for traces.

Member Typedef Documentation

typedef TracesStorageT::const_iterator WaveField::const_iterator

Constant iterator to amplitude of the trace.

typedef TracesStorageT::iterator WaveField::iterator

Iterator to amplitude of the trace.

typedef std::vector<Trace> WaveField::TracesStorageT

Type for traces storage.

Constructor & Destructor Documentation

WaveField::WaveField ( )

Default constructor for empty wavefield.

WaveField::WaveField ( const Trace::Header hdr,
size_t  size,
size_t  length,
Trace::AmplT  value 
)

Constructs wavefield with provided number of traces with defined length.

Parameters
hdrHeader for all traces.
sizeNumber of traces.
lengthLength of each traces.
valueAll amplitudes default value.
template<typename Iterator >
WaveField::WaveField ( Iterator  first,
Iterator  last 
)
inline

Constructs wavefield from provided range of traces.

WaveField::WaveField ( const WaveField that)

Copy constructor.

virtual WaveField::~WaveField ( )
virtual

Destructs object.

Member Function Documentation

const Trace& WaveField::at ( size_t  n) const

Returns n-th trace.

Trace& WaveField::at ( size_t  n)

Acces to the n-th trace.

const_iterator WaveField::begin ( ) const

Returns the dirst trece iterator for reading.

iterator WaveField::begin ( )

Access to the first trace.

void WaveField::clear ( )

Removes all traces and windows if defined.

Trace::TimeT WaveField::duration ( ) const

Duration of traces in the wavefield. Taken only from the first trace. Zero if empty wavefield.

bool WaveField::empty ( ) const

Returns true if field is empty.

const_iterator WaveField::end ( ) const

Returns after the last trace iterator for reading.

iterator WaveField::end ( )

Access to the past-the-end trace.

iterator WaveField::erase ( iterator  first,
iterator  last 
)

Erases set of traces.

WaveField& WaveField::fill ( const Trace::AmplT ampl)

Fill wavefields amplitudes with provided ampl value. Returns reference to this wavefield was filled.

Trace::TimeT WaveField::get_window_duration ( ) const

Get current window duration.

Trace::TimeT WaveField::get_window_timestart ( ) const

Get start time of current window.

bool WaveField::hasInf ( )

True if has any Inf sample.

bool WaveField::hasNAN ( )

True if has any NAN sample.

bool WaveField::hasNANInf ( )

True if has any NAN or Inf sample.

void WaveField::insert ( iterator  pos,
size_t  n,
const Trace tr = Trace() 
)

Insert number n of traces at position pos.

bool WaveField::is_windowed ( ) const

Returns true if wavefield has at least one window.

size_t WaveField::length ( ) const

Lenght of traces in the wavefield. Taken only from the first trace. Zero if empty wavefield.

WaveField WaveField::operator+ ( const WaveField wf) const

Addition of traces.

WaveField WaveField::operator- ( const WaveField wf) const

Subtraction of traces.

void WaveField::push_back ( const Trace t)

Add new trace at the end of field.

void WaveField::remove_window ( ) const

Remove the last added window. (Wavefield will be expanded.)

void WaveField::resize ( size_t  n,
const Trace tr = Trace() 
)

Resizes the field to contain n traces.

WaveField& WaveField::set_window ( size_t  trace,
size_t  traces,
Trace::TimeT  start,
Trace::TimeT  duration 
)

Set window for the wavefield and returns reference to the window as wavefield.

Parameters
traceThe first trace.
tracesNumber of traces.
startStart time.
durationDuration of traces.
const WaveField& WaveField::set_window ( size_t  trace,
size_t  traces,
Trace::TimeT  start,
Trace::TimeT  duration 
) const

Set window for the wavefield and returns constant reference to the window as wavefield.

Parameters
traceThe first trace.
tracesNumber of traces.
startStart time.
durationDuration of traces.
void WaveField::shift ( Trace::TimeT  s)

Shifts all traces to specified amount of milliseconds. If s is positive shift will be done to the right and otherwise to the left.

void WaveField::shift ( const std::vector< Trace::TimeT > &  shifts)

Multiple shifts using single shift method declared above.

size_t WaveField::size ( ) const

Gets number of traces.

Trace::TimeT WaveField::timestep ( ) const

Timestep of traces in the wavefield. Taken only from the first trace. Zero if empty wavefield.

Member Data Documentation

TracesStorageT WaveField::m_data
protected

Traces storage.

std::vector<Window> WaveField::m_win_stack
mutableprotected

Stack of windows.


The documentation for this class was generated from the following file: