Skip to content

Commit afcce28

Browse files
committed
2024.11.18 (1.54m26; Multi Measure)
1 parent b026637 commit afcce28

File tree

7 files changed

+16
-33
lines changed

7 files changed

+16
-33
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.54m";
82-
public static final String BUILD = "23";
82+
public static final String BUILD = "26";
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/Overlay.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public class Overlay implements Iterable<Roi> {
2121
private boolean isCalibrationBar;
2222
private boolean selectable = true;
2323
private boolean draggable = true;
24-
private double minStrokeWidth = -1;
2524

2625
/** Constructs an empty Overlay. */
2726
public Overlay() {
@@ -37,11 +36,8 @@ public Overlay(Roi roi) {
3736

3837
/** Adds an ROI to this Overlay. */
3938
public void add(Roi roi) {
40-
if (roi!=null) {
41-
if (minStrokeWidth>=0)
42-
roi.setMinStrokeWidth(minStrokeWidth);
39+
if (roi!=null)
4340
list.add(roi);
44-
}
4541
}
4642

4743
/** Adds an ROI to this Overlay using the specified name. */
@@ -483,11 +479,6 @@ public void setDraggable(boolean draggable) {
483479
this.draggable = draggable;
484480
}
485481

486-
/** Sets the minimum scaled stroke width (default is 0.05). */
487-
public void setMinStrokeWidth(double minWidth) {
488-
minStrokeWidth = minWidth;
489-
}
490-
491482
/** Returns 'true' if ROIs in this overlay can be dragged by their labels. */
492483
public boolean isDraggable() {
493484
return draggable;

ij/gui/Roi.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@ public class Roi extends Object implements Cloneable, java.io.Serializable, Iter
7777
private static int defaultGroup; // zero is no specific group
7878
private static Color groupColor;
7979
private static double defaultStrokeWidth;
80-
private static float defaultMinStrokeWidth = 0.05f;
81-
private float minStrokeWidth = defaultMinStrokeWidth;
80+
private float minStrokeWidth = 0.1f;
8281
private static String groupNamesString = Prefs.get(NAMES_KEY, null);
8382
private static String[] groupNames;
8483
private static boolean groupNamesChanged;

ij/macro/Functions.java

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6790,8 +6790,6 @@ else if (name.equals("paste")) {
67906790
return 0.0;
67916791
} else if (name.equals("hidden")) {
67926792
return overlay!=null && imp.getHideOverlay()?1.0:0.0;
6793-
} else if (name.equals("setMinStrokeWidth")) {
6794-
return setMinStrokeWidth(imp, overlay);
67956793
} else if (name.equals("addSelection") || name.equals("addRoi")) {
67966794
return overlayAddSelection(imp, overlay);
67976795
} else if (name.equals("setPosition")) {
@@ -7006,16 +7004,6 @@ private double getOverlayElementBounds(Overlay overlay) {
70067004
return Double.NaN;
70077005
}
70087006

7009-
private double setMinStrokeWidth(ImagePlus imp, Overlay overlay) {
7010-
double minStrokeWidth = getArg();
7011-
if (overlay==null) {
7012-
overlay = new Overlay();
7013-
imp.setOverlay(overlay);
7014-
}
7015-
overlay.setMinStrokeWidth(minStrokeWidth);
7016-
return Double.NaN;
7017-
}
7018-
70197007
double overlaySetPosition(Overlay overlay) {
70207008
int c=0, z=0, t=0;
70217009
int nargs = 1;
@@ -7815,10 +7803,7 @@ private Variable doRoi() {
78157803
return new Variable(Colors.colorToString(color));
78167804
}
78177805
ImagePlus imp = getImage();
7818-
if (name.equals("setMinStrokeWidth")) {
7819-
setMinStrokeWidth(imp, imp.getOverlay());
7820-
return null;
7821-
} else if (name.equals("paste")) {
7806+
if (name.equals("paste")) {
78227807
interp.getParens();
78237808
//IJ.log("paste: "+roiClipboard);
78247809
if (roiClipboard!=null)
@@ -7909,6 +7894,9 @@ else if (name.equals("remove")||name.equals("selectNone")) {
79097894
roi.setStrokeWidth(getArg());
79107895
imp.draw();
79117896
return null;
7897+
} else if (name.equals("setMinStrokeWidth")) {
7898+
roi.setMinStrokeWidth(getArg());
7899+
return null;
79127900
} else if (name.equals("getStrokeWidth")) {
79137901
interp.getParens();
79147902
return new Variable(roi.getStrokeWidth());

ij/plugin/RoiRotator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ public static Roi rotate(Roi roi, double angle, double xcenter, double ycenter)
100100
double dy = ycenter-poly.ypoints[i];
101101
double radius = Math.sqrt(dx*dx+dy*dy);
102102
double a = Math.atan2(dy, dx);
103-
poly.xpoints[i] = (float)(xcenter + radius*Math.cos(a+theta));
104-
poly.ypoints[i] = (float)(ycenter - radius*Math.sin(a+theta));
103+
poly.xpoints[i] = (float)(xcenter+radius*Math.cos(a+theta));
104+
poly.ypoints[i] = (float)(ycenter-radius*Math.sin(a+theta));
105105
}
106106
Roi roi2 = null;
107107
if (type==Roi.LINE)

ij/plugin/frame/RoiManager.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1208,6 +1208,8 @@ boolean multiMeasure(String cmd) {
12081208

12091209
public static ResultsTable multiMeasure(ImagePlus imp, Roi[] rois, boolean appendResults) {
12101210
int nSlices = imp.getStackSize();
1211+
if (!measureAll)
1212+
nSlices = 1;
12111213
Analyzer aSys = new Analyzer(imp); // System Analyzer
12121214
ResultsTable rtSys = Analyzer.getResultsTable();
12131215
ResultsTable rtMulti = new ResultsTable();

release-notes.html

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

88

9-
<li> <u>1.54m23 9 November 2024</u>
9+
<li> <u>1.54m26 18 November 2024</u>
1010
<ul>
11-
<li> Thanks to Kenneth Sloan, added the Overlay.setMinStrokeWidth(minStrokeWidth)
11+
<li> Thanks to Kenneth Sloan, added the Roi.setMinStrokeWidth(minStrokeWidth)
1212
macro function and Java method that you can use to specify a
1313
minimum scaled stroke width
1414
(<a href="http://wsr.imagej.net/macros/Polygons.ijm">example</a>). DOC
@@ -42,6 +42,9 @@
4242
of 16 and 32 bit histogram bin widths.
4343
<li> Thanks to Gilles Carpentier, fixed several Hyperstack type
4444
conversion bugs.
45+
<li> Thanks to 'scouser27', fixed bug with ROI Manager
46+
"Multi Measure" command when "Measure all n slices" was
47+
not checked and "One row per slice" was.
4548
</ul>
4649

4750
<li> <u>1.54k 15 September 2024</u>

0 commit comments

Comments
 (0)