IDS peak AFL v1.8.0
Loading...
Searching...
No Matches
Manager Class Reference

The autofeature manager. More...

#include <peak_afl/peak_afl.hpp>

Public Member Functions

 Manager (const std::shared_ptr< peak::core::NodeMap > &node_map)
 Create an automanager instance.
 
 ~Manager ()
 Destructor of an automanager instance.
 
void AddController (const std::shared_ptr< Controller > &controller)
 Add a controller to an automanager.
 
void RemoveController (const std::shared_ptr< Controller > &controller)
 Remove a controller from an automanager.
 
void Process (const peak::ipl::Image &image) const
 Process an image.
 
PEAK_AFL_NO_DISCARD std::shared_ptr< Controller > CreateController (peak_afl_controllerType type)
 Create a controller and append it to Manager.
 
void DestroyAllController ()
 Destroy all controllers for a manager.
 
void DestroyController (const std::shared_ptr< Controller > &controller)
 Destroy a controller.
 
void SetGainIPL (const peak::ipl::Gain &gain)
 Sets the ipl gain.
 
void SetCCM (std::array< float, 9 > ccm)
 Set the Color Correction Matrix (CCM)
 
PEAK_AFL_NO_DISCARD bool Status () const
 Get the status of a manager.
 
PEAK_AFL_NO_DISCARD std::vector< std::shared_ptr< Controller > > ControllerList () const
 Get the list of the controller associated with the manager.
 
PEAK_AFL_NO_DISCARD size_t ControllerCount () const
 Get the list count of the controller associated with the manager.
 
PEAK_AFL_NO_DISCARD std::shared_ptr< Controller > GetController (peak_afl_controllerType type) const
 Get the controller for a type.
 
PEAK_AFL_NO_DISCARD bool IsControllerSupported (peak_afl_controllerType type) const
 Get if the given controller type is supported.
 

Detailed Description

The autofeature manager.

Constructor & Destructor Documentation

◆ Manager()

Manager ( const std::shared_ptr< peak::core::NodeMap > & node_map)
inlineexplicit

Create an automanager instance.

Creates an automanager instance.

Parameters
[in]node_mapthe shared pointer to the device nodemap
Exceptions
peak::afl::error::Exceptionif an error occurs. Check code() and what() for an explanation of the error
Since
1.1

Member Function Documentation

◆ AddController()

void AddController ( const std::shared_ptr< Controller > & controller)
inline

Add a controller to an automanager.

An autocontroller instance can only be added to one autofeature manager at the same time. The same type can only be added one time.

Parameters
[in]controllershared_ptr to a controller
Exceptions
peak::afl::error::Exceptionif an error occurs. Check code() and what() for an explanation of the error
Since
1.1

◆ ControllerCount()

size_t ControllerCount ( ) const
inline

Get the list count of the controller associated with the manager.

Returns
number of controllers in list
Since
1.1

◆ ControllerList()

std::vector< std::shared_ptr< Controller > > ControllerList ( ) const
inline

Get the list of the controller associated with the manager.

Returns
controller list
Since
1.1

◆ CreateController()

std::shared_ptr< Controller > CreateController ( peak_afl_controllerType type)
inline

Create a controller and append it to Manager.

Convenience function to create an autofeature controller and add it to the manager. The same type can only be added one time.

Parameters
[in]typecontroller type, see peak_afl_controllerType
Returns
the shared ptr to the created controller
Exceptions
peak::afl::error::Exceptionif deinitialization fails
Since
1.1

◆ DestroyAllController()

void DestroyAllController ( )
inline

Destroy all controllers for a manager.

After this operation all controllers associated with the given manager will be invalid.

Exceptions
peak::afl::error::Exceptionif function fails
Since
1.1

◆ DestroyController()

void DestroyController ( const std::shared_ptr< Controller > & controller)
inline

Destroy a controller.

After this operation the controller will be invalid.

Parameters
[in]controllershared ptr to a controller
Exceptions
peak::afl::error::Exceptionif function fails

◆ GetController()

std::shared_ptr< Controller > GetController ( peak_afl_controllerType type) const
inline

Get the controller for a type.

Parameters
[in]typecontroller type.
Returns
controller
Exceptions
peak::afl::error::Exceptionif no controller is found
Since
1.1

◆ IsControllerSupported()

bool IsControllerSupported ( peak_afl_controllerType type) const
inline

Get if the given controller type is supported.

Parameters
[in]typecontroller type.
Returns
True if controller is supported
Since
1.11

◆ Process()

void Process ( const peak::ipl::Image & image) const
inline

Process an image.

Processes an image.

Parameters
[in]imagean peak::ipl::Image image
Exceptions
peak::afl::error::Exceptionif an error occurs. Check code() and what() for an explanation of the error
Since
1.1

◆ RemoveController()

void RemoveController ( const std::shared_ptr< Controller > & controller)
inline

Remove a controller from an automanager.

Remove a controller from a manager. For a function which destroys the object in one call, see peak_afl_AutoFeatureManager_DestroyController.

Parameters
[in]controllershared_ptr to a controller
Exceptions
peak::afl::error::Exceptionif an error occurs. Check code() and what() for an explanation of the error
Since
1.1

◆ SetCCM()

void SetCCM ( std::array< float, 9 > ccm)
inline

Set the Color Correction Matrix (CCM)

Sets a 3x3 color correction matrix for the auto feature manager. The CCM is used to correct color values during image processing. The matrix should be provided as a std::array of 9 float values in row-major order: [R->R, R->G, R->B, G->R, G->G, G->B, B->R, B->G, B->B].

Parameters
[in]ccmstd::array of 9 float values representing the 3x3 CCM in row-major order
Exceptions
peak::afl::error::Exceptionif function fails
Since
1.8

◆ SetGainIPL()

void SetGainIPL ( const peak::ipl::Gain & gain)
inline

Sets the ipl gain.

Parameters
[in]gainan peak::ipl::Gain gain
Exceptions
peak::afl::error::Exceptionif function fails
Since
1.2

◆ Status()

bool Status ( ) const
inline

Get the status of a manager.

The returned value will contain whether the manager currently processes an image (true) or is idle (false).

Returns
manager status
Exceptions
peak::afl::error::Exceptionif function fails
Since
1.1

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