at.tuwien.ifs.somtoolbox.visualization
Interface BackgroundImageVisualizer

All Superinterfaces:
Comparable<BackgroundImageVisualizer>
All Known Subinterfaces:
QualityMeasureVisualizer
All Known Implementing Classes:
AbstractBackgroundImageVisualizer, AbstractItemVisualizer, AbstractMatrixVisualizer, ActivityHistogram, AdaptiveCoordinatesVisualizer, CategoryPieChartVisualizer, ClusterConnectionsVisualizer, ComparisonVisualizer, ComponentPlanesVisualizer, EntropyVisualizer, FlowBorderlineVisualizer, FuzzyColourCodingVisualiser, GapVisualiser, HitHistogramVisualizer, IntrinsicDistanceVisualizer, MappingDistortionVisualizer, MetroMapVisualizer, MinimumSpanningTreeVisualizer, NeighbourhoodGraph, PMatrix, QuantizationErrorVisualizer, RegressionVisualiser, RhythmPatternsAttributeVisualizer, SearchResultHistogramVisualizer, SilhouetteVisualizer, SmoothedCountHistograms, SmoothedDataHistograms, ThematicClassMapVisualizer, TopographicErrorVisualizer, TopographicProductVisualizer, TrustwothinessVisualizer, UMatrix

public interface BackgroundImageVisualizer
extends Comparable<BackgroundImageVisualizer>

Interface defining a visualisation of a SOM. If you want to provide new visualisers, you have to implement this interface and register your visualisation in Visualizations.getAvailableVisualizations(). If your visualisation requires user input to e.g. control parameters, extend AbstractBackgroundImageVisualizer.VisualizationControlPanel to add your specific control panel inputs.

Version:
$Id: BackgroundImageVisualizer.java 3888 2010-11-02 17:42:53Z frank $
Author:
Michael Dittenbach, Rudolf Mayer

Field Summary
static int DEFAULT_BACKGROUND_VISUALIZATION_SCALE
           
 
Method Summary
 AbstractBackgroundImageVisualizer.VisualizationControlPanel getControlPanel()
          Gets the visualisation control panel.
 String getHTMLVisualisationControl(Map params)
          Returns HTML control elements (inputs) to be used by the webserver version of the SOM.
 int getNumberOfVisualizations()
           
 int getPreferredScaleFactor()
          Return the preferred scale factor for interpolation for this visualisation.
 BufferedImage getVisualization(int variantIndex, GrowingSOM gsom, int width, int height)
          Returns a visualisation image.
 String getVisualizationDescription(int variantIndex)
          Gets the descriptions of a specified visualisation variant.
 String[] getVisualizationDescriptions()
          Gets the descriptions of all visualisation variants provided by this visualiser.
 HashMap<String,BufferedImage> getVisualizationFlavours(int index, GrowingSOM gsom, int width, int height)
          Returns all visualisation flavours of the given variant, e.g.
 HashMap<String,BufferedImage> getVisualizationFlavours(int index, GrowingSOM gsom, int width, int height, int maxFlavours)
          Returns all visualisation flavours of the given variant just as getVisualizationFlavours(int, GrowingSOM, int, int), but limiting the number of flavours to the given maximum number.
 HashMap<String,BufferedImage> getVisualizationFlavours(int index, GrowingSOM gsom, int width, int height, Map<String,String> flavourParameters)
          Returns all visualisation flavours of the given variant just as getVisualizationFlavours(int, GrowingSOM, int, int), but limiting the number of flavours by the given parameters.
 String getVisualizationName(int variantIndex)
          Gets the name of a specified visualisation variant.
 String[] getVisualizationNames()
          Gets the names of all visualisation variants provided by this visualiser.
 String getVisualizationShortName(int variantIndex)
          Gets the short name of a specified visualisation variant.
 String[] getVisualizationShortNames()
          Gets the short names of all visualisation variants provided by this visualiser.
 String[] needsAdditionalFiles()
          Checks whether this visualisation still needs some input files to generate an image.
 void setInputObjects(SharedSOMVisualisationData inputObjects)
          Sets the input objects needed to create visualisations.
 void setMap(MapPNode map)
          Sets the map this visualiser operates on.
 void setSOMData(SOMInputReader reader)
          Sets the input data needed to create visualisations.
 void setVisualizationUpdateListener(VisualizationUpdateListener listener)
          Sets a new listener for visualisation update events.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

DEFAULT_BACKGROUND_VISUALIZATION_SCALE

static final int DEFAULT_BACKGROUND_VISUALIZATION_SCALE
See Also:
Constant Field Values
Method Detail

getVisualization

BufferedImage getVisualization(int variantIndex,
                               GrowingSOM gsom,
                               int width,
                               int height)
                               throws SOMToolboxException
Returns a visualisation image.

Parameters:
variantIndex - the index of the variant to use
gsom - the GrowingSOM to take build the visualisation for
width - the desired width of the image, in pixels
height - the desired height of the image, in pixels
Returns:
an image for this visualisation
Throws:
SOMToolboxException - If there was an error creating the visualisation

getNumberOfVisualizations

int getNumberOfVisualizations()
Returns:
Returns the number of visualizations

getVisualizationNames

String[] getVisualizationNames()
Gets the names of all visualisation variants provided by this visualiser.

Returns:
a String array containing all names

getVisualizationName

String getVisualizationName(int variantIndex)
Gets the name of a specified visualisation variant.

Parameters:
variantIndex - the index of the variant to use
Returns:
the name of the visualisation variant

getVisualizationShortNames

String[] getVisualizationShortNames()
Gets the short names of all visualisation variants provided by this visualiser.

Returns:
a String array containing all short names

getVisualizationShortName

String getVisualizationShortName(int variantIndex)
Gets the short name of a specified visualisation variant.

Parameters:
variantIndex - the index of the variant to use
Returns:
the short name of the visualisation variant

getVisualizationDescriptions

String[] getVisualizationDescriptions()
Gets the descriptions of all visualisation variants provided by this visualiser.

Returns:
a String array containing all descriptions

getVisualizationDescription

String getVisualizationDescription(int variantIndex)
Gets the descriptions of a specified visualisation variant.

Parameters:
variantIndex - the index of the variant to use
Returns:
the description of the visualisation variant

getControlPanel

AbstractBackgroundImageVisualizer.VisualizationControlPanel getControlPanel()
Gets the visualisation control panel.

Returns:
the control panel of this visualizer

needsAdditionalFiles

String[] needsAdditionalFiles()
Checks whether this visualisation still needs some input files to generate an image.

Returns:
an array containing the names of the input objects needed

setVisualizationUpdateListener

void setVisualizationUpdateListener(VisualizationUpdateListener listener)
Sets a new listener for visualisation update events.

Parameters:
listener - the new listener to be registered

setInputObjects

void setInputObjects(SharedSOMVisualisationData inputObjects)
Sets the input objects needed to create visualisations.

Parameters:
inputObjects - the new input objects
See Also:
SOMVisualisationData

setSOMData

void setSOMData(SOMInputReader reader)
Sets the input data needed to create visualisations.

Parameters:
reader - the som input reader

setMap

void setMap(MapPNode map)
Sets the map this visualiser operates on.

Parameters:
map - the map

getHTMLVisualisationControl

String getHTMLVisualisationControl(Map params)
Returns HTML control elements (inputs) to be used by the webserver version of the SOM. Only the inputs are required, the surrounding form will be provided.

Parameters:
params - the parameters as passed by the web request - used to select the values in the inputs.
Returns:
HTML code containing the inputs

getPreferredScaleFactor

int getPreferredScaleFactor()
Return the preferred scale factor for interpolation for this visualisation. This is useful for visualisations that do not want to be interpolated, or at least less interpolated, e.g. when they draw lines rather than having a matrix-height profile.


getVisualizationFlavours

HashMap<String,BufferedImage> getVisualizationFlavours(int index,
                                                       GrowingSOM gsom,
                                                       int width,
                                                       int height)
                                                       throws SOMToolboxException
Returns all visualisation flavours of the given variant, e.g. applying possible parameters to the visualisation, etc.
The keys in the map shall be specific suffixes that describe how the flavours were constructed, e.g. they might contain parameter names and values.

Throws:
SOMToolboxException

getVisualizationFlavours

HashMap<String,BufferedImage> getVisualizationFlavours(int index,
                                                       GrowingSOM gsom,
                                                       int width,
                                                       int height,
                                                       int maxFlavours)
                                                       throws SOMToolboxException
Returns all visualisation flavours of the given variant just as getVisualizationFlavours(int, GrowingSOM, int, int), but limiting the number of flavours to the given maximum number.

Throws:
SOMToolboxException

getVisualizationFlavours

HashMap<String,BufferedImage> getVisualizationFlavours(int index,
                                                       GrowingSOM gsom,
                                                       int width,
                                                       int height,
                                                       Map<String,String> flavourParameters)
                                                       throws SOMToolboxException
Returns all visualisation flavours of the given variant just as getVisualizationFlavours(int, GrowingSOM, int, int), but limiting the number of flavours by the given parameters.

Throws:
SOMToolboxException