Package systole.view.charts

Examples of systole.view.charts.XYChart


            if ((x == 0) || (y == 0)) {
                x = this.jPnlSelection.getWidth() / 4;
                y = this.jPnlSelection.getHeight() - 15;
            }
            Dimension dim = new Dimension(x, y);
            XYChart chart;
            String name;
            ChartPanel pnl;
            Segment currentSegment = this.analysisControl.getAnalysis().getAllSegments().getSegments().elementAt(
                    item);
            name = "Segmento: " + (item);
            chart = new XYChart(name);
            chart.addSeries(name, currentSegment.toDoubleArray(), 1);
            chart.setShowLegend(false);
            chart.setShowTitle(false);
            pnl = chart.plot();
            pnl.setMouseZoomable(false);
            pnl.setPopupMenu(null);
            JPnlItemFlow img = new JPnlItemFlow(item, pnl,
                    this);
            img.setPreferredSize(dim);
View Full Code Here


    private void filter() {
        FilterSettings filtSet = new FilterSettings();
        filtSet.createDefault(this.currentAnalysis.getSignalFrequency().getFrequency().doubleValue());

        // primer grafico -> señal cruda
        XYChart rawSignal = new XYChart("Señal Original", "Muestras", "Amplitud (%)");
        rawSignal.setShowLegend(false);
        rawSignal.addSeries("Tren de Pulsos", this.currentAnalysis.getRawSignal().getSegment().toDoubleArray(), 1);
        this.rawSignalChart = rawSignal.plot();
        // onda filtrada
        this.segment = FilterProcessor.filterPulseWave(this.currentAnalysis.getRawSignal().getSegment(), filtSet);

        if (this.currentAnalysis.getRawSignal().isInverted()) {
            this.segment = this.segment.invert();
        }

        // segundo grafico -> señal invertida y filtrada
        this.filteredSignalModel = new XYChart("Señal Filtrada", "Muestras", "Amplitud (%)");
        this.filteredSignalModel.addSeries("Tren de Pulsos", this.segment.toDoubleArray(), 1);
        this.filteredSignalModel.setShowLegend(false);
        this.filteredSignalChart = this.filteredSignalModel.plot();

    }
View Full Code Here

        Vector<Segment> slicedSegments = this.allSegments.getSegments();
        if ((slicedSegments != null) && (!slicedSegments.isEmpty())) {
            this.items = new Vector<ImageFlowItem>();
            this.images = new Vector<Image>();
            ImageFlowItem flowItem;
            XYChart thumb;
            this.selectionItems = new Vector<SelectionItem>();
            for (int i = 0; i < slicedSegments.size(); i++) {
                thumb = new XYChart("Segmento " + (i + 1));
                thumb.setShowLegend(false);
                thumb.addSeries("", slicedSegments.elementAt(i).toDoubleArray(), 1);
                flowItem = new ImageFlowItem(thumb.plotThumbnail(225, 225, false), "Segmento " + (i + 1));
                this.items.add(flowItem);
                thumb.setShowTitle(false);
                this.images.add(thumb.plotThumbnail(200, 150, false));
                this.selectionItems.add(new SelectionItem(i));
            }
            this.sliced = true;
        }
    }
View Full Code Here


    private XYChart buildFilterScheme(int maxFrequency){

        //Construccion del grafico representativo de un filtro pasabajos
        XYChart filter = new XYChart("Filtro PasaBajos","Frecuencias (Hz)","Amplitud (dB)");
        double[] dataset = new double[maxFrequency];

        int i,db;
        for (i = 0, db = 0; i < 17; i++){ dataset[i] = 0;}                  //Los primeros 17 valores son 0db
        for (i = 17; i < 20; i++, db--){ dataset[i] = db - 1;}              //Del 17 al 20 caen a -3db
        for (i = 20, db = -20; i < dataset.length; i++){ dataset[i] = db;//Del 20 en adelante valen -20db
        filter.addSeries("", dataset, 1);
        filter.setShowLegend(false);
       
        return filter;

    }
View Full Code Here

    public void previewFilter(){

        //Llamo a refiltrar - estos debieran ser parametros de esta clase y no de metodo
        Segment refiltered = FilterProcessor.filterPulseWave(this.logic.getAnalysis().getRawSignal().getSegment(), this.setupSettings());

        XYChart previewChart = new XYChart("Señal Filtrada - Vista Previa","Muestras","Amplitud(%)");
        previewChart.setShowLegend(false);
        previewChart.addSeries("", refiltered.toDoubleArray(), 1);

        this.jPnlFilteredSignal.removeAll();
        this.jPnlFilteredSignal.add(previewChart.plot());
        this.jPnlFilteredSignal.revalidate();

        this.btnApplyFilter.setEnabled(true);

    }
View Full Code Here

    public void loadSegments() {

        ResultsModel model = this.analysisController.getResultsModel();

        double xScaleFactor = this.analysisController.getAnalysis().getSignalFrequency().getFrequency().doubleValue();
        this.paramsChart = new XYChart("Parámetros Segmento Final", "Tiempo (ms)", "Amplitud (%)");
        this.paramsChart.addSeries("Latido", model.getCurrentFinalSignal().getFinalSegment().toDoubleArray(), xScaleFactor);
        this.paramsChart.addSeries("Derivada 2da", model.getCurrentFinalSignal().getSecondDerivative().toDoubleArray(), xScaleFactor);
        this.paramsChart.addSeries("Derivada 4ta", model.getCurrentFinalSignal().getFourthDerivative().toDoubleArray(), xScaleFactor);
        this.paramsChartPanel = this.paramsChart.plot();
        this.paramsChartPanel.getChart().getXYPlot().setDomainCrosshairVisible(true);
View Full Code Here

TOP

Related Classes of systole.view.charts.XYChart

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.