ij.plugin.filter.Analyzer.resetCounter()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(6.0k)|赞(0)|评价(0)|浏览(145)

本文整理了Java中ij.plugin.filter.Analyzer.resetCounter()方法的一些代码示例,展示了Analyzer.resetCounter()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analyzer.resetCounter()方法的具体详情如下:
包路径:ij.plugin.filter.Analyzer
类名称:Analyzer
方法名:resetCounter

Analyzer.resetCounter介绍

[英]Sets the measurement counter to zero. Displays a dialog that allows the user to save any existing measurements. Returns false if the user cancels the dialog.
[中]将测量计数器设置为零。显示一个对话框,允许用户保存任何现有测量值。如果用户取消对话框,则返回false。

代码示例

代码示例来源:origin: net.imagej/ij

public int setup(String arg, ImagePlus imp) {
  this.arg = arg;
  this.imp = imp;
  IJ.register(Analyzer.class);
  if (arg.equals("set")) {
    doSetDialog();
    return DONE;
  } else if (arg.equals("sum")) {
    summarize();
    return DONE;
  } else if (arg.equals("clear")) {
    if (IJ.macroRunning())
      unsavedMeasurements = false;
    resetCounter();
    return DONE;
  } else
    return DOES_ALL+NO_CHANGES;
}

代码示例来源:origin: net.imagej/ij

boolean reset() {
  boolean ok = true;
  if (rt.size()>0 && !disableReset)
    ok = resetCounter();
  if (ok && rt.getColumnHeading(ResultsTable.LAST_HEADING)==null)
    rt.setDefaultHeadings();
  return ok;
}

代码示例来源:origin: imagej/ImageJA

boolean reset() {
  boolean ok = true;
  if (rt.size()>0 && !disableReset)
    ok = resetCounter();
  if (ok && rt.getColumnHeading(ResultsTable.LAST_HEADING)==null)
    rt.setDefaultHeadings();
  return ok;
}

代码示例来源:origin: imagej/ImageJA

public int setup(String arg, ImagePlus imp) {
  this.arg = arg;
  this.imp = imp;
  IJ.register(Analyzer.class);
  if (arg.equals("set")) {
    doSetDialog();
    return DONE;
  } else if (arg.equals("sum")) {
    summarize();
    return DONE;
  } else if (arg.equals("clear")) {
    if (IJ.macroRunning())
      unsavedMeasurements = false;
    resetCounter();
    return DONE;
  } else
    return DOES_ALL+NO_CHANGES;
}

代码示例来源:origin: zitmen/thunderstorm

Analyzer.resetCounter();
ResultsTable rt = ResultsTable.getResultsTable();
for (int i=0; i<npoints; i++) {

代码示例来源:origin: net.imagej/ij

if (IJ.isResultsWindow() && IJ.getTextPanel()==this) {
  Analyzer.setUnsavedMeasurements(false);
  Analyzer.resetCounter();
} else
  rt.reset();

代码示例来源:origin: imagej/ImageJA

if (IJ.isResultsWindow() && IJ.getTextPanel()==this) {
  Analyzer.setUnsavedMeasurements(false);
  Analyzer.resetCounter();
} else
  rt.reset();

代码示例来源:origin: net.imagej/ij

Analyzer.resetCounter();
ResultsTable rt = ResultsTable.getResultsTable();
for (int i=0; i<npoints; i++) {

代码示例来源:origin: net.imagej/ij

/** Closes this TextWindow. Display a "save changes" dialog
  if this is the "Results" window and 'showDialog' is true. */
public void close(boolean showDialog) {
  if (getTitle().equals("Results")) {
    if (showDialog && !Analyzer.resetCounter())
      return;
    IJ.setTextPanel(null);
    Prefs.saveLocation(LOC_KEY, getLocation());
    Dimension d = getSize();
    Prefs.set(WIDTH_KEY, d.width);
    Prefs.set(HEIGHT_KEY, d.height);
  } else if (getTitle().equals("Log")) {
    Prefs.saveLocation(LOG_LOC_KEY, getLocation());
    Dimension d = getSize();
    Prefs.set(LOG_WIDTH_KEY, d.width);
    Prefs.set(LOG_HEIGHT_KEY, d.height);
    IJ.setDebugMode(false);
    IJ.log("\\Closed");
    IJ.notifyEventListeners(IJEventListener.LOG_WINDOW_CLOSED);
  } else if (getTitle().equals("Debug")) {
    Prefs.saveLocation(DEBUG_LOC_KEY, getLocation());
  } else if (textPanel!=null && textPanel.rt!=null) {
    if (!saveContents()) return;
  }
  //setVisible(false);
  dispose();
  WindowManager.removeWindow(this);
  textPanel.flush();
}

代码示例来源:origin: net.imagej/ij

Analyzer.setUnsavedMeasurements(false);
Analyzer.setResultsTable(null);
Analyzer.resetCounter();

代码示例来源:origin: imagej/ImageJA

Analyzer.setUnsavedMeasurements(false);
Analyzer.setResultsTable(null);
Analyzer.resetCounter();

代码示例来源:origin: imagej/ImageJA

/** Closes this TextWindow. Display a "save changes" dialog
  if this is the "Results" window and 'showDialog' is true. */
public void close(boolean showDialog) {
  if (getTitle().equals("Results")) {
    if (showDialog && !Analyzer.resetCounter())
      return;
    IJ.setTextPanel(null);
    Prefs.saveLocation(LOC_KEY, getLocation());
    Dimension d = getSize();
    Prefs.set(WIDTH_KEY, d.width);
    Prefs.set(HEIGHT_KEY, d.height);
  } else if (getTitle().equals("Log")) {
    Prefs.saveLocation(LOG_LOC_KEY, getLocation());
    Dimension d = getSize();
    Prefs.set(LOG_WIDTH_KEY, d.width);
    Prefs.set(LOG_HEIGHT_KEY, d.height);
    IJ.setDebugMode(false);
    IJ.log("\\Closed");
    IJ.notifyEventListeners(IJEventListener.LOG_WINDOW_CLOSED);
  } else if (getTitle().equals("Debug")) {
    Prefs.saveLocation(DEBUG_LOC_KEY, getLocation());
  } else if (textPanel!=null && textPanel.rt!=null) {
    if (!saveContents()) return;
  }
  //setVisible(false);
  dispose();
  WindowManager.removeWindow(this);
  textPanel.flush();
}

代码示例来源:origin: sc.fiji/Simple_Neurite_Tracer

public void addToResultsTable() {
  final ResultsTable rt = Analyzer.getResultsTable();
  if (!Analyzer.resetCounter())
    return;
  rt.incrementCounter();
  rt.addValue("Filename", getOriginalFilename());
  rt.addValue("All paths used", String.valueOf(useAllPaths));
  rt.addValue("Paths used", numberOfPathsUsed);
  rt.addValue("Sphere separation", sphereSeparation);
  rt.addValue("Normalization", normalization);
  rt.addValue("Axes", axes);
  rt.addValue("Max inters. radius", getCriticalValue());
  rt.addValue("Max inters.", getDendriteMaximum());
  rt.addValue("Regression coefficient", getShollRegressionCoefficient());
  rt.addValue("Regression gradient", getRegressionGradient());
  rt.addValue("Regression intercept", getRegressionIntercept());
  rt.show("Results");
}

代码示例来源:origin: sc.fiji/Stack_Manipulation

measurements |= MEAN;
if (showResults) {
  if (!analyzer.resetCounter())
    return null;

代码示例来源:origin: net.imagej/ij

measurements |= MEAN;
if (showResults) {
  if (!Analyzer.resetCounter())
    return null;

代码示例来源:origin: imagej/ImageJA

measurements |= MEAN;
if (showResults) {
  if (!Analyzer.resetCounter())
    return null;

代码示例来源:origin: net.imagej/ij

measurements |= MEAN;
if (showResults) {
  if (!Analyzer.resetCounter())
    return null;

代码示例来源:origin: imagej/ImageJA

measurements |= MEAN;
if (showResults) {
  if (!Analyzer.resetCounter())
    return null;

代码示例来源:origin: net.imagej/ij

if (!Analyzer.resetCounter())
  return false;

代码示例来源:origin: imagej/ImageJA

if (!Analyzer.resetCounter())
  return false;

相关文章