You may wish to first try the existing 32-bit DLL on a 32-bit JVM though
Thanks for your suggestion Melissa. I installed a 32-bit version of Fiji and ImageJ-ND-Viewer-Plugin-32bit.msi (installing it to the Fiji directory as instructed in the PDF
http://rsb.info.nih.gov/ij/plugins/docs/ND2Reader.pdf) and added LegacyND2Reader.dll to Fiji's plugin folder. The importing performance in Fiji/Bioformats with the DLL-based reader is indeed the same, however, I am not 100% convinced that Fiji is using the DLL-based reader of Bioformats and not falling back on the NativeND2Reader upon getting an
UnsatisfiedLinkError.
Here is the reason behind my suspicion.
1) I created a new folder call
D:\nd2test, copied LegacyND2Reader.dll into this folder and selected this folder as the installation folder for installing ImageJ-ND-Viewer-Plugin-32bit.msi
2) I created the following Java program
- Code: Select all
public class TestLegacyND2Reader {
public static void main(String[] args) {
System.loadLibrary("LegacyND2Reader");
}
}
3) I added the
nd2test folder to my java.library.path (i.e.,
-Djava.library.path=D:\nd2test)
When I run this program I get an
UnsatisfiedLinkError exception. Here's the stack trace
- Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: D:\nd2test\LegacyND2Reader.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
Besides the LegacyND2Reader, ipp*, v6* and a few other DLLs included with the msi installer (there are a total of 29 DLLs in my nd2test folder) would you happen to know what dependencies are required to load LegacyND2Reader?
Is there a way to know that when an ND2 file is imported into Fiji using the
Bio-Formats Import Options plugin that the DLL-based reader was successfully used to import the file?
Thanks,
Joe