Skip to content

Commit d05f254

Browse files
committed
2025.02.17 (1.54n; Release version)
1 parent e8002ff commit d05f254

File tree

7 files changed

+26
-22
lines changed

7 files changed

+26
-22
lines changed

functions.html

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3326,12 +3326,17 @@ <h1>Built-in Macro Functions</h1>
33263326
or an empty string if <i>key</i> is not found.
33273327
<br>
33283328

3329-
<a name="Property.getNumber"></a>
3330-
<b>Property.getNumber(key)</b><br>
3329+
<a name="Property.getValue"></a>
3330+
<b>Property.getValue(key)</b><br>
33313331
Returns the image property associated with <i>key</i>,
33323332
as a number, or returns NaN if <i>key</i> is not found
33333333
or the property cannot be converted into a number.
3334-
Requires 1.53b.
3334+
Requires 1.53n.
3335+
<br>
3336+
3337+
<a name="Property.getNumber"></a>
3338+
<b>Property.getNumber(key)</b><br>
3339+
Alias for Property.getValue(key).
33353340
<br>
33363341

33373342
<a name="Property.set"></a>
@@ -5483,7 +5488,7 @@ <h1>Built-in Macro Functions</h1>
54835488

54845489
<p class=navbar> <a href="#Top">top</a> | <a href="https://imagej.net/ij/index.html">home</a></p>
54855490

5486-
<small>Last updated 2025-01-18</small>
5491+
<small>Last updated 2025-02-15</small>
54875492

54885493
</body>
54895494
</html>

ij/ImageJ.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public class ImageJ extends Frame implements ActionListener,
7979

8080
/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
8181
public static final String VERSION = "1.54n";
82-
public static final String BUILD = "7";
82+
public static final String BUILD = ""; //10
8383
public static Color backgroundColor = new Color(237,237,237);
8484
/** SansSerif, 12-point, plain font. */
8585
public static final Font SansSerif12 = new Font("SansSerif", Font.PLAIN, 12);

ij/gui/HistogramPlot.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ public void draw(ImagePlus imp, ImageStatistics stats) {
106106
drawHistogram(imp, ip, fixedRange, stats.histMin, stats.histMax);
107107
}
108108

109-
protected void drawHistogram(ImageProcessor ip, boolean fixedRange) {
110-
drawHistogram(null, ip, fixedRange, 0.0, 0.0);
109+
protected void drawHistogram(ImageProcessor ip, boolean unused) {
110+
drawHistogram(null, ip, unused, 0.0, 0.0);
111111
}
112112

113-
void drawHistogram(ImagePlus imp, ImageProcessor ip, boolean fixedRange, double xMin, double xMax) {
113+
void drawHistogram(ImagePlus imp, ImageProcessor ip, boolean unused, double xMin, double xMax) {
114114
setTitle("Histogram of "+imp.getShortTitle());
115115
int x, y;
116116
long maxCount2 = 0;
@@ -141,7 +141,7 @@ void drawHistogram(ImagePlus imp, ImageProcessor ip, boolean fixedRange, double
141141
else
142142
drawAlignedColorBar(imp, xMin, xMax, ip, x-1, y, HIST_WIDTH, BAR_HEIGHT);
143143
y += BAR_HEIGHT+(int)(15*SCALE);
144-
drawText(ip, x, y, fixedRange);
144+
drawText(ip, x, y);
145145
srcImageID = imp.getID();
146146
}
147147

@@ -282,7 +282,7 @@ void drawLogPlot (long maxCount, ImageProcessor ip) {
282282
ip.setColor(Color.black);
283283
}
284284

285-
void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
285+
void drawText(ImageProcessor ip, int x, int y) {
286286
ip.setFont(font);
287287
ip.setAntialiasedText(true);
288288
double hmin = cal.getCValue(stats.histMin);
@@ -304,12 +304,12 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
304304
}
305305
ip.setJustification(ImageProcessor.LEFT_JUSTIFY);
306306
}
307-
double range = hmax-hmin;
308-
if (fixedRange&&!cal.calibrated()&&hmin==0&&hmax==255)
309-
range = 256;
310-
double binWidth = range/stats.nBins;
307+
//double range = hmax-hmin;
308+
//if (fixedRange&&!cal.calibrated()&&hmin==0&&hmax==255)
309+
// range = 256;
310+
double binWidth = stats.binSize;
311311
binWidth = Math.abs(binWidth);
312-
showBins = binWidth!=1.0 || !fixedRange;
312+
showBins = binWidth!=1.0;
313313
col1 = XMARGIN + 5;
314314
col2 = XMARGIN + HIST_WIDTH/2;
315315
row1 = y+(int)(25*SCALE);

ij/gui/HistogramWindow.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,10 +440,7 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
440440
}
441441
ip.setJustification(ImageProcessor.LEFT_JUSTIFY);
442442
}
443-
double range = hmax-hmin;
444-
if (fixedRange&&!cal.calibrated()&&hmin==0&&hmax==255)
445-
range = 256;
446-
double binWidth = range/stats.nBins;
443+
double binWidth = stats.binSize;
447444
binWidth = Math.abs(binWidth);
448445
showBins = binWidth!=1.0 || !fixedRange;
449446
col1 = XMARGIN + 5;

ij/macro/Functions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8235,7 +8235,7 @@ private Variable doProperty() {
82358235
} else if (name.equals("get")) {
82368236
String value = imp.getProp(getStringArg());
82378237
return new Variable(value!=null?value:"");
8238-
} else if (name.equals("getNumber")) {
8238+
} else if (name.equals("getNumber") || name.equals("getValue")) {
82398239
String svalue = imp.getProp(getStringArg());
82408240
double nvalue = svalue!=null?Tools.parseDouble(svalue):Double.NaN;
82418241
return new Variable(nvalue);

ij/process/StackStatistics.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import ij.measure.*;
55
import ij.plugin.filter.Analyzer;
66
import java.awt.*;
7-
7+
88
/** Statistics, including the histogram, of a stack. */
99
public class StackStatistics extends ImageStatistics {
1010

@@ -147,6 +147,8 @@ void doCalculations(ImagePlus imp, int bins, double histogramMin, double histog
147147
histMin = cal.getRawValue(histMin);
148148
histMax = cal.getRawValue(histMax);
149149
binSize = (histMax-histMin+1)/nBins;
150+
if (imp.getBitDepth()==32)
151+
binSize = (histMax-histMin)/nBins;
150152
int bits = imp.getBitDepth();
151153
if (histMin==0.0 && histMax==256.0 && (bits==8||bits==24))
152154
histMax = 255.0;

release-notes.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<body>
77

88

9-
<li> <u>1.54n7 02 February 2025</u>
9+
<li> <u>1.54n 17 February 2025</u>
1010
<ul>
1111
<li> Thanks to Christophe Leterrier, fixed bugs with how
1212
the <i>Image&gt;Stacks&gt;Tools&gt;Combine</i> and

0 commit comments

Comments
 (0)