marf.Preprocessing
Class Filter

java.lang.Object
  extended by marf.Storage.StorageManager
      extended by marf.Preprocessing.Preprocessing
          extended by marf.Preprocessing.Filter
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IFilter, IPreprocessing, IStorageManager
Direct Known Subclasses:
CFEFilter, FFTFilter

public abstract class Filter
extends Preprocessing
implements IFilter

Filter class implements generic filtering.

Derivatives must implement filter API based on the type of filter they are and override preprocess() as needed.

$Id: Filter.java,v 1.1 2007/12/16 21:58:31 mokhov Exp $

Since:
0.3.0.6
Version:
$Revision: 1.1 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
 
Fields inherited from class marf.Preprocessing.Preprocessing
bRemoveNoise, bRemoveSilence, DEFAULT_SILENCE_THRESHOLD, dSilenceThreshold, oSample
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.Preprocessing.IFilter
FILTER_DIMENSIONALITY_1D, FILTER_DIMENSIONALITY_2D, FILTER_DIMENSIONALITY_3D, MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Preprocessing.IPreprocessing
MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS
 
Constructor Summary
Filter()
          Default constructor for reflective creation of Preprocessing clones.
Filter(IPreprocessing poPreprocessing)
          Pipelined constructor.
Filter(Sample poSample)
          Filter Constructor.
 
Method Summary
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 boolean preprocess()
          Filter implementation of preprocess().
 
Methods inherited from class marf.Preprocessing.Preprocessing
backSynchronizeObject, clone, compress, compress, cropAudio, extractParameters, getSample, normalize, normalize, normalize, removeNoise, removeSilence, removeSilence, setSample
 
Methods inherited from class marf.Storage.StorageManager
dump, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, getObjectToSerialize, hashCode, restore, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface marf.Preprocessing.IFilter
filter, filter, filter
 

Constructor Detail

Filter

public Filter()
Default constructor for reflective creation of Preprocessing clones. Typically should not be used unless really necessary for the frameworked modules.


Filter

public Filter(IPreprocessing poPreprocessing)
       throws PreprocessingException
Pipelined constructor.

Parameters:
poPreprocessing - the follow-up preprocessing module
Throws:
PreprocessingException

Filter

public Filter(Sample poSample)
       throws PreprocessingException
Filter Constructor.

Parameters:
poSample - incoming sample
Throws:
PreprocessingException
Method Detail

preprocess

public boolean preprocess()
                   throws PreprocessingException
Filter implementation of preprocess().

It does call removeNoise() and removeSilence() if they were explicitly requested by an app after applying the primary filtering algorithm.

NOTE: it alters inner Sample by resetting its data array to the new filtered values.

Specified by:
preprocess in interface IPreprocessing
Overrides:
preprocess in class Preprocessing
Returns:
true if there was something filtered out
Throws:
PreprocessingException - if the frequency response is null
See Also:
IPreprocessing.removeNoise(), IPreprocessing.removeSilence()

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string


SourceForge Logo