marf.gui
Class Spectrogram

java.lang.Object
  |
  +--marf.gui.Spectrogram
All Implemented Interfaces:
StorageManager

public class Spectrogram
extends java.lang.Object
implements StorageManager

Class Spectrogram

Dumps a spectrogram to a PPM file

$Header: /cvsroot/marf/marf/src/marf/gui/Spectrogram.java,v 1.20.2.1 2003/02/16 18:30:35 mokhov Exp $

Author:
Ian Clement

Field Summary
protected  java.util.Vector data
          The data vector
protected  double max
          Current maximum
protected  double min
          Current minimum
protected  java.lang.String strMethod
          To differentiate file names based on the feature extraction method name.
 
Constructor Summary
Spectrogram()
          Constructor
Spectrogram(java.lang.String pstrMethodName)
          Constructor with a feature extraction method name
 
Method Summary
 void addFFT(double[] values)
          Adds FFT spectrum to the data to dump
 void addLPC(double[] lpc_coeffs, int num_coeffs, int size)
          Adds LPC spectrum to the data to dump
 void dump()
          Dumps spectrogram
 void restore()
          Not implemented
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

protected java.util.Vector data
The data vector

min

protected double min
Current minimum

max

protected double max
Current maximum

strMethod

protected java.lang.String strMethod
To differentiate file names based on the feature extraction method name.
Constructor Detail

Spectrogram

public Spectrogram()
Constructor

Spectrogram

public Spectrogram(java.lang.String pstrMethodName)
Constructor with a feature extraction method name
Parameters:
pstrMethodName - String representing FE module name
Method Detail

addLPC

public final void addLPC(double[] lpc_coeffs,
                         int num_coeffs,
                         int size)
Adds LPC spectrum to the data to dump
Parameters:
lpc_coeffs - LPC coefficiencies to dump
num_coeffs - number of LPC coefficiencies to dump
size - size of the spectrogram (width)

addFFT

public final void addFFT(double[] values)
Adds FFT spectrum to the data to dump
Parameters:
values - array of doubles (FFT coefficiencies)

dump

public final void dump()
                throws java.io.IOException
Dumps spectrogram
Specified by:
dump in interface StorageManager
Throws:
java.io.IOException -  

restore

public void restore()
             throws java.io.IOException
Not implemented
Specified by:
restore in interface StorageManager
Following copied from interface: marf.Storage.StorageManager
Throws:
java.io.IOException -