|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer
at.tuwien.ifs.somtoolbox.visualization.AbstractMatrixVisualizer
at.tuwien.ifs.somtoolbox.visualization.SmoothedDataHistograms
public class SmoothedDataHistograms
This visualizer provides an implementation of the Smoothed Data Histograms in three variants.
Nested Class Summary | |
---|---|
protected class |
SmoothedDataHistograms.Histogram
|
class |
SmoothedDataHistograms.SDHControlPanel
A control panel extending the generic AbstractBackgroundImageVisualizer.VisualizationControlPanel , adding
additionally a JSpinner for controlling the smoothing factor. |
Nested classes/interfaces inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer |
---|
AbstractBackgroundImageVisualizer.ContourInterpolationMode, AbstractBackgroundImageVisualizer.ContourMode, AbstractBackgroundImageVisualizer.VisualizationControlPanel |
Field Summary | |
---|---|
protected SOMLibDataWinnerMapping |
dataWinnerMapping
|
protected static int |
DEFAULT_SMOOTHING_VALUE
The default value for the smoothing factor (15). |
protected static int |
MAX_SMOOTHING_VALUE
The maximum value for the smoothing factor (300). |
protected static int |
MIN_SMOOTHING_VALUE
The minimum value for the smoothing factor (1), resulting in only the best winning units to get a hit counted. |
protected int |
s
The currently used smoothing factor. |
protected Hashtable<Integer,SmoothedDataHistograms.Histogram>[] |
smoothingCache
A cache for the different smoothing factors. |
Fields inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractMatrixVisualizer |
---|
maximumMatrixValue, minimumMatrixValue, palette |
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 |
Fields inherited from interface at.tuwien.ifs.somtoolbox.visualization.BackgroundImageVisualizer |
---|
DEFAULT_BACKGROUND_VISUALIZATION_SCALE |
Constructor Summary | |
---|---|
SmoothedDataHistograms()
|
Method Summary | |
---|---|
protected void |
ceckInitSmoothingCache(GrowingSOM gsom,
boolean forceSmoothingCacheInitialisation)
|
protected void |
checkNeededObjectsAvailable(GrowingSOM gsom)
|
protected void |
computeDefaultAndMaxSmoothingValues(int xSize,
int ySize)
|
protected flanagan.interpolation.BiCubicSplineFast |
computeSpline(GrowingSOM gsom,
cern.colt.matrix.DoubleMatrix2D matrix,
int width,
int height,
int unitWidth,
int unitHeight)
|
BufferedImage |
createVisualization(int index,
GrowingSOM gsom,
int width,
int height)
Creates a visualisation image. |
BufferedImage |
createVisualization(int index,
GrowingSOM gsom,
int width,
int height,
int blockWidth,
int blockHeight,
boolean forceSmoothingCacheInitialisation,
boolean shallDrawBackground)
|
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. |
String |
getHTMLVisualisationControl(Map params)
Returns HTML control elements (inputs) to be used by the webserver version of the SOM. |
int |
getSmoothingFactor()
Return the currently used smoothing factor. |
BufferedImage |
getVisualization(int index,
int smoothingFactor,
GrowingSOM gsom,
int width,
int height)
Visualisation for a specific smoothing factor |
HashMap<String,BufferedImage> |
getVisualizationFlavours(int variantIndex,
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 variantIndex,
GrowingSOM gsom,
int width,
int height,
int maxFlavours)
Default implementation equal to AbstractBackgroundImageVisualizer.getVisualizationFlavours(int, GrowingSOM, int, int) . |
HashMap<String,BufferedImage> |
getVisualizationFlavours(int variantIndex,
GrowingSOM gsom,
int width,
int height,
Map<String,String> flavourParameters)
Default implementation equal to AbstractBackgroundImageVisualizer.getVisualizationFlavours(int, GrowingSOM, int, int) . |
protected void |
initSmoothingCache(GrowingSOM gsom)
|
String[] |
needsAdditionalFiles()
Overrides AbstractBackgroundImageVisualizer.needsAdditionalFiles() , as we need only one of the two
possible input files to create this visualisation. |
void |
setSmoothingFactor(int smoothingFactor)
Sets the smoothing factor. |
void |
stateChanged(ChangeEvent e)
|
Methods inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractMatrixVisualizer |
---|
computeHitHistogram, constrainWithinPalette, createImage, drawContour, getCurrentPalette, getMaximumMatrixValue, getMinimumMatrixValue, getPalette, getPreferredPaletteName, getVisualization, invalidateCache, reversePalette, setInterpolate, setPalette |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface at.tuwien.ifs.somtoolbox.visualization.BackgroundImageVisualizer |
---|
getControlPanel, getNumberOfVisualizations, getPreferredScaleFactor, getVisualization, getVisualizationDescription, getVisualizationDescriptions, getVisualizationName, getVisualizationNames, getVisualizationShortName, getVisualizationShortNames, setInputObjects, setMap, setSOMData, setVisualizationUpdateListener |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Field Detail |
---|
protected static final int MIN_SMOOTHING_VALUE
protected static int MAX_SMOOTHING_VALUE
protected static int DEFAULT_SMOOTHING_VALUE
protected int s
protected Hashtable<Integer,SmoothedDataHistograms.Histogram>[] smoothingCache
protected SOMLibDataWinnerMapping dataWinnerMapping
Constructor Detail |
---|
public SmoothedDataHistograms()
Method Detail |
---|
protected String getCacheKey(GrowingSOM gsom, int index, int width, int height)
AbstractBackgroundImageVisualizer
getCacheKey
in class AbstractMatrixVisualizer
public BufferedImage getVisualization(int index, int smoothingFactor, GrowingSOM gsom, int width, int height) throws SOMToolboxException
SOMToolboxException
public BufferedImage createVisualization(int index, GrowingSOM gsom, int width, int height) throws SOMToolboxException
AbstractBackgroundImageVisualizer
createVisualization
in class AbstractBackgroundImageVisualizer
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.
SOMToolboxException
public BufferedImage createVisualization(int index, GrowingSOM gsom, int width, int height, int blockWidth, int blockHeight, boolean forceSmoothingCacheInitialisation, boolean shallDrawBackground) throws SOMToolboxException
SOMToolboxException
protected flanagan.interpolation.BiCubicSplineFast computeSpline(GrowingSOM gsom, cern.colt.matrix.DoubleMatrix2D matrix, int width, int height, int unitWidth, int unitHeight)
computeSpline
in class AbstractMatrixVisualizer
protected void checkNeededObjectsAvailable(GrowingSOM gsom) throws SOMToolboxException
checkNeededObjectsAvailable
in class AbstractBackgroundImageVisualizer
SOMToolboxException
protected void ceckInitSmoothingCache(GrowingSOM gsom, boolean forceSmoothingCacheInitialisation) throws SOMToolboxException
SOMToolboxException
public void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
public int getSmoothingFactor()
protected void computeDefaultAndMaxSmoothingValues(int xSize, int ySize)
protected void initSmoothingCache(GrowingSOM gsom) throws SOMToolboxException
SOMToolboxException
public String[] needsAdditionalFiles()
AbstractBackgroundImageVisualizer.needsAdditionalFiles()
, as we need only one of the two
possible input files to create this visualisation. If the data winner mapping is present, it will be used
directly, otherwise it can be created from the input vectors.
needsAdditionalFiles
in interface BackgroundImageVisualizer
needsAdditionalFiles
in class AbstractBackgroundImageVisualizer
public void setSmoothingFactor(int smoothingFactor)
smoothingFactor
- the new smoothing factorpublic String getHTMLVisualisationControl(Map params)
BackgroundImageVisualizer
getHTMLVisualisationControl
in interface BackgroundImageVisualizer
getHTMLVisualisationControl
in class AbstractBackgroundImageVisualizer
params
- the parameters as passed by the web request - used to select the values in the inputs.
public HashMap<String,BufferedImage> getVisualizationFlavours(int variantIndex, GrowingSOM gsom, int width, int height) throws SOMToolboxException
AbstractBackgroundImageVisualizer
getVisualizationFlavours
in interface BackgroundImageVisualizer
getVisualizationFlavours
in class AbstractBackgroundImageVisualizer
SOMToolboxException
public HashMap<String,BufferedImage> getVisualizationFlavours(int variantIndex, GrowingSOM gsom, int width, int height, int maxFlavours) throws SOMToolboxException
AbstractBackgroundImageVisualizer
AbstractBackgroundImageVisualizer.getVisualizationFlavours(int, GrowingSOM, int, int)
.
getVisualizationFlavours
in interface BackgroundImageVisualizer
getVisualizationFlavours
in class AbstractBackgroundImageVisualizer
SOMToolboxException
public HashMap<String,BufferedImage> getVisualizationFlavours(int variantIndex, GrowingSOM gsom, int width, int height, Map<String,String> flavourParameters) throws SOMToolboxException
AbstractBackgroundImageVisualizer
AbstractBackgroundImageVisualizer.getVisualizationFlavours(int, GrowingSOM, int, int)
.
getVisualizationFlavours
in interface BackgroundImageVisualizer
getVisualizationFlavours
in class AbstractBackgroundImageVisualizer
SOMToolboxException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |