Skip to content

Commit 03382be

Browse files
committed
2025.02.17 (1.54p; Release version)
1 parent d05f254 commit 03382be

File tree

3 files changed

+17
-8
lines changed

3 files changed

+17
-8
lines changed

ij/ImageJ.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ public class ImageJ extends Frame implements ActionListener,
7878
MouseListener, KeyListener, WindowListener, ItemListener, Runnable {
7979

8080
/** Plugins should call IJ.getVersion() or IJ.getFullVersion() to get the version string. */
81-
public static final String VERSION = "1.54n";
82-
public static final String BUILD = ""; //10
81+
public static final String VERSION = "1.54p";
82+
public static final String BUILD = "";
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/process/ImageProcessor.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,10 @@ private void process(int op, double value) {
11001100

11011101
/**
11021102
* Returns an array containing the pixel values along the
1103-
* line starting at (x1,y1) and ending at (x2,y2). Pixel
1104-
* values are sampled using getInterpolatedValue(double,double)
1103+
* line starting at (x1,y1) and ending at (x2,y2). The end
1104+
* point is included, and the interval is chosen such that
1105+
* the distance between successive points is close to 1.0 pixel.
1106+
* Pixel values are sampled using getInterpolatedValue(double,double)
11051107
* if interpolation is enabled or getPixelValue(int,int) if it is not.
11061108
* For byte and short images, returns calibrated values if a
11071109
* calibration table has been set using setCalibrationTable().
@@ -1114,20 +1116,20 @@ private void process(int op, double value) {
11141116
public double[] getLine(double x1, double y1, double x2, double y2) {
11151117
double dx = x2-x1;
11161118
double dy = y2-y1;
1117-
int n = (int)Math.round(Math.sqrt(dx*dx + dy*dy)) + 1;
1119+
int n = (int)Math.round(Math.sqrt(dx*dx + dy*dy));
11181120
double xinc = n>0?dx/n:0;
11191121
double yinc = n>0?dy/n:0;
1120-
double[] data = new double[n];
1122+
double[] data = new double[n+1];
11211123
double rx = x1;
11221124
double ry = y1;
11231125
if (interpolate) {
1124-
for (int i=0; i<n; i++) {
1126+
for (int i=0; i<=n; i++) {
11251127
data[i] = getInterpolatedValue(rx, ry);
11261128
rx += xinc;
11271129
ry += yinc;
11281130
}
11291131
} else {
1130-
for (int i=0; i<n; i++) {
1132+
for (int i=0; i<=n; i++) {
11311133
data[i] = getPixelValue((int)Math.round(rx), (int)Math.round(ry));
11321134
rx += xinc;
11331135
ry += yinc;

release-notes.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
<body>
77

88

9+
<li> <u>1.54p 17 February 2025</u>
10+
<ul>
11+
<li> Thanks to Michael Schmid, fixed 1.54m9 <i>Analyze&gt;Plot Profile</i>
12+
regression where ImageProcessor.getLine() did not sample the
13+
correct points
14+
</ul>
15+
916
<li> <u>1.54n 17 February 2025</u>
1017
<ul>
1118
<li> Thanks to Christophe Leterrier, fixed bugs with how

0 commit comments

Comments
 (0)