Search in sources :

Example 1 with ColorRGBAPainter

use of org.twak.viewTrace.ColorRGBAPainter in project chordatlas by twak.

the class SkelFootprint method go.

public HalfMesh2 go(List<Line> footprint, SkelGen skelGen, ProgressMonitor m) {
    this.skelGen = skelGen;
    PaintThing.lookup.put(ColorRGBA.class, new ColorRGBAPainter());
    PaintThing.debug.clear();
    SolverState SS;
    if (FALSE) {
        try {
            SS = (SolverState) new XStream().fromXML(new FileReader(new File("/media/twak/8bc5e750-9a70-4180-8eee-ced2fbba6484/data/regent/solutions/652.9836272423689_-455.4482046683377/solver_state.xml")));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
            SS = null;
        }
    } else {
        SS = buildFootprint(footprint, m, null, skelGen.blockGen);
        dbgCountProfileEdges(SS);
        if (SS == null)
            return null;
        if (FALSE) {
            PaintThing.debug.clear();
            dbgShowProfiles(SS.mesh, SS.globalProfs, SS.profFit, "edge fit");
            SS.debugSolverResult();
            m.close();
            return SS.mesh;
        }
        solve(SS, m, skelGen.blockGen.getSolutionFile(), Long.MAX_VALUE);
    }
    if (TRUE)
        postProcesss(SS);
    dbgCountProfileEdges(SS);
    dbgShowProfiles(SS.mesh, SS.globalProfs, SS.profFit, "edge fit");
    if (FALSE) {
        PaintThing.debug.clear();
        PaintThing.debug.put(1, footprint);
        SS.debugSolverResult();
    }
    return SS.mesh;
}
Also used : ColorRGBAPainter(org.twak.viewTrace.ColorRGBAPainter) XStream(com.thoughtworks.xstream.XStream) FileNotFoundException(java.io.FileNotFoundException) FileReader(java.io.FileReader) File(java.io.File)

Aggregations

XStream (com.thoughtworks.xstream.XStream)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 FileReader (java.io.FileReader)1 ColorRGBAPainter (org.twak.viewTrace.ColorRGBAPainter)1