Package adams.data.jai.features
Class DFT
-
- All Implemented Interfaces:
CleanUpHandler,Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,ShallowCopySupporter<AbstractImageFeatureGenerator>,SizeOfHandler,Serializable,Comparable
public class DFT extends AbstractBufferedImageFeatureGenerator
Performs discrete fourier transform (DFT).
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-field <adams.data.report.Field> [-field ...] (property: fields) The fields to add to the output. default:
-notes <adams.core.base.BaseString> [-notes ...] (property: notes) The notes to add as attributes to the generated data, eg 'PROCESS INFORMATION' . default:
-output-type <REAL|IMAGINARY|BOTH> (property: outputType) The type of output to generate. default: BOTH
- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz), Dale (dale at cs dot waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDFT.OutputTypeDetermines how to output the data.
-
Field Summary
Fields Modifier and Type Field Description protected DFT.OutputTypem_OutputTypethe output type.-
Fields inherited from class adams.data.image.AbstractImageFeatureGenerator
m_Converter, m_Fields, m_Notes, m_Prefix
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description DFT()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HeaderDefinitioncreateHeader(BufferedImageContainer img)Creates the header from a template image.voiddefineOptions()Adds options to the internal list of options.List<Object>[]generateRows(BufferedImageContainer img)Performs the actual feature generation.DFT.OutputTypegetOutputType()Returns the type of output to generate.StringglobalInfo()Returns a string describing the object.StringoutputTypeTipText()Returns the tip text for this property.protected double[]performDFT(BufferedImageContainer img)Performs DFT on the image.voidsetOutputType(DFT.OutputType value)Sets the type of output to generate.-
Methods inherited from class adams.data.image.AbstractImageFeatureGenerator
checkData, cleanUp, compareTo, converterTipText, destroy, equals, fieldsTipText, generate, getConverter, getDatasetFormat, getFields, getNotes, getPrefix, getRowFormat, notesTipText, postProcessHeader, postProcessRow, postProcessRows, prefixTipText, reset, setConverter, setFields, setNotes, setPrefix, shallowCopy, shallowCopy
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Field Detail
-
m_OutputType
protected DFT.OutputType m_OutputType
the output type.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfoin interfaceGlobalInfoSupporter- Specified by:
globalInfoin classAbstractOptionHandler- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptionsin interfaceOptionHandler- Overrides:
defineOptionsin classAbstractImageFeatureGenerator<BufferedImageContainer>
-
setOutputType
public void setOutputType(DFT.OutputType value)
Sets the type of output to generate.- Parameters:
value- the type
-
getOutputType
public DFT.OutputType getOutputType()
Returns the type of output to generate.- Returns:
- the type
-
outputTypeTipText
public String outputTypeTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
createHeader
public HeaderDefinition createHeader(BufferedImageContainer img)
Creates the header from a template image.- Specified by:
createHeaderin classAbstractImageFeatureGenerator<BufferedImageContainer>- Parameters:
img- the image to act as a template- Returns:
- the generated header
-
performDFT
protected double[] performDFT(BufferedImageContainer img)
Performs DFT on the image.- Parameters:
img- the image to process- Returns:
- the generated data (real/imag pairs)
-
generateRows
public List<Object>[] generateRows(BufferedImageContainer img)
Performs the actual feature generation.- Specified by:
generateRowsin classAbstractImageFeatureGenerator<BufferedImageContainer>- Parameters:
img- the image to process- Returns:
- the generated features
-
-