OpendTect-6_4  6.4
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
InverseDistanceArray2DInterpol Class Reference

Interpolates 2D arrays using inverse distance method. More...

Inheritance diagram for InverseDistanceArray2DInterpol:
[legend]

Public Member Functions

 mDefaultFactoryInstantiation (Array2DInterpol, InverseDistanceArray2DInterpol,"InverseDistance", tr("Inverse distance")) InverseDistanceArray2DInterpol()
 
 ~InverseDistanceArray2DInterpol ()
 
bool setArray (Array2D< float > &, TaskRunner *)
 Set AFTER all settings. More...
 
bool canUseArrayAccess () const
 
bool setArray (ArrayAccess &, TaskRunner *)
 Set AFTER all settings. More...
 
float getSearchRadius () const
 
void setSearchRadius (float r)
 
void setStepSize (int n)
 
int getStepSize () const
 
void setNrSteps (int n)
 
int getNrSteps () const
 
void setCornersFirst (bool n)
 
bool getCornersFirst () const
 
bool nothingToFill () const
 
virtual bool fillPar (IOPar &) const
 
virtual bool usePar (const IOPar &)
 
- Public Member Functions inherited from Array2DInterpol
virtual ~Array2DInterpol ()
 
 mDefineFactoryInClass (Array2DInterpol, factory)
 
 mDeclareEnumUtils (FillType)
 
void setFillType (FillType)
 
FillType getFillType () const
 
void setRowStep (float r)
 
void setColStep (float r)
 
void setOrigin (const RowCol &)
 
void setSampling (const TrcKeySampling &)
 Set both steps and the origin. More...
 
void setMaxHoleSize (float)
 
float getMaxHoleSize () const
 
void setClassification (bool)
 
bool isClassification () const
 
void setMask (const Array2D< bool > *, OD::PtrPolicy=OD::UsePtr)
 
virtual uiString infoMsg () const
 
void setTrendOrder (PolyTrend::Order ord)
 
bool trimArray (int step, Array2D< char > &edgesmask)
 
void doPolygonCrop ()
 
uiString uiMessage () const
 will be message() again in 7.x More...
 
- Public Member Functions inherited from ParallelTask
virtual ~ParallelTask ()
 
bool execute ()
 
virtual bool executeParallel (bool parallel)
 
void setProgressMeter (ProgressMeter *)
 Must be called before execute() More...
 
int64_t nrDone () const
 May be -1, i.e. class does not report nrdone. More...
 
int64_t totalNr () const
 
- Public Member Functions inherited from Task
virtual ~Task ()
 
virtual void enableWorkControl (bool=true)
 Must be called before execute() More...
 
bool workControlEnabled () const
 
virtual void controlWork (Control)
 
virtual Control getState () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=0)
 
 NamedObject (const NamedObject *linkedto)
 
 NamedObject (const NamedObject &)
 
virtual ~NamedObject ()
 
void setLinkedTo (NamedObject *)
 
bool operator== (const NamedObject &oth) const
 
virtual const OD::Stringname () const
 
virtual const OD::StringannotName () const
 
virtual void setName (const char *)
 
void setCleanName (const char *)
 cleans string first More...
 
void deleteNotify (const CallBack &)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Static Public Member Functions

static const char * sKeySearchRadius ()
 
static const char * sKeyCornersFirst ()
 
static const char * sKeyStepSize ()
 
static const char * sKeyNrSteps ()
 
- Static Public Member Functions inherited from Array2DInterpol
static const char * sKeyFillType ()
 
static const char * sKeyRowStep ()
 
static const char * sKeyColStep ()
 
static const char * sKeyOrigin ()
 
static const char * sKeyNrRows ()
 
static const char * sKeyNrCols ()
 
static const char * sKeyNrCells ()
 
static const char * sKeyMaxHoleSz ()
 
static const char * sKeyPolyNrofNodes ()
 
static const char * sKeyPolyNode ()
 
static const char * sKeyCropPolygon ()
 
- Static Public Member Functions inherited from ParallelTask
static uiString sPosFinished ()
 
static uiString sTrcFinished ()
 
- Static Public Member Functions inherited from Task
static uiString stdNrDoneText ()
 
static uiString uiStdNrDoneText ()
 

Protected Member Functions

virtual bool doWork (od_int64, od_int64, int)
 
od_int64 nrIterations () const
 
uiString uiNrDoneText () const
 will be nrDoneText() in 7.x More...
 
bool doPrepare (int)
 
virtual bool initFromArray (TaskRunner *)
 
od_int64 getNextIdx ()
 
void reportDone (od_int64)
 
- Protected Member Functions inherited from Array2DInterpol
 Array2DInterpol ()
 
void getNodesToFill (const bool *isdef, bool *shouldinterpol, TaskRunner *) const
 
bool isDefined (int idx) const
 
virtual void setFrom (od_int64 target, const od_int64 *sources, const float *weights, int nrsrc)
 
void floodFillArrFrom (int seed, const bool *isdef, bool *shouldinterpol) const
 
void excludeBigHoles (const bool *isdef, bool *shouldinterpol) const
 
- Protected Member Functions inherited from ParallelTask
virtual int maxNrThreads () const
 
virtual int minThreadSize () const
 
virtual bool stopAllOnFailure () const
 
 ParallelTask (const char *nm=0)
 
 ParallelTask (const ParallelTask &)
 
int64_t calculateThreadSize (int64_t totalnr, int nrthreads, int thread) const
 
void addToNrDone (int64_t increment)
 
void quickAddToNrDone (int64_t loopidx)
 
void resetNrDone ()
 
- Protected Member Functions inherited from Task
 Task (const char *nm=0)
 
virtual bool shouldContinue ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

int nrsteps_
 
int stepsize_
 
bool cornersfirst_
 
float searchradius_
 
int nrthreads_
 
int nrthreadswaiting_
 
bool waitforall_
 
Threads::ConditionVarcondvar_
 
bool shouldend_
 
int stepidx_
 
int nrinitialdefined_
 
int totalnr_
 
bool * curdefined_
 
bool * nodestofill_
 
TypeSet< od_int64definedidxs_
 
TypeSet< RowColneighbors_
 
TypeSet< float > neighborweights_
 
TypeSet< od_int64addedwithcursuport_
 
int nraddedthisstep_
 
od_int64 prevsupportsize_
 
TypeSet< od_int64todothisstep_
 
TypeSet< od_int64nrsources_
 
- Protected Attributes inherited from Array2DInterpol
Array2D< float > * arr_
 
ArrayAccessarrsetter_
 
float rowstep_
 
float colstep_
 
int nrrows_
 
int nrcols_
 
int nrcells_
 
RowCol origin_
 
FillType filltype_
 
float maxholesize_
 
const Array2D< bool > * mask_
 
bool maskismine_
 
bool isclassification_
 
Stats::CalcSetupstatsetup_
 
PolyTrendtrend_
 
ODPolygon< double > * poly_
 
bool croppoly_
 
- Protected Attributes inherited from Task
Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedObject
BufferStringname_
 
NamedObjectlinkedto_
 
CallBackSetdelnotify_
 

Private Member Functions

 mODTextTranslationClass (InverseDistanceArray2DInterpol)
 

Additional Inherited Members

- Public Types inherited from Array2DInterpol
enum  FillType { HolesOnly, ConvexHull, Full, Polygon }
 
- Public Types inherited from Task
enum  Control { Run, Pause, Stop }
 

Detailed Description

Interpolates 2D arrays using inverse distance method.

Parameters:

  1. searchradius - sets the search radius. Should have the same unit as given in setRowStep and getColStep. If undefined, all defined nodes will be used, and no other settings will be used.
  2. stepsize/nrsteps - sets how many nodes that will be done in each step. Each step will only use points defined in previous steps (not really true as shortcuts are made). In general, larger steps gives faster interpolation, but lower quality. If stepsize is 10, and nrsteps is 10, a border of maximum 100 nodes will be interpolated around the defined positions.
  3. cornersfirst - if true, algorithm will only interpolate nodes that has the same number of support (i.e. neigbors) within +-stepsize, before reevaluating which nodes to do next. Enabling cornersfirst will give high quality output at the expense of speed.

Constructor & Destructor Documentation

InverseDistanceArray2DInterpol::~InverseDistanceArray2DInterpol ( )

Member Function Documentation

bool InverseDistanceArray2DInterpol::canUseArrayAccess ( ) const
inlinevirtual

Reimplemented from Array2DInterpol.

bool InverseDistanceArray2DInterpol::doPrepare ( int  nrthreads)
protectedvirtual

Called once, before any doWork is called.

Reimplemented from Array2DInterpol.

virtual bool InverseDistanceArray2DInterpol::doWork ( od_int64  ,
od_int64  ,
int   
)
protectedvirtual
virtual bool InverseDistanceArray2DInterpol::fillPar ( IOPar ) const
virtual

Reimplemented from Array2DInterpol.

Reimplemented in InvDistHor3DGridder.

bool InverseDistanceArray2DInterpol::getCornersFirst ( ) const
inline
od_int64 InverseDistanceArray2DInterpol::getNextIdx ( )
protected
int InverseDistanceArray2DInterpol::getNrSteps ( ) const
inline
float InverseDistanceArray2DInterpol::getSearchRadius ( ) const
inline
int InverseDistanceArray2DInterpol::getStepSize ( ) const
inline
virtual bool InverseDistanceArray2DInterpol::initFromArray ( TaskRunner )
protectedvirtual

Reimplemented in InvDistHor3DGridder.

InverseDistanceArray2DInterpol::mDefaultFactoryInstantiation ( Array2DInterpol  ,
InverseDistanceArray2DInterpol  ,
"InverseDistance"  ,
tr("Inverse distance")   
)
InverseDistanceArray2DInterpol::mODTextTranslationClass ( InverseDistanceArray2DInterpol  )
private
bool InverseDistanceArray2DInterpol::nothingToFill ( ) const
inlinevirtual

Reimplemented from Array2DInterpol.

od_int64 InverseDistanceArray2DInterpol::nrIterations ( ) const
inlineprotectedvirtual
Returns
the number of times the process should be run.

Implements ParallelTask.

void InverseDistanceArray2DInterpol::reportDone ( od_int64  )
protected
bool InverseDistanceArray2DInterpol::setArray ( Array2D< float > &  ,
TaskRunner  
)
virtual

Set AFTER all settings.

Reimplemented from Array2DInterpol.

bool InverseDistanceArray2DInterpol::setArray ( ArrayAccess ,
TaskRunner  
)
virtual

Set AFTER all settings.

Trend is active only when setTrendOrder is called

Reimplemented from Array2DInterpol.

void InverseDistanceArray2DInterpol::setCornersFirst ( bool  n)
inline
void InverseDistanceArray2DInterpol::setNrSteps ( int  n)
inline
void InverseDistanceArray2DInterpol::setSearchRadius ( float  r)
inline
void InverseDistanceArray2DInterpol::setStepSize ( int  n)
inline
static const char* InverseDistanceArray2DInterpol::sKeyCornersFirst ( )
static
static const char* InverseDistanceArray2DInterpol::sKeyNrSteps ( )
static
static const char* InverseDistanceArray2DInterpol::sKeySearchRadius ( )
static
static const char* InverseDistanceArray2DInterpol::sKeyStepSize ( )
static
uiString InverseDistanceArray2DInterpol::uiNrDoneText ( ) const
inlineprotectedvirtual

will be nrDoneText() in 7.x

Reimplemented from Task.

virtual bool InverseDistanceArray2DInterpol::usePar ( const IOPar )
virtual

Reimplemented from Array2DInterpol.

Reimplemented in InvDistHor3DGridder.

Member Data Documentation

TypeSet<od_int64> InverseDistanceArray2DInterpol::addedwithcursuport_
protected
Threads::ConditionVar& InverseDistanceArray2DInterpol::condvar_
protected
bool InverseDistanceArray2DInterpol::cornersfirst_
protected
bool* InverseDistanceArray2DInterpol::curdefined_
protected
TypeSet<od_int64> InverseDistanceArray2DInterpol::definedidxs_
protected
TypeSet<RowCol> InverseDistanceArray2DInterpol::neighbors_
protected
TypeSet<float> InverseDistanceArray2DInterpol::neighborweights_
protected
bool* InverseDistanceArray2DInterpol::nodestofill_
protected
int InverseDistanceArray2DInterpol::nraddedthisstep_
protected
int InverseDistanceArray2DInterpol::nrinitialdefined_
protected
TypeSet<od_int64> InverseDistanceArray2DInterpol::nrsources_
protected
int InverseDistanceArray2DInterpol::nrsteps_
protected
int InverseDistanceArray2DInterpol::nrthreads_
protected
int InverseDistanceArray2DInterpol::nrthreadswaiting_
protected
od_int64 InverseDistanceArray2DInterpol::prevsupportsize_
protected
float InverseDistanceArray2DInterpol::searchradius_
protected
bool InverseDistanceArray2DInterpol::shouldend_
protected
int InverseDistanceArray2DInterpol::stepidx_
protected
int InverseDistanceArray2DInterpol::stepsize_
protected
TypeSet<od_int64> InverseDistanceArray2DInterpol::todothisstep_
protected
int InverseDistanceArray2DInterpol::totalnr_
protected
bool InverseDistanceArray2DInterpol::waitforall_
protected

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