Skip to content

Commit

Permalink
2023.10.18 (1.54g; Release version)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Oct 18, 2023
1 parent 9ea5782 commit b66c034
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 15 deletions.
14 changes: 12 additions & 2 deletions functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,11 @@ <h1>Built-in Macro Functions</h1>
<b>Dialog.setLocation(x, y)</b> -
Sets the screen location where this dialog will be displayed.
<br>
<a name="Dialog.getLocation"></a>
<b>Dialog.getLocation(x, y)</b> -
Returns the screen location of this dialog.
Requires 1.54g.
<br>
<a name="Dialog.show"></a>
<b>Dialog.show()</b> -
Displays the dialog and waits until the user clicks "OK" or "Cancel". The macro
Expand Down Expand Up @@ -4017,8 +4022,13 @@ <h1>Built-in Macro Functions</h1>
<br>

<a name="RoiManager.setPosition"></a>
<b>RoiManager.setPosition</b><br>
<b>RoiManager.setPosition(slice)</b><br>
Sets the position of the selected selections.
<br>

<b>RoiManager.setPosition(channel, slice, frame)</b><br>
Sets the position of the selected selections.
Requires 1.54g.
<br>

<a name="RoiManager.size"></a>
Expand Down Expand Up @@ -5412,7 +5422,7 @@ <h1>Built-in Macro Functions</h1>

<p class=navbar> <a href="#Top">top</a> | <a href="https://imagej.nih.gov/ij/index.html">home</a></p>

<small>Last updated 2023/07/28</small>
<small>Last updated 2023/10/18</small>

</body>
</html>
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.54g";
public static final String BUILD = "32";
public static final String BUILD = ""; //33
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
15 changes: 13 additions & 2 deletions ij/macro/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -8100,8 +8100,7 @@ private Variable doRoiManager() {
} else if (name.equals("getIndex")) {
return new Variable(rm.getIndex(getStringArg()));
} else if (name.equals("setPosition")) {
int position = (int)getArg();
rm.setPosition(position);
setRoiManagerPosition(rm);
return null;
} else if (name.equals("multiCrop")) {
rm.multiCrop(getFirstString(),getLastString());
Expand All @@ -8124,6 +8123,18 @@ private Variable doRoiManager() {
interp.error("Unrecognized RoiManager function");
return null;
}

private void setRoiManagerPosition(RoiManager rm) {
int channel = (int)getFirstArg();
if (interp.nextToken()==')') {
interp.getRightParen();
rm.setPosition(channel);
return;
}
int slice = (int)getNextArg();
int frame = (int)getLastArg();
rm.setPosition(channel, slice, frame);
}

private Variable doProperty() {
interp.getToken();
Expand Down
13 changes: 12 additions & 1 deletion ij/plugin/frame/RoiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ public void setGroup(int group) {
if (imp!=null) imp.draw();
}

/** Sets the position for the selected ROIs. */
/** Sets the position of the selected ROIs. */
public void setPosition(int position) {
int[] indexes = getIndexes();
for (int i: indexes) {
Expand All @@ -1454,6 +1454,17 @@ public void setPosition(int position) {
if (imp!=null) imp.draw();
}

/** Sets the c,z,t position of the selected ROIs. */
public void setPosition(int c, int z, int t) {
int[] indexes = getIndexes();
for (int i: indexes) {
Roi roi = getRoi(i);
roi.setPosition(c, z, t);
}
ImagePlus imp = WindowManager.getCurrentImage();
if (imp!=null) imp.draw();
}

/** Obsolete; replaced by RoiManager.setGroup() macro function. */
public static void setGroup(String group) {
RoiManager rm = getInstance();
Expand Down
21 changes: 12 additions & 9 deletions release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</head>
<body>

<li> <u>1.54g32 17 October 2023</u>
<li> <u>1.54g 18 October 2023</u>
<ul>
<li> Thanks to Yuekan Jiao, added a 16-bit histogram
<li> Thanks to Yuekan Jiao, added a "16-bit histogram"
option to the <i>Image&gt;Adjust&gt;Threshold</i> dialog
and a '16-bit' option to the setAutoThreshold()
macro function and the ImagePlus.setAutoThreshold(String) method.
Expand All @@ -22,16 +22,19 @@
threshold.
<li> Thanks to Nicolas De Francesco and Curtis Rueden,
the macro language documentation (functions.html) is now included
in ij.jar and this file is used by the Editor's Macros>Function Finder
in ij.jar and is used by the Editor's Macros>Function Finder
command.
<li> Thanks to Robert Baer, the Associate Show All ROIs with slices
option in the ROI Managers More&gt;&gt;Options dialog is now always
<li> Thanks to Robert Baer, the "Associate 'Show All' ROIs with slices"
option in the ROI Manager's More&gt;&gt;Options dialog is now always
enabled when ImageJ starts up.
<li> Thanks to Christian Tischer, files with an "ome.tif" or "ome.tiff" extension
are opened using Bio-Formats.
<li> Thanks to Fred Damen and Michael Schmid, the ImageProcessor.getSliceNumber()
method no longer requires a PlugInFilter to return the stack position.
<li> Thanks to Fred Damen, added the Dialog.getLocation(x,y) macro function. DOC
method returns the stack position when not called from a
PlugInFilter.
<li> Thanks to Fred Damen, added the Dialog.getLocation(x,y) macro function.
<li> Thanks to Philippe Carl, added the RoiManager.setPosition(c,z,t)
macro function.
<li> Thanks to Fred Damen, the second argument of the
Dialog.addDirectory(label,defaultdir) function is no longer ignored when
the user clicks on the "Browse" button.
Expand All @@ -42,8 +45,8 @@
very small images or user resized windows
(<a href="http://wsr.imagej.net/macros/js/FitToWindowBug.js">example</a>).
<li> Thanks to Michael Ellis and Michael Schmid, fixed a
RotatedRectRoi rounding bug and a bug where the resulting polygon consisted
of 5 points instead of 4.
RotatedRectRoi rounding bug and a bug where newly created RotatedRectRois
consisted of 5 points instead of 4.
<li> Thanks to Volker Backer, fixed a Roi group bug with Fiji on Linux.
<li> Thanks to Yuekan Jiao and Michael Schmid, fixed a rounding error with
PointRoi.getContainedPoints().
Expand Down

0 comments on commit b66c034

Please sign in to comment.