Skip to content

Commit e8002ff

Browse files
committed
2025.02.02 (1.54n7; 1.54m16 histogram regression)
1 parent 5a2d47f commit e8002ff

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

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 = "6";
82+
public static final String BUILD = "7";
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: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,10 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
304304
}
305305
ip.setJustification(ImageProcessor.LEFT_JUSTIFY);
306306
}
307-
double binWidth = (hmax-hmin+1)/stats.nBins;
307+
double range = hmax-hmin;
308+
if (fixedRange&&!cal.calibrated()&&hmin==0&&hmax==255)
309+
range = 256;
310+
double binWidth = range/stats.nBins;
308311
binWidth = Math.abs(binWidth);
309312
showBins = binWidth!=1.0 || !fixedRange;
310313
col1 = XMARGIN + 5;

ij/gui/HistogramWindow.java

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

ij/process/FloatStatistics.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void getStatistics(ImageProcessor ip, double minThreshold, double maxThreshold)
8686
if (max>histMax)
8787
max = histMax;
8888
}
89-
binSize = (histMax-histMin+1)/nBins;
89+
binSize = (histMax-histMin)/nBins;
9090

9191
// Generate histogram
9292
double scale = nBins/(histMax-histMin);

release-notes.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
<body>
77

88

9-
<li> <u>1.54n6 26 January 2025</u>
9+
<li> <u>1.54n7 02 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
1313
<i>Edit&gt;Selection&gt;Straighten</i> commands handle
1414
multi-channel images.
1515
<li> Thanks to Murilo Spineli, fixed crashes with processes
16-
started by exec() macro function.
16+
started by the exec() macro function.
17+
<li> Thanks to Guenter Pudmich, fixed 1.54m16 float histogram regression.
1718
</ul>
1819

1920
<li> <u>1.54m 5 December 2024</u>

0 commit comments

Comments
 (0)