Skip to content

Commit

Permalink
2022.12.14 (1.54a16; Multi-point tool)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Dec 14, 2022
1 parent 9cbd91e commit 81bba6d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 42 deletions.
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.54a";
public static final String BUILD = "14";
public static final String BUILD = "16";
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
24 changes: 14 additions & 10 deletions ij/gui/PointRoi.java
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,10 @@ public PointRoi addPoint(double x, double y) {
/** Adds a point at the specified stack position. */
public void addPoint(double x, double y, int position) {
if (counters==null) {
counters = new short[100];
positions = new int[100];
int size = nPoints*2;
if (size<100) size=100;
counters = new short[size];
positions = new int[size];
}
addPoint(null, x, y);
positions[nPoints-1] = position;
Expand All @@ -395,22 +397,24 @@ private synchronized void incrementCounter(ImagePlus imp) {
boolean isStack = imp!=null && imp.getStackSize()>1;
if (counter!=0 || isStack || counters!=null) {
if (counters==null) {
counters = new short[nPoints*2];
positions = new int[nPoints*2];
int size = nPoints*2;
if (size<100) size=100;
counters = new short[size];
positions = new int[size];
}
counters[nPoints-1] = (short)counter;
if (imp!=null)
positions[nPoints-1] = imp.getStackSize()>1 ? imp.getCurrentSlice() : 0;
//if (positions[nPoints-1]==0 || positions[nPoints-1]==1 || counters[nPoints-1]==0)
// IJ.log("incrementCounter: "+nPoints+" "+" "+positions[nPoints-1]+" "+counters[nPoints-1]+" "+imp);
if (nPoints+1==counters.length) {
if (nPoints>=counters.length) {
short[] temp = new short[counters.length*2];
System.arraycopy(counters, 0, temp, 0, counters.length);
counters = temp;
int[] temp1 = new int[counters.length*2];
System.arraycopy(positions, 0, temp1, 0, positions.length);
positions = temp1;
}
counters[nPoints-1] = (short)counter;
if (imp!=null)
positions[nPoints-1] = imp.getStackSize()>1 ? imp.getCurrentSlice() : 0;
//if (positions[nPoints-1]==0 || positions[nPoints-1]==1 || counters[nPoints-1]==0)
//IJ.log("incrementCounter: "+nPoints+" "+counters.length+" "+counters[nPoints-1]+" "+positions[nPoints-1]+" "+imp);
}
if (rt!=null && WindowManager.getFrame(getCountsTitle())!=null)
displayCounts();
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/AboutBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public void run(String arg) {
text[0] = "ImageJ "+ImageJ.VERSION+ImageJ.BUILD;
text[1] = "Wayne Rasband and contributors";
text[2] = "National Institutes of Health, USA";
text[3] = IJ.URL;
text[3] = "http://imagej.org";
text[4] = "Java "+System.getProperty("java.version")+(IJ.is64Bit()?" (64-bit)":" (32-bit)");
text[5] = IJ.freeMemory();
text[6] = "ImageJ is in the public domain";
Expand Down
2 changes: 1 addition & 1 deletion ij/plugin/BrowserLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class BrowserLauncher implements PlugIn {
public void run(String theURL) {
if (error) return;
if (theURL==null || theURL.equals(""))
theURL = IJ.URL;
theURL = "http://imagej.org";
try {openURL(theURL);}
catch (IOException e) {}
}
Expand Down
3 changes: 1 addition & 2 deletions ij/plugin/filter/Binary.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@ void outline(ImageProcessor ip) {
void median(ImageProcessor ip) {
ip.resetThreshold();
new RankFilters().rank(ip, medianRadius, RankFilters.MEAN);
//ip.threshold(128,255);
ip.threshold(127);
ip.threshold(128,255);
}

void skeletonize(ImageProcessor ip) {
Expand Down
26 changes: 1 addition & 25 deletions ij/process/ImageProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -1940,31 +1940,7 @@ public int[] getPixel(int x, int y, int[] iArray) {
public void putPixel(int x, int y, int[] iArray) {
putPixel(x, y, iArray[0]);
}

/*
public int[] getRGBValue(int index, int[] rgb) {
if (rgb==null) rgb = new int[3];
if (this instanceof ColorProcessor)
return rgb;
if (rLUT1==null) {
if (cm==null)
makeDefaultColorModel();
baseCM = cm;
IndexColorModel m = (IndexColorModel)cm;
rLUT1 = new byte[256]; gLUT1 = new byte[256]; bLUT1 = new byte[256];
m.getReds(rLUT1); m.getGreens(gLUT1); m.getBlues(bLUT1);
}
int min2=(int)getMin(), max2=(int)getMax();
double scale = 256.0/(max2-min2+1);
double value = getf(index)-min2;
if (value<0.0) value = 0.0;
int v = (int)(value*scale+0.5);
if (v>255) v = 255;
rgb[0]=rLUT1[v]; rgb[1]=gLUT1[v]; rgb[2]=bLUT1[v];
return rgb;
}
*/


/** Uses the current interpolation method (bilinear or bicubic)
to find the pixel value at real coordinates (x,y). */
public abstract double getInterpolatedPixel(double x, double y);
Expand Down
7 changes: 5 additions & 2 deletions release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
</head>
<body>

<li> <u>1.54a14 10 December 2022</u>
<li> <u>1.54a16 14 December 2022</u>
<ul>
<li> Thanks to Herbie Gluender, added the
<i>Process&gt;Binary&gt;Median</i>
command.
command and the ImageProcessor.threshold(level1,level2)
method.
<li> Thanks to Christian Tischer, added the
AVI_Reader.open(path,options) method.
<li> Thanks to Wilhelm Burger, added a GenericDialog.addEnumChoice()
Expand All @@ -24,6 +25,8 @@
(<a href="http://wsr.imagej.net/macros/PlotsWithVaryingSizeSymbols.ijm">example</a>).
<li> Thanks to 'rlazevedo1', fixed a bug that caused the range arrow overlay to
be included when saving a plot in tiff format.
<li> Thanks to Eg Laf, fixed a bug that caused the multi-point tool
to throw an exception when used for counting.
</ul>

<li> <u>1.53v 21 November 2022</u>
Expand Down

0 comments on commit 81bba6d

Please sign in to comment.