Package com.visitrend.ndvis.gui.spi

Examples of com.visitrend.ndvis.gui.spi.DataVisualization


        if (ow.isCanceled()) {
            // then do nothing
            return;
        } else {
            short[] optimal = ow.getOptimal();
            DataVisualization dataVis = view.getActiveDataVisualization();
            dataVis.getLookup().lookup(Parameters.class).setParamOrder(optimal);
            /*
             * Make the colorEngine color the current image. The color engine
             * will update its order from Parameters, which has been set
             * directly above, and then color the image accordingly.
             */
            ColorEngine e = dataVis.getLookup().lookup(ColorMapper.class).getEngine();
            e.colorImage(dataVis);
        }
        view.makeActiveVisualizationVisible();
    }
View Full Code Here


    // axis dimensions
    public Optimizer() {
    }

    public static short[] flipOptimize(NDVis view) {
        DataVisualization dataVis = view.getActiveDataVisualization();
        ColorEngine engine = dataVis.getLookup().lookup(ColorMapper.class).getEngine();
        // TODO: why are you getting the number of parameters on X from the
        // color engine instead of parameters?
        int numParametersOnX = dataVis.getLookup().lookup(Parameters.class).getNumParametersOnX();
        int[] rgb = engine.getPixels();
        int[] rgbCopy = new int[rgb.length];
        short[] currentOrder = engine.getCurrentOrder();
        short[] bestOrder = PermutorCombinator.cloneShorts(engine.getCurrentOrder());
        // I leave this as being a local reference to bases because the user may
        // actually set a different value while this processing is happening
        short[] bases = view.getDataInfoForVisualization(
                dataVis).getBases();
        ParametersUtils paramUtils = dataVis.getLookup().lookup(Parameters.class).getParametersUtils();

        // score the current image
        int score = Score0.score(paramUtils, currentOrder, numParametersOnX,
                rgb, Integer.MAX_VALUE);
        int bestScore = score;
View Full Code Here

        Vector data = new Vector();
        colorQueryPanel.setQueries(data);
    }

    public void colorsMapped(MapColorsEvent evt) {
        DataVisualization imagePanel = dataVis;
//        ImagePanel imagePanel = view.getLookup().lookup(ImagePanel.class);
        // If there is no image then there's nothing to paint on so return
        if (imagePanel == null) {
//            JOptionPane.showMessageDialog(null,
//                    "You must first create a new image in \n"
//                    + "the main application.  You can do that now \n"
//                    + "and come back to this window, you're queries \n"
//                    + "will still be here.");
            return;
        }

        // if we get here we have an image to work with
        // set the cursor on the on image
        // panel in the view to the wait cursor
        imagePanel.getImagePane().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));

        // construct some pixel representations to work on
        int[] pix = new int[engine.getPixels().length];
        // make sure the pix default to being white
        engine.resetPixels(pix);
View Full Code Here

TOP

Related Classes of com.visitrend.ndvis.gui.spi.DataVisualization

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.