MaxScoreOverRotationsConstrained#

class MaxScoreOverRotationsConstrained(positions, rotations, cone_angle=None, cone_offset=None, reference=(0, 0, 1), acceptance_radius=None, unique_positions=False, **kwargs)[source]#

Bases: MaxScoreOverRotations

Implements constrained template matching using rejection sampling.

Parameters:
positionsNDArray

Array of shape (n, d) with n seed point translations.

rotationsNDArray

Array of shape (n, d, d) with n seed point rotation matrices.

cone_anglefloat, optional

Maximum accepted rotational deviation in degrees. Default is unconstrained.

cone_offsetfloat, optional

Accept matches between cone_offset and cone_angle instead of 0 and cone angle.

referencetuple of ints

Reference orientation of the template, defaults to (0,0,1).

acceptance_radiustuple of ints, optional

Translational acceptance radius around seed point in voxels.

unique_positionsbool, optional

If True, assumes positions are unique and uses optimized indexing. Only valid when acceptance_radius is None. Default is False.

**kwargsdict, optional

Keyword aguments passed to the constructor of MaxScoreOverRotations.

Attributes

MaxScoreOverRotationsConstrained.shareable

Indicate whether the analyzer can be shared across processes.

Methods

MaxScoreOverRotationsConstrained.__call__(...)

Update the parameter store.

MaxScoreOverRotationsConstrained.correct_background(state)

Applies flat-fielding correction to scores f as

MaxScoreOverRotationsConstrained.init_state()

Initialize the analysis state.

MaxScoreOverRotationsConstrained.merge(results)

Merge multiple instances of the current class.

MaxScoreOverRotationsConstrained.result(...)

Finalize the analysis result with optional postprocessing.