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

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


    }

    // 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 processNewResult(HierarchicalResult baseResult, Result newResult) {
    final ArrayList<EvaluateClustering.ScoreResult> srs = ResultUtil.filterResults(newResult, EvaluateClustering.ScoreResult.class);
    for(EvaluateClustering.ScoreResult sr : srs) {
      final VisualizationTask task = new VisualizationTask(NAME, sr, null, this);
      task.width = .5;
      task.height = 2.0;
      task.put(VisualizationTask.META_LEVEL, VisualizationTask.LEVEL_STATIC);
      baseResult.getHierarchy().add(sr, task);
    }
  }
View Full Code Here

      // TODO: we can also visualize other scores!
      List<OutlierResult> ors = ResultUtil.filterResults(result, OutlierResult.class);
      for(OutlierResult o : ors) {
        IterableIterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
        for(ScatterPlotProjector<?> p : ps) {
          final VisualizationTask task = new VisualizationTask(NAME, o.getScores(), p.getRelation(), this);
          task.put(VisualizationTask.META_TOOL, true);
          task.put(VisualizationTask.META_VISIBLE_DEFAULT, false);
          baseResult.getHierarchy().add(o.getScores(), task);
          baseResult.getHierarchy().add(p, task);
        }
      }
      List<Relation<?>> rrs = ResultUtil.filterResults(result, Relation.class);
      for(Relation<?> r : rrs) {
        if(!TypeUtil.DOUBLE.isAssignableFromType(r.getDataTypeInformation())) {
          continue;
        }
        // Skip if we already considered it above
        boolean add = true;
        for(Result p : baseResult.getHierarchy().getChildren(r)) {
          if(p instanceof VisualizationTask && ((VisualizationTask) p).getFactory() instanceof Factory) {
            add = false;
            break;
          }
        }
        if(add) {
          IterableIterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(baseResult, ScatterPlotProjector.class);
          for(ScatterPlotProjector<?> p : ps) {
            final VisualizationTask task = new VisualizationTask(NAME_GEN, r, p.getRelation(), this);
            task.put(VisualizationTask.META_TOOL, true);
            task.put(VisualizationTask.META_VISIBLE_DEFAULT, false);
            baseResult.getHierarchy().add(r, task);
            baseResult.getHierarchy().add(p, task);
          }
        }
      }
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) {
    final IterableIterator<IterableResult<?>> iterableResults = ResultUtil.filteredResults(result, IterableResult.class);
    final IterableIterator<IterableResult<DoubleDoublePair>> curves = new CurveFilter(iterableResults);
    for (IterableResult<DoubleDoublePair> curve : curves) {
      final VisualizationTask task = new VisualizationTask(NAME, curve, null, this);
      task.width = 1.0;
      task.height = 1.0;
      task.put(VisualizationTask.META_LEVEL, VisualizationTask.LEVEL_STATIC);
      baseResult.getHierarchy().add(curve, task);
    }
  }
View Full Code Here

    @Override
    public void processNewResult(HierarchicalResult baseResult, Result result) {
      Iterator<ScatterPlotProjector<?>> ps = ResultUtil.filteredResults(result, ScatterPlotProjector.class);
      for(ScatterPlotProjector<?> p : IterableUtil.fromIterator(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);
        baseResult.getHierarchy().add(p, task);
      }
    }
View Full Code Here

      IterableIterator<StyleResult> styleres = ResultUtil.filteredResults(result, StyleResult.class);
      for(StyleResult c : styleres) {
        IterableIterator<HistogramProjector<?>> ps = ResultUtil.filteredResults(baseResult, HistogramProjector.class);
        for(HistogramProjector<?> p : ps) {
          // register self
          final VisualizationTask task = new VisualizationTask(CNAME, 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 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_BACKGROUND);
        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.