Search in sources :

Example 36 with VisualizationTask

use of de.lmu.ifi.dbs.elki.visualization.VisualizationTask in project elki by elki-project.

the class OPTICSSteepAreaVisualization method processNewResult.

@Override
public void processNewResult(VisualizerContext context, Object result) {
    VisualizationTree.findVis(context, result).filter(OPTICSProjector.class).forEach(p -> {
        ClusterOrder co = p.getResult();
        It<OPTICSXi.SteepAreaResult> r = co.getHierarchy().iterChildren(co).filter(OPTICSXi.SteepAreaResult.class);
        if (r.valid()) {
            final VisualizationTask task = // 
            new VisualizationTask(this, NAME, p.getResult(), null).level(VisualizationTask.LEVEL_DATA + 1);
            context.addVis(p, task);
            context.addVis(r.get(), task);
        }
    });
}
Also used : VisualizationTask(de.lmu.ifi.dbs.elki.visualization.VisualizationTask) OPTICSProjector(de.lmu.ifi.dbs.elki.visualization.projector.OPTICSProjector) ClusterOrder(de.lmu.ifi.dbs.elki.algorithm.clustering.optics.ClusterOrder) OPTICSXi(de.lmu.ifi.dbs.elki.algorithm.clustering.optics.OPTICSXi)

Example 37 with VisualizationTask

use of de.lmu.ifi.dbs.elki.visualization.VisualizationTask in project elki by elki-project.

the class BoundingBoxVisualization method processNewResult.

@Override
public void processNewResult(VisualizerContext context, Object start) {
    VisualizationTree.findVis(context, start).filter(ParallelPlotProjector.class).forEach(p -> {
        final Relation<?> rel = p.getRelation();
        if (TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
            return;
        }
        if (!TypeUtil.SPATIAL_OBJECT.isAssignableFromType(rel.getDataTypeInformation())) {
            return;
        }
        context.addVis(p, // 
        new VisualizationTask(this, NAME, p.getRelation(), p.getRelation()).level(// 
        VisualizationTask.LEVEL_DATA).with(UpdateFlag.ON_DATA).with(UpdateFlag.ON_STYLEPOLICY).with(UpdateFlag.ON_SAMPLE));
    });
}
Also used : VisualizationTask(de.lmu.ifi.dbs.elki.visualization.VisualizationTask) ParallelPlotProjector(de.lmu.ifi.dbs.elki.visualization.projector.ParallelPlotProjector)

Example 38 with VisualizationTask

use of de.lmu.ifi.dbs.elki.visualization.VisualizationTask in project elki by elki-project.

the class LineVisualization method processNewResult.

@Override
public void processNewResult(VisualizerContext context, Object start) {
    VisualizationTree.findVis(context, start).filter(ParallelPlotProjector.class).forEach(p -> {
        final Relation<?> rel = p.getRelation();
        if (!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
            return;
        }
        context.addVis(p, // 
        new VisualizationTask(this, NAME, p.getRelation(), p.getRelation()).level(// 
        VisualizationTask.LEVEL_DATA).with(UpdateFlag.ON_DATA).with(UpdateFlag.ON_STYLEPOLICY).with(UpdateFlag.ON_SAMPLE));
    });
}
Also used : VisualizationTask(de.lmu.ifi.dbs.elki.visualization.VisualizationTask) ParallelPlotProjector(de.lmu.ifi.dbs.elki.visualization.projector.ParallelPlotProjector)

Example 39 with VisualizationTask

use of de.lmu.ifi.dbs.elki.visualization.VisualizationTask in project elki by elki-project.

the class ClusterOrderVisualization method processNewResult.

@Override
public void processNewResult(VisualizerContext context, Object start) {
    VisualizationTree.findNewSiblings(context, start, ClusterOrder.class, ScatterPlotProjector.class, (co, p) -> {
        final Relation<?> rel = p.getRelation();
        if (!TypeUtil.NUMBER_VECTOR_FIELD.isAssignableFromType(rel.getDataTypeInformation())) {
            return;
        }
        final VisualizationTask task = // 
        new VisualizationTask(this, NAME, co, rel).level(VisualizationTask.LEVEL_DATA - 1).visibility(// 
        false).with(UpdateFlag.ON_DATA);
        context.addVis(co, task);
        context.addVis(p, task);
    });
}
Also used : VisualizationTask(de.lmu.ifi.dbs.elki.visualization.VisualizationTask)

Example 40 with VisualizationTask

use of de.lmu.ifi.dbs.elki.visualization.VisualizationTask in project elki by elki-project.

the class TreeSphereVisualization method processNewResult.

@Override
public void processNewResult(VisualizerContext context, Object start) {
    VisualizationTree.findNewSiblings(context, start, AbstractMTree.class, ScatterPlotProjector.class, (tree, p) -> {
        Relation<?> rel = p.getRelation();
        if (!canVisualize(rel, tree)) {
            return;
        }
        final VisualizationTask task = // 
        new VisualizationTask(this, NAME, tree, rel).level(VisualizationTask.LEVEL_BACKGROUND + 1).visibility(false);
        context.addVis(tree, task);
        context.addVis(p, task);
    });
}
Also used : VisualizationTask(de.lmu.ifi.dbs.elki.visualization.VisualizationTask)

Aggregations

VisualizationTask (de.lmu.ifi.dbs.elki.visualization.VisualizationTask)44 ScatterPlotProjector (de.lmu.ifi.dbs.elki.visualization.projector.ScatterPlotProjector)10 ParallelPlotProjector (de.lmu.ifi.dbs.elki.visualization.projector.ParallelPlotProjector)7 Visualization (de.lmu.ifi.dbs.elki.visualization.visualizers.Visualization)7 PlotItem (de.lmu.ifi.dbs.elki.visualization.gui.overview.PlotItem)6 ArrayList (java.util.ArrayList)6 Element (org.w3c.dom.Element)4 ScalesResult (de.lmu.ifi.dbs.elki.result.ScalesResult)3 Relation (de.lmu.ifi.dbs.elki.database.relation.Relation)2 AbortException (de.lmu.ifi.dbs.elki.utilities.exceptions.AbortException)2 Projector (de.lmu.ifi.dbs.elki.visualization.projector.Projector)2 LabelVisualization (de.lmu.ifi.dbs.elki.visualization.visualizers.visunproj.LabelVisualization)2 PointerHierarchyRepresentationResult (de.lmu.ifi.dbs.elki.algorithm.clustering.hierarchical.PointerHierarchyRepresentationResult)1 ClusterOrder (de.lmu.ifi.dbs.elki.algorithm.clustering.optics.ClusterOrder)1 OPTICSXi (de.lmu.ifi.dbs.elki.algorithm.clustering.optics.OPTICSXi)1 PolygonsObject (de.lmu.ifi.dbs.elki.data.spatial.PolygonsObject)1 Database (de.lmu.ifi.dbs.elki.database.Database)1 UpdatableDatabase (de.lmu.ifi.dbs.elki.database.UpdatableDatabase)1 AffineTransformation (de.lmu.ifi.dbs.elki.math.linearalgebra.AffineTransformation)1 EvaluationResult (de.lmu.ifi.dbs.elki.result.EvaluationResult)1