From 09d093cd8a47eaac7c0aed967093ce69d845face Mon Sep 17 00:00:00 2001 From: Wayne Rasband Date: Mon, 15 Apr 2024 12:52:38 -0400 Subject: [PATCH] 2024.04.15 (1.54j15; DICOM tags) --- ij/ImageJ.java | 2 +- ij/ImagePlus.java | 2 +- ij/gui/HistogramPlot.java | 9 +- ij/gui/HistogramWindow.java | 6 + ij/measure/ResultsTable.java | 11 +- ij/plugin/DICOM.java | 4579 +++++++++++++++++++++++++++++++++- release-notes.html | 13 +- 7 files changed, 4515 insertions(+), 107 deletions(-) diff --git a/ij/ImageJ.java b/ij/ImageJ.java index 2f252a12d..51ec2a8ac 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 = "10"; + public static final String BUILD = "15"; 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/ImagePlus.java b/ij/ImagePlus.java index 28dc9c7a0..de3c37eda 100644 --- a/ij/ImagePlus.java +++ b/ij/ImagePlus.java @@ -27,7 +27,7 @@ It also includes metadata (spatial calibration and possibly the directory/file w @see ij.gui.ImageCanvas */ -public class ImagePlus implements ImageObserver, Measurements, Cloneable, AutoCloseable { +public class ImagePlus implements ImageObserver, Measurements, Cloneable { /** 8-bit grayscale (unsigned)*/ public static final int GRAY8 = 0; diff --git a/ij/gui/HistogramPlot.java b/ij/gui/HistogramPlot.java index fd8d14559..1e23a670b 100644 --- a/ij/gui/HistogramPlot.java +++ b/ij/gui/HistogramPlot.java @@ -320,8 +320,15 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) { row5 = row4 + (int)(15*SCALE); long count = stats.longPixelCount>0?stats.longPixelCount:stats.pixelCount; String modeCount = " (" + stats.maxCount + ")"; + if (histogram!=null) {// Add '*' if multi-modal histogram + int mcount = 0;; + for (int i=0; i1) break; + } + if (mcount>1) modeCount=modeCount+"*"; + } if (modeCount.length()>12) modeCount = ""; - ip.drawString("N: " + count, col1, row1); ip.drawString("Min: " + d2s(stats.min), col2, row1); ip.drawString("Mean: " + d2s(stats.mean), col1, row2); diff --git a/ij/gui/HistogramWindow.java b/ij/gui/HistogramWindow.java index 044b502c7..323085e1b 100644 --- a/ij/gui/HistogramWindow.java +++ b/ij/gui/HistogramWindow.java @@ -455,6 +455,12 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) { row5 = row4 + (int)(15*SCALE); long count = stats.longPixelCount>0?stats.longPixelCount:stats.pixelCount; String modeCount = " (" + stats.maxCount + ")"; + if (histogram!=null) {// Add '*' if multi-modal histogram + int mcount = 0;; + for (int i=0; i1) modeCount=modeCount+"*"; + } if (modeCount.length()>12) modeCount = ""; ip.drawString("N: " + count, col1, row1); diff --git a/ij/measure/ResultsTable.java b/ij/measure/ResultsTable.java index 765542054..df7ecaa20 100644 --- a/ij/measure/ResultsTable.java +++ b/ij/measure/ResultsTable.java @@ -698,7 +698,7 @@ public String getRowAsString(int row) { if (columns[i]!=null) { String value = getValueAsString(i,row); if (quoteCommas) { - if (value!=null && value.contains(",")) + if (value!=null && (value.contains(",")||value.equals(""))) value = "\""+value+"\""; } sb.append(value); @@ -731,13 +731,8 @@ public Variable[] getColumnAsVariables(String column) { String str = null; if (Double.isNaN(value) && stringColumns!=null) { ArrayList stringColumn = (ArrayList)stringColumns.get(Integer.valueOf(col)); - if (stringColumn!=null && row>=0 && row=0 && row -
  • 1.54j10 25 March 2024 +
  • 1.54j15 15 April 2024
      +
    • Thanks to 'ramnoob', added a number of official tags +to the DICOM reader.
    • Thanks to Abdul Hannan, changed the default extension used by the File>Save As>Text Image command from “.txt” to “.csv”. +
    • Thanks to Gabriel Landini, ImageJ adds an "*" next to +the Mode value in the Histogram window if the histogram is +multi-modal.
    • Thanks to Albert Cardona and Curtis Rueden, added public setEqualize() and setSaturated() methods to the ContrastEnhancer class.
    • Thanks to Gabriel Landini, fixed bug where the "Composite ROIs" particle analyzer option did not work as expected. +
    • Thanks to Norbert Vischer, fixed bug where empty string +fields in tables are converted to NaNs after the table is +saved and reopened. +
    • Thanks to Stein Rorvik, fixed a bug where the +Table.getColumn() macro function did not work with +columns containing empty strings.
  • 1.54i 03 March 2024