marf.gui
Class Spectrogram

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

public class Spectrogram
extends StorageManager

Class Spectrogram dumps a spectrogram to a PPM file.

$Id: Spectrogram.java,v 1.32 2007/12/31 00:17:05 mokhov Exp $

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

Field Summary
protected  double dMax
          Current maximum.
protected  double dMin
          Current minimum.
protected  java.util.Vector oData
          The data vector.
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[] padValues)
          Adds FFT spectrum to the data to dump.
 void addLPC(double[] padLPCCoeffs, int piNumCoeffs, int piSize)
          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, getObjectToSerialize, 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

oData

protected java.util.Vector oData
The data vector.


dMin

protected double dMin
Current minimum.


dMax

protected double dMax
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[] padLPCCoeffs,
                         int piNumCoeffs,
                         int piSize)
Adds LPC spectrum to the data to dump.

Parameters:
padLPCCoeffs - LPC coefficiencies to dump
piNumCoeffs - number of LPC coefficiencies to dump
piSize - size of the spectrogram (width)

addFFT

public final void addFFT(double[] padValues)
Adds FFT spectrum to the data to dump.

Parameters:
padValues - 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.2


SourceForge Logo