|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.webkitchen.eeg.analysis.BandFilter
public class BandFilter
Listens for new raw sample values, then filters the raw data into the specified frequency band described by our FilterSpecification, and notifies listeners of the filtered value. Objects can add themselves as listeners/observers to receive copies of all new filtered samples.
IBandSampleListener| Constructor Summary | |
|---|---|
BandFilter(FilterSpecification spec)
Creates a new BandFilter that builds an IIRFilter to match
the FilterSpecification parameter, and generates band sample values for
the specified filter type |
|
BandFilter(FilterSpecification spec,
double[] filterCoefficients)
Creates a new BandFilter that uses the filterCoefficients parameter
to generate band sample values. |
|
| Method Summary | |
|---|---|
void |
addBandListener(IBandSampleListener listener)
Attach listener to receive notification/copies of all new band values |
void |
receiveSample(double rawSample)
Processes the sample to filter for our band, and notifies our listeners of the latest band sample value |
void |
removeAllBandListeners()
Remove all listeners from our notification list |
void |
removeBandListener(IBandSampleListener listener)
Remove listener from our notification list |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BandFilter(FilterSpecification spec)
BandFilter that builds an IIRFilter to match
the FilterSpecification parameter, and generates band sample values for
the specified filter type
spec - the specification we will use to design our IIRFilter
public BandFilter(FilterSpecification spec,
double[] filterCoefficients)
BandFilter that uses the filterCoefficients parameter
to generate band sample values.
For valid results, the coefficients should have been designed by the
FilterSpecification, but we don't check validity here,
that is the responsibility of the caller.
spec - the specification we will use for our IIRFilterfilterCoefficients - the coefficients we will use to process raw samples| Method Detail |
|---|
public void receiveSample(double rawSample)
receiveSample in interface IChannelSampleListenerrawSample - the raw sample that we will processpublic void addBandListener(IBandSampleListener listener)
addBandListener in interface IBandSampleGeneratorlistener - the observer who wants to receive band valuespublic void removeBandListener(IBandSampleListener listener)
removeBandListener in interface IBandSampleGeneratorlistener - the observer to removepublic void removeAllBandListeners()
removeAllBandListeners in interface IBandSampleGenerator
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||