Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d
Class TreeMBRVisualizer<NV extends NumberVector<NV,?>,N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>

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.vis2d.Projection2DVisualizer<NV>
              extended by de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.TreeMBRVisualizer<NV,N,E>
Type Parameters:
NV - Type of the DatabaseObject being visualized.
N - Tree node type
E - Tree entry type
All Implemented Interfaces:
Parameterizable, ProjectedVisualizer, Visualizer

public class TreeMBRVisualizer<NV extends NumberVector<NV,?>,N extends AbstractRStarTreeNode<N,E>,E extends SpatialEntry>
extends Projection2DVisualizer<NV>

Visualize the bounding rectangles of an rtree based index.

Author:
Erich Schubert

Field Summary
static String INDEX
          Generic tag to indicate the type of element.
static String NAME
          A short name characterizing 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
TreeMBRVisualizer()
          The default constructor only registers parameters.
 
Method Summary
 boolean canVisualize(VisualizerContext context)
          Test for a visualizable index in the context's database.
private  AbstractRStarTree<NV,N,E> findRStarTree(VisualizerContext context)
           
 void init(VisualizerContext context)
          Initializes this Visualizer.
private  void recDrawEdges(SVGPath path, DoubleDoublePair r_min, ArrayList<DoubleDoublePair> r_edges, int off, BitSet b)
           
 Element visualize(SVGPlot svgp, VisualizationProjection proj, double width, double height)
          Returns an Element representing a visualization.
private  void visualizeRTreeEntry(SVGPlot svgp, Element layer, VisualizationProjection proj, AbstractRStarTree<NV,? extends N,E> rtree, E entry, int depth)
          Recursively draw the MBR rectangles.
 
Methods inherited from class de.lmu.ifi.dbs.elki.visualization.visualizers.vis2d.Projection2DVisualizer
setupCanvas
 
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

INDEX

public static final String INDEX
Generic tag to indicate the type of element. Used in IDs, CSS-Classes etc.

See Also:
Constant Field Values

NAME

public static final String NAME
A short name characterizing this Visualizer.

See Also:
Constant Field Values
Constructor Detail

TreeMBRVisualizer

public TreeMBRVisualizer()
The default constructor only registers parameters.

Method Detail

init

public void init(VisualizerContext context)
Initializes this Visualizer.

Parameters:
context - Visualization context

findRStarTree

private AbstractRStarTree<NV,N,E> findRStarTree(VisualizerContext context)

visualize

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

Parameters:
svgp - plot to contain the returned Element.
proj - projection to use
width - Width of plot
height - Height of plot
Returns:
an Element representing a 2-dimensional visualization.

visualizeRTreeEntry

private void visualizeRTreeEntry(SVGPlot svgp,
                                 Element layer,
                                 VisualizationProjection proj,
                                 AbstractRStarTree<NV,? extends N,E> rtree,
                                 E entry,
                                 int depth)
Recursively draw the MBR rectangles.

Parameters:
svgp - SVG Plot
layer - Layer
proj - Projection
rtree - Rtree to visualize
entry - Current entry
depth - Current depth

recDrawEdges

private void recDrawEdges(SVGPath path,
                          DoubleDoublePair r_min,
                          ArrayList<DoubleDoublePair> r_edges,
                          int off,
                          BitSet b)

canVisualize

public boolean canVisualize(VisualizerContext context)
Test for a visualizable index in the context's database.

Parameters:
context - Visualization context
Returns:
whether there is a visualizable index

Release 0.3 (2010-03-31_1612)