Package adams.data.filter.heatmapcrop
Class AbstractHeatmapCrop
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.data.filter.heatmapcrop.AbstractHeatmapCrop
-
- 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
- Direct Known Subclasses:
AbstractFilteredHeatmapCrop
,Dummy
,Rectangle
,Submap
public abstract class AbstractHeatmapCrop extends adams.core.option.AbstractOptionHandler
Ancestor for algorithsm that crop heatmaps.- Version:
- $Revision$
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
CROP_BOTTOM
the bottom coordinate of the crop in the original heatmap.static String
CROP_LEFT
the left coordinate of the crop in the original heatmap.static String
CROP_RIGHT
the right coordinate of the crop in the original heatmap.static String
CROP_TOP
the right coordinate of the crop in the original heatmap.protected Point
m_BottomRight
the bottom-right corner.protected Point
m_TopLeft
the top-left corner.
-
Constructor Summary
Constructors Constructor Description AbstractHeatmapCrop()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
check(Heatmap map)
Checks whether the heatmap can be processed, throws anIllegalArgumentException
if not.Heatmap
crop(Heatmap map)
Crops the given heatmap.protected abstract Heatmap
doCrop(Heatmap map)
Performs the actual cropping.protected void
postCrop(Heatmap map)
Hook method after the crop happened.protected void
preCrop(Heatmap map)
Hook method before the crop happens.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Field Detail
-
CROP_LEFT
public static final String CROP_LEFT
the left coordinate of the crop in the original heatmap.- See Also:
- Constant Field Values
-
CROP_TOP
public static final String CROP_TOP
the right coordinate of the crop in the original heatmap.- See Also:
- Constant Field Values
-
CROP_RIGHT
public static final String CROP_RIGHT
the right coordinate of the crop in the original heatmap.- See Also:
- Constant Field Values
-
CROP_BOTTOM
public static final String CROP_BOTTOM
the bottom coordinate of the crop in the original heatmap.- See Also:
- Constant Field Values
-
m_TopLeft
protected Point m_TopLeft
the top-left corner.
-
m_BottomRight
protected Point m_BottomRight
the bottom-right corner.
-
-
Method Detail
-
check
protected void check(Heatmap map)
Checks whether the heatmap can be processed, throws anIllegalArgumentException
if not.
Default implementation only checks whether a heatmap is present.- Parameters:
map
- the heatmap to check.
-
preCrop
protected void preCrop(Heatmap map)
Hook method before the crop happens.
Default method initializes the top-left and bottom-right corners to map dimensions.- Parameters:
map
- the heatmap to crop
-
doCrop
protected abstract Heatmap doCrop(Heatmap map)
Performs the actual cropping.- Parameters:
map
- the map to crop- Returns:
- the cropped heatmap
-
postCrop
protected void postCrop(Heatmap map)
Hook method after the crop happened.
Sets the crop coordinates.- Parameters:
map
- the cropped heatmap- See Also:
m_TopLeft
,m_BottomRight
-
-