|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectadams.core.ConsoleObject
adams.core.option.AbstractOptionHandler
adams.data.image.AbstractImageFlattener<T>
T - the type of image to processpublic abstract class AbstractImageFlattener<T extends AbstractImage>
Abstract base class for AbstractImage flattening operations.
| Field Summary | |
|---|---|
protected Field[] |
m_Fields
fields to add to the output data. |
protected Instances |
m_Header
the current header. |
protected BaseString[] |
m_Notes
the notes to add as attributes. |
| Fields inherited from class adams.core.option.AbstractOptionHandler |
|---|
m_DebugLevel, m_OptionManager |
| Constructor Summary | |
|---|---|
AbstractImageFlattener()
|
|
| Method Summary | |
|---|---|
protected void |
checkImage(T img)
Optional checks of the image. |
void |
cleanUp()
Cleans up data structures, frees up memory. |
int |
compareTo(Object o)
Compares this object with the specified object for order. |
abstract Instances |
createHeader(T img)
Creates the header from a template image. |
void |
defineOptions()
Adds options to the internal list of options. |
void |
destroy()
Frees up memory in a "destructive" non-reversible way. |
abstract Instance[] |
doFlatten(T img)
Performs the actual flattening of the image. |
boolean |
equals(Object o)
Returns whether the two objects are the same. |
String |
fieldsTipText()
Returns the tip text for this property. |
Instance[] |
flatten(T img)
Process the given image. |
Field[] |
getFields()
Returns the targets to add. |
BaseString[] |
getNotes()
Returns the current notes to add as attributes. |
protected double[] |
newArray(int numAttributes)
Returns a double array filled with missing values. |
String |
notesTipText()
Returns the tip text for this property. |
Instances |
postProcessHeader(Instances header)
Post-processes the header, adding fields and notes. |
Instance |
postProcessInstance(T img,
Instance inst)
Post-processes the generated instance, adding notes and fields. |
protected void |
reset()
Resets the scheme, i.e., the header information. |
void |
setFields(Field[] value)
Sets the targets to add. |
void |
setNotes(BaseString[] value)
Sets the notes to add as attributes. |
T |
shallowCopy()
Returns a shallow copy of itself, i.e., based on the commandline options. |
T |
shallowCopy(boolean expand)
Returns a shallow copy of itself, i.e., based on the commandline options. |
| Methods inherited from class adams.core.option.AbstractOptionHandler |
|---|
cleanUpOptions, debug, debug, debugLevelTipText, finishInit, getDebugLevel, getOptionManager, globalInfo, initialize, isDebugOn, newOptionManager, setDebugLevel, toCommandLine, toString |
| Methods inherited from class adams.core.ConsoleObject |
|---|
getDebugging, getSystemErr, getSystemOut, sizeOf |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Instances m_Header
protected Field[] m_Fields
protected BaseString[] m_Notes
| Constructor Detail |
|---|
public AbstractImageFlattener()
| Method Detail |
|---|
public void defineOptions()
defineOptions in interface OptionHandlerdefineOptions in class AbstractOptionHandlerprotected void reset()
reset in class AbstractOptionHandlerpublic void setFields(Field[] value)
value - the targetspublic Field[] getFields()
public String fieldsTipText()
public void setNotes(BaseString[] value)
value - the notes prefixes, e.g., "PROCESS INFORMATION"public BaseString[] getNotes()
public String notesTipText()
protected void checkImage(T img)
img - the image to checkpublic abstract Instances createHeader(T img)
img - the image to act as a template
public Instances postProcessHeader(Instances header)
header - the header to process
protected double[] newArray(int numAttributes)
numAttributes - the length of the array
public abstract Instance[] doFlatten(T img)
img - the image to process
m_Header
public Instance postProcessInstance(T img,
Instance inst)
img - the image containerinst - the inst to process
public Instance[] flatten(T img)
img - the image to process
m_Header,
#createHeader(T)public int compareTo(Object o)
compareTo in interface Comparableo - the object to be compared.
ClassCastException - if the specified object's type prevents it
from being compared to this object.public boolean equals(Object o)
equals in class Objecto - the object to be compared
public T shallowCopy()
public T shallowCopy(boolean expand)
expand - whether to expand variables to their current values
public void cleanUp()
cleanUp in interface CleanUpHandlerpublic void destroy()
destroy in interface Destroyabledestroy in class AbstractOptionHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||