Closed MarkRivers closed 4 years ago
I made progress on this problem. The installation instructions say to unzip into the top-level of Fiji. For ImageJ this does not work, I needed to copy the .jar file to the plugins/ directory and the lib/ folder to the top-level of ImageJ. Once I did that when I try to open a file I get the following traceback:
ImageJ 1.52u; Java 1.8.0_112 [64-bit]; Linux 3.10.0-862.14.4.el7.x86_64; 51MB of 43581MB (<1%)
java.lang.NoSuchMethodError: org.slf4j.Logger.trace(Ljava/lang/String;)V
at ncsa.hdf.object.h5.H5ScalarDS.init(H5ScalarDS.java:364)
at ch.psi.imagej.hdf5.HDF5Utilities.getDatasets(HDF5Utilities.java:161)
at ch.psi.imagej.hdf5.HDF5Utilities.getDatasets(HDF5Utilities.java:164)
at ch.psi.imagej.hdf5.HDF5Utilities.getDatasets(HDF5Utilities.java:145)
at ch.psi.imagej.hdf5.HDF5Utilities.getDatasets(HDF5Utilities.java:134)
at ch.psi.imagej.hdf5.HDF5Reader.open(HDF5Reader.java:86)
at ch.psi.imagej.hdf5.HDF5Reader.open(HDF5Reader.java:51)
at ch.psi.imagej.hdf5.HDF5Reader.run(HDF5Reader.java:36)
at ij.IJ.runUserPlugIn(IJ.java:233)
at ij.IJ.runPlugIn(IJ.java:196)
at ij.Executer.runCommand(Executer.java:150)
at ij.Executer.run(Executer.java:68)
at java.lang.Thread.run(Thread.java:745)
It looks like I need to install the slf4j package. Is there a jar file available for that?
Hello Mark
First of all regarding your Windows question, no right now Windows is not supported right now. Whats missing is the windows hdf precompiled binaries and a good amount of testing. But technically it would be possible.
Regarding the slf4j, actually the plugin jar contains the slf4j code so there should be no need to copy/download any other jar. However I suspect that the latest imageJ might come with a different version of slf4j and that there might be a conflict. I'm going to look into this
Hey Mark I cannot reproduce your problem, i can install and use the plugin with ImageJ on a vanilla Linux machine. This is how I did the installation:
# 'Im in the users home directory
# download latest ImageJ
curl -O http://wsr.imagej.net/distros/linux/ij152-linux64-java8.zip
# Download lastest plugin release
curl -LO https://github.com/paulscherrerinstitute/ch.psi.imagej.hdf5/releases/download/0.12.0/HDF5_Viewer-0.12.0.zip
# Installing ImageJ
unzip ij152-linux64-java8.zip
# Installing plugin
cd ImageJ/
unzip ~/HDF5_Viewer-0.12.0.zip
Then i can open ImageJ and are able to use Import to open HDF5 files
./ImageJ
Can you try this procedure on your side and let me know if things then work for you?
@simongregorebner thanks very much!
Your recipe for installing on Linux was simple and worked fine. I think I was previously unzipping the Viewer in the wrong place and then trying to copy the files.
But I have more good news, the HDF5Reader actually works fine on Windows where I tested with Fiji!
This is from the ImageJ Console output:
Apr 22, 2020 2:30:42 PM ch.psi.imagej.hdf5.HDF5Reader open
INFO: Using manual selection
Apr 22, 2020 2:31:04 PM ch.psi.imagej.hdf5.HDF5Reader open
INFO: Reading dataset: data Dimensions: 3 Type: 16-bit unsigned integer
Apr 22, 2020 2:31:04 PM ch.psi.imagej.hdf5.HDF5Reader open
INFO: 3D Image
Apr 22, 2020 2:31:04 PM ch.psi.imagej.hdf5.HDF5Reader open
INFO: Use virtual stack
Apr 22, 2020 2:31:05 PM ch.psi.imagej.hdf5.ImagePlusHDF5 <init>
INFO: VirtualStackHDF5
I think this is working because I have installed HDFView (https://www.hdfgroup.org/downloads/hdfview/) on my machine, which puts this directory in the PATH.
C:\Program Files\HDF_Group\HDF5\1.10.5\bin\
That directory contains hdf5.dll
.
So this is a simple procedure to recommend to people who want to use the HDF5Reader plugin in ImageJ on Windows.
Hey @MarkRivers this sounds good. Regarding Windows, I will have a look to including the hdf5.dll from hdfview in the zip so that the Plugin would work out of the box. But I will also add the hint with hdfview to the readme. Thanks for sharing your findings!
there is a short hint in the readme now until the Windows .dll files are distributed with the zip.
I am trying to install with the latest version of ImageJ, not Fiji.
I think I correctly installed it following the instructions on their Web site.
This is the listing of the directories at the top level of ImageJ
This is the HDF5_Viewer-0.12.0/ directory:
This is the plugins directory:
I think that when I open ImageJ and do File/Import I should see a choice for HDF5, but I don’t.
Can you tell me what I am doing wrong?
I also see that the lib directory only contains this:
I assume this means there is no support for Windows? How hard would it be to add, given that I have a working version of the 1.10 HDF5 library on Windows?