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

Base class for two dimensional array interpolators. More...

Inheritance diagram for Array2DInterpol:
[legend]

Classes

class  ArrayAccess
 

Public Types

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

Public Member Functions

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
 
virtual bool nothingToFill () const
 
virtual bool setArray (Array2D< float > &, TaskRunner *=0)
 Set AFTER all settings. More...
 
virtual bool canUseArrayAccess () const
 
virtual bool setArray (ArrayAccess &, TaskRunner *=0)
 Set AFTER all settings. More...
 
void setTrendOrder (PolyTrend::Order ord)
 
bool trimArray (int step, Array2D< char > &edgesmask)
 
void doPolygonCrop ()
 
virtual bool fillPar (IOPar &) const
 
virtual bool usePar (const IOPar &)
 
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 uiString uiNrDoneText () const
 will be nrDoneText() in 7.x More...
 
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 * 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

 Array2DInterpol ()
 
bool doPrepare (int)
 
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 int64_t nrIterations () const =0
 
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

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 (Array2DInterpol)
 

Detailed Description

Base class for two dimensional array interpolators.

Member Enumeration Documentation

Enumerator
HolesOnly 
ConvexHull 
Full 
Polygon 

Constructor & Destructor Documentation

virtual Array2DInterpol::~Array2DInterpol ( )
virtual
Array2DInterpol::Array2DInterpol ( )
protected

Member Function Documentation

virtual bool Array2DInterpol::canUseArrayAccess ( ) const
inlinevirtual
void Array2DInterpol::doPolygonCrop ( )
bool Array2DInterpol::doPrepare ( int  nrthreads)
protectedvirtual

Called once, before any doWork is called.

Reimplemented from ParallelTask.

Reimplemented in TriangulationArray2DInterpol, InverseDistanceArray2DInterpol, and ContinuousCurvatureArray2DInterpol.

void Array2DInterpol::excludeBigHoles ( const bool *  isdef,
bool *  shouldinterpol 
) const
protected

Will find holes larger than maxholesize_ and exclude them from shouldinterpol.

virtual bool Array2DInterpol::fillPar ( IOPar ) const
virtual
void Array2DInterpol::floodFillArrFrom ( int  seed,
const bool *  isdef,
bool *  shouldinterpol 
) const
protected

Floodfills 'false' into shouldinterpol from position seed. Floodfill will stop when bumping into defined values, as provided in isdef.

FillType Array2DInterpol::getFillType ( ) const
float Array2DInterpol::getMaxHoleSize ( ) const
void Array2DInterpol::getNodesToFill ( const bool *  isdef,
bool *  shouldinterpol,
TaskRunner  
) const
protected

Fills shouldinterpol with true or false depending on if a certain node should be interpolated or not, based on filltype and maxholesize. If isdef is zero, the information will be extracted from the grid. Both isdef and shouldinterpol arrays refers to positions on the grid by row=idx/nrcols_,col=idxnrcols_

virtual uiString Array2DInterpol::infoMsg ( ) const
inlinevirtual
bool Array2DInterpol::isClassification ( ) const
bool Array2DInterpol::isDefined ( int  idx) const
protected

idx refers to positions on the grid by row=idx/nrcols_,col=idxnrcols_

Array2DInterpol::mDeclareEnumUtils ( FillType  )
Array2DInterpol::mDefineFactoryInClass ( Array2DInterpol  ,
factory   
)
Array2DInterpol::mODTextTranslationClass ( Array2DInterpol  )
private
virtual bool Array2DInterpol::nothingToFill ( ) const
inlinevirtual
virtual bool Array2DInterpol::setArray ( Array2D< float > &  ,
TaskRunner = 0 
)
virtual
virtual bool Array2DInterpol::setArray ( ArrayAccess ,
TaskRunner = 0 
)
virtual

Set AFTER all settings.

Trend is active only when setTrendOrder is called

Reimplemented in TriangulationArray2DInterpol, InverseDistanceArray2DInterpol, and ContinuousCurvatureArray2DInterpol.

void Array2DInterpol::setClassification ( bool  )
void Array2DInterpol::setColStep ( float  r)
void Array2DInterpol::setFillType ( FillType  )
virtual void Array2DInterpol::setFrom ( od_int64  target,
const od_int64 sources,
const float *  weights,
int  nrsrc 
)
protectedvirtual

For convenience, inheriting obj may set arr_ directly.

Reimplemented in TriangulationHor3DGridder, and InvDistHor3DGridder.

void Array2DInterpol::setMask ( const Array2D< bool > *  ,
OD::PtrPolicy  = OD::UsePtr 
)

If mask is set, interpolation will only occur where mask has 'true' values. If array is larger than mask, values are assumed to be 'false' outside the mask. The mask works together with the filltype in an AND operations, so each position must get a 'true' value both from the filltype AND the mask. If no mask is given, the filltype will be used alone.

void Array2DInterpol::setMaxHoleSize ( float  )
void Array2DInterpol::setOrigin ( const RowCol )
void Array2DInterpol::setRowStep ( float  r)
void Array2DInterpol::setSampling ( const TrcKeySampling )

Set both steps and the origin.

void Array2DInterpol::setTrendOrder ( PolyTrend::Order  ord)
static const char* Array2DInterpol::sKeyColStep ( )
static
static const char* Array2DInterpol::sKeyCropPolygon ( )
static
static const char* Array2DInterpol::sKeyFillType ( )
static
static const char* Array2DInterpol::sKeyMaxHoleSz ( )
static
static const char* Array2DInterpol::sKeyNrCells ( )
static
static const char* Array2DInterpol::sKeyNrCols ( )
static
static const char* Array2DInterpol::sKeyNrRows ( )
static
static const char* Array2DInterpol::sKeyOrigin ( )
static
static const char* Array2DInterpol::sKeyPolyNode ( )
static
static const char* Array2DInterpol::sKeyPolyNrofNodes ( )
static
static const char* Array2DInterpol::sKeyRowStep ( )
static
bool Array2DInterpol::trimArray ( int  step,
Array2D< char > &  edgesmask 
)
uiString Array2DInterpol::uiMessage ( ) const
inlinevirtual

will be message() again in 7.x

Note
totalNr is only used for displaying progress.

Reimplemented from Task.

virtual bool Array2DInterpol::usePar ( const IOPar )
virtual

Member Data Documentation

Array2D<float>* Array2DInterpol::arr_
protected
ArrayAccess* Array2DInterpol::arrsetter_
protected
float Array2DInterpol::colstep_
protected
bool Array2DInterpol::croppoly_
protected
FillType Array2DInterpol::filltype_
protected
bool Array2DInterpol::isclassification_
protected
const Array2D<bool>* Array2DInterpol::mask_
protected
bool Array2DInterpol::maskismine_
protected
float Array2DInterpol::maxholesize_
protected
int Array2DInterpol::nrcells_
protected
int Array2DInterpol::nrcols_
protected
int Array2DInterpol::nrrows_
protected
RowCol Array2DInterpol::origin_
protected
ODPolygon<double>* Array2DInterpol::poly_
protected
float Array2DInterpol::rowstep_
protected
Stats::CalcSetup* Array2DInterpol::statsetup_
protected
PolyTrend* Array2DInterpol::trend_
protected

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