BindUpdate#
- class deeptrack.features.BindUpdate(feature: Feature, **kwargs: dict[str, Any])#
Bases:
StructuralFeatureBind a feature with certain arguments.
This feature binds a child feature with specific properties (kwargs) that are passed to it when it is updated. It is similar to the Bind feature but is marked as deprecated in favor of Bind.
Parameters#
- feature: Feature
The child feature to bind with specific arguments.
- **kwargs: dict of str to Any
Properties to send to the child feature during updates.
Methods#
- get(image: Any, **kwargs: dict[str, Any]) -> Any
Resolves the child feature with the provided arguments.
Warnings#
This feature is deprecated and may be removed in a future release. It is recommended to use Bind instead for equivalent functionality.
Notes#
The current implementation is not guaranteed to be exactly equivalent to prior implementations.
Examples#
>>> import deeptrack as dt >>> import numpy as np
Start by creating a Gaussian feature: >>> gaussian_noise = dt.Gaussian()
Dynamically modify the behavior of the feature using BindUpdate: >>> bound_feature = dt.BindUpdate(gaussian_noise, mu = 5, sigma=3)
>>> input_image = np.zeros((512, 512)) >>> output_image = bound_feature.resolve(input_image) >>> print(np.mean(output_image), np.std(output_image)) 4.998501486851294 3.0020269383538176
Methods Summary
get(image, **kwargs)Resolve the child feature with the provided arguments.
Methods Documentation
- get(image: Any, **kwargs: dict[str, Any]) Any#
Resolve the child feature with the provided arguments.
Parameters#
- image: Any
The input data or image to process.
- **kwargs: dict of str to Any
Properties or arguments to pass to the child feature during resolution.
Returns#
- Any
The result of resolving the child feature with the provided arguments.