Package adams.data.filter.heatmapcrop
Class CropToCentroid
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.heatmapcrop.AbstractHeatmapCrop
-
- adams.data.filter.heatmapcrop.AbstractFilteredHeatmapCrop
-
- adams.data.filter.heatmapcrop.CropToCentroid
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.SizeOfHandler
,Serializable
public class CropToCentroid extends AbstractFilteredHeatmapCrop
Generates a cropped heatmap centered around the centroid calculated on the pre-filtered data.
-logging-level <OFF|SEVERE|WARNING|INFO|CONFIG|FINE|FINER|FINEST> (property: loggingLevel) The logging level for outputting errors and debugging output. default: WARNING
-filter <adams.data.filter.AbstractFilter> (property: filter) Pre-filters the heatmap. default: adams.data.filter.HeatmapThreshold -threshold adams.data.filter.heatmapthreshold.Manual
-height <int> (property: height) The height of the cropped region. default: 240 minimum: 1
-width <int> (property: width) The width of the cropped region. default: 320 minimum: 1
-centroid <adams.data.filter.HeatmapCentroid> (property: centroid) The centroid filter to use. default: adams.data.filter.HeatmapCentroid
- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected HeatmapCentroid
m_Centroid
the centroid filter.protected int
m_Height
the height of the crop region around the centroid.protected int
m_Width
the width of the crop region around the centroid.-
Fields inherited from class adams.data.filter.heatmapcrop.AbstractFilteredHeatmapCrop
m_Filter
-
Fields inherited from class adams.data.filter.heatmapcrop.AbstractHeatmapCrop
CROP_BOTTOM, CROP_LEFT, CROP_RIGHT, CROP_TOP, m_BottomRight, m_TopLeft
-
-
Constructor Summary
Constructors Constructor Description CropToCentroid()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
centroidTipText()
Returns the tip text for this property.static Heatmap
crop(Heatmap original, int centroidY, int centroidX, int height, int width)
Crops the heatmap around the centroid stored in the heatmap's report.void
defineOptions()
Adds options to the internal list of options.protected Heatmap
doCrop(Heatmap filtered, Heatmap original)
Performs the actual cropping, using the pre-filtered heatmap to manipulate the original heatmap.HeatmapCentroid
getCentroid()
Returns the centroid filter.protected adams.data.filter.Filter
getDefaultFilter()
Returns the default pre-filter to use.int
getHeight()
Returns the height start the submap from.int
getWidth()
Returns the width start the submap from.String
globalInfo()
Returns a string describing the object.String
heightTipText()
Returns the tip text for this property.void
setCentroid(HeatmapCentroid value)
Sets the centroid filter.void
setHeight(int value)
Sets the height of the submap.void
setWidth(int value)
Sets the width of the submap.String
widthTipText()
Returns the tip text for this property.-
Methods inherited from class adams.data.filter.heatmapcrop.AbstractFilteredHeatmapCrop
doCrop, filterTipText, getFilter, setFilter
-
Methods inherited from class adams.data.filter.heatmapcrop.AbstractHeatmapCrop
check, crop, postCrop, preCrop
-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
m_Height
protected int m_Height
the height of the crop region around the centroid.
-
m_Width
protected int m_Width
the width of the crop region around the centroid.
-
m_Centroid
protected HeatmapCentroid m_Centroid
the centroid filter.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
defineOptions
public void defineOptions()
Adds options to the internal list of options.- Specified by:
defineOptions
in interfaceadams.core.option.OptionHandler
- Overrides:
defineOptions
in classAbstractFilteredHeatmapCrop
-
getDefaultFilter
protected adams.data.filter.Filter getDefaultFilter()
Returns the default pre-filter to use.- Overrides:
getDefaultFilter
in classAbstractFilteredHeatmapCrop
- Returns:
- the default
-
setHeight
public void setHeight(int value)
Sets the height of the submap.- Parameters:
value
- the height
-
getHeight
public int getHeight()
Returns the height start the submap from.- Returns:
- the height
-
heightTipText
public String heightTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setWidth
public void setWidth(int value)
Sets the width of the submap.- Parameters:
value
- the width
-
getWidth
public int getWidth()
Returns the width start the submap from.- Returns:
- the width
-
widthTipText
public String widthTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
setCentroid
public void setCentroid(HeatmapCentroid value)
Sets the centroid filter.- Parameters:
value
- the filter
-
getCentroid
public HeatmapCentroid getCentroid()
Returns the centroid filter.- Returns:
- the filter
-
centroidTipText
public String centroidTipText()
Returns the tip text for this property.- Returns:
- tip text for this property suitable for displaying in the GUI or for listing the options.
-
doCrop
protected Heatmap doCrop(Heatmap filtered, Heatmap original)
Performs the actual cropping, using the pre-filtered heatmap to manipulate the original heatmap.- Specified by:
doCrop
in classAbstractFilteredHeatmapCrop
- Parameters:
filtered
- the pre-filtered heatmaporiginal
- the original heatmap- Returns:
- the final data
-
crop
public static Heatmap crop(Heatmap original, int centroidY, int centroidX, int height, int width)
Crops the heatmap around the centroid stored in the heatmap's report.- Parameters:
original
- the heatmap, with the centroid informationcentroidY
- the Y position of the centroidcentroidX
- the X position of the centroidheight
- the new height of the heatmapwidth
- the new width of the heatmap- Returns:
- the cropped heatmap
-
-