Skip to content

Commit

Permalink
2024.04.15 (1.54j15; DICOM tags)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Apr 15, 2024
1 parent 3b62815 commit 09d093c
Show file tree
Hide file tree
Showing 7 changed files with 4,515 additions and 107 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.54j";
public static final String BUILD = "10";
public static final String BUILD = "15";
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
2 changes: 1 addition & 1 deletion ij/ImagePlus.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ It also includes metadata (spatial calibration and possibly the directory/file w
@see ij.gui.ImageCanvas
*/

public class ImagePlus implements ImageObserver, Measurements, Cloneable, AutoCloseable {
public class ImagePlus implements ImageObserver, Measurements, Cloneable {

/** 8-bit grayscale (unsigned)*/
public static final int GRAY8 = 0;
Expand Down
9 changes: 8 additions & 1 deletion ij/gui/HistogramPlot.java
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,15 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
row5 = row4 + (int)(15*SCALE);
long count = stats.longPixelCount>0?stats.longPixelCount:stats.pixelCount;
String modeCount = " (" + stats.maxCount + ")";
if (histogram!=null) {// Add '*' if multi-modal histogram
int mcount = 0;;
for (int i=0; i<histogram.length; i++) {
if (histogram[i]==stats.maxCount) mcount++;
if (mcount>1) break;
}
if (mcount>1) modeCount=modeCount+"*";
}
if (modeCount.length()>12) modeCount = "";

ip.drawString("N: " + count, col1, row1);
ip.drawString("Min: " + d2s(stats.min), col2, row1);
ip.drawString("Mean: " + d2s(stats.mean), col1, row2);
Expand Down
6 changes: 6 additions & 0 deletions ij/gui/HistogramWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,12 @@ void drawText(ImageProcessor ip, int x, int y, boolean fixedRange) {
row5 = row4 + (int)(15*SCALE);
long count = stats.longPixelCount>0?stats.longPixelCount:stats.pixelCount;
String modeCount = " (" + stats.maxCount + ")";
if (histogram!=null) {// Add '*' if multi-modal histogram
int mcount = 0;;
for (int i=0; i<histogram.length; i++)
if (histogram[i]==stats.maxCount) mcount++;
if (mcount>1) modeCount=modeCount+"*";
}
if (modeCount.length()>12) modeCount = "";

ip.drawString("N: " + count, col1, row1);
Expand Down
11 changes: 3 additions & 8 deletions ij/measure/ResultsTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ public String getRowAsString(int row) {
if (columns[i]!=null) {
String value = getValueAsString(i,row);
if (quoteCommas) {
if (value!=null && value.contains(","))
if (value!=null && (value.contains(",")||value.equals("")))
value = "\""+value+"\"";
}
sb.append(value);
Expand Down Expand Up @@ -731,13 +731,8 @@ public Variable[] getColumnAsVariables(String column) {
String str = null;
if (Double.isNaN(value) && stringColumns!=null) {
ArrayList stringColumn = (ArrayList)stringColumns.get(Integer.valueOf(col));
if (stringColumn!=null && row>=0 && row<stringColumn.size()) {
str = (String)stringColumn.get(row);
if (firstValueNumeric && "".equals(str)) {
nValues = row;
break;
}
}
if (stringColumn!=null && row>=0 && row<stringColumn.size())
str = (String)stringColumn.get(row);
}
if (str!=null)
values[row] = new Variable(str);
Expand Down
Loading

0 comments on commit 09d093c

Please sign in to comment.