at.tuwien.ifs.somtoolbox.visualization
Class MetroMapVisualizer

java.lang.Object
  extended by at.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer
      extended by at.tuwien.ifs.somtoolbox.visualization.MetroMapVisualizer
All Implemented Interfaces:
BackgroundImageVisualizer, Comparable<BackgroundImageVisualizer>

public class MetroMapVisualizer
extends AbstractBackgroundImageVisualizer

Version:
$Id: MetroMapVisualizer.java 3939 2010-11-17 16:06:14Z frank $
Author:
Rudolf Mayer

Nested Class Summary
private  class MetroMapVisualizer.MetroMapControlPanel
          A control panel extending the generic AbstractBackgroundImageVisualizer.VisualizationControlPanel, adding additionally a JList and a JTextField for selecting a component from the TemplateVector.
(package private) static class MetroMapVisualizer.Mode
           
 
Nested classes/interfaces inherited from class at.tuwien.ifs.somtoolbox.visualization.AbstractBackgroundImageVisualizer
AbstractBackgroundImageVisualizer.ContourInterpolationMode, AbstractBackgroundImageVisualizer.ContourMode, AbstractBackgroundImageVisualizer.VisualizationControlPanel
 
Field Summary
private  MetroMapVisualizer.Mode aggregationMode
           
private  double aggregationSimilarity
           
private  int aggregationTargetNumberOfComponents
           
private  Hashtable<Point2D,int[]>[] allDirections
           
private  Point2D[] allSOMCoordinates
          Array of all points on the SOM .
private  double[] allSOMCoordinatesDiffValues
          Similar matrix as allSOMCoordinatesSumValues, but containing the difference of the X&Y coordinates, for upper-left and lower-right diagonal units.
private  double[] allSOMCoordinatesSumValues
          Lookup-up matrix to check fast if two points are on a diagonal to each other.
protected  Point2D[][] binCentres
           
private  Palette binPalette
           
private  LeastRecentlyUsedCache<ClusterElementFunctions<ComponentLine2D>,WardClustering<ComponentLine2D>> clusterCache
           
private  List<? extends Cluster<ComponentLine2D>> clusters
           
protected  MetroColorMap colorMap
           
private static Color[] COLORS
           
private  JTable colourLegendTable1
           
private static String COMP_PREFIX
           
 float[][] dashPatterns
           
private  int dim
           
private  int endIndexTable1
           
private  FlowBorderlineVisualizer flowBorderlineVisualizer
           
private  GrowingSOM gsom
           
private  int innerRadius
           
private static String[] legendColumnNames
           
private  double legendColumns
           
protected  DistanceFunctionType lineDistanceFunction
           
private  double lineOffset
           
private  double lineOffsetIsThisFractionOfRadius
           
private  int lineThickness
           
static float[] lineThicknessFactors
           
private static int MAX_BINS
           
private static int MAX_NUMBER_OF_LEGEND_ENTRIES
          the attribute legend will have at most this many entries
private static MetroColorMap metroColorMap
           
private  MetroMapVisualizer.MetroMapControlPanel metroMapControlPanel
           
private static int MIN_BINS
           
private  int numberOfBins
           
private  AffineTransformOp op
           
private  BufferedImage overlayVisualisation
           
private  JComboBox overlayVisualisationComboBox
           
private  int radius
           
(package private)  double scale
           
private  int[] selectedComponentIndices
           
private  List<ComponentRegionCount> selectedComponents
           
private  MetroMapVisualizer.Mode selectionMode
           
private  int selectionTargetNumberOfComponents
           
private  double selectionThreshold
           
private  boolean snapping
           
private static Color STATION_FILL_COLOUR
           
private  SOMLibTemplateVector templateVector
           
private  ThematicClassMapVisualizer thematicClassMapVisualizer
           
private  UMatrix uMatrixVisualizer
           
private  int unitHeight
           
private  Hashtable<Point2D,Integer> unitsWithStopsOnThemAndHowMany
           
private  int unitWidth
           
 
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
MetroMapVisualizer()
           
 
Method Summary
private  void colourUnits(Graphics2D g, int[][] binAssignment, Color[] binPalette)
          Colours SOM units according to the given bin assignment.
private  Point2D[][] computeFinalComponentLines(GrowingLayer layer)
          Performs the computation of the new bin centres, therefore component aggregation, selection as well as snapping are handled
private  Hashtable<Point2D,int[]> countOutgoingLines(Point2D[] line, Hashtable<Point2D,int[]> outgoingLineTable)
           
private  void createLayout(Graphics2D g, GrowingLayer layer, boolean drawLine)
          Create the layout for the metro lines (not snapped).
protected  BufferedImage createMetromapImage(int index, GrowingSOM gsom, int width, int height)
          Will create the metro map image for the given params.
 BufferedImage createMetromapImage(int index, GrowingSOM gsom, int width, int height, int component)
           
private  BufferedImage createOverlayVisualisation(int width, int height)
          Creates the selected overlay visualisation.
private  void createSnappedMetroLayout(Graphics2D g, GrowingLayer layer)
          Organises all metro drawing for snapped lines, i.e.
private  void createStations(Graphics2D g)
          Draw metro stations on top of existing maps.
 BufferedImage createVisualization(int index, GrowingSOM gsom, int width, int height)
          Creates a visualisation image.
private  Point2D[][] doAggregation(ArrayList<ComponentLine2D> binCentresAsList, GrowingLayer layer)
          Clustering of metro lines is done in here (i.e.
private  Point2D[][] doSelection(Point2D[][] binCentres, GrowingLayer layer)
          Computes the line selection, returns the selected lines
private  Point2D[][] doSnapping(Point2D[][] binCentres, GrowingLayer layer)
          Performs the snapping step, returns snapped lines
private  void drawComponentLineSegment(Point2D begin, Point2D end, Graphics2D g, int component, boolean keepCurrentStroke)
          Draws a line segment for the given component.
private  void drawLine(Graphics2D g, int lineIndex, Point2D[][] binCentres)
           
private  void drawLineAndStation(Graphics2D g, int lineIndex)
          Draw the line for the current line or component index.
private  Hashtable<Point2D,int[]>[] getAllDirections()
          Get a Hastable[] containing the per-dimension directions to draw on each unit of the som.
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.
 Color getColour(int component)
           
 Color[] getColours(int components)
           
private  String getComponentName(int i)
          VISUALISATION IMPROVEMENTS ***********************
private  String[] getComponentNames()
           
private  int[] getComponentsInDirection(Point2D currentSOMUnit, int i_direction)
          Gets components which have links in the given direction.
private  int getDirection(Point2D current, Point2D next)
          returns the direction between two nodes based on the following scheme: 0 7 left up up right up 1 \ | / 6 left - * - right 6 / | \ 5 left down down right down 3 4
private  int[] getDirectionArray(Point2D current, Point2D next)
          get a direction array for the given points its indices are set to on for outgoing directions and it takes the form given in
private  int[] getDirectionArray(Point2D current, Point2D next, int[] directions)
          update a given direction array for the given points its indices are set to on for outgoing directions and it takes the form given in
 Point2D[] getNeighbouringUnits(Point2D p)
          Finds the four units around the given point.
private  Point2D getNextCoords(Point2D currentPoint, int[] directions)
          return the coordinates on the som grid for the next unit in the given direction
private  Hashtable<Point2D,Integer> getUnitsWithStopsOnThemAndHowMany()
          Get a Hashtable of unit coordinates and the number of centres which lie on it.
 BufferedImage getVisualization(int index, GrowingSOM gsom, int width, int height)
          Returns the requested visualization image, either by retrieving it from the image cache, or by invoking AbstractBackgroundImageVisualizer.createVisualization(int, GrowingSOM, int, int) to create the image new.
 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).
private  float[][] initDashPatterns()
           
 void initNeighbourhoodLookup(GrowingSOM gsom)
           
private  void reInitVis()
           
 void setInputObjects(SharedSOMVisualisationData inputObjects)
          Implementing sub-classes shall override this method if they need to set some specific input object related information.
 void setSOMData(SOMInputReader reader)
          Implementing sub-classes shall override this method if they need to set some specific input-data related information.
private  Point2D[] snap(Point2D[] line, int xSize, int ySize)
          Returns a snapped line of the given line.
private  Point2D[] snapPoint(Point2D startPoint, Point2D[] line, int currentPosition, int direction, int xSize, int ySize, int bins)
          Snaps the next point on the line.
 
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, setMap, setVisualizationUpdateListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATION_FILL_COLOUR

private static final Color STATION_FILL_COLOUR

MIN_BINS

private static final int MIN_BINS
See Also:
Constant Field Values

MAX_BINS

private static final int MAX_BINS
See Also:
Constant Field Values

MAX_NUMBER_OF_LEGEND_ENTRIES

private static final int MAX_NUMBER_OF_LEGEND_ENTRIES
the attribute legend will have at most this many entries

See Also:
Constant Field Values

COMP_PREFIX

private static final String COMP_PREFIX
See Also:
Constant Field Values

numberOfBins

private int numberOfBins

selectedComponentIndices

private int[] selectedComponentIndices

templateVector

private SOMLibTemplateVector templateVector

radius

private int radius

innerRadius

private int innerRadius

lineThickness

private int lineThickness

unitWidth

private int unitWidth

unitHeight

private int unitHeight

lineOffsetIsThisFractionOfRadius

private double lineOffsetIsThisFractionOfRadius

lineOffset

private double lineOffset

scale

double scale

dim

private int dim

selectionTargetNumberOfComponents

private int selectionTargetNumberOfComponents

selectionThreshold

private double selectionThreshold

aggregationTargetNumberOfComponents

private int aggregationTargetNumberOfComponents

aggregationSimilarity

private double aggregationSimilarity

aggregationMode

private MetroMapVisualizer.Mode aggregationMode

snapping

private boolean snapping

selectionMode

private MetroMapVisualizer.Mode selectionMode

lineDistanceFunction

protected DistanceFunctionType lineDistanceFunction

metroMapControlPanel

private MetroMapVisualizer.MetroMapControlPanel metroMapControlPanel

colorMap

protected final MetroColorMap colorMap

legendColumnNames

private static final String[] legendColumnNames

overlayVisualisationComboBox

private JComboBox overlayVisualisationComboBox

clusterCache

private LeastRecentlyUsedCache<ClusterElementFunctions<ComponentLine2D>,WardClustering<ComponentLine2D>> clusterCache

COLORS

private static Color[] COLORS

metroColorMap

private static final MetroColorMap metroColorMap

dashPatterns

public float[][] dashPatterns

lineThicknessFactors

public static float[] lineThicknessFactors

uMatrixVisualizer

private UMatrix uMatrixVisualizer

flowBorderlineVisualizer

private FlowBorderlineVisualizer flowBorderlineVisualizer

thematicClassMapVisualizer

private ThematicClassMapVisualizer thematicClassMapVisualizer

overlayVisualisation

private BufferedImage overlayVisualisation

colourLegendTable1

private JTable colourLegendTable1

legendColumns

private double legendColumns

endIndexTable1

private int endIndexTable1

binCentres

protected Point2D[][] binCentres

unitsWithStopsOnThemAndHowMany

private Hashtable<Point2D,Integer> unitsWithStopsOnThemAndHowMany

allDirections

private Hashtable<Point2D,int[]>[] allDirections

gsom

private GrowingSOM gsom

op

private AffineTransformOp op

allSOMCoordinates

private Point2D[] allSOMCoordinates
Array of all points on the SOM .


allSOMCoordinatesSumValues

private double[] allSOMCoordinatesSumValues
Lookup-up matrix to check fast if two points are on a diagonal to each other. The table has the sum of the X & Y coordinates of each point. For a given unit, all units that are in the lower-left or upper-right diagonal will have the same value. As an example, for a 6x6 SOM, it would thus have values as follows:
               0  1  2  3  4  5  6
               1  2  3  4  5  6  7
               2  3  4  5  6  7  8
               3  4  5  6  7  8  9
               4  5  6  7  8  9 10
               5  6  7  8  9 10 11
               6  7  8  9 10 11 12
 


allSOMCoordinatesDiffValues

private double[] allSOMCoordinatesDiffValues
Similar matrix as allSOMCoordinatesSumValues, but containing the difference of the X&Y coordinates, for upper-left and lower-right diagonal units. As an example, for a 6x6 SOM, it would thus have values as follows:
                0   1   2   3   4   5   6
               -1   0   1   2   3   4   5
               -2  -1   0   1   2   3   4
               -3  -2  -1   0   1   2   3
               -4  -3  -2  -1   0   1   2
               -5  -4  -3  -2  -1   0   1
               -6  -5  -4  -3  -2  -1   0
 


clusters

private List<? extends Cluster<ComponentLine2D>> clusters

selectedComponents

private List<ComponentRegionCount> selectedComponents

binPalette

private Palette binPalette
Constructor Detail

MetroMapVisualizer

public MetroMapVisualizer()
Method Detail

getVisualization

public BufferedImage getVisualization(int index,
                                      GrowingSOM gsom,
                                      int width,
                                      int height)
                               throws SOMToolboxException
Description copied from class: AbstractBackgroundImageVisualizer
Returns the requested visualization image, either by retrieving it from the image cache, or by invoking AbstractBackgroundImageVisualizer.createVisualization(int, GrowingSOM, int, int) to create the image new. Subclasses should not overwrite this method, unless they implement their own caching mechanism, or do not want any caching.

Specified by:
getVisualization in interface BackgroundImageVisualizer
Overrides:
getVisualization in class AbstractBackgroundImageVisualizer
Parameters:
index - 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
See Also:
BackgroundImageVisualizer.getVisualization(int, at.tuwien.ifs.somtoolbox.models.GrowingSOM, int, int)

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 AbstractBackgroundImageVisualizer

createVisualization

public BufferedImage createVisualization(int index,
                                         GrowingSOM gsom,
                                         int width,
                                         int height)
                                  throws SOMToolboxException
Description copied from class: AbstractBackgroundImageVisualizer
Creates a visualisation image. Subclasses must implement this method.

Specified by:
createVisualization in class AbstractBackgroundImageVisualizer
Parameters:
index - 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

initNeighbourhoodLookup

public void initNeighbourhoodLookup(GrowingSOM gsom)

createMetromapImage

protected BufferedImage createMetromapImage(int index,
                                            GrowingSOM gsom,
                                            int width,
                                            int height)
                                     throws SOMToolboxException
Will create the metro map image for the given params.

Throws:
SOMToolboxException

createMetromapImage

public BufferedImage createMetromapImage(int index,
                                         GrowingSOM gsom,
                                         int width,
                                         int height,
                                         int component)

createOverlayVisualisation

private BufferedImage createOverlayVisualisation(int width,
                                                 int height)
                                          throws SOMToolboxException
Creates the selected overlay visualisation.

Parameters:
width - width of the overlay
height - of the overlay
Returns:
overlay image
Throws:
SOMToolboxException

colourUnits

private void colourUnits(Graphics2D g,
                         int[][] binAssignment,
                         Color[] binPalette)
Colours SOM units according to the given bin assignment.

Parameters:
g - thingy to draw on
binAssignment - assignment of single bins
binPalette - the palette to draw the bins with

drawLineAndStation

private void drawLineAndStation(Graphics2D g,
                                int lineIndex)
Draw the line for the current line or component index. Note that this one's not snapped.

Parameters:
g - thingy to draw on
lineIndex - the line to draw

drawLine

private void drawLine(Graphics2D g,
                      int lineIndex,
                      Point2D[][] binCentres)

createLayout

private void createLayout(Graphics2D g,
                          GrowingLayer layer,
                          boolean drawLine)
Create the layout for the metro lines (not snapped). This method possibly colours the units of the SOM according to their bin assignments, that is if only one component or component group is selected.

Parameters:
g - piece of paper
layer - layer of the SOM
drawLine - colouring only or drawing the actual lines too (you always have a choice after all)

getAllDirections

private Hashtable<Point2D,int[]>[] getAllDirections()
Get a Hastable[] containing the per-dimension directions to draw on each unit of the som. This includes units not having a stop, i.e. this also handles long links across empty units (and if you think it's a mess now, you should've seen it earlier on).

Returns:
Hashtable[] containing the outgoing lines in each unit for all dimensions

getUnitsWithStopsOnThemAndHowMany

private Hashtable<Point2D,Integer> getUnitsWithStopsOnThemAndHowMany()
Get a Hashtable of unit coordinates and the number of centres which lie on it.


getComponentsInDirection

private int[] getComponentsInDirection(Point2D currentSOMUnit,
                                       int i_direction)
Gets components which have links in the given direction.


createSnappedMetroLayout

private void createSnappedMetroLayout(Graphics2D g,
                                      GrowingLayer layer)
Organises all metro drawing for snapped lines, i.e. the layouting for parallel lines.

Parameters:
g - thingy to draw on

createStations

private void createStations(Graphics2D g)
Draw metro stations on top of existing maps. A metro station is drawn as a large ellipse with dark border. In contrast to normal stops which are drawn on the bin centres, stations are drawn whenever: 1) several bin centres are located on the same unit 2) lines that were parallel are not so anymore (merging of lines) 3) several lines have stops on the same unit

Parameters:
g - thingy to draw on

doSelection

private Point2D[][] doSelection(Point2D[][] binCentres,
                                GrowingLayer layer)
                         throws SOMToolboxException
Computes the line selection, returns the selected lines

Throws:
SOMToolboxException

doAggregation

private Point2D[][] doAggregation(ArrayList<ComponentLine2D> binCentresAsList,
                                  GrowingLayer layer)
                           throws SOMToolboxException
Clustering of metro lines is done in here (i.e. aggregation step).

Returns:
new, aggregated bin centres
Throws:
SOMToolboxException

doSnapping

private Point2D[][] doSnapping(Point2D[][] binCentres,
                               GrowingLayer layer)
                        throws SOMToolboxException
Performs the snapping step, returns snapped lines

Throws:
SOMToolboxException

computeFinalComponentLines

private Point2D[][] computeFinalComponentLines(GrowingLayer layer)
                                        throws SOMToolboxException
Performs the computation of the new bin centres, therefore component aggregation, selection as well as snapping are handled

Returns:
new Point[][] of bin centres
Throws:
SOMToolboxException

drawComponentLineSegment

private void drawComponentLineSegment(Point2D begin,
                                      Point2D end,
                                      Graphics2D g,
                                      int component,
                                      boolean keepCurrentStroke)
Draws a line segment for the given component.

Parameters:
begin - begin coordinates
end - end coordinates
component - does it for a given component
keepCurrentStroke - whether or not to keep the current line stroke (and not modify it to use e.g. dashes, ...; used when for exporting small images)

getNextCoords

private Point2D getNextCoords(Point2D currentPoint,
                              int[] directions)
return the coordinates on the som grid for the next unit in the given direction

Parameters:
currentPoint - start point
directions - directions to next point
Returns:
next point as directed to in directions

getDirection

private int getDirection(Point2D current,
                         Point2D next)
returns the direction between two nodes based on the following scheme: 0 7 left up up right up 1 \ | / 6 left - * - right 6 / | \ 5 left down down right down 3 4

Parameters:
current - current node
next - next node to go to
Returns:
dir from current to next

getDirectionArray

private int[] getDirectionArray(Point2D current,
                                Point2D next)
get a direction array for the given points its indices are set to on for outgoing directions and it takes the form given in

Parameters:
current - current node
next - next node
Returns:
array for outgoing lines (boolean in this case)
See Also:
getDirection(Point2D, Point2D)

getDirectionArray

private int[] getDirectionArray(Point2D current,
                                Point2D next,
                                int[] directions)
update a given direction array for the given points its indices are set to on for outgoing directions and it takes the form given in

Parameters:
current - current node
next - next node
directions - -
Returns:
array for outgoing lines (counts for outgoing directions this time)
See Also:
getDirection(Point2D, Point2D)

countOutgoingLines

private Hashtable<Point2D,int[]> countOutgoingLines(Point2D[] line,
                                                    Hashtable<Point2D,int[]> outgoingLineTable)

snap

private Point2D[] snap(Point2D[] line,
                       int xSize,
                       int ySize)
Returns a snapped line of the given line. Snapping the metro lines means to find a line as similar as possible to the given line, which has all bin centres in the unit centres, and line segments are connected in multiples of 45° degree angles to each other.
TODO: Consider disallowing 135° / 315° as too sharp turns.


snapPoint

private Point2D[] snapPoint(Point2D startPoint,
                            Point2D[] line,
                            int currentPosition,
                            int direction,
                            int xSize,
                            int ySize,
                            int bins)
Snaps the next point on the line.

Parameters:
startPoint - the point to start from
line - the line to snap
currentPosition - the current position on the line
direction - forward (1) or backwards (-1)
xSize - x-size of the map
ySize - y-size of the map
bins - number of bins
Returns:
a snapped line

getComponentName

private String getComponentName(int i)
VISUALISATION IMPROVEMENTS ***********************


getComponentNames

private String[] getComponentNames()

reInitVis

private void reInitVis()

initDashPatterns

private float[][] initDashPatterns()

getColours

public Color[] getColours(int components)

getColour

public Color getColour(int component)

getNeighbouringUnits

public Point2D[] getNeighbouringUnits(Point2D p)
Finds the four units around the given point.


setInputObjects

public void setInputObjects(SharedSOMVisualisationData inputObjects)
Description copied from class: AbstractBackgroundImageVisualizer
Implementing sub-classes shall override this method if they need to set some specific input object related information.

Specified by:
setInputObjects in interface BackgroundImageVisualizer
Overrides:
setInputObjects in class AbstractBackgroundImageVisualizer
Parameters:
inputObjects - the new input objects
See Also:
SOMVisualisationData

setSOMData

public void setSOMData(SOMInputReader reader)
Description copied from class: AbstractBackgroundImageVisualizer
Implementing sub-classes shall override this method if they need to set some specific input-data related information.

Specified by:
setSOMData in interface BackgroundImageVisualizer
Overrides:
setSOMData in class AbstractBackgroundImageVisualizer
Parameters:
reader - the som input reader

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