Skip to content

Commit

Permalink
2025.02.17 (1.54p; Release version)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Feb 18, 2025
1 parent d05f254 commit 03382be
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions ij/ImageJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ public class ImageJ extends Frame implements ActionListener,
MouseListener, KeyListener, WindowListener, ItemListener, Runnable {

/** 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 = ""; //10
public static final String VERSION = "1.54p";
public static final String BUILD = "";
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
14 changes: 8 additions & 6 deletions ij/process/ImageProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,10 @@ private void process(int op, double value) {

/**
* Returns an array containing the pixel values along the
* line starting at (x1,y1) and ending at (x2,y2). Pixel
* values are sampled using getInterpolatedValue(double,double)
* line starting at (x1,y1) and ending at (x2,y2). The end
* point is included, and the interval is chosen such that
* the distance between successive points is close to 1.0 pixel.
* Pixel values are sampled using getInterpolatedValue(double,double)
* if interpolation is enabled or getPixelValue(int,int) if it is not.
* For byte and short images, returns calibrated values if a
* calibration table has been set using setCalibrationTable().
Expand All @@ -1114,20 +1116,20 @@ private void process(int op, double value) {
public double[] getLine(double x1, double y1, double x2, double y2) {
double dx = x2-x1;
double dy = y2-y1;
int n = (int)Math.round(Math.sqrt(dx*dx + dy*dy)) + 1;
int n = (int)Math.round(Math.sqrt(dx*dx + dy*dy));
double xinc = n>0?dx/n:0;
double yinc = n>0?dy/n:0;
double[] data = new double[n];
double[] data = new double[n+1];
double rx = x1;
double ry = y1;
if (interpolate) {
for (int i=0; i<n; i++) {
for (int i=0; i<=n; i++) {
data[i] = getInterpolatedValue(rx, ry);
rx += xinc;
ry += yinc;
}
} else {
for (int i=0; i<n; i++) {
for (int i=0; i<=n; i++) {
data[i] = getPixelValue((int)Math.round(rx), (int)Math.round(ry));
rx += xinc;
ry += yinc;
Expand Down
7 changes: 7 additions & 0 deletions release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
<body>


<li> <u>1.54p 17 February 2025</u>
<ul>
<li> Thanks to Michael Schmid, fixed 1.54m9 <i>Analyze&gt;Plot Profile</i>
regression where ImageProcessor.getLine() did not sample the
correct points
</ul>

<li> <u>1.54n 17 February 2025</u>
<ul>
<li> Thanks to Christophe Leterrier, fixed bugs with how
Expand Down

0 comments on commit 03382be

Please sign in to comment.