Package ij.measure

Examples of ij.measure.ResultsTable


  
   public void lostOwnership (Clipboard clip, Transferable cont) {}

  void duplicate() {
    if (rt==null) return;
    ResultsTable rt2 = (ResultsTable)rt.clone();
    String title2 = IJ.getString("Title:", "Results2");
    if (!title2.equals("")) {
      if (title2.equals("Results")) title2 = "Results2";
      rt2.show(title2);
    }
  }
View Full Code Here


      Recorder.recordString("IJ.renameResults(\""+title2+"\");\n");
  }

  void duplicate() {
    if (rt==null) return;
    ResultsTable rt2 = (ResultsTable)rt.clone();
    String title2 = IJ.getString("Title:", "Results2");
    if (!title2.equals("")) {
      if (title2.equals("Results")) title2 = "Results2";
      rt2.show(title2);
    }
  }
View Full Code Here

      if (tp!=null) {
        if (!tp.saveAs(path))
          return false;
      }
    } else {
      ResultsTable rt = ResultsTable.getResultsTable();
      if (rt==null || rt.getCounter()==0)
        return false;
      if (path.equals("")) {
        SaveDialog sd = new SaveDialog("Save as Text", "Results", Prefs.get("options.ext", ".xls"));
        String file = sd.getFileName();
        if (file == null) return false;
        path = sd.getDirectory() + file;
      }
      try {
        rt.saveAs(path);
      } catch (IOException e) {
        IJ.error(""+e);
      }
    }
    return true;
View Full Code Here

    for(int i = 0; i<plot.storedData.size(); i+=2) {
      float[] column = (float[])plot.storedData.get(i);
      int s = column.length;
      if (column.length>max) max=column.length;
    }
    ResultsTable rt = new ResultsTable();
    for (int row=0; row<max; row++) {
      rt.incrementCounter();
      for (int i=0; i<sets; i++) {
        float[] x = (float[])plot.storedData.get(i*2);
        float[] y = (float[])plot.storedData.get(i*2+1);
        if (row<x.length) rt.addValue("x"+i, x[row]);
        if (row<y.length) rt.addValue("y"+i, y[row]);
      }
    }
    return rt;
  }
View Full Code Here

  }
 
  /** Opens a tab or comma delimited text file in the Results window. */
  public static void openResultsTable(String path) {
    try {
      ResultsTable rt = ResultsTable.open(path);
      if (rt!=null) rt.show("Results");
    } catch(IOException e) {
      IJ.error("Open Results", e.getMessage());
    }
  }
View Full Code Here

    if (rgbWeights!=null)
      ColorProcessor.setWeightingFactors(rgbWeights[0], rgbWeights[1], rgbWeights[2]);
    if (func.writer!=null) func.writer.close();
    func.roiManager = null;
    if (func.resultsPending) {
      ResultsTable rt = ResultsTable.getResultsTable();
      if (rt!=null && rt.getCounter()>0) rt.show("Results");
    }
  }
View Full Code Here

  /** Deletes 'row1' through 'row2' of the "Results" window. Arguments
       must be in the range 0-Analyzer.getCounter()-1. */
  public static void deleteRows(int row1, int row2) {
    int n = row2 - row1 + 1;
    ResultsTable rt = Analyzer.getResultsTable();
    for (int i=row1; i<row1+n; i++)
      rt.deleteRow(row1);
    rt.show("Results");
  }
View Full Code Here

      if (tp!=null) {
        if (!tp.saveAs(path))
          return false;
      }
    } else {
            ResultsTable rt = ResultsTable.getResultsTable();
            if (rt==null || rt.getCounter()==0)
                return false;
            if (path.equals("")) {
                SaveDialog sd = new SaveDialog("Save as Text", "Results", Prefs.get("options.ext", ".xls"));
                String file = sd.getFileName();
                if (file == null) return false;
                path = sd.getDirectory() + file;
            }
            PrintWriter pw = null;
            try {
                FileOutputStream fos = new FileOutputStream(path);
                BufferedOutputStream bos = new BufferedOutputStream(fos);
                pw = new PrintWriter(bos);
            }
            catch (IOException e) {
                IJ.log("MeasurementsWriter: "+e);
                return false;
            }
            int n = rt.getCounter();
            for (int i=0; i<n; i++) {
                pw.println(rt.getRowAsString(i));
            }
            pw.close();
        }
    return true;
  }
View Full Code Here

  
   public void lostOwnership (Clipboard clip, Transferable cont) {}

  void duplicate() {
    if (rt==null) return;
    ResultsTable rt2 = (ResultsTable)rt.clone();
    String title2 = IJ.getString("Title:", "Results2");
    if (!title2.equals("")) {
      if (title2.equals("Results")) title2 = "Results2";
      rt2.show(title2);
    }
  }
View Full Code Here

 
 
  private void buildAnalizer(int min, int max)
  {
    // Se construye el analizador
    rt = new ResultsTable();
    analizer = new ParticleAnalyzer(
        ParticleAnalyzer.SHOW_NONE | ParticleAnalyzer.FLOOD_FILL | ParticleAnalyzer.RECORD_STARTS,
        Measurements.CENTROID | Measurements.AREA | Measurements.RECT,
        rt,
        min,
View Full Code Here

TOP

Related Classes of ij.measure.ResultsTable

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.