OpendTect  6.6
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ArrayNDWindow Class Reference

Tapers the N-dimentional ArrayND with a windowFunction. More...

Public Types

enum  WindowType {
  Box , Hamming , Hanning , Blackman ,
  Bartlett , CosTaper5 , CosTaper10 , CosTaper20
}
 

Public Member Functions

 ArrayNDWindow (const ArrayNDInfo &, bool rectangular, const char *winnm, const TypeSet< float > &paramvals)
 
 ArrayNDWindow (const ArrayNDInfo &, bool rectangular, const char *winnm, float paramval=mUdf(float))
 
 ArrayNDWindow (const ArrayNDInfo &, bool rectangular, WindowType=Hamming)
 
 ~ArrayNDWindow ()
 
template<class Type >
bool apply (ArrayND< Type > *in, ArrayND< Type > *out_=0) const
 
float getParamVal () const
 
float getParamVal (int dim) const
 
float * getValues () const
 
bool isOK () const
 
bool resize (const ArrayNDInfo &)
 
void setParamVal (int dim=0, float paramval=mUdf(float))
 
void setParamVals (const TypeSet< float > &)
 
bool setType (const char *, const TypeSet< float > &)
 
bool setType (const char *, float paramval=mUdf(float))
 
bool setType (WindowType)
 
void setValue (int idx, float val)
 

Protected Member Functions

bool buildWindow (const char *winnm)
 
bool buildWindow (const char *winnm, float pval)
 
TypeSet< float > * getParamvals_ ()
 
TypeSet< float > & paramvals_ ()
 

Protected Attributes

float paramval_
 
bool rectangular_
 
ArrayNDInfoImpl size_
 
float * window_
 
BufferString windowtypename_
 

Detailed Description

Tapers the N-dimentional ArrayND with a windowFunction.

Usage is straightforward- construct and use. If apply()'s second argument is omitted, the result will be placed in the input array. apply() will return false if input-, output- and window-size are not equal. The only requirement on the windowfunction is that it should give full taper at x=+-1 and no taper when x=0. Feel free to implement more functions!!

<>

Member Enumeration Documentation

◆ WindowType

Enumerator
Box 
Hamming 
Hanning 
Blackman 
Bartlett 
CosTaper5 
CosTaper10 
CosTaper20 

Constructor & Destructor Documentation

◆ ArrayNDWindow() [1/3]

ArrayNDWindow::ArrayNDWindow ( const ArrayNDInfo ,
bool  rectangular,
WindowType  = Hamming 
)

◆ ArrayNDWindow() [2/3]

ArrayNDWindow::ArrayNDWindow ( const ArrayNDInfo ,
bool  rectangular,
const char *  winnm,
float  paramval = mUdf(float) 
)

◆ ArrayNDWindow() [3/3]

ArrayNDWindow::ArrayNDWindow ( const ArrayNDInfo ,
bool  rectangular,
const char *  winnm,
const TypeSet< float > &  paramvals 
)

◆ ~ArrayNDWindow()

ArrayNDWindow::~ArrayNDWindow ( )

Member Function Documentation

◆ apply()

template<class Type >
bool ArrayNDWindow::apply ( ArrayND< Type > *  in,
ArrayND< Type > *  out_ = 0 
) const
inline

◆ buildWindow() [1/2]

bool ArrayNDWindow::buildWindow ( const char *  winnm)
protected

◆ buildWindow() [2/2]

bool ArrayNDWindow::buildWindow ( const char *  winnm,
float  pval 
)
protected

◆ getParamVal() [1/2]

float ArrayNDWindow::getParamVal ( ) const
inline

◆ getParamVal() [2/2]

float ArrayNDWindow::getParamVal ( int  dim) const

◆ getParamvals_()

TypeSet<float>* ArrayNDWindow::getParamvals_ ( )
protected

◆ getValues()

float* ArrayNDWindow::getValues ( ) const
inline

◆ isOK()

bool ArrayNDWindow::isOK ( ) const
inline

◆ paramvals_()

TypeSet<float>& ArrayNDWindow::paramvals_ ( )
protected

◆ resize()

bool ArrayNDWindow::resize ( const ArrayNDInfo )

◆ setParamVal()

void ArrayNDWindow::setParamVal ( int  dim = 0,
float  paramval = mUdf(float) 
)

◆ setParamVals()

void ArrayNDWindow::setParamVals ( const TypeSet< float > &  )

◆ setType() [1/3]

bool ArrayNDWindow::setType ( const char *  ,
const TypeSet< float > &   
)

◆ setType() [2/3]

bool ArrayNDWindow::setType ( const char *  ,
float  paramval = mUdf(float) 
)

◆ setType() [3/3]

bool ArrayNDWindow::setType ( WindowType  )

◆ setValue()

void ArrayNDWindow::setValue ( int  idx,
float  val 
)
inline

Member Data Documentation

◆ paramval_

float ArrayNDWindow::paramval_
protected

◆ rectangular_

bool ArrayNDWindow::rectangular_
protected

◆ size_

ArrayNDInfoImpl ArrayNDWindow::size_
protected

◆ window_

float* ArrayNDWindow::window_
protected

◆ windowtypename_

BufferString ArrayNDWindow::windowtypename_
protected

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