Abstract base class for functions evaluating the overlap between two Gaussian shape functions.
More...
Abstract base class for functions evaluating the overlap between two Gaussian shape functions.
Concrete subclasses (e.g. Shape.ExactGaussianShapeOverlapFunction, Shape.FastGaussianShapeOverlapFunction) implement the overlap evaluation using different trade-offs of accuracy vs. speed.
◆ getObjectID()
| int CDPL.Shape.GaussianShapeOverlapFunction.getObjectID |
( |
| ) |
|
Returns the numeric identifier (ID) of the wrapped C++ class instance.
Different Python GaussianShapeOverlapFunction instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two GaussianShapeOverlapFunction instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().
- Returns
- The numeric ID of the internally referenced C++ class instance.
◆ setShapeFunction()
| None CDPL.Shape.GaussianShapeOverlapFunction.setShapeFunction |
( |
GaussianShapeFunction |
func, |
|
|
bool |
is_ref |
|
) |
| |
Specifies the reference or aligned shape function used by the overlap evaluation.
- Parameters
-
| func | The shape function. |
| is_ref | If True, func is the reference shape function. Otherwise, the aligned shape function. |
◆ getShapeFunction()
Returns the reference or aligned shape function.
- Parameters
-
| ref | If True, the reference shape function is returned. Otherwise, the aligned shape function. |
- Returns
- A reference to the requested shape function (or
nullptr if none is associated).
◆ setColorMatchFunction()
Specifies the function used to decide whether two color features match.
- Parameters
-
| func | The color-match function. |
◆ getColorMatchFunction()
Returns the currently configured color-match function.
- Returns
- A reference to the color-match function.
◆ setColorFilterFunction()
| None CDPL.Shape.GaussianShapeOverlapFunction.setColorFilterFunction |
( |
BoolSizeTypeFunctor |
func | ) |
|
Specifies the function used to filter color features by type.
- Parameters
-
| func | The color-filter function. |
◆ getColorFilterFunction()
Returns the currently configured color-filter function.
- Returns
- A reference to the color-filter function.
◆ calcSelfOverlap()
| float CDPL.Shape.GaussianShapeOverlapFunction.calcSelfOverlap |
( |
bool |
ref | ) |
|
Calculates the shape-only self-overlap of the reference or aligned shape function.
- Parameters
-
| ref | If True, the reference self-overlap is returned. Otherwise, the aligned self-overlap. |
- Returns
- The self-overlap value.
◆ calcColorSelfOverlap()
| float CDPL.Shape.GaussianShapeOverlapFunction.calcColorSelfOverlap |
( |
bool |
ref | ) |
|
Calculates the color self-overlap of the reference or aligned shape function.
- Parameters
-
| ref | If True, the reference color self-overlap is returned. Otherwise, the aligned color self-overlap. |
- Returns
- The color self-overlap value.
◆ calcOverlap() [1/2]
| float CDPL.Shape.GaussianShapeOverlapFunction.calcOverlap |
( |
| ) |
|
Calculates the shape-only overlap of the reference and aligned shape functions.
- Returns
- The shape overlap value.
◆ calcOverlap() [2/2]
Calculates the shape-only overlap with the aligned shape element positions taken from coords.
- Parameters
-
| coords | The element 3D positions of the aligned shape. |
- Returns
- The shape overlap value.
◆ calcColorOverlap() [1/2]
| float CDPL.Shape.GaussianShapeOverlapFunction.calcColorOverlap |
( |
| ) |
|
Calculates the color overlap of the reference and aligned shape functions.
- Returns
- The color overlap value.
◆ calcColorOverlap() [2/2]
| float CDPL.Shape.GaussianShapeOverlapFunction.calcColorOverlap |
( |
Math.Vector3DArray |
coords | ) |
|
Calculates the color overlap with the aligned shape element positions taken from coords.
- Parameters
-
| coords | The element 3D positions of the aligned shape. |
- Returns
- The color overlap value.
◆ calcOverlapGradient()
Calculates the shape overlap with the aligned shape element positions taken from coords and returns the gradient with respect to those positions.
- Parameters
-
| coords | The element 3D positions of the aligned shape. |
| grad | The output element-wise gradient of the overlap. |
- Returns
- The shape overlap value.