35 #ifndef GRT_CLASS_LABEL_TIMEOUT_FILTER_HEADER
36 #define GRT_CLASS_LABEL_TIMEOUT_FILTER_HEADER
38 #include "../Util/GRTCommon.h"
39 #include "../CoreModules/PostProcessing.h"
49 this->classLabel = classLabel;
50 timer.
start(timeoutDuration);
54 bool set(UINT classLabel,
unsigned long timeoutDuration){
55 if( classLabel > 0 && timeoutDuration > 0 ){
56 this->classLabel = classLabel;
57 timer.
start(timeoutDuration);
64 UINT getClassLabel(){
return classLabel; }
146 virtual bool reset();
191 bool init(
unsigned long timeoutDuration,UINT filterMode = ALL_CLASS_LABELS);
199 UINT
filter(UINT predictedClassLabel);
250 enum FilterModes{ALL_CLASS_LABELS=0,INDEPENDENT_CLASS_LABELS};
253 UINT filteredClassLabel;
255 unsigned long timeoutDuration;
263 #endif //GRT_CLASS_LABEL_TIMEOUT_FILTER_HEADER
ClassLabelTimeoutFilter(unsigned long timeoutDuration=1000, UINT filterMode=ALL_CLASS_LABELS)
virtual bool process(const VectorDouble &inputVector)
UINT filter(UINT predictedClassLabel)
virtual ~ClassLabelTimeoutFilter()
UINT getFilteredClassLabel()
signed long getMilliSeconds()
bool setTimeoutDuration(unsigned long timeoutDuration)
virtual bool loadModelFromFile(std::string filename)
ClassLabelTimeoutFilter & operator=(const ClassLabelTimeoutFilter &rhs)
virtual bool saveModelToFile(std::string filename) const
bool setFilterMode(UINT filterMode)
virtual bool deepCopyFrom(const PostProcessing *postProcessing)