IDS peak AFL v1.8.0
Loading...
Searching...
No Matches

Focus limit feature implementation for auto focus controllers. More...

#include <peak_afl/pipeline/modules/controllers/features/peak_afl_focus_limit.hpp>

Inheritance diagram for FocusLimit:
IFeature< peak::common::Interval > ISerializable

Public Member Functions

 FocusLimit (std::shared_ptr< peak::afl::Controller > controller)
 Constructs a FocusLimit feature with the specified controller.
 
void Set (const peak::common::Interval &value) override
 Sets the focus position limits.
 
PEAK_COMMON_NO_DISCARD peak::common::Interval Get () const override
 Gets the current focus position limits.
 
void Serialize (peak::common::serialization::IArchive &archive) const override
 Serializes the current focus limits to an archive.
 
void Deserialize (const peak::common::serialization::IArchive &archive) override
 Deserializes the focus limits from an archive.
 
- Public Member Functions inherited from IFeature< peak::common::Interval >
virtual ~IFeature ()=default
 Virtual destructor for proper cleanup of derived classes.
 

Detailed Description

Focus limit feature implementation for auto focus controllers.

The FocusLimit class provides a feature interface for managing the focus limit parameter of auto focus controllers. This feature defines the range of focus positions that the automatic focus algorithm is allowed to use during focus operations.

Focus limits are useful for:

  • Restricting focus search to a specific distance range (e.g., macro, infinity)
  • Preventing the lens from moving to mechanically unsafe positions
  • Optimizing focus speed by limiting the search range
  • Avoiding focus on unwanted objects at certain distances

The limit is defined as an interval with minimum and maximum focus positions, typically expressed in lens-specific units or motor steps.

This class inherits from IFeature<peak::common::Interval> and provides serialization support for configuration persistence.

Note
The actual focus position units and valid ranges depend on the specific lens and controller implementation.
See also
IFeature
peak::common::Interval
peak::afl::Controller::SetLimit()
peak::afl::Controller::GetLimit()
Since
1.8

Constructor & Destructor Documentation

◆ FocusLimit()

FocusLimit ( std::shared_ptr< peak::afl::Controller > controller)
inlineexplicit

Constructs a FocusLimit feature with the specified controller.

Parameters
[in]controllerShared pointer to the auto focus controller that will be used to manage the focus limit parameter. The controller must support focus limit operations.
Precondition
controller must not be null
controller must support focus limit functionality
Since
1.8

Member Function Documentation

◆ Deserialize()

void Deserialize ( const peak::common::serialization::IArchive & archive)
inlineoverridevirtual

Deserializes the focus limits from an archive.

Loads the focus position limits from the provided archive and applies them to the controller. The limits are expected to be stored with keys "Min" and "Max".

Parameters
[in]archiveThe archive to read the focus limits from
Exceptions
Maythrow serialization exceptions if the archive operation fails
Maythrow controller exceptions if the deserialized limits are invalid
See also
Serialize()
Since
1.8

Implements ISerializable.

◆ Get()

PEAK_COMMON_NO_DISCARD peak::common::Interval Get ( ) const
inlineoverridevirtual

Gets the current focus position limits.

Retrieves the currently configured range of focus positions that the automatic focus algorithm is allowed to use.

Returns
The current focus limits as an Interval object
Exceptions
Maythrow exceptions based on the underlying controller implementation if the controller is in an invalid state.
See also
Set()
peak::common::Interval
Since
1.8

Implements IFeature< peak::common::Interval >.

◆ Serialize()

void Serialize ( peak::common::serialization::IArchive & archive) const
inlineoverridevirtual

Serializes the current focus limits to an archive.

Stores the current focus position limits in the provided archive for configuration persistence. The limits are stored with keys "Min" and "Max".

Parameters
[in,out]archiveThe archive to write the focus limits to
Exceptions
Maythrow serialization exceptions if the archive operation fails
See also
Deserialize()
Since
1.8

Implements ISerializable.

◆ Set()

void Set ( const peak::common::Interval & value)
inlineoverridevirtual

Sets the focus position limits.

Sets the range of focus positions that the automatic focus algorithm is allowed to use. The focus search will be restricted to positions between the minimum and maximum values of the interval.

Parameters
[in]valueThe interval defining the focus limits. The minimum value should be less than or equal to the maximum value. Values are typically in lens-specific units or motor steps.
Exceptions
Maythrow exceptions based on the underlying controller implementation if the interval is invalid or if the controller is in an invalid state.
See also
Get()
peak::common::Interval
Since
1.8

Implements IFeature< peak::common::Interval >.


The documentation for this class was generated from the following file: