Skip to content

Commit

Permalink
2024.06.28 (1.54k8; RoiManager select)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Jun 28, 2024
1 parent af59443 commit 8799326
Show file tree
Hide file tree
Showing 26 changed files with 75 additions and 102 deletions.
6 changes: 3 additions & 3 deletions functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<font color="#224488">

<a name="Top"></a>
<p class=navbar> <a href="https://imagej.nih.gov/ij/">home</a> | <a href="https://imagej.nih.gov/ij/download.html">download</a> | <a href="https://imagej.nih.gov/ij/developer/index.html">resources</a></p>
<p class=navbar> <a href="https://imagej.net/ij/">home</a> | <a href="https://imagej.net/ij/download.html">download</a> | <a href="https://imagej.net/ij/developer/index.html">resources</a></p>
<h1>Built-in Macro Functions</h1>

</font>
Expand Down Expand Up @@ -5463,9 +5463,9 @@ <h1>Built-in Macro Functions</h1>

</blockquote>

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

<small>Last updated 2024-06-12</small>
<small>Last updated 2024-06-17</small>

</body>
</html>
2 changes: 1 addition & 1 deletion ij/CommandListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/** Plugins that implement this interface are notified when ImageJ
is about to run a menu command. There is an example plugin at
http://imagej.nih.gov/ij/plugins/download/misc/Command_Listener.java
http://imagej.net/ij/plugins/download/misc/Command_Listener.java
*/
public interface CommandListener {

Expand Down
6 changes: 3 additions & 3 deletions ij/IJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class IJ {
public static final int COMPOSITE=1, COLOR=2, GRAYSCALE=3;

/** @deprecated */
public static final String URL = "http://imagej.nih.gov/ij";
public static final String URL = "http://imagej.net/ij";

/** ImageJ website */
public static final String URL2 = "http://imagej.net/ij";
Expand Down Expand Up @@ -534,7 +534,7 @@ public static void showStatus(String message, String options) {
* @deprecated
* replaced by IJ.log(), ResultsTable.setResult() and TextWindow.append().
* There are examples at
* http://imagej.nih.gov/ij/plugins/sine-cosine.html
* http://imagej.net/ij/plugins/sine-cosine.html
*/
public static void write(String s) {
if (textPanel==null && ij!=null)
Expand Down Expand Up @@ -799,7 +799,7 @@ public static void showMessage(String msg) {
/** Displays a message in a dialog box with the specified title.
Displays HTML formatted text if 'msg' starts with "<html>".
There are examples at
"http://imagej.nih.gov/ij/macros/HtmlDialogDemo.txt".
"http://imagej.net/ij/macros/HtmlDialogDemo.txt".
Writes to the Java console if ImageJ is not present. */
public static void showMessage(String title, String msg) {
if (ij!=null) {
Expand Down
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.54k";
public static final String BUILD = "3";
public static final String BUILD = "8";
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
4 changes: 2 additions & 2 deletions ij/gui/GenericDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public void addCheckboxGroup(int rows, int columns, String[] labels, boolean[] d
* @param labels the labels
* @param defaultValues the initial states
* @param headings the column headings
* Example: http://imagej.nih.gov/ij/plugins/multi-column-dialog/index.html
* Example: http://imagej.net/ij/plugins/multi-column-dialog/index.html
*/
public void addCheckboxGroup(int rows, int columns, String[] labels, boolean[] defaultValues, String[] headings) {
Panel panel = new Panel();
Expand Down Expand Up @@ -1903,7 +1903,7 @@ public void windowClosing(WindowEvent e) {
/** Adds a "Help" button that opens the specified URL in the default browser.
With v1.46b or later, displays an HTML formatted message if
'url' starts with "<html>". There is an example at
http://imagej.nih.gov/ij/macros/js/DialogWithHelp.js
http://imagej.net/ij/macros/js/DialogWithHelp.js
If url is an empty String, pressing the "Help" button does nothing except
calling the DialogListeners (if any). See also: setHelpLabel.
*/
Expand Down
31 changes: 13 additions & 18 deletions ij/gui/ProfilePlot.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import ij.measure.*;
import ij.plugin.Straightener;

/** Creates a density profile plot of a rectangular selection or line selection. */
/** Creates a density profile plot of a line or rectangular selection. */
public class ProfilePlot {

static final int MIN_WIDTH = 350;
Expand All @@ -30,12 +30,22 @@ public class ProfilePlot {
public ProfilePlot() {
}

/** Based on the current line or rectangular selection,
* creates a profile plot that can be retrieved using
* the getPlot() method.
*/
public ProfilePlot(ImagePlus imp) {
this(imp, false);
}

public ProfilePlot(ImagePlus imp, boolean averageHorizontally) {
/** Based on the current rectangular selection,
* creates profile plot, which is a vertical if
* verticalPlot is 'true'. Use the getPlot() method
* to retrieve the plot.
*/
public ProfilePlot(ImagePlus imp, boolean verticalPlot) {
this.imp = imp;
boolean averageHorizontally = verticalPlot;
Roi roi = imp.getRoi();
if (roi==null) {
IJ.error("Profile Plot", "Selection required.");
Expand Down Expand Up @@ -104,6 +114,7 @@ public void createWindow() {
plot.show();
}

/** Returns the profile plot as a Plot object. */
public Plot getPlot() {
if (profile==null)
return null;
Expand Down Expand Up @@ -283,22 +294,6 @@ public static double[] getColumnAverageProfile(Rectangle rect, ImageProcessor ip
return values2;
}

/*
double[] getIrregularProfile(Roi roi, ImageProcessor ip, Calibration cal) {
boolean interpolate = PlotWindow.interpolate;
FloatPolygon p = roi.getFloatPolygon();
float[][] xyPoints = ((PolygonRoi)roi).getEquidistantPoints(p.xpoints, p.ypoints, p.npoints, 1.0, imp);
float[] xPoints = xyPoints[0];
float[] yPoints = xyPoints[1];
double[] values = new double[xPoints.length];
for (int i=0; i<xPoints.length; i++)
values[i] = interpolate ?
ip.getInterpolatedValue(xPoints[i], yPoints[i]) :
ip.getPixelValue((int)Math.round(xPoints[i]), (int)Math.round(yPoints[i]));
return values;
}
*/

double[] getWideLineProfile(ImagePlus imp, int lineWidth) {
Roi roi = imp.getRoi();
if (roi == null) return null; //roi may have changed asynchronously
Expand Down
2 changes: 1 addition & 1 deletion ij/gui/TextRoi.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public TextRoi(int x, int y, String text, Font font, Color color) {
super(x, y, 1, 1);
if (font==null) font = new Font(name, style, size);
this.font = font;
IJ.error("TextRoi", "API has changed. See updated example at\nhttp://imagej.nih.gov/ij/macros/js/TextOverlay.js");
IJ.error("TextRoi", "API has changed. See updated example at\nhttp://imagej.net/ij/macros/js/TextOverlay.js");
}

public TextRoi(int x, int y, ImagePlus imp) {
Expand Down
2 changes: 1 addition & 1 deletion ij/gui/Toolbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -1738,7 +1738,7 @@ public void mouseMoved(MouseEvent e) {

/** Adds a tool to the toolbar. The 'toolTip' string is displayed in the status bar
when the mouse is over the tool icon. The 'toolTip' string may include icon
(http://imagej.nih.gov/ij/developer/macro/macros.html#tools).
(http://imagej.net/ij/developer/macro/macros.html#tools).
Returns the tool ID, or -1 if all tool slots are in use. */
public int addTool(String toolTip) {
int index = toolTip.indexOf('-');
Expand Down
5 changes: 3 additions & 2 deletions ij/io/FileOpener.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,10 @@ public FileOpener(FileInfo fi) {

/** Opens the image and returns it has an ImagePlus object. */
public ImagePlus openImage() {
Recorder.suspendRecording();
boolean headless = GraphicsEnvironment.isHeadless();
if (!headless) Recorder.suspendRecording();
ImagePlus imp = open(false);
Recorder.resumeRecording();
if (!headless) Recorder.resumeRecording();
return imp;
}

Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/ChannelArranger.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void run(String arg) {
The following example opens the FluorescentCells sample
image and reverses the order of the channels.
<pre>
ImagePlus img = IJ.openImage("http://imagej.nih.gov/ij/images/FluorescentCells.zip");
ImagePlus img = IJ.openImage("http://imagej.net/ij/images/FluorescentCells.zip");
int[] order = {3,2,1};
ImagePlus img2 = ChannelArranger.run(img, order);
img2.setDisplayMode(IJ.COLOR);
Expand Down
6 changes: 4 additions & 2 deletions ij/plugin/Duplicator.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,18 @@ else if (duplicateStack || imp.getStackSize()==1) {
imp2 = crop(imp);
recordCrop(imp);
}
if (ignoreSelection && roi!=null)
if (ignoreSelection && roi!=null) {
imp.setRoi(roi);
imp2.setRoi((Roi)roi.clone());
}
Calibration cal = imp2.getCalibration();
if (roi!=null && (cal.xOrigin!=0.0||cal.yOrigin!=0.0)) {
cal.xOrigin -= roi.getBounds().x;
cal.yOrigin -= roi.getBounds().y;
}
imp2.setTitle(newTitle);
imp2.setProp("UniqueName","true");
if (roi!=null && roi.isArea() && roi.getType()!=Roi.RECTANGLE) {
if (roi!=null && !ignoreSelection && roi.isArea() && roi.getType()!=Roi.RECTANGLE) {
Roi roi2 = cropRoi(imp, roi);
if (roi2==null)
return;
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/FFT.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
This class implements the FFT, Inverse FFT and Redisplay Power Spectrum commands
in the Process/FFT submenu. It is based on Arlo Reeves'
Pascal implementation of the Fast Hartley Transform from NIH Image
(http://imagej.nih.gov/ij/docs/ImageFFT/).
(http://imagej.net/ij/docs/ImageFFT/).
The Fast Hartley Transform was restricted by U.S. Patent No. 4,646,256, but was placed
in the public domain by Stanford University in 1995 and is now freely available.
Expand Down
4 changes: 2 additions & 2 deletions ij/plugin/ImageCalculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
/** This plugin implements the Process/Image Calculator command.
<pre>
// test script
imp1 = IJ.openImage("http://imagej.nih.gov/ij/images/boats.gif")
imp2 = IJ.openImage("http://imagej.nih.gov/ij/images/bridge.gif")
imp1 = IJ.openImage("http://imagej.net/ij/images/boats.gif")
imp2 = IJ.openImage("http://imagej.net/ij/images/bridge.gif")
imp3 = ImageCalculator.run(imp1, imp2, "add create 32-bit");
imp3.show();
</pre>
Expand Down
4 changes: 2 additions & 2 deletions ij/plugin/Macro_Runner.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ private static String runScript(Object plugin, String script, String arg) {
/** Runs a BeanShell script on the current thread, passing a string argument,
which the script can retrieve using the getArgument() function. Returns,
as a string, the last expression evaluated by the script.
Uses the plugin at http://imagej.nih.gov/ij/plugins/bsh/
Uses the plugin at http://imagej.net/ij/plugins/bsh/
to run the script.
*/
public static String runBeanShell(String script, String arg) {
Expand All @@ -309,7 +309,7 @@ public static String runBeanShell(String script, String arg) {
which the script can retrieve using the getArgument() function. Returns,
as a string, the value of the variable 'result'. For example, a Python script
containing the line "result=123" will return the string "123".
Uses the plugin at http://imagej.nih.gov/ij/plugins/jython/
Uses the plugin at http://imagej.net/ij/plugins/jython/
to run the script.
*/
public static String runPython(String script, String arg) {
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/ZProjector.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static ImagePlus run(ImagePlus imp, String method) {
/** Performs projection using the specified method and stack range, and returns
the result, where 'method' is "avg", "min", "max", "sum", "sd" or "median".
Add " all" to 'method' to project all hyperstack time points. <br>
Example: http://imagej.nih.gov/ij/macros/js/ProjectionDemo.js
Example: http://imagej.net/ij/macros/js/ProjectionDemo.js
*/
public static ImagePlus run(ImagePlus imp, String method, int startSlice, int stopSlice) {
ZProjector zp = new ZProjector(imp);
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/filter/Benchmark.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/** Implements the Plugins/Utilities/Run Benchmark command when
the current image is 512x512 and RGB. Results and additional
benchmarks are available at<br>
"http://imagej.nih.gov/ij/plugins/benchmarks.html". */
"http://imagej.net/ij/plugins/benchmarks.html". */
public class Benchmark implements PlugInFilter{

String arg;
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/filter/FFTFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
This class implements the Process/FFT/Bandpass Filter command. It is based on
Joachim Walter's FFT Filter plugin at "http://imagej.nih.gov/ij/plugins/fft-filter.html".
Joachim Walter's FFT Filter plugin at "http://imagej.net/ij/plugins/fft-filter.html".
2001/10/29: First Version (JW)
2003/02/06: 1st bugfix (works in macros/plugins, works on stacks, overwrites image(=>filter)) (JW)
2003/07/03: integrated into ImageJ, added "Display Filter" option (WSR)
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/filter/MaximumFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ public void run(ImageProcessor ip) {

/** Finds the image maxima and returns them as a Polygon, where
* poly.npoints is the number of maxima. There is an example at<br>
* http://imagej.nih.gov/ij/macros/js/FindMaxima.js.
* http://imagej.net/ij/macros/js/FindMaxima.js.
* @param ip The input image
* @param tolerance Height tolerance: maxima are accepted only if protruding more than this value
* from the ridge to a higher maximum
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/filter/ParticleAnalyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ public static void setLineWidth(int width) {

/** Sets the RoiManager to be used by the next ParticleAnalyzer
instance. There is a JavaScript example at
http://imagej.nih.gov/ij/macros/js/HiddenRoiManager.js
http://imagej.net/ij/macros/js/HiddenRoiManager.js
*/
public static void setRoiManager(RoiManager manager) {
staticRoiManager = manager;
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/frame/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ public void evaluateScript(String ext) {
plugin = "bsh";
url = "/plugins/bsh/BeanShell.jar";
} else {
// download Jython from http://imagej.nih.gov/ij/plugins/jython/
// download Jython from http://imagej.net/ij/plugins/jython/
plugin = "Jython";
url = "/plugins/jython/Jython.jar";
}
Expand Down
Loading

0 comments on commit 8799326

Please sign in to comment.