Login  Register

Leftover dialog when opening custom format as virtual stack in 1.52u

Posted by Alan Brooks on Mar 18, 2020; 11:49am
URL: http://imagej.273.s1.nabble.com/Leftover-dialog-when-opening-custom-format-as-virtual-stack-in-1-52u-tp5023048.html

I maintain a plugin for opening a custom raw file format as a virtual stack.
In 1.52t, it works fine.

In 1.52u, it opens the image but also throws up a modal/blocking dialog with
title "Opener" and content "File is not in a supported format, a reader
plugin is not available, or it was not found." (see attached screenshot)

<http://imagej.1557.x6.nabble.com/file/t379688/NotSupported.png

I suspect this has something to do with an underlying change in the
HandleExtraFileTypes infrastructure in 1.52u. I enable my custom raw format
plugin as such in HandleExtraFileTyes.java (checking for some magic byte
characters because unfortunately the files I am dealing with end with the
ambiguous file extension `.raw`):

// A. Brooks: Added Vvv .raw file handler
byte[] V_PREAMBLE = {0x44, 0x44, 0x43, 0x20};
if ((name.endsWith(".raw") || name.endsWith(".RAW")) &&
        buf[0]==V_PREAMBLE[0] &&
        buf[1]==V_PREAMBLE[1] &&
        buf[2]==V_PREAMBLE[2] &&
        buf[3]==V_PREAMBLE[3]) {
        // return tryPlugIn("brooks.io.VvvFile", path);
        return tryPlugIn("brooks.io.VvvVirtualStack", path);
}