roviz  0.7
Code Documentation of roviz
Protected Member Functions | List of all members
SubtractorItem Class Reference

Subtracts two images. More...

#include <subtractor_item.h>

Inheritance diagram for SubtractorItem:
Inheritance graph
Collaboration diagram for SubtractorItem:
Collaboration graph

Protected Member Functions

void starting (void) override
 Called, when the thread is about to start. More...
 
void thread (void) override
 Main thread of the item. More...
 

Additional Inherited Members

- Public Member Functions inherited from RovizItem
 RovizItem (std::string type_name)
 
void stop (void) override
 Stop thread operation. More...
 
virtual void stopped (void)
 Called after the thread stopped. More...
 
template<class T >
Input< T > addInput (std::string name)
 Add an input. More...
 
template<class T >
Output< T > addOutput (std::string name)
 Add an output. More...
 
bool waitForCond (std::function< bool(void)> cond)
 Sleep until a condition comes true. More...
 
bool waitFor (std::function< bool(void)> cond)
 Wait until a condition comes true. More...
 
bool wait (void)
 Wait if the item is paused. More...
 
bool running (void) const override
 Check if the thread is running. More...
 
void wake (void) const
 Wake the possibly waiting thread. More...
 
std::mutex & mutex (void) const
 Mutex that waitFor() locks to check the condidion. More...
 
Trim addTrim (std::string name, double default_value, double min, double max, std::function< void(double)> notifier_func)
 Add a trim value. More...
 
Trim addTrim (std::string name, double default_value, double min, double max, bool logarithmic)
 Add a trim value. More...
 
Trim addTrim (std::string name, double default_value, double min, double max, int steps, std::function< void(double)> notifier_func)
 Add a trim value. More...
 
Trim addTrim (std::string name, double default_value, double min, double max, int steps=0, bool logarithmic=false, std::function< void(double)> notifier_func=[](double){})
 Add a trim value. More...
 
Trim addTrim (std::string name, double default_value, double min, double max, double step_size, std::function< void(double)> notifier_func=[](double){})
 Add a trim value. More...
 
template<class T >
Config< T > addConfig (const std::string &name, const typename ConfigStorageType< T >::type &default_value, int min, int max, bool restart_when_changed=false)
 Add a config for an integer value. More...
 
template<class T >
Config< T > addConfig (const std::string &name, const typename ConfigStorageType< T >::type &default_value, double min, double max, bool restart_when_changed=false)
 Add a config for a floating point (double) value. More...
 
template<class T >
Config< T > addConfig (const std::string &name, const typename ConfigStorageType< T >::type &default_value, std::function< bool(std::string &)> checker=[](std::string &){return true;}, bool restart_when_changed=false)
 Add a config for a string value. More...
 
template<class T >
Config< T > addConfig (const std::string &name, const typename ConfigStorageType< T >::type &default_index, const std::list< std::string > &possibilities, bool restart_when_changed=false)
 Add a config for a list of strings. More...
 
template<class T >
Config< T > addConfig (const std::string &name, const typename ConfigStorageType< T >::type &default_value, bool restart_when_changed=false)
 Add a config for a boolean value. More...
 
template<class T >
Config< T > addConfig (const std::string &name, const typename ConfigStorageType< T >::type &default_value, enum FilePath::Mode file_mode, const std::string &filter, bool restart_when_changed=false)
 Add a config for an integer value. More...
 
template<>
Config< int > addConfig (const std::string &name, const ConfigStorageType< int >::type &default_value, int min, int max, bool restart_when_changed)
 
template<>
Config< double > addConfig (const std::string &name, const ConfigStorageType< double >::type &default_value, double min, double max, bool restart_when_changed)
 
template<>
Config< bool > addConfig (const std::string &name, const ConfigStorageType< bool >::type &default_value, bool restart_when_changed)
 
template<>
Config< FilePathaddConfig (const std::string &name, const ConfigStorageType< FilePath >::type &default_value, FilePath::Mode file_mode, const std::string &filter, bool restart_when_changed)
 

Detailed Description

Subtracts two images.

Member Function Documentation

◆ starting()

void SubtractorItem::starting ( void  )
overrideprotectedvirtual

Called, when the thread is about to start.

Use this function to reset, clear and initialize everything that might change during runtime. After the call to this function, the item has to be in a clean, fresh state. The item is not allowed to have any information of the previous "session" or thread run left. That would defy the purpose of the start/stop mechanism. The inputs/outputs and trims/configs are preserved, you can set them in the constructor. The thread doesn't run yet at this point.

See also
stopped

Reimplemented from RovizItem.

◆ thread()

void SubtractorItem::thread ( void  )
overrideprotectedvirtual

Main thread of the item.

This function will be executed in a different thread and you can process the image data in here.

See also
starting
stopped

Implements RovizItem.

Here is the call graph for this function:

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