Skip to content

cisstStereoVision svlFilterBase

Anton Deguet edited this page May 6, 2014 · 3 revisions

svlFilterBase class

Every filter of the cisstStereoVision library is derived from the baseclass svlFilterBase.

Methods to be implemented

Name Description
default constructor Typically, input and output connectors and their supported sample types are added in the default constructor.
int Initialize(svlSample * syncInput, svlSample * syncOutput) Input sample prototype for the synchronous input is stored in syncInput. If the filter has outputs, the Initialize method is responsible for providing sample prototypes for the filters that may be connected to them. The sample prototype for the synchronous output needs to be passed along in syncOutput. Sample prototypes for the asynchronous outputs need to be pushed to the corresponding outputs.
int Process(svlProcInfo * procInfo, svlSample * syncInput, svlSample * syncOutput) The synchronous input sample is stored in syncInput. If the filter has outputs, the synchronous output sample needs to be passed along in syncOutput. Samples for the asynchronous outputs may be pushed to the corresponding outputs.

Optional overloadable methods

Name Description
int OnConnectInput(svlFilterInput & input, svlStreamType type)
int OnStart(unsigned int procCount)
void OnStop(void)
int Release(void)

Public methods

Name Description
bool IsInitialized(void)
bool IsRunning(void)
unsigned int [span(GetFrameCounter, style=color: #0066AA)]
svlFilterInput* [span(GetInput, style=color: #0066AA)]
svlFilterOutput* [span(GetOutput, style=color: #0066AA)]
svlFilterInput* [[span(GetInput, style=color: #0066AA)]](std::string& [[span(inputname, style=color: #33AA33)]])
svlFilterOutput* [[span(GetOutput, style=color: #0066AA)]](std::string& [[span(outputname, style=color: #33AA33)]])
void [[span(SetEnable, style=color: #0066AA)]](bool& [[span(enable, style=color: #33AA33)]])
void [[span(GetEnable, style=color: #0066AA)]](bool& [[span(enable, style=color: #33AA33)]])
void [span(Enable, style=color: #0066AA)]
void [span(Disable, style=color: #0066AA)]
bool [span(IsEnabled, style=color: #0066AA)]
bool [span(IsDisabled, style=color: #0066AA)]

== Protected methods ==

||'''Name'''||'''Description'''|| ||svlFilterInput* [[span(AddInput, style=color: #0066AA)]](std::string& [[span(inputName, style=color: #33AA33)]], bool [[span(trunk, style=color: #33AA33)]])|| || ||svlFilterOutput* [[span(AddOutput, style=color: #0066AA)]](std::string& [[span(outputName, style=color: #33AA33)]], bool [[span(trunk, style=color: #33AA33)]])|| || ||int [[span(AddInputType, style=color: #0066AA)]](std::string& [[span(inputname, style=color: #33AA33)]], svlStreamType [[span(type, style=color: #33AA33)]])|| || ||int [[span(SetOutputType, style=color: #0066AA)]](std::string& [[span(outputname, style=color: #33AA33)]], svlStreamType [[span(type, style=color: #33AA33)]])|| || ||void [[span(SetAutomaticOutputType, style=color: #0066AA)]](bool [[span(autotype, style=color: #33AA33)]])|| || ||int [[span(IsDataValid, style=color: #0066AA)]](svlStreamType [[span(type, style=color: #33AA33)]], svlSample* [[span(data, style=color: #33AA33)]])|| || ||bool [[span(IsNewSample, style=color: #0066AA)]](svlSample* [[span(sample, style=color: #33AA33)]])|| ||

== Code samples ==

See [wiki:SVLTutorial04192011 Tutorial Session 4]

Clone this wiki locally