OrbbecSDK 1.10.18
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | Friends | List of all members
ob::Filter Class Reference

The Filter class is the base class for all filters in the SDK. More...

#include <Filter.hpp>

+ Inheritance diagram for ob::Filter:

Public Member Functions

 Filter ()
 
 Filter (std::shared_ptr< FilterImpl > impl)
 
virtual ~Filter ()=default
 
virtual void reset ()
 ReSet the filter, freeing the internal cache, stopping the processing thread, and clearing the pending buffer frame when asynchronous processing is used.
 
void enable (bool enable)
 enable the filter
 
bool isEnabled ()
 Return Enable State.
 
virtual std::shared_ptr< Frameprocess (std::shared_ptr< Frame > frame)
 Processes a frame synchronously.
 
virtual void pushFrame (std::shared_ptr< Frame > frame)
 Pushes the pending frame into the cache for asynchronous processing.
 
virtual void setCallBack (FilterCallback callback)
 Set the callback function for asynchronous processing.
 
virtual const char * type ()
 Get the type of filter.
 
template<typename T >
bool is ()
 Check if the runtime type of the filter object is compatible with a given type.
 
template<typename T >
std::shared_ptr< T > as ()
 Convert the filter object to a target type.
 

Protected Attributes

std::shared_ptr< FilterImpl > impl_
 
std::string type_
 

Friends

class OBFilterList
 

Detailed Description

The Filter class is the base class for all filters in the SDK.

Definition at line 27 of file Filter.hpp.

Constructor & Destructor Documentation

◆ Filter() [1/2]

ob::Filter::Filter ( )

◆ Filter() [2/2]

ob::Filter::Filter ( std::shared_ptr< FilterImpl >  impl)

◆ ~Filter()

virtual ob::Filter::~Filter ( )
virtualdefault

Member Function Documentation

◆ reset()

virtual void ob::Filter::reset ( )
virtual

ReSet the filter, freeing the internal cache, stopping the processing thread, and clearing the pending buffer frame when asynchronous processing is used.

◆ enable()

void ob::Filter::enable ( bool  enable)

enable the filter

◆ isEnabled()

bool ob::Filter::isEnabled ( )

Return Enable State.

◆ process()

virtual std::shared_ptr< Frame > ob::Filter::process ( std::shared_ptr< Frame frame)
virtual

Processes a frame synchronously.

Parameters
frameThe frame to be processed.
Returns
std::shared_ptr< Frame > The processed frame.

◆ pushFrame()

virtual void ob::Filter::pushFrame ( std::shared_ptr< Frame frame)
virtual

Pushes the pending frame into the cache for asynchronous processing.

Parameters
frameThe pending frame. The processing result is returned by the callback function.

◆ setCallBack()

virtual void ob::Filter::setCallBack ( FilterCallback  callback)
virtual

Set the callback function for asynchronous processing.

Parameters
callbackThe processing result callback.

◆ type()

virtual const char * ob::Filter::type ( )
virtual

Get the type of filter.

Returns
string The type of filte.

Referenced by is().

◆ is()

template<typename T >
bool ob::Filter::is

Check if the runtime type of the filter object is compatible with a given type.

Template Parameters
TThe given type.
Returns
bool The result.

Definition at line 592 of file Filter.hpp.

◆ as()

template<typename T >
std::shared_ptr< T > ob::Filter::as ( )
inline

Convert the filter object to a target type.

Template Parameters
TThe target type.
Returns
std::shared_ptr<T> The result. If it cannot be converted, an exception will be thrown.

Definition at line 94 of file Filter.hpp.

Friends And Related Symbol Documentation

◆ OBFilterList

friend class OBFilterList
friend

Definition at line 106 of file Filter.hpp.

Member Data Documentation

◆ impl_

std::shared_ptr<FilterImpl> ob::Filter::impl_
protected

Definition at line 103 of file Filter.hpp.

◆ type_

std::string ob::Filter::type_
protected

Definition at line 104 of file Filter.hpp.


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