Skip to content

Commit

Permalink
2018.07.18 (1.52f4)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Jul 18, 2018
1 parent 3b64d27 commit f98e875
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 34 deletions.
2 changes: 1 addition & 1 deletion ij/ImageJ.java
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.52f";
public static final String BUILD = "2";
public static final String BUILD = "4";
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
6 changes: 4 additions & 2 deletions ij/plugin/Clipboard.java
Expand Up @@ -38,9 +38,11 @@ else if (arg.equals("show"))

void copy(boolean cut) {
ImagePlus imp = WindowManager.getCurrentImage();
if (imp!=null)
if (imp!=null) {
imp.copy(cut);
else
if (cut)
imp.changes = true;
} else
IJ.noImage();
}

Expand Down
55 changes: 29 additions & 26 deletions ij/plugin/FolderOpener.java
Expand Up @@ -133,34 +133,33 @@ public void run(String arg) {
n = list.length;
start = 1;
increment = 1;
boolean dicomImages = false;
try {
if (isMacro) {
if (!showDialog(null, list))
return;
} else {
for (int i=0; i<list.length; i++) {
Opener opener = new Opener();
opener.setSilentMode(true);
IJ.redirectErrorMessages(true);
ImagePlus imp = opener.openImage(directory, list[i]);
IJ.redirectErrorMessages(false);
if (imp!=null) {
width = imp.getWidth();
height = imp.getHeight();
bitDepth = imp.getBitDepth();
if (arg==null) {
if (!showDialog(imp, list))
return;
}
break;
for (int i=0; i<list.length; i++) {
Opener opener = new Opener();
opener.setSilentMode(true);
IJ.redirectErrorMessages(true);
ImagePlus imp = opener.openImage(directory, list[i]);
IJ.redirectErrorMessages(false);
if (imp!=null) {
width = imp.getWidth();
height = imp.getHeight();
bitDepth = imp.getBitDepth();
String info = (String)imp.getProperty("Info");
if (info!=null && info.contains("7FE0,0010"))
dicomImages = true;
if (arg==null) {
if (!showDialog(imp, list))
return;
}
break;
}
if (width==0) {
IJ.error("Sequence Reader", "This folder does not appear to contain\n"
+ "any TIFF, JPEG, BMP, DICOM, GIF, FITS or PGM files.\n \n"
+ " \""+directory+"\"");
return;
}
}
if (width==0) {
IJ.error("Sequence Reader", "This folder does not appear to contain\n"
+ "any TIFF, JPEG, BMP, DICOM, GIF, FITS or PGM files.\n \n"
+ " \""+directory+"\"");
return;
}
String pluginName = "Sequence Reader";
if (legacyRegex!=null)
Expand All @@ -170,7 +169,7 @@ public void run(String arg) {
return;
IJ.showStatus("");
t0 = System.currentTimeMillis();
if (sortFileNames)
if (sortFileNames || dicomImages)
list = StringSorter.sortNumerically(list);

if (n<1)
Expand Down Expand Up @@ -373,6 +372,8 @@ else if (label2!=null && !label2.equals(""))
filter = "["+filter+"]";
options = options + " file=" + filter;
}
if (!sortByMetaData)
options = options + " noMetaSort";
Recorder.recordCall("imp = FolderOpener.open(\""+directory+"\", \""+options+"\");");
}

Expand Down Expand Up @@ -427,6 +428,8 @@ boolean showDialog(ImagePlus imp, String[] list) {
filter = "("+legacyRegex+")";
convertToRGB = gd.getNextBoolean();
sortFileNames = gd.getNextBoolean();
if (!sortFileNames)
sortByMetaData = false;
openAsVirtualStack = gd.getNextBoolean();
if (openAsVirtualStack)
scale = 100.0;
Expand Down
4 changes: 3 additions & 1 deletion ij/plugin/filter/ScaleDialog.java
Expand Up @@ -101,8 +101,10 @@ public void run(ImageProcessor ip) {
cal.pixelHeight = cal.pixelWidth;
cal.setUnit(unit);
}
if (!cal.equals(calOrig))
if (!cal.equals(calOrig)) {
imp.setCalibration(cal);
imp.changes = true;
}
imp.setGlobalCalibration(global2?cal:null);
if (global2 || global2!=global1)
WindowManager.repaintImageWindows();
Expand Down
13 changes: 9 additions & 4 deletions release-notes.html
Expand Up @@ -5,13 +5,18 @@
</head>
<body>

<li> <u>1.52f 12 July 2018</u>
<li> <u>1.52f 18 July 2018</u>
<ul>
<li> Thanks to 'Sethur', added a 'noMetaSort' option to the options
string of the FolderOpener.open(dir,options) method. This option
disables sorting of DICOM stacks by series number (0020,0011).
<li> Thanks to 'Sethur', ImageJ no longer sorts imported DICOM
stacks by series number (tag 0020,0011) if "Sort images numerically"
is not checked in the <i>File&gt;Import&gt;ImageSequence</i>
dialog. Also added a recordable 'noMetaSort' option to the options
string of the FolderOpener.open(dir,options) method.
<li> Thanks to Christian Tischer, fixed bugs in the RoiManager.add(ImagePlus,Roi,int)
method than caused it to not behave as expected if the ROI name was not null.
<li> Thanks to Norbert Vischer, fixed bugs that caused the
<i>Edit&gt;Cut</i> and <i>Analyze&gt;Set Scale</i> commands
to not set the 'changes' flag.
</ul>

<li> <u>1.52e 11 July 2018</u>
Expand Down

0 comments on commit f98e875

Please sign in to comment.