Public Member Functions | Protected Member Functions | List of all members
DistanceModelLinear Class Reference
Inheritance diagram for DistanceModelLinear:
Inheritance graph
[legend]
Collaboration diagram for DistanceModelLinear:
Collaboration graph
[legend]

Public Member Functions

void setRadius (float horz, float vert=nan_f, float horzLeft=nan_f, float vertUp=nan_f)
 
void setDecrement (float horz, float vert=nan_f, float horzLeft=nan_f, float vertUp=nan_f)
 
virtual DistanceElement getElement (short dx, short dy, bool forward=true) const
 
virtual float decrease (float value, float coeff) const
 
- Public Member Functions inherited from DistanceModel
void setMax (float maxCodeValue)
 Set maximum (expected) code value. Radii, if given, will set pixel-to-pixel decrements scaled to this value.
 
float getMax () const
 Returns the maximum (expected) code value.
 
void setRadiusVerbatim (float horz, float vert=nan_f, float horzLeft=nan_f, float vertUp=nan_f)
 Simply copies values, does not try to set defaults.
 
const Bidirectional< float > & getRadiusHorz () const
 
const Bidirectional< float > & getRadiusVert () const
 
void update ()
 
virtual void updateBean () const override
 Called after setParameters()
 
void setTopology (PIXEL_ADJACENCY topology)
 Sets the topology of the computation grid: 0=diamond, 1=diagonal, 2=extended (chess knight steps)
 
void setTopology (const std::string &topology)
 
void createChain (DistanceNeighbourhood &chain, PIXEL_ADJACENCY topology=PIXEL_ADJACENCY::KNIGHT, bool forward=true) const
 Creates a list of DistanceElements. More...
 
void createChain (DistanceNeighbourhood &chain, bool forward=true) const
 
- Public Member Functions inherited from BeanLike
virtual const std::string & getName () const
 Return the name of an instance.
 
virtual const std::string & getDescription () const
 Return a brief description.
 
bool hasParameters () const
 
template<class F >
getParameter (const std::string &p) const
 Gets a single parameter.
 
const ReferenceMapgetParameters () const
 
ReferenceMapgetParameters ()
 
template<class F >
void setParametersFromEntries (const F &args)
 
void setParameters (std::initializer_list< Variable::init_pair_t > args)
 Grants access to (if above hidden)
 
virtual void setParameters (const std::string &p, char assignmentSymbol='=', char separatorSymbol=0)
 Sets comma-separated parameters in a predetermined order "a,b,c" or by specifing them "b=2". More...
 
template<class T >
void setParameters (const std::map< std::string, T > &args)
 Set parameters.
 
template<class T >
void setParameters (const SmartMap< T > &args)
 Set parameters.
 
void setParameter (const std::string &p, const Castable &value)
 Sets a single parameter.
 
template<class T >
void setParameter (const std::string &p, const VariableT< T > &value)
 
template<class F >
void setParameter (const std::string &p, const F &value)
 Sets a single parameter. More...
 
template<class F >
void setParameter (const std::string &p, std::initializer_list< F > value)
 Sets a single parameter.
 
BeanLikeoperator= (const BeanLike &b)
 
virtual std::ostream & toStream (std::ostream &ostr, bool compact=true) const
 
 BeanLike (const BeanLike &b)
 
 BeanLike (const std::string &name, const std::string &description="")
 

Protected Member Functions

float radius2Dec (float r, float rDefault) const
 
float checkDec (float d, float dDefault=1.0) const
 
- Protected Member Functions inherited from DistanceModel
 DistanceModel (const std::string &name, const std::string &description="")
 Base class for digital distance models. Supports 4-, 8- and extended "chess knight" distance. More...
 
 DistanceModel (const DistanceModel &dm)
 
- Protected Member Functions inherited from BeanLike
virtual void storeLastArguments (const std::string &p)
 Called after setParameters()
 

Additional Inherited Members

- Public Types inherited from DistanceModel
enum  PIXEL_ADJACENCY { CONN4 =4 , CONN8 =8 , KNIGHT =16 }
 
typedef PIXEL_ADJACENCY topol_t
 
typedef drain::EnumFlagger< drain::SingleFlagger< PIXEL_ADJACENCY > > PixelAdjacencyFlagger
 
- Public Attributes inherited from DistanceModel
PixelAdjacencyFlagger pixelAdjacency
 
- Static Public Attributes inherited from DistanceModel
static const float nan_f = std::numeric_limits<float>::quiet_NaN()
 
- Protected Attributes inherited from DistanceModel
std::string pixelAdjacencyStr
 
drain::Bidirectional< float > horzRadius
 
drain::Bidirectional< float > vertRadius
 
drain::Bidirectional< float > horzDec
 Final decrement or decay per pixel in horizontal direction. Derived from horzRadius; definition varies in subclasses.
 
drain::Bidirectional< float > vertDec
 Final decrement or decay per pixel in vertical direction. Derived from vertRadius; definition varies in subclasses.
 
float maxCodeValue
 Needed internally to get diag decrement larger than horz/vert decrements. (Not used for scaling).
 
- Protected Attributes inherited from BeanLike
const std::string name
 
const std::string description
 
ReferenceMap parameters
 

Member Function Documentation

◆ setDecrement()

void setDecrement ( float  horz,
float  vert = nan_f,
float  horzLeft = nan_f,
float  vertUp = nan_f 
)
virtual

◆ setRadius()

void setRadius ( float  horz,
float  vert = nan_f,
float  horzLeft = nan_f,
float  vertUp = nan_f 
)
virtual
See also
DistanceModel::setRadius()

NEW 2024

Implements DistanceModel.


The documentation for this class was generated from the following files: