public class NeighbourhoodGraph extends AbstractBackgroundImageVisualizer
Modifier and Type | Class and Description |
---|---|
private class |
NeighbourhoodGraph.NeighbourhoodControlPanel
The control panel for the two plug-ins, containing a JSpinner.
|
AbstractBackgroundImageVisualizer.ContourInterpolationMode, AbstractBackgroundImageVisualizer.ContourMode, AbstractBackgroundImageVisualizer.VisualizationControlPanel
Modifier and Type | Field and Description |
---|---|
private int |
currentVisualization |
private InputVectorDistanceMatrix |
distanceMatrix |
private InputData |
inputData |
private int |
k
number of neighbours for knn-based distances
|
private ArrayList<UnitPair>[] |
knnLinesCache
caches the results of knn-based connections
|
private static int |
MAX_K |
private static double |
MAX_RADIUS |
private DistanceMetric |
metric |
private static int |
MIN_K |
private static double |
MIN_RADIUS |
private NeighbourhoodGraph.NeighbourhoodControlPanel |
neighbourhoodPanel
control panel for this plug-in
|
(package private) int |
numVectors |
private double |
radius
radius for radius-based distances
|
private Hashtable<Double,ArrayList<UnitPair>> |
radiusLinesCache
caches the results of radius-based connections
|
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 |
---|
NeighbourhoodGraph()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
private ArrayList<UnitPair> |
createKNNBased(GrowingSOM gsom,
int width,
int height)
Returns a list of unit-pairs, for which at least one of the two units is one of the k-nearest neighbours of the
other one.
|
private ArrayList<UnitPair> |
createRadiusBased(GrowingSOM gsom,
int width,
int height)
Returns a list of unit-pairs, for which the distance of at least one of them to the other one is smaller than the
fixed radius.
|
BufferedImage |
createVisualization(int index,
GrowingSOM gsom,
int width,
int height)
Creates a visualisation image.
|
protected String |
getVisualisationSpecificCacheKey(int currentVariant) |
HashMap<String,BufferedImage> |
getVisualizationFlavours_K(int index,
GrowingSOM gsom,
int width,
int height) |
HashMap<String,BufferedImage> |
getVisualizationFlavours_R(int index,
GrowingSOM gsom,
int width,
int height) |
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) . |
String[] |
needsAdditionalFiles()
Checks whether this visualisation still needs some input files to generate an image.
|
buildCacheKey, checkNeededObjectsAvailable, checkVariantIndex, clearVisualisationCache, compareTo, createVisualization, drawBackground, escapeFileName, getCache, getCacheKey, getControlPanel, getDefaultVisualisationFileName, getDefaultVisualisationFileName, getHTMLVisualisationControl, getNumberOfVisualizations, getPreferredScaleFactor, getVariantException, getVisualization, getVisualizationDescription, getVisualizationDescriptions, getVisualizationName, getVisualizationNames, getVisualizationShortName, getVisualizationShortNames, invalidateCache, logImageCache, setInputObjects, setMap, setSOMData, setVisualizationUpdateListener
private static final int MIN_K
private static final int MAX_K
private static final double MIN_RADIUS
private static final double MAX_RADIUS
private int k
private double radius
private NeighbourhoodGraph.NeighbourhoodControlPanel neighbourhoodPanel
private int currentVisualization
private InputData inputData
private InputVectorDistanceMatrix distanceMatrix
private DistanceMetric metric
private ArrayList<UnitPair>[] knnLinesCache
private Hashtable<Double,ArrayList<UnitPair>> radiusLinesCache
int numVectors
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
private ArrayList<UnitPair> createKNNBased(GrowingSOM gsom, int width, int height) throws SOMToolboxException
SOMToolboxException
private ArrayList<UnitPair> createRadiusBased(GrowingSOM gsom, int width, int height) throws SOMToolboxException
SOMToolboxException
protected String getVisualisationSpecificCacheKey(int currentVariant)
getVisualisationSpecificCacheKey
in class AbstractBackgroundImageVisualizer
public HashMap<String,BufferedImage> getVisualizationFlavours_K(int index, GrowingSOM gsom, int width, int height) throws SOMToolboxException
SOMToolboxException
public HashMap<String,BufferedImage> getVisualizationFlavours_R(int index, GrowingSOM gsom, int width, int height) throws SOMToolboxException
SOMToolboxException
public HashMap<String,BufferedImage> getVisualizationFlavours(int index, GrowingSOM gsom, int width, int height) throws SOMToolboxException
AbstractBackgroundImageVisualizer
getVisualizationFlavours
in interface BackgroundImageVisualizer
getVisualizationFlavours
in class AbstractBackgroundImageVisualizer
SOMToolboxException
public HashMap<String,BufferedImage> getVisualizationFlavours(int index, 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 index, 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
public String[] needsAdditionalFiles()
BackgroundImageVisualizer
needsAdditionalFiles
in interface BackgroundImageVisualizer
needsAdditionalFiles
in class AbstractBackgroundImageVisualizer