Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Static Public Attributes | Properties | List of all members
CDPL.Shape.FastGaussianShapeAlignment Class Reference
+ Inheritance diagram for CDPL.Shape.FastGaussianShapeAlignment:

Public Member Functions

None __init__ ()
 Initializes the FastGaussianShapeAlignment instance.
 
None __init__ (GaussianShape ref_shape)
 Initializes the FastGaussianShapeAlignment instance. More...
 
None __init__ (GaussianShapeSet ref_shapes)
 Initializes the FastGaussianShapeAlignment instance. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None setResultCompareFunction (BoolAlignmentResult2Functor func)
 
BoolAlignmentResult2Functor getResultCompareFunction ()
 
None setScoringFunction (DoubleAlignmentResultFunctor func)
 
DoubleAlignmentResultFunctor getScoringFunction ()
 
None setResultSelectionMode (int mode)
 
int getResultSelectionMode ()
 
None setMaxNumOptimizationIterations (int max_iter)
 
int getMaxNumOptimizationIterations ()
 
None setOptimizationStopGradient (float grad_norm)
 
float getOptimizationStopGradient ()
 
None performAlignment (bool perf_align)
 
bool performAlignment ()
 
None optimizeOverlap (bool optimize)
 
bool optimizeOverlap ()
 
None greedyOptimization (bool greedy)
 
bool greedyOptimization ()
 
None setSymmetryThreshold (float thresh)
 
float getSymmetryThreshold ()
 
None genShapeCenterStarts (bool generate)
 
bool genShapeCenterStarts ()
 
None genColorCenterStarts (bool generate)
 
bool genColorCenterStarts ()
 
None genNonColorCenterStarts (bool generate)
 
bool genNonColorCenterStarts ()
 
None genRandomStarts (bool generate)
 
bool genRandomStarts ()
 
None genForAlignedShapeCenters (bool generate)
 
bool genForAlignedShapeCenters ()
 
None genForReferenceShapeCenters (bool generate)
 
bool genForReferenceShapeCenters ()
 
None genForLargerShapeCenters (bool generate)
 
bool genForLargerShapeCenters ()
 
None setMaxRandomTranslation (float max_trans)
 
float getMaxRandomTranslation ()
 
None setNumRandomStarts (int num_starts)
 
int getNumRandomStarts ()
 
None setRandomSeed (int seed)
 
None clearReferenceShapes ()
 
None addReferenceShape (GaussianShape shape, bool new_set=True)
 
None addReferenceShapes (GaussianShapeSet shapes, bool new_set=True)
 
int getNumReferenceShapes ()
 
bool align (GaussianShape shape)
 
bool align (GaussianShapeSet shapes)
 
int getNumResults ()
 
AlignmentResult getResult (int idx)
 
int __len__ ()
 
AlignmentResult __getitem__ (int idx)
 

Static Public Attributes

float DEF_OPTIMIZATION_STOP_GRADIENT = 1.0
 
int DEF_MAX_OPTIMIZATION_ITERATIONS = 20
 
int DEF_RESULT_SELECTION_MODE = 3
 
float DEF_SYMMETRY_THRESHOLD = 0.15
 
int DEF_NUM_RANDOM_STARTS = 4
 
float DEF_MAX_RANDOM_TRANSLATION = 2.0
 

Properties

 objectID = property(getObjectID)
 
 numResults = property(getNumResults)
 
 resultCompareFunction = property(getResultCompareFunction, setResultCompareFunction)
 
 scoringFunction = property(getScoringFunction, setScoringFunction)
 
 resultSelectionMode = property(getResultSelectionMode, setResultSelectionMode)
 
 maxNumOptIterations = property(getMaxNumOptimizationIterations, setMaxNumOptimizationIterations)
 
 optStopGradient = property(getOptimizationStopGradient, setOptimizationStopGradient)
 
 perfAlignment = property(performAlignment, performAlignment)
 
 optOverlap = property(optimizeOverlap, optimizeOverlap)
 
 greedyOpt = property(greedyOptimization, greedyOptimization)
 
 numReferenceShapes = property(getNumReferenceShapes)
 
 symmetryThreshold = property(getSymmetryThreshold, setSymmetryThreshold)
 
 maxRandomTranslation = property(getMaxRandomTranslation, setMaxRandomTranslation)
 
 numRandomStarts = property(getNumRandomStarts, setNumRandomStarts)
 
 shapeCenterStarts = property(genShapeCenterStarts, genShapeCenterStarts)
 
 colorCenterStarts = property(genColorCenterStarts, genColorCenterStarts)
 
 nonColorCenterStarts = property(genNonColorCenterStarts, genNonColorCenterStarts)
 
 randomStarts = property(getNumRandomStarts, setNumRandomStarts)
 
 genForAlignedShapeCtrs = property(genForAlignedShapeCenters, genForAlignedShapeCenters)
 
 genForReferenceShapeCrs = property(genForReferenceShapeCenters, genForReferenceShapeCenters)
 
 genForLargerShapeCtrs = property(genForLargerShapeCenters, genForLargerShapeCenters)
 

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.__init__ ( GaussianShape  ref_shape)

Initializes the FastGaussianShapeAlignment instance.

Parameters
ref_shape

◆ __init__() [2/2]

None CDPL.Shape.FastGaussianShapeAlignment.__init__ ( GaussianShapeSet  ref_shapes)

Initializes the FastGaussianShapeAlignment instance.

Parameters
ref_shapes

Member Function Documentation

◆ getObjectID()

int CDPL.Shape.FastGaussianShapeAlignment.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python FastGaussianShapeAlignment 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 FastGaussianShapeAlignment 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.

◆ setResultCompareFunction()

None CDPL.Shape.FastGaussianShapeAlignment.setResultCompareFunction ( BoolAlignmentResult2Functor  func)
Parameters
func

◆ getResultCompareFunction()

BoolAlignmentResult2Functor CDPL.Shape.FastGaussianShapeAlignment.getResultCompareFunction ( )
Returns

◆ setScoringFunction()

None CDPL.Shape.FastGaussianShapeAlignment.setScoringFunction ( DoubleAlignmentResultFunctor  func)
Parameters
func

◆ getScoringFunction()

DoubleAlignmentResultFunctor CDPL.Shape.FastGaussianShapeAlignment.getScoringFunction ( )
Returns

◆ setResultSelectionMode()

None CDPL.Shape.FastGaussianShapeAlignment.setResultSelectionMode ( int  mode)
Parameters
mode

◆ getResultSelectionMode()

int CDPL.Shape.FastGaussianShapeAlignment.getResultSelectionMode ( )
Returns

◆ setMaxNumOptimizationIterations()

None CDPL.Shape.FastGaussianShapeAlignment.setMaxNumOptimizationIterations ( int  max_iter)
Parameters
max_iter

◆ getMaxNumOptimizationIterations()

int CDPL.Shape.FastGaussianShapeAlignment.getMaxNumOptimizationIterations ( )
Returns

◆ setOptimizationStopGradient()

None CDPL.Shape.FastGaussianShapeAlignment.setOptimizationStopGradient ( float  grad_norm)
Parameters
grad_norm

◆ getOptimizationStopGradient()

float CDPL.Shape.FastGaussianShapeAlignment.getOptimizationStopGradient ( )
Returns

◆ performAlignment() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.performAlignment ( bool  perf_align)
Parameters
perf_align

◆ performAlignment() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.performAlignment ( )
Returns

◆ optimizeOverlap() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.optimizeOverlap ( bool  optimize)
Parameters
optimize

◆ optimizeOverlap() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.optimizeOverlap ( )
Returns

◆ greedyOptimization() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.greedyOptimization ( bool  greedy)
Parameters
greedy

◆ greedyOptimization() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.greedyOptimization ( )
Returns

◆ setSymmetryThreshold()

None CDPL.Shape.FastGaussianShapeAlignment.setSymmetryThreshold ( float  thresh)
Parameters
thresh

◆ getSymmetryThreshold()

float CDPL.Shape.FastGaussianShapeAlignment.getSymmetryThreshold ( )
Returns

◆ genShapeCenterStarts() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.genShapeCenterStarts ( bool  generate)
Parameters
generate

◆ genShapeCenterStarts() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.genShapeCenterStarts ( )
Returns

◆ genColorCenterStarts() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.genColorCenterStarts ( bool  generate)
Parameters
generate

◆ genColorCenterStarts() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.genColorCenterStarts ( )
Returns

◆ genNonColorCenterStarts() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.genNonColorCenterStarts ( bool  generate)
Parameters
generate

◆ genNonColorCenterStarts() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.genNonColorCenterStarts ( )
Returns

◆ genRandomStarts() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.genRandomStarts ( bool  generate)
Parameters
generate

◆ genRandomStarts() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.genRandomStarts ( )
Returns

◆ genForAlignedShapeCenters() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.genForAlignedShapeCenters ( bool  generate)
Parameters
generate

◆ genForAlignedShapeCenters() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.genForAlignedShapeCenters ( )
Returns

◆ genForReferenceShapeCenters() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.genForReferenceShapeCenters ( bool  generate)
Parameters
generate

◆ genForReferenceShapeCenters() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.genForReferenceShapeCenters ( )
Returns

◆ genForLargerShapeCenters() [1/2]

None CDPL.Shape.FastGaussianShapeAlignment.genForLargerShapeCenters ( bool  generate)
Parameters
generate

◆ genForLargerShapeCenters() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.genForLargerShapeCenters ( )
Returns

◆ setMaxRandomTranslation()

None CDPL.Shape.FastGaussianShapeAlignment.setMaxRandomTranslation ( float  max_trans)
Parameters
max_trans

◆ getMaxRandomTranslation()

float CDPL.Shape.FastGaussianShapeAlignment.getMaxRandomTranslation ( )
Returns

◆ setNumRandomStarts()

None CDPL.Shape.FastGaussianShapeAlignment.setNumRandomStarts ( int  num_starts)
Parameters
num_starts

◆ getNumRandomStarts()

int CDPL.Shape.FastGaussianShapeAlignment.getNumRandomStarts ( )
Returns

◆ setRandomSeed()

None CDPL.Shape.FastGaussianShapeAlignment.setRandomSeed ( int  seed)
Parameters
seed

◆ addReferenceShape()

None CDPL.Shape.FastGaussianShapeAlignment.addReferenceShape ( GaussianShape  shape,
bool   new_set = True 
)
Parameters
shape
new_set

◆ addReferenceShapes()

None CDPL.Shape.FastGaussianShapeAlignment.addReferenceShapes ( GaussianShapeSet  shapes,
bool   new_set = True 
)
Parameters
shapes
new_set

◆ getNumReferenceShapes()

int CDPL.Shape.FastGaussianShapeAlignment.getNumReferenceShapes ( )
Returns

◆ align() [1/2]

bool CDPL.Shape.FastGaussianShapeAlignment.align ( GaussianShape  shape)
Parameters
shape
Returns

◆ align() [2/2]

bool CDPL.Shape.FastGaussianShapeAlignment.align ( GaussianShapeSet  shapes)
Parameters
shapes
Returns

◆ getNumResults()

int CDPL.Shape.FastGaussianShapeAlignment.getNumResults ( )
Returns

◆ getResult()

AlignmentResult CDPL.Shape.FastGaussianShapeAlignment.getResult ( int  idx)
Parameters
idx
Returns

◆ __len__()

int CDPL.Shape.FastGaussianShapeAlignment.__len__ ( )
Returns

◆ __getitem__()

AlignmentResult CDPL.Shape.FastGaussianShapeAlignment.__getitem__ ( int  idx)
Parameters
idx
Returns