diff --git a/ij/ImageJ.java b/ij/ImageJ.java index 54cf1ad61..1b4965d1e 100644 --- a/ij/ImageJ.java +++ b/ij/ImageJ.java @@ -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 = "1"; + public static final String BUILD = "2"; 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); diff --git a/ij/plugin/FolderOpener.java b/ij/plugin/FolderOpener.java index d7735f053..3cace7c64 100644 --- a/ij/plugin/FolderOpener.java +++ b/ij/plugin/FolderOpener.java @@ -21,6 +21,7 @@ public class FolderOpener implements PlugIn { private static boolean staticOpenAsVirtualStack; private boolean convertToRGB; private boolean sortFileNames = true; + private boolean sortByMetaData = true; private boolean openAsVirtualStack; private double scale = 100.0; private int n, start, increment; @@ -40,15 +41,21 @@ public static ImagePlus open(String path) { /** Opens the images in the specified directory as a stack. Opens the images as a virtual stack if the 'options' string contains - "virtual" or "use". Add " file=abc" to 'options' to only open - images with, for example, "abc" in their name. Displays directory - chooser and options dialogs if the the 'path' argument is null. */ + 'virtual' or 'use'. Add ' file=abc' to the options string to only open + images with, for example, 'abc' in their name. Add ' noMetaSort' to + disable sorting of DICOM stacks by series number (0020,0011). + Displays directory chooser and options dialogs if the the 'path' + argument is null. */ public static ImagePlus open(String path, String options) { if (options==null) options = ""; FolderOpener fo = new FolderOpener(); fo.saveImage = true; - fo.openAsVirtualStack = options!=null && (options.contains("virtual")||options.contains("use")); + if (options!=null) { + fo.openAsVirtualStack = options.contains("virtual") || options.contains("use"); + if (options.contains("noMetaSort")) + fo.sortByMetaData = false; + } fo.filter = Macro.getValue(options, "file", ""); fo.run(path); return fo.image; @@ -331,7 +338,8 @@ else if (label2!=null && !label2.equals("")) imp2.setCalibration(cal); } if (info1!=null && info1.lastIndexOf("7FE0,0010")>0) { - stack = DicomTools.sort(stack); + if (sortByMetaData) + stack = DicomTools.sort(stack); imp2.setStack(stack); double voxelDepth = DicomTools.getVoxelDepth(stack); if (voxelDepth>0.0) { @@ -533,6 +541,10 @@ public void sortFileNames(boolean b) { sortFileNames = b; } + public void sortByMetaData(boolean b) { + sortByMetaData = b; + } + /** Sorts file names containing numerical components. * @see ij.util.StringSorter#sortNumerically * Author: Norbert Vischer diff --git a/ij/plugin/frame/RoiManager.java b/ij/plugin/frame/RoiManager.java index 4a062bb9a..5cb0305ba 100644 --- a/ij/plugin/frame/RoiManager.java +++ b/ij/plugin/frame/RoiManager.java @@ -433,7 +433,7 @@ String getHex(Color color) { * be used to form the first part of the ROI label if it is zero or greater. * @param imp the image associated with the ROI, or null * @param roi the Roi to be added - * @param n if zero or greater, will be used to form irst part of the label + * @param n if zero or greater, will be used to form the first part of the label */ public void add(ImagePlus imp, Roi roi, int n) { if (IJ.debugMode && n<3 && roi!=null) IJ.log("RoiManager.add: "+n+" "+roi.getName()); diff --git a/release-notes.html b/release-notes.html index 517836211..01cf54392 100644 --- a/release-notes.html +++ b/release-notes.html @@ -5,10 +5,13 @@ -
  • 1.52e 11 July 2018 +
  • 1.52f 12 July 2018
  • 1.52e 11 July 2018