Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.visualizers.visunproj
Class OPTICSPlotVisualizer<D extends Distance<?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
          extended by de.lmu.ifi.dbs.elki.visualization.visualizers.visunproj.OPTICSPlotVisualizer<D>
Type Parameters:
D - Distance type
All Implemented Interfaces:
Parameterizable, UnprojectedVisualizer, Visualizer

public class OPTICSPlotVisualizer<D extends Distance<?>>
extends AbstractVisualizer
implements UnprojectedVisualizer

Visualize an OPTICS result by constructing an OPTICS plot for it.

Author:
Erich Schubert

Field Summary
(package private)  ClusterOrderResult<D> co
          Curve to visualize
private  File imgfile
          The image we generated.
private  double imgratio
          The height/width ratio of the image.
private  LinearScale linscale
          The scale
private static String NAME
          Name for this visualizer.
 
Fields inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
context, metadata
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Fields inherited from interface de.lmu.ifi.dbs.elki.visualization.visualizers.Visualizer
LEVEL_BACKGROUND, LEVEL_FOREGROUND, LEVEL_INTERACTIVE, LEVEL_STATIC, META_LEVEL, META_NAME, META_NOTHUMB, META_VISIBLE, META_VISIBLE_DEFAULT
 
Constructor Summary
OPTICSPlotVisualizer()
           
 
Method Summary
static
<D extends Distance<?>>
boolean
canPlot(ClusterOrderResult<D> co)
          Test whether we have an adapter for this cluster orders distance.
private static
<D extends Distance<?>>
OPTICSDistanceAdapter<D>
getAdapterForDistance(ClusterOrderResult<D> co)
          Try to find a distance adapter.
 void init(VisualizerContext context, ClusterOrderResult<D> co)
          Initialization.
protected  void makePlot()
          Make the optics plot
 Element visualize(SVGPlot svgp, double width, double height)
          Returns an Element representing a visualization.
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.AbstractVisualizer
addRedrawListener, fireRedrawEvent, getMetadata, init, removeRedrawListener, requestRedraw, setLevel
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.visualization.visualizers.Visualizer
addRedrawListener, getMetadata, removeRedrawListener
 

Field Detail

NAME

private static final String NAME
Name for this visualizer.

See Also:
Constant Field Values

co

ClusterOrderResult<D extends Distance<?>> co
Curve to visualize


imgfile

private File imgfile
The image we generated.


imgratio

private double imgratio
The height/width ratio of the image.


linscale

private LinearScale linscale
The scale

Constructor Detail

OPTICSPlotVisualizer

public OPTICSPlotVisualizer()
Method Detail

init

public void init(VisualizerContext context,
                 ClusterOrderResult<D> co)
Initialization.

Parameters:
context - context.
co - Cluster order to visualize

makePlot

protected void makePlot()
                 throws IOException
Make the optics plot

Throws:
IOException

getAdapterForDistance

private static <D extends Distance<?>> OPTICSDistanceAdapter<D> getAdapterForDistance(ClusterOrderResult<D> co)
Try to find a distance adapter.

Returns:
distance adapter

canPlot

public static <D extends Distance<?>> boolean canPlot(ClusterOrderResult<D> co)
Test whether we have an adapter for this cluster orders distance.

Type Parameters:
D - distance type
Parameters:
co - Cluster order
Returns:
true when we do find a matching adapter.

visualize

public Element visualize(SVGPlot svgp,
                         double width,
                         double height)
Description copied from interface: UnprojectedVisualizer
Returns an Element representing a visualization.

Specified by:
visualize in interface UnprojectedVisualizer
Parameters:
svgp - the SVGPlot which will act as owner for the returned Element.
width - Width of plot
height - Height of plot
Returns:
an Element representing a 2-dimensional visualization.

Release 0.3 (2010-03-31_1612)