Package ij.plugin.filter

Examples of ij.plugin.filter.Analyzer


  float[] getZAxisProfile(Roi roi, double minThreshold, double maxThreshold) {
    ImageStack stack = imp.getStack();
    int size = stack.getSize();
    float[] values = new float[size];
    Calibration cal = imp.getCalibration();
    Analyzer analyzer = new Analyzer(imp);
    int measurements = analyzer.getMeasurements();
    boolean showResults = measurements!=0 && measurements!=LIMIT;
    boolean showingLabels = (measurements&LABELS)!=0 || (measurements&SLICE)!=0;
    measurements |= MEAN;
    if (showResults) {
      if (!analyzer.resetCounter())
        return null;
    }
    int current = imp.getCurrentSlice();
    for (int i=1; i<=size; i++) {
      if (showingLabels) imp.setSlice(i);
      ImageProcessor ip = stack.getProcessor(i);
      if (minThreshold!=ImageProcessor.NO_THRESHOLD)
        ip.setThreshold(minThreshold,maxThreshold,ImageProcessor.NO_LUT_UPDATE);
      ip.setRoi(roi);
      ImageStatistics stats = ImageStatistics.getStatistics(ip, measurements, cal);
      analyzer.saveResults(stats, roi);
      if (showResults)     
        analyzer.displayResults();
      values[i-1] = (float)stats.mean;
    }
    if (showingLabels) imp.setSlice(current);
    return values;
  }
View Full Code Here


    }
    calibration = redirectImp!=null?redirectImp.getCalibration():imp.getCalibration();
   
    if (rt==null) {
      rt = Analyzer.getResultsTable();
      analyzer = new Analyzer(imp);
    } else
      analyzer = new Analyzer(imp, measurements, rt);
    if (resetCounter && slice==1) {
      if (!Analyzer.resetCounter())
        return false;
    }
    beginningCount = Analyzer.getCounter();
View Full Code Here

  }
 
  public void update(int measurements, ImagePlus imp, Roi roi) {
    if (roi==null && imp!=null) roi = imp.getRoi();
    ResultsTable rt2 = new ResultsTable();
    Analyzer analyzer = new Analyzer(imp, measurements, rt2);
    ImageProcessor ip = new ByteProcessor(1, 1);
    ImageStatistics stats = new ByteStatistics(ip, measurements, null);
    analyzer.saveResults(stats, roi);
    //IJ.log(rt2.getColumnHeadings());
    int last = rt2.getLastColumn();
    //IJ.log("update1: "+last+"  "+getMaxColumns());
    while (last+1>=getMaxColumns()) {
      addColumns();
View Full Code Here

  float[] getZAxisProfile(Roi roi, double minThreshold, double maxThreshold) {
    ImageStack stack = imp.getStack();
    int size = stack.getSize();
    float[] values = new float[size];
    Calibration cal = imp.getCalibration();
    Analyzer analyzer = new Analyzer(imp);
    int measurements = analyzer.getMeasurements();
    boolean showResults = measurements!=0 && measurements!=LIMIT;
    boolean showingLabels = (measurements&LABELS)!=0 || (measurements&SLICE)!=0;
    measurements |= MEAN;
    if (showResults) {
      if (!analyzer.resetCounter())
        return null;
    }
    int current = imp.getCurrentSlice();
    for (int i=1; i<=size; i++) {
      if (showingLabels) imp.setSlice(i);
      ImageProcessor ip = stack.getProcessor(i);
      if (minThreshold!=ImageProcessor.NO_THRESHOLD)
        ip.setThreshold(minThreshold,maxThreshold,ImageProcessor.NO_LUT_UPDATE);
      ip.setRoi(roi);
      ImageStatistics stats = ImageStatistics.getStatistics(ip, measurements, cal);
      analyzer.saveResults(stats, roi);
      if (showResults)     
        analyzer.displayResults();
      values[i-1] = (float)stats.mean;
    }
    if (showingLabels) imp.setSlice(current);
    return values;
  }
View Full Code Here

    }

    // See if the particles have been previously numbered
    // by surrounding them with a ROI and selecting "Measure"
    // in the desired order
    Analyzer an = new Analyzer();
    ResultsTable srt = an.getResultsTable();
    int nInitialCount = srt.getCounter();
    float[] sxInitial = srt.getColumn(ResultsTable.X_CENTROID);
    float[] syInitial = srt.getColumn(ResultsTable.Y_CENTROID);
   
    ImageStack stack = imp.getStack();
View Full Code Here

    }

    // See if the particles have been previously numbered
    // by surrounding them with a ROI and selecting "Measure"
    // in the desired order
    Analyzer an = new Analyzer();
    ResultsTable srt = an.getResultsTable();
    int nInitialCount = srt.getCounter();
    float[] sxInitial = srt.getColumn(ResultsTable.X_CENTROID);
    float[] syInitial = srt.getColumn(ResultsTable.Y_CENTROID);
   
    ImageStack stack = imp.getStack();
View Full Code Here

    }
    calibration = redirectImp!=null?redirectImp.getCalibration():imp.getCalibration();
   
    if (rt==null) {
      rt = Analyzer.getResultsTable();
      analyzer = new Analyzer(imp);
    } else
      analyzer = new Analyzer(imp, measurements, rt);
    if (resetCounter && slice==1) {
      if (!Analyzer.resetCounter())
                return false;
    }
    beginningCount = Analyzer.getCounter();
View Full Code Here

TOP

Related Classes of ij.plugin.filter.Analyzer

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.