Skip to content

Commit

Permalink
2024.07.11 (1.54k12; IJ.openImage)
Browse files Browse the repository at this point in the history
  • Loading branch information
rasband committed Jul 12, 2024
1 parent 0abfe3e commit 7746fcb
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
4 changes: 3 additions & 1 deletion ij/IJ.java
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,9 @@ public static ImagePlus openImage(String path) {

/** Opens the nth image of the specified tiff stack. */
public static ImagePlus openImage(String path, int n) {
return (new Opener()).openImage(path, n);
Opener opener = new Opener();
opener.doNotUseBioFormats();
return opener.openImage(path, n);
}

/** Opens the specified tiff file as a virtual stack. */
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 = "11";
public static final String BUILD = "12";
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
7 changes: 6 additions & 1 deletion ij/io/Opener.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class Opener {
private static boolean bioformats;
private String url;
private boolean useHandleExtraFileTypes;
private boolean doNotUseBioFormats;

static {
Hashtable commands = Menus.getCommands();
Expand Down Expand Up @@ -1332,7 +1333,7 @@ public int getFileType(String path) {
return UNKNOWN; // The LSM Reader plugin opens these files

// OME TIFF
if (bioformats && name.contains(".ome.tif"))
if (!doNotUseBioFormats && bioformats && name.contains(".ome.tif"))
return UNKNOWN; // Open with Bio-formats plugin

// TIFF
Expand Down Expand Up @@ -1476,5 +1477,9 @@ public static void setOpenUsingPlugins(boolean b) {
public static boolean getOpenUsingPlugins() {
return openUsingPlugins;
}

public void doNotUseBioFormats() {
doNotUseBioFormats = true;
}

}
4 changes: 2 additions & 2 deletions ij/plugin/frame/Recorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void keyPressed (KeyEvent e) {
* resumeRecording the same number of times to resume recording.
* The suspendRecording method does nothing if the Recorder window is not open. */
public static void suspendRecording() {
if (getInstance() == null) return;
if (getInstance()==null) return;
notRecordingThreads.add(Thread.currentThread());
}

Expand All @@ -127,7 +127,7 @@ public static void suspendRecording() {
* The resumeRecording method is unrelated to recording in macros, i.e.,
* resumeRecording does not enable recording in macros; use 'recordInMacros' for this. */
public static void resumeRecording() {
if (getInstance() == null) return;
if (getInstance()==null) return;
notRecordingThreads.remove(Thread.currentThread());
}

Expand Down
4 changes: 3 additions & 1 deletion release-notes.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</head>
<body>

<li> <u>1.54k11 2 July 2024</u>
<li> <u>1.54k12 11 July 2024</u>
<ul>
<li> Thanks to Bram van den Broek, the <i>Image&gt;Duplicate</i>
command enables the "Ignore Selection" option when the ROI is
Expand All @@ -28,6 +28,8 @@
<li> Thanks to Oleg Dobrokhotov, fixed bug with the
"non-antialiased" option of the setFont() macro
function to not work as expected.
<li> Thanks to Jonathan Cottet, fixed bug with
IJ.openImage(path,n) opening .ome.tif files.
<li> Thanks to Felix Rudolphi and Curtis Rueden, fixed a
1.54i regression that caused FileOpener to throw
HeadlessExceptions in headless environments.
Expand Down

1 comment on commit 7746fcb

@imagesc-bot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/ij-openimage-java-lang-string-path-int-n-error-only-in-versions-1-54f/98911/8

Please sign in to comment.