Skip to content

Commit

Permalink
2025.02.02 (1.54n7; 1.54m16 histogram regression)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Feb 2, 2025
1 parent 5a2d47f commit e8002ff
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ij/ImageJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.54n";
public static final String BUILD = "6";
public static final String BUILD = "7";
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);
Expand Down
5 changes: 4 additions & 1 deletion ij/gui/HistogramPlot.java
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
}
ip.setJustification(ImageProcessor.LEFT_JUSTIFY);
}
double binWidth = (hmax-hmin+1)/stats.nBins;
double range = hmax-hmin;
if (fixedRange&&!cal.calibrated()&&hmin==0&&hmax==255)
range = 256;
double binWidth = range/stats.nBins;
binWidth = Math.abs(binWidth);
showBins = binWidth!=1.0 || !fixedRange;
col1 = XMARGIN + 5;
Expand Down
5 changes: 4 additions & 1 deletion ij/gui/HistogramWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,10 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
}
ip.setJustification(ImageProcessor.LEFT_JUSTIFY);
}
double binWidth = (hmax-hmin+1)/stats.nBins;
double range = hmax-hmin;
if (fixedRange&&!cal.calibrated()&&hmin==0&&hmax==255)
range = 256;
double binWidth = range/stats.nBins;
binWidth = Math.abs(binWidth);
showBins = binWidth!=1.0 || !fixedRange;
col1 = XMARGIN + 5;
Expand Down
2 changes: 1 addition & 1 deletion ij/process/FloatStatistics.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ void getStatistics(ImageProcessor ip, double minThreshold, double maxThreshold)
if (max>histMax)
max = histMax;
}
binSize = (histMax-histMin+1)/nBins;
binSize = (histMax-histMin)/nBins;

// Generate histogram
double scale = nBins/(histMax-histMin);
Expand Down
5 changes: 3 additions & 2 deletions release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
<body>


<li> <u>1.54n6 26 January 2025</u>
<li> <u>1.54n7 02 February 2025</u>
<ul>
<li> Thanks to Christophe Leterrier, fixed bugs with how
the <i>Image&gt;Stacks&gt;Tools&gt;Combine</i> and
<i>Edit&gt;Selection&gt;Straighten</i> commands handle
multi-channel images.
<li> Thanks to Murilo Spineli, fixed crashes with processes
started by exec() macro function.
started by the exec() macro function.
<li> Thanks to Guenter Pudmich, fixed 1.54m16 float histogram regression.
</ul>

<li> <u>1.54m 5 December 2024</u>
Expand Down

1 comment on commit e8002ff

@imagesc-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/wrong-histogram-for-32-bit-images-in-v1-54m/107831/3

Please sign in to comment.