Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

ArrayNDWindow Class Reference

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

List of all members.

Public Types

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

Public Member Functions

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

Protected Member Functions

bool buildWindow (const char *winnm, float pval)

Protected Attributes

float * window_
ArrayNDInfoImpl size_
bool rectangular_
BufferString windowtypename_
float paramval_

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

Enumerator:
Box 
Hamming 
Hanning 
Blackman 
Bartlett 
CosTaper5 
CosTaper10 
CosTaper20 

Constructor & Destructor Documentation

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

Member Function Documentation

template<class Type >
bool ArrayNDWindow::apply ( ArrayND< Type > *  in,
ArrayND< Type > *  out_ = 0 
) const [inline]
bool ArrayNDWindow::buildWindow ( const char *  winnm,
float  pval 
) [protected]
ArrayNDWindow::DeclareEnumUtils ( WindowType   ) 
float ArrayNDWindow::getParamVal (  )  const [inline]
float* ArrayNDWindow::getValues (  )  const [inline]
bool ArrayNDWindow::isOK (  )  const [inline]
bool ArrayNDWindow::resize ( const ArrayNDInfo  ) 
bool ArrayNDWindow::setType ( const char *  ,
float  paramval = mUdf(float) 
)
bool ArrayNDWindow::setType ( WindowType   ) 
void ArrayNDWindow::setValue ( int  idx,
float  val 
) [inline]

Member Data Documentation

float ArrayNDWindow::paramval_ [protected]
bool ArrayNDWindow::rectangular_ [protected]
float* ArrayNDWindow::window_ [protected]