Package de.lmu.ifi.dbs.elki.visualization

Examples of de.lmu.ifi.dbs.elki.visualization.VisualizationTask


      Collection<Clustering<?>> clusterings = ResultUtil.filterResults(result, Clustering.class);
      for(Clustering<?> c : clusterings) {
        if(c.getAllClusters().size() > 0) {
          Iterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
          for(ScatterPlotProjector<?> p : IterableUtil.fromIterator(ps)) {
            final VisualizationTask task = new VisualizationTask(NAME, c, p.getRelation(), this);
            task.put(VisualizationTask.META_LEVEL, VisualizationTask.LEVEL_DATA);
            baseResult.getHierarchy().add(c, task);
            baseResult.getHierarchy().add(p, task);
          }
        }
      }
View Full Code Here


  @Override
  public void processNewResult(HierarchicalResult baseResult, Result newResult) {
    List<HistogramResult<? extends NumberVector<?, ?>>> histograms = ResultUtil.filterResults(newResult, HistogramResult.class);
    for(HistogramResult<? extends NumberVector<?, ?>> histogram : histograms) {
      final VisualizationTask task = new VisualizationTask(NAME, histogram, null, this);
      task.width = 2.0;
      task.height = 1.0;
      task.put(VisualizationTask.META_LEVEL, VisualizationTask.LEVEL_STATIC);
      baseResult.getHierarchy().add(histogram, task);
    }
  }
View Full Code Here

    }

    // add tools
    Element[] toolTags = new Element[vis.size()];
    for(int i = 0; i < vis.size(); i++) {
      VisualizationTask v = vis.get(i);
      toolTags[i] = svgp.svgRect(x, y, width, height);
      String name = v.getLongName();
      // Split
      List<String> lines = FormatUtil.splitAtLastBlank(name, 8);
      // Generate label objects.
      for(int l = 0; l < lines.size(); l++) {
        Element selectRangeText = svgp.svgText(x + 0.01 * scale, y + (0.02 + 0.05 * l / lines.size()) * scale, lines.get(l));
View Full Code Here

  }

  @Override
  public void resultAdded(Result child, Result parent) {
    if(child instanceof VisualizationTask) {
      VisualizationTask task = (VisualizationTask) child;
      if(VisualizerUtil.isTool(task)) {
        synchronizedRedraw();
      }
    }
  }
View Full Code Here

  }

  @Override
  public void resultRemoved(Result child, Result parent) {
    if(child instanceof VisualizationTask) {
      VisualizationTask task = (VisualizationTask) child;
      if(VisualizerUtil.isTool(task)) {
        synchronizedRedraw();
      }
    }
  }
View Full Code Here

  }

  @Override
  public void resultChanged(Result current) {
    if(current instanceof VisualizationTask) {
      VisualizationTask task = (VisualizationTask) current;
      if(VisualizerUtil.isTool(task)) {
        synchronizedRedraw();
      }
    }
  }
View Full Code Here

    @Override
    public void processNewResult(HierarchicalResult baseResult, Result result) {
      IterableIterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(result, ScatterPlotProjector.class);
      for(ScatterPlotProjector<?> p : ps) {
        final VisualizationTask task = new VisualizationTask(NAME, p, p.getRelation(), this);
        task.put(VisualizationTask.META_LEVEL, VisualizationTask.LEVEL_INTERACTIVE);
        task.put(VisualizationTask.META_NOTHUMB, true);
        task.put(VisualizationTask.META_NOEXPORT, true);
        task.put(VisualizationTask.META_NOEMBED, true);
        baseResult.getHierarchy().add(p, task);
      }
    }
View Full Code Here

        if(TypeUtil.POLYGON_TYPE.isAssignableFromType(rel.getDataTypeInformation())) {
          // Assume that a 2d projector is using the same coordinates as the polygons.
          Iterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
          for(ScatterPlotProjector<?> p : IterableUtil.fromIterator(ps)) {
            if(DatabaseUtil.dimensionality(p.getRelation()) == 2) {
              final VisualizationTask task = new VisualizationTask(NAME, rel, p.getRelation(), this);
              task.put(VisualizationTask.META_LEVEL, VisualizationTask.LEVEL_DATA - 10);
              baseResult.getHierarchy().add(rel, task);
              baseResult.getHierarchy().add(p, task);
            }
          }
        }
View Full Code Here

      // Find clusterings we can visualize:
      Iterator<Clustering<?>> clusterings = ResultUtil.filteredResults(newResult, Clustering.class);
      while(clusterings.hasNext()) {
        Clustering<?> c = clusterings.next();
        if(c.getAllClusters().size() > 0) {
          final VisualizationTask task = new VisualizationTask(NAME, c, null, this);
          task.width = 1.0;
          task.height = 1.0;
          task.put(VisualizationTask.META_LEVEL, VisualizationTask.LEVEL_STATIC);
          task.put(VisualizationTask.META_NODETAIL, true);
          baseResult.getHierarchy().add(c, task);
        }
      }
    }
View Full Code Here

        if(TypeUtil.POLYGON_TYPE.isAssignableFromType(rel.getDataTypeInformation())) {
          // Assume that a 2d projector is using the same coordinates as the polygons.
          IterableIterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
          for(ScatterPlotProjector<?> p : ps) {
            if(DatabaseUtil.dimensionality(p.getRelation()) == 2) {
              final VisualizationTask task = new VisualizationTask(NAME, rel, p.getRelation(), this);
              task.put(VisualizationTask.META_LEVEL, VisualizationTask.LEVEL_DATA - 10);
              baseResult.getHierarchy().add(rel, task);
              baseResult.getHierarchy().add(p, task);
            }
          }
        }
View Full Code Here

TOP

Related Classes of de.lmu.ifi.dbs.elki.visualization.VisualizationTask

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.