OpendTect  7.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TriangulationArray2DInterpol Class Reference

Uses triangulation method to interpolate two dimensional arrays. More...

Inheritance diagram for TriangulationArray2DInterpol:
[legend]

Public Member Functions

 TriangulationArray2DInterpol ()
 
 ~TriangulationArray2DInterpol ()
 
bool canUseArrayAccess () const override
 
bool doInterpolation () const
 
void doInterpolation (bool yn)
 
bool fillPar (IOPar &) const override
 
float getMaxDistance () const
 
bool isMaxInterPolChecked () const
 
bool nothingToFill () const override
 
bool setArray (Array2D< float > &, TaskRunner *) override
 Set AFTER all settings. More...
 
bool setArray (ArrayAccess &, TaskRunner *) override
 Set AFTER all settings. More...
 
void setMaxDistance (float r)
 
void setMaxDistInterPolChecekd (bool yn)
 
bool usePar (const IOPar &) override
 
- Public Member Functions inherited from Array2DInterpol
virtual ~Array2DInterpol ()
 
void doPolygonCrop ()
 
FillType getFillType () const
 
float getMaxHoleSize () const
 
virtual uiString infoMsg () const
 
bool isClassification () const
 
void setClassification (bool)
 
void setColStep (float r)
 
void setFillType (FillType)
 
void setMask (const Array2D< bool > *, OD::PtrPolicy=OD::UsePtr)
 
void setMaxHoleSize (float)
 
void setOrigin (const RowCol &)
 
void setRowStep (float r)
 
void setSampling (const TrcKeySampling &)
 Set both steps and the origin. More...
 
void setTrendOrder (PolyTrend::Order ord)
 
bool trimArray (int step, Array2D< char > &edgesmask)
 
uiString uiMessage () const override
 will be message() again in 7.x More...
 
- Public Member Functions inherited from ParallelTask
virtual ~ParallelTask ()
 
void doParallel (bool yn)
 
bool execute () override
 
virtual bool executeParallel (bool parallel)
 
std::int64_t nrDone () const override
 May be -1, i.e. class does not report nrdone. More...
 
std::int64_t totalNr () const override
 
- Public Member Functions inherited from ReportingTask
virtual ~ReportingTask ()
 
void getProgress (const ReportingTask &)
 
- Public Member Functions inherited from Task
virtual ~Task ()
 
virtual void controlWork (Control)
 
virtual void enableWorkControl (bool=true)
 Must be called before execute() More...
 
virtual uiRetVal errorWithDetails () const
 
virtual Control getState () const
 
bool workControlEnabled () const
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static const char * sKeyDoInterpol ()
 
static const char * sKeyMaxDistance ()
 
- Static Public Member Functions inherited from Array2DInterpol
static const char * sKeyColStep ()
 
static const char * sKeyCropPolygon ()
 
static const char * sKeyFillType ()
 
static const char * sKeyMaxHoleSz ()
 
static const char * sKeyNrCells ()
 
static const char * sKeyNrCols ()
 
static const char * sKeyNrRows ()
 
static const char * sKeyOrigin ()
 
static const char * sKeyPolyNode ()
 
static const char * sKeyPolyNrofNodes ()
 
static const char * sKeyRowStep ()
 
- 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 ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

bool doPrepare (int) override
 
bool doWork (od_int64, od_int64, int) override
 
void getNextNodes (TypeSet< od_int64 > &)
 
virtual bool initFromArray (TaskRunner *)
 
int minThreadSize () const override
 
od_int64 nrIterations () const override
 
uiString uiNrDoneText () const override
 will be nrDoneText() in 7.x More...
 
- Protected Member Functions inherited from Array2DInterpol
 Array2DInterpol ()
 
void excludeBigHoles (const bool *isdef, bool *shouldinterpol) const
 
void floodFillArrFrom (int seed, const bool *isdef, bool *shouldinterpol) const
 
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)
 
- Protected Member Functions inherited from ParallelTask
 ParallelTask (const char *nm=0)
 
 ParallelTask (const ParallelTask &)
 
void addToNrDone (std::int64_t increment)
 
std::int64_t calculateThreadSize (std::int64_t totalnr, int nrthreads, int thread) const
 
virtual int maxNrThreads () const
 
void quickAddToNrDone (std::int64_t loopidx)
 
void resetNrDone ()
 
virtual bool stopAllOnFailure () const
 
- Protected Member Functions inherited from ReportingTask
 ReportingTask (const char *nm=nullptr)
 
void incrementProgress ()
 
ProgressMeterprogressMeter () const
 
void reportProgressFinished ()
 
void reportProgressStarted ()
 
void resetProgress ()
 
void setProgressMeter (ProgressMeter *) override
 Must be called before execute() More...
 
void updateProgressMeter (bool forced=false, std::int64_t *totalnr=0)
 
void updateReportedName ()
 
- Protected Member Functions inherited from Task
 Task (const char *nm=nullptr)
 
virtual bool shouldContinue ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

TypeSet< int > coordlistindices_
 
TypeSet< BinIDcornerbid_
 
TypeSet< int > corneridx_
 
TypeSet< float > cornerval_
 
bool * curdefined_
 
od_int64 curnode_
 
Threads::Lock curnodelock_
 
bool dointerpolation_
 
bool ismaxdistfldchecked_
 
float maxdistance_
 
bool * nodestofill_
 
od_int64 totalnr_
 
Triangle2DInterpolatortriangleinterpolator_
 
DAGTriangleTreetriangulation_
 
- Protected Attributes inherited from Array2DInterpol
Array2D< float > * arr_
 
ArrayAccessarrsetter_
 
float colstep_
 
bool croppoly_
 
FillType filltype_
 
bool isclassification_
 
const Array2D< bool > * mask_
 
bool maskismine_
 
float maxholesize_
 
int nrcells_
 
int nrcols_
 
int nrrows_
 
RowCol origin_
 
ODPolygon< double > * poly_
 
float rowstep_
 
Stats::CalcSetupstatsetup_
 
PolyTrendtrend_
 
- Protected Attributes inherited from Task
Control control_
 
Threads::ConditionVarworkcontrolcondvar_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Additional Inherited Members

- Public Types inherited from Array2DInterpol
enum  FillType { HolesOnly , ConvexHull , Full , Polygon }
 
- Public Types inherited from Task
enum  Control { Run , Pause , Stop }
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 
- Public Attributes inherited from ReportingTask
Notifier< ReportingTaskprogressUpdated
 

Detailed Description

Uses triangulation method to interpolate two dimensional arrays.

<>

Constructor & Destructor Documentation

◆ TriangulationArray2DInterpol()

TriangulationArray2DInterpol::TriangulationArray2DInterpol ( )

◆ ~TriangulationArray2DInterpol()

TriangulationArray2DInterpol::~TriangulationArray2DInterpol ( )

Member Function Documentation

◆ canUseArrayAccess()

bool TriangulationArray2DInterpol::canUseArrayAccess ( ) const
inlineoverridevirtual

Reimplemented from Array2DInterpol.

◆ doInterpolation() [1/2]

bool TriangulationArray2DInterpol::doInterpolation ( ) const
inline

◆ doInterpolation() [2/2]

void TriangulationArray2DInterpol::doInterpolation ( bool  yn)
inline

◆ doPrepare()

bool TriangulationArray2DInterpol::doPrepare ( int  nrthreads)
overrideprotectedvirtual

Called once, before any doWork is called.

Reimplemented from Array2DInterpol.

◆ doWork()

bool TriangulationArray2DInterpol::doWork ( od_int64  ,
od_int64  ,
int   
)
overrideprotected

◆ fillPar()

bool TriangulationArray2DInterpol::fillPar ( IOPar ) const
overridevirtual

Reimplemented from Array2DInterpol.

Reimplemented in TriangulationHor3DGridder.

◆ getMaxDistance()

float TriangulationArray2DInterpol::getMaxDistance ( ) const
inline

◆ getNextNodes()

void TriangulationArray2DInterpol::getNextNodes ( TypeSet< od_int64 > &  )
protected

◆ initFromArray()

virtual bool TriangulationArray2DInterpol::initFromArray ( TaskRunner )
protectedvirtual

Reimplemented in TriangulationHor3DGridder.

◆ isMaxInterPolChecked()

bool TriangulationArray2DInterpol::isMaxInterPolChecked ( ) const
inline

◆ minThreadSize()

int TriangulationArray2DInterpol::minThreadSize ( ) const
inlineoverrideprotectedvirtual
Returns
the minimum number of computations that effectively can be run in a separate thread. A small number will give a large overhead for when each step is quick and nrIterations is not big.

Reimplemented from ParallelTask.

◆ nothingToFill()

bool TriangulationArray2DInterpol::nothingToFill ( ) const
inlineoverridevirtual

Reimplemented from Array2DInterpol.

◆ nrIterations()

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

Implements ParallelTask.

◆ setArray() [1/2]

bool TriangulationArray2DInterpol::setArray ( Array2D< float > &  ,
TaskRunner  
)
overridevirtual

Set AFTER all settings.

Reimplemented from Array2DInterpol.

◆ setArray() [2/2]

bool TriangulationArray2DInterpol::setArray ( ArrayAccess ,
TaskRunner  
)
overridevirtual

Set AFTER all settings.

Trend is active only when setTrendOrder is called

Reimplemented from Array2DInterpol.

◆ setMaxDistance()

void TriangulationArray2DInterpol::setMaxDistance ( float  r)
inline

◆ setMaxDistInterPolChecekd()

void TriangulationArray2DInterpol::setMaxDistInterPolChecekd ( bool  yn)
inline

◆ sKeyDoInterpol()

static const char* TriangulationArray2DInterpol::sKeyDoInterpol ( )
static

◆ sKeyMaxDistance()

static const char* TriangulationArray2DInterpol::sKeyMaxDistance ( )
static

◆ uiNrDoneText()

uiString TriangulationArray2DInterpol::uiNrDoneText ( ) const
inlineoverrideprotectedvirtual

will be nrDoneText() in 7.x

Reimplemented from Task.

◆ usePar()

bool TriangulationArray2DInterpol::usePar ( const IOPar )
overridevirtual

Reimplemented from Array2DInterpol.

Reimplemented in TriangulationHor3DGridder.

Member Data Documentation

◆ coordlistindices_

TypeSet<int> TriangulationArray2DInterpol::coordlistindices_
protected

◆ cornerbid_

TypeSet<BinID> TriangulationArray2DInterpol::cornerbid_
protected

◆ corneridx_

TypeSet<int> TriangulationArray2DInterpol::corneridx_
protected

◆ cornerval_

TypeSet<float> TriangulationArray2DInterpol::cornerval_
protected

◆ curdefined_

bool* TriangulationArray2DInterpol::curdefined_
protected

◆ curnode_

od_int64 TriangulationArray2DInterpol::curnode_
protected

◆ curnodelock_

Threads::Lock TriangulationArray2DInterpol::curnodelock_
protected

◆ dointerpolation_

bool TriangulationArray2DInterpol::dointerpolation_
protected

◆ ismaxdistfldchecked_

bool TriangulationArray2DInterpol::ismaxdistfldchecked_
protected

◆ maxdistance_

float TriangulationArray2DInterpol::maxdistance_
protected

◆ nodestofill_

bool* TriangulationArray2DInterpol::nodestofill_
protected

◆ totalnr_

od_int64 TriangulationArray2DInterpol::totalnr_
protected

◆ triangleinterpolator_

Triangle2DInterpolator* TriangulationArray2DInterpol::triangleinterpolator_
protected

◆ triangulation_

DAGTriangleTree* TriangulationArray2DInterpol::triangulation_
protected

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