Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Filter Class Reference

#include <frame.h>

Inheritance diagram for Filter:

eye_locator_filter flesh_tone_locator_filter input_filter locator_filter output_filter recognizer_filter stat_eye_locator_filter viola_locator voter_filter List of all members.

Public Methods

virtual ~Filter ()
virtual bool filter_frame (FrameClass &frame)=0
virtual void reset ()
virtual void property_changed ()
virtual int get_nb_inputs ()
virtual int get_nb_outputs ()

Public Attributes

vector< Property * > properties
string name
GdkPixmap * icon_pixmap
bool is_input_filter

Detailed Description

this is an abstract base class for a biometric filter it basicly just supplies a single function that should be overloaded in all subclasses. This function preformes the filtering operation, and some methods to be used to inform the filter of changes to it's properties

Note also that mearly subclassing filter is not enough to have it interface with the GUI. the GUI is dynamicly linked to all of the filters and so each filter must impliment a "C" function that will be called by the GUI to get a copy of the filter. also each filter needs an icon associated with it, so a function to return this icon must also be implimented these functions should be of the following form

in the .h file ifdef DYNAMIC_LINK extern "C"{ Filter * create_instance(); ifndef NO_GUI GdkPixmap *create_icon(GtkWidget *drawing_area); endif } endif

in the .cpp file ifdef DYNAMIC_LINK

Filter * create_instance(){ return new locator_filter; }

ifndef NO_GUI GdkPixmap *create_icon(GtkWidget *drawing_area){ return gdk_pixmap_create_from_xpm( drawing_area->window, NULL, NULL, "images/locator.xpm" ); } endif

endif

the extern "C" is so the names of the functions are not garbled by the C++ complier. the ifdef DYNAMIC_LINK is so that if the filters are staticly linked together the linker does not see many implimentations of a single function, the NO_GUI is used in the case that the user does not wish to compile the filters with GTK2.0 linked in

Author:
Robert Evans
Version:
0.1
Date:
Jan 24 2003


Constructor & Destructor Documentation

Filter::~Filter   [virtual]
 

we really need this to make everythign work properly


Member Function Documentation

virtual bool Filter::filter_frame FrameClass   frame [pure virtual]
 

this simply takes a frame and runs the current filter over it

Parameters:
frame  the current frame to be processed

Implemented in eye_locator_filter.

int Filter::get_nb_inputs   [virtual]
 

currently unused do not touch

int Filter::get_nb_outputs   [virtual]
 

currently unused do not touch

void Filter::property_changed   [virtual]
 

this method is called after the member properties has been updated, it informs the filter that properties has changed and those changes should take effect

Reimplemented in eye_locator_filter.

void Filter::reset   [virtual]
 

some filters are ment to be used on a movie and can increase performance by storing information about previous frames, this function is called after an entire movie has finnished playing so that the filter may reset it's data, NOTE that this is only virtual and not purly virtual it need not be imlemented unless the filter wishes to be reset after a complete, movie has been run through it

Reimplemented in input_filter.


Member Data Documentation

GdkPixmap* Filter::icon_pixmap
 

this is the icon that the filter will be identified with in the

bool Filter::is_input_filter
 

mearly states if this is an input filter or not, an input filter is one that updates the frame with a new image when it is called, it will always be the first filter in a sequence

string Filter::name
 

this is the name that the filter will be identified with in the GUI

vector<Property *> Filter::properties
 

a vector of properties for this particular filter this should be initilised in the filters constructor


The documentation for this class was generated from the following files:
Generated on Wed Apr 23 10:42:35 2003 for BioFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002