public class SmoothedDataHistograms extends AbstractMatrixVisualizer implements BackgroundImageVisualizer, ChangeListener
Modifier and Type | Class and Description |
---|---|
protected class |
SmoothedDataHistograms.Histogram |
class |
SmoothedDataHistograms.SDHControlPanel
A control panel extending the generic
AbstractBackgroundImageVisualizer.VisualizationControlPanel , adding
additionally a JSpinner for controlling the smoothing factor. |
AbstractBackgroundImageVisualizer.ContourInterpolationMode, AbstractBackgroundImageVisualizer.ContourMode, AbstractBackgroundImageVisualizer.VisualizationControlPanel
Modifier and Type | Field and Description |
---|---|
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.
|
maximumMatrixValue, minimumMatrixValue, palette
cache, CACHE_KEY_SEPARATOR, contourInterpolationMode, contourMode, controlPanel, currentZDimSlice, inputObjects, log, map, MAX_CACHE_SIZE_MB, neededInputObjects, NUM_VISUALIZATIONS, numberOfContours, opacity, preferredScaleFactor, VISUALIZATION_DESCRIPTIONS, VISUALIZATION_NAMES, VISUALIZATION_SHORT_NAMES, visualizationUpdateListener, zSize
CACHE_KEY_SECTION_SEPARATOR, DEFAULT_BACKGROUND_VISUALIZATION_SCALE
Constructor and Description |
---|
SmoothedDataHistograms() |
Modifier and Type | Method and Description |
---|---|
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) |
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.
|
protected String |
getVisualisationSpecificCacheKey(int currentVariant) |
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) |
computeHitHistogram, constrainWithinPalette, createImage, drawContour, getCurrentPalette, getMaximumMatrixValue, getMinimumMatrixValue, getPalette, getPreferredPaletteName, getVisualization, invalidateCache, isInterpolate, reversePalette, setDefaultInterpolate, setInterpolate, setPalette
buildCacheKey, checkVariantIndex, clearVisualisationCache, compareTo, createVisualization, drawBackground, escapeFileName, getCache, getCacheKey, getControlPanel, getDefaultVisualisationFileName, getDefaultVisualisationFileName, getNumberOfVisualizations, getPreferredScaleFactor, getVariantException, getVisualizationDescription, getVisualizationDescriptions, getVisualizationName, getVisualizationNames, getVisualizationShortName, getVisualizationShortNames, invalidateCache, logImageCache, setInputObjects, setMap, setSOMData, setVisualizationUpdateListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getControlPanel, getDefaultVisualisationFileName, getNumberOfVisualizations, getPreferredScaleFactor, getVisualization, getVisualizationDescription, getVisualizationDescriptions, getVisualizationName, getVisualizationNames, getVisualizationShortName, getVisualizationShortNames, setInputObjects, setMap, setSOMData, setVisualizationUpdateListener
compareTo
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
protected String getVisualisationSpecificCacheKey(int currentVariant)
getVisualisationSpecificCacheKey
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