![]() |
IDS peak AFL v1.8.0
|
Search algorithm feature implementation for auto focus controllers. More...
#include <peak_afl/pipeline/modules/controllers/features/peak_afl_search_algorithm.hpp>
Public Member Functions | |
| SearchAlgorithm (std::shared_ptr< peak::afl::Controller > controller) | |
| Constructs a SearchAlgorithm feature with the specified controller. | |
| void | Set (const FocusSearchAlgorithm &value) override |
| Sets the focus search algorithm. | |
| PEAK_COMMON_NO_DISCARD FocusSearchAlgorithm | Get () const override |
| Gets the current focus search algorithm. | |
| PEAK_COMMON_NO_DISCARD std::vector< FocusSearchAlgorithm > | GetList () const override |
| Gets the list of supported focus search algorithms. | |
| void | Serialize (peak::common::serialization::IArchive &archive) const override |
| Serializes the current search algorithm to an archive. | |
| void | Deserialize (const peak::common::serialization::IArchive &archive) override |
| Deserializes the search algorithm from an archive. | |
Public Member Functions inherited from IFeature< FocusSearchAlgorithm > | |
| virtual | ~IFeature ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
Search algorithm feature implementation for auto focus controllers.
The SearchAlgorithm class provides a feature interface for managing the focus search algorithm used by auto focus controllers. This feature controls which algorithm the automatic focus system uses to find the optimal focus position.
Different algorithms provide different trade-offs:
This class inherits from IListFeature<FocusSearchAlgorithm> and provides both current algorithm management and a list of supported algorithms.
|
inlineexplicit |
Constructs a SearchAlgorithm feature with the specified controller.
| [in] | controller | Shared pointer to the auto focus controller that will be used to manage the search algorithm parameter. The controller must support search algorithm operations. |
|
inlineoverridevirtual |
Deserializes the search algorithm from an archive.
Loads the focus search algorithm from the provided archive and applies it to the controller. The algorithm is expected to be stored with the key "SearchAlgorithm".
| [in] | archive | The archive to read the search algorithm from |
| May | throw serialization exceptions if the archive operation fails |
| May | throw controller exceptions if the deserialized algorithm is invalid |
Implements ISerializable.
|
inlineoverridevirtual |
Gets the current focus search algorithm.
Retrieves the currently configured algorithm that the automatic focus system is using to find the optimal focus position.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IFeature< FocusSearchAlgorithm >.
|
inlineoverridevirtual |
Gets the list of supported focus search algorithms.
Retrieves a list of all focus search algorithms that are supported by the current controller. This can be used to populate user interface controls or to validate algorithm selections.
| May | throw exceptions based on the underlying controller implementation if the controller is in an invalid state. |
Implements IListFeature< FocusSearchAlgorithm >.
|
inlineoverridevirtual |
Serializes the current search algorithm to an archive.
Stores the current focus search algorithm in the provided archive for configuration persistence. The algorithm is stored with the key "SearchAlgorithm".
| [in,out] | archive | The archive to write the search algorithm to |
| May | throw serialization exceptions if the archive operation fails |
Implements ISerializable.
|
inlineoverridevirtual |
Sets the focus search algorithm.
Sets the algorithm that the automatic focus system will use to find the optimal focus position. Different algorithms provide different trade-offs between speed, accuracy, and robustness.
| [in] | value | The focus search algorithm to set. Must be one of the algorithms supported by the controller (see GetList()). |
| May | throw exceptions based on the underlying controller implementation if the algorithm is not supported or if the controller is in an invalid state. |
Implements IFeature< FocusSearchAlgorithm >.