at.tuwien.ifs.somtoolbox.visualization
Class ActivityHistogram
java.lang.Object
at.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer
at.tuwien.ifs.somtoolbox.visualization.AbstractMatrixVisualizer
at.tuwien.ifs.somtoolbox.visualization.AbstractItemVisualizer
at.tuwien.ifs.somtoolbox.visualization.ActivityHistogram
- All Implemented Interfaces:
- BackgroundImageVisualizer, MatrixVisualizer, Comparable<BackgroundImageVisualizer>
class ActivityHistogram
- extends AbstractItemVisualizer
This is the implementation of an Activity Histogram.
FIXME: there are a lot of common parts with ComponentPlanesVisualizer
==> make a superclass for both of them.
- Version:
- $Id: ActivityHistogram.java 3849 2010-10-12 12:56:45Z frank $
- Author:
- Roman Gerger, Florian Mistelbauer, Rudolf Mayer
Fields inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer |
cache, CACHE_KEY_SECTION_SEPARATOR, CACHE_KEY_SEPARATOR, contourInterpolationMode, contourMode, controlPanel, currentZDimSlice, inputObjects, interpolate, log, map, MAX_CACHE_SIZE_MB, neededInputObjects, NUM_VISUALIZATIONS, numberOfContours, opacity, preferredScaleFactor, VISUALIZATION_DESCRIPTIONS, VISUALIZATION_NAMES, VISUALIZATION_SHORT_NAMES, visualizationUpdateListener, zSize |
Method Summary |
BufferedImage |
createVisualization(int index,
GrowingSOM gsom,
int width,
int height)
Draws the activity histogram. |
protected String |
getCacheKey(GrowingSOM gsom,
int index,
int width,
int height)
The key of a cache is created as follows: VisualisationShortName + Hashcode of the SOM + Width + Height +
Opacity.
Sub-classes might add more information to the cache, if needed. |
HashMap<String,BufferedImage> |
getVisualizationFlavours(int index,
GrowingSOM gsom,
int width,
int height)
Default implementation which returns a map of size 1 with the standard, unparameterised visualisation of the
given variant. |
HashMap<String,BufferedImage> |
getVisualizationFlavours(int index,
GrowingSOM gsom,
int width,
int height,
int maxFlavours)
Default implementation equal to AbstractBackgroundImageVisualizer.getVisualizationFlavours(int, GrowingSOM, int, int) . |
HashMap<String,BufferedImage> |
getVisualizationFlavours(int index,
GrowingSOM gsom,
int width,
int height,
Map<String,String> flavourParameters)
Default implementation equal to AbstractBackgroundImageVisualizer.getVisualizationFlavours(int, GrowingSOM, int, int) . |
Methods inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractMatrixVisualizer |
computeHitHistogram, computeSpline, constrainWithinPalette, createImage, drawContour, getCurrentPalette, getMaximumMatrixValue, getMinimumMatrixValue, getPalette, getPreferredPaletteName, getVisualization, invalidateCache, reversePalette, setInterpolate, setPalette |
Methods inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer |
appendToCacheKey, buildCacheKey, checkNeededObjectsAvailable, checkVariantIndex, clearVisualisationCache, compareTo, createVisualization, drawBackground, getControlPanel, getHTMLVisualisationControl, getNumberOfVisualizations, getPreferredScaleFactor, getVariantException, getVisualizationDescription, getVisualizationDescriptions, getVisualizationName, getVisualizationNames, getVisualizationShortName, getVisualizationShortNames, invalidateCache, logImageCache, needsAdditionalFiles, setInputObjects, setMap, setSOMData, setVisualizationUpdateListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
dataPoint
private String dataPoint
inputData
private InputData inputData
ActivityHistogram
public ActivityHistogram()
getCacheKey
protected String getCacheKey(GrowingSOM gsom,
int index,
int width,
int height)
- Description copied from class:
AbstractBackgroundImageVisualizer
- The key of a cache is created as follows: VisualisationShortName + Hashcode of the SOM + Width + Height +
Opacity.
Sub-classes might add more information to the cache, if needed.
- Overrides:
getCacheKey
in class AbstractMatrixVisualizer
createVisualization
public BufferedImage createVisualization(int index,
GrowingSOM gsom,
int width,
int height)
throws SOMToolboxException
- Draws the activity histogram. Given one input point it calculates the Euclidian distance to each weight vector.
- Specified by:
createVisualization
in class AbstractBackgroundImageVisualizer
- Parameters:
index
- the index of the variant to usegsom
- the GrowingSOM to take build the visualisation forwidth
- the desired width of the image, in pixelsheight
- the desired height of the image, in pixels.
- Returns:
- an image for this visualisation.
- Throws:
SOMToolboxException
- If the InputData
is not provided
getVisualizationFlavours
public HashMap<String,BufferedImage> getVisualizationFlavours(int index,
GrowingSOM gsom,
int width,
int height)
throws SOMToolboxException
- Description copied from class:
AbstractBackgroundImageVisualizer
- Default implementation which returns a map of size 1 with the standard, unparameterised visualisation of the
given variant. Subclasses that want to return more flavours should override this method.
- Specified by:
getVisualizationFlavours
in interface BackgroundImageVisualizer
- Overrides:
getVisualizationFlavours
in class AbstractBackgroundImageVisualizer
- Throws:
SOMToolboxException
getVisualizationFlavours
public HashMap<String,BufferedImage> getVisualizationFlavours(int index,
GrowingSOM gsom,
int width,
int height,
int maxFlavours)
throws SOMToolboxException
- Description copied from class:
AbstractBackgroundImageVisualizer
- Default implementation equal to
AbstractBackgroundImageVisualizer.getVisualizationFlavours(int, GrowingSOM, int, int)
.
- Specified by:
getVisualizationFlavours
in interface BackgroundImageVisualizer
- Overrides:
getVisualizationFlavours
in class AbstractBackgroundImageVisualizer
- Throws:
SOMToolboxException
getVisualizationFlavours
public HashMap<String,BufferedImage> getVisualizationFlavours(int index,
GrowingSOM gsom,
int width,
int height,
Map<String,String> flavourParameters)
throws SOMToolboxException
- Description copied from class:
AbstractBackgroundImageVisualizer
- Default implementation equal to
AbstractBackgroundImageVisualizer.getVisualizationFlavours(int, GrowingSOM, int, int)
.
- Specified by:
getVisualizationFlavours
in interface BackgroundImageVisualizer
- Overrides:
getVisualizationFlavours
in class AbstractBackgroundImageVisualizer
- Throws:
SOMToolboxException