Public Member Functions | Protected Member Functions | Protected Attributes

InverseDistanceArray2DInterpol Class Reference

Inheritance diagram for InverseDistanceArray2DInterpol:
Array2DInterpol ParallelTask Task NamedObject CallBacker

List of all members.

Public Member Functions

 mDefaultFactoryInstantiation (Array2DInterpol, InverseDistanceArray2DInterpol,"Inverse distance", sFactoryKeyword())
 InverseDistanceArray2DInterpol ()
 ~InverseDistanceArray2DInterpol ()
bool setArray (Array2D< float > &, TaskRunner *)
 Set AFTER all settings.
bool canUseArrayAccess () const
bool setArray (ArrayAccess &, TaskRunner *)
 Set AFTER all settings.
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

Protected Member Functions

bool doWork (od_int64, od_int64, int)
od_int64 nrIterations () const
const char * nrDoneText () const
bool doPrepare (int)
bool initFromArray (TaskRunner *)
od_int64 getNextIdx ()
void reportDone (od_int64)

Protected Attributes

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

Detailed Description

Class that interpolates 2D arrays with inverse distance.

Parameters: 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. 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.

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 (  ) 
InverseDistanceArray2DInterpol::~InverseDistanceArray2DInterpol (  ) 

Member Function Documentation

bool InverseDistanceArray2DInterpol::canUseArrayAccess (  )  const [inline, virtual]

Reimplemented from Array2DInterpol.

bool InverseDistanceArray2DInterpol::doPrepare ( int   )  [protected, virtual]

Reimplemented from Array2DInterpol.

bool InverseDistanceArray2DInterpol::doWork ( od_int64  ,
od_int64  ,
int   
) [protected]
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]
bool InverseDistanceArray2DInterpol::initFromArray ( TaskRunner  )  [protected]
InverseDistanceArray2DInterpol::mDefaultFactoryInstantiation ( Array2DInterpol  ,
InverseDistanceArray2DInterpol  ,
"Inverse distance"  ,
sFactoryKeyword()   
)
bool InverseDistanceArray2DInterpol::nothingToFill (  )  const [inline, virtual]

Reimplemented from Array2DInterpol.

const char* InverseDistanceArray2DInterpol::nrDoneText (  )  const [inline, protected, virtual]

Reimplemented from Task.

od_int64 InverseDistanceArray2DInterpol::nrIterations (  )  const [inline, protected, virtual]

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.

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]

Member Data Documentation