From fc8c05e867d84bbfe1e533ffb7f66d814ecf3bff Mon Sep 17 00:00:00 2001 From: Wayne Rasband Date: Wed, 12 Jun 2024 20:09:37 -0400 Subject: [PATCH] 2024.06.12 (1.54j; Release version) --- functions.html | 8 +++++++- ij/ImageJ.java | 2 +- ij/gui/HistogramWindow.java | 13 ++++++++----- ij/macro/Functions.java | 19 ++++++++++++++++++- ij/plugin/Benchmark.java | 1 + release-notes.html | 14 +++++++++----- 6 files changed, 44 insertions(+), 13 deletions(-) diff --git a/functions.html b/functions.html index 2eea6f68..143c7f3c 100644 --- a/functions.html +++ b/functions.html @@ -5312,6 +5312,12 @@

Built-in Macro Functions

other types of windows if a title is specified as the fifth argument.
+ +Table.showHistogramTable - +Equivalent to clicking on "List" in a Histogram +window. +Requires 1.54j +
@@ -5459,7 +5465,7 @@

Built-in Macro Functions

-Last updated 2024/05/15 +Last updated 2024-06-12 diff --git a/ij/ImageJ.java b/ij/ImageJ.java index bca69cbf..83f784f2 100644 --- a/ij/ImageJ.java +++ b/ij/ImageJ.java @@ -79,7 +79,7 @@ public class ImageJ extends Frame implements ActionListener, /** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */ public static final String VERSION = "1.54j"; - public static final String BUILD = "22"; + public static final String BUILD = ""; //25 public static Color backgroundColor = new Color(237,237,237); /** SansSerif, 12-point, plain font. */ public static final Font SansSerif12 = new Font("SansSerif", Font.PLAIN, 12); diff --git a/ij/gui/HistogramWindow.java b/ij/gui/HistogramWindow.java index 323085e1..b793de10 100644 --- a/ij/gui/HistogramWindow.java +++ b/ij/gui/HistogramWindow.java @@ -11,6 +11,7 @@ import ij.measure.*; import ij.plugin.filter.Analyzer; import ij.text.TextWindow; +import ij.plugin.frame.Recorder; /** This class is an extended ImageWindow that displays histograms. */ public class HistogramWindow extends ImageWindow implements Measurements, ActionListener, @@ -525,11 +526,11 @@ public ResultsTable getResultsTable() { return rt; } - protected void showList() { + public void showList() { ResultsTable rt = getResultsTable(); rt.show(getTitle()); } - + protected void copyToClipboard() { Clipboard systemClipboard = null; try {systemClipboard = getToolkit().getSystemClipboard();} @@ -571,9 +572,11 @@ public void actionPerformed(ActionEvent e) { toggleLiveMode(); else if (b==rgb) changeChannel(); - else if (b==list) + else if (b==list) { showList(); - else if (b==copy) + if (!Recorder.scriptMode()) + Recorder.record("Table.showHistogramTable"); + } else if (b==copy) copyToClipboard(); else if (b==log) { logScale = !logScale; @@ -723,5 +726,5 @@ private void removeListeners() { live.setForeground(Color.black); } } - + } diff --git a/ij/macro/Functions.java b/ij/macro/Functions.java index bd9a19f4..f1a1eb36 100644 --- a/ij/macro/Functions.java +++ b/ij/macro/Functions.java @@ -7274,11 +7274,28 @@ else if (name.equals("setSelection")) return setSelection(); else if (name.equals("setLocAndSize") || name.equals("setLocationAndSize")) return setTableLocAndSize(); + else if (name.equals("showHistogramTable") || name.equals("list")) + return tableList(); else interp.error("Unrecognized function name"); return null; } - + + private Variable tableList() { + ImagePlus img = WindowManager.getCurrentImage(); + boolean isHistogram = false; + if (img!=null) { + ImageWindow win = img.getWindow(); + if (win!=null && win instanceof HistogramWindow) { + ((HistogramWindow)win).showList(); + isHistogram = true; + } + } + if (!isHistogram) + interp.error("No histogram window"); + return null; + } + private Variable setTableLocAndSize() { double x = getFirstArg(); double y = getNextArg(); diff --git a/ij/plugin/Benchmark.java b/ij/plugin/Benchmark.java index c195b11b..aa4c5dae 100644 --- a/ij/plugin/Benchmark.java +++ b/ij/plugin/Benchmark.java @@ -13,6 +13,7 @@ */ public class Benchmark implements PlugIn { private String[] results = { + " 6.8|MacBook Pro (M3 Pro, 2023)", " 9.5|MacBook Pro (M1 Max, 2021)", "10.5|Custom PC (12th Gen Core i9, 2022)", "10.9|MacBook Air (M1, 2020, Native)", diff --git a/release-notes.html b/release-notes.html index 9dcf5542..0de81e59 100644 --- a/release-notes.html +++ b/release-notes.html @@ -5,19 +5,23 @@ -
  • 1.54j22 24 May 2024 +
  • 1.54j 12 June 2024