marf.gui
Class Spectrogram

java.lang.Object
  extended bymarf.Storage.StorageManager
      extended bymarf.gui.Spectrogram
All Implemented Interfaces:
java.lang.Cloneable, IStorageManager, java.io.Serializable

public class Spectrogram
extends StorageManager

Class Spectrogram dumps a spectrogram to a PPM file.

$Id: Spectrogram.java,v 1.30 2005/08/13 23:09:38 susan_fan Exp $

Since:
0.0.1
Version:
$Revision: 1.30 $
Author:
Ian Clement, Serguei Mokhov
See Also:
Serialized Form

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.
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
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
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.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 void restore()
          Not implemented.
 
Methods inherited from class marf.Storage.StorageManager
backSynchronizeObject, clone, dumpBinary, dumpCSV, dumpGzipBinary, dumpHTML, dumpSQL, dumpXML, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getFilename, hashCode, restoreBinary, restoreCSV, restoreGzipBinary, restoreHTML, restoreSQL, restoreXML, setDumpMode, setFilename, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, 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 StorageException
Dumps spectrogram.

Specified by:
dump in interface IStorageManager
Overrides:
dump in class StorageManager
Throws:
StorageException
See Also:
IStorageManager.DUMP_GZIP_BINARY, IStorageManager.DUMP_BINARY, StorageManager.dumpGzipBinary(), StorageManager.dumpCSV(), StorageManager.dumpBinary(), StorageManager.dumpXML(), StorageManager.dumpHTML(), StorageManager.dumpSQL(), StorageManager.backSynchronizeObject(), StorageManager.iCurrentDumpMode

restore

public void restore()
             throws StorageException
Not implemented.

Specified by:
restore in interface IStorageManager
Overrides:
restore in class StorageManager
Throws:
NotImplementedException
StorageException - never thrown
See Also:
IStorageManager.DUMP_GZIP_BINARY, IStorageManager.DUMP_BINARY, StorageManager.dumpGzipBinary(), StorageManager.dumpCSV(), StorageManager.dumpBinary(), StorageManager.dumpXML(), StorageManager.dumpHTML(), StorageManager.dumpSQL(), StorageManager.backSynchronizeObject(), StorageManager.iCurrentDumpMode

getMARFSourceCodeRevision

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

Returns:
revision string
Since:
0.3.0


SourceForge Logo