Installing Old "Plugin"

Tags: #<Tag:0x00007fa304042f28> #<Tag:0x00007fa304042d70>


The group I am in recently got data from the European Synchrotron Radiation Facility. Unfortunately, to open the data sets, we need to use a custom “plugin”* as specified here. I am using Fiji (ImageJ 1.51n). However, ESRF uses ImageJ 1.46a (2011); and their plugin hasn’t been updated since 2004. Obviously there have been significant changes since then and the directions reference an older directory structure. Is there some way to get this plugin to work with my current version of Fiji or do I need to install and maintain multiple versions?

*By “plugin”, I mean additional code. I have no idea if it conforms to the standard ImageJ plugin format.

Providing Input for Dialog Boxes from a Script

Dear @Andrew_Shum,

That’s not entirely true, if you take a look at the projects GitHub page. There you can see that the last changes to the sources have been made in 2016.

You can try to download an archive version of that repository and copy the files from the ESRFPlugins/plugins/ subfolder into the plugins subfolder of your Fiji installation. You might have to use Plugins > ESRF Reader instead of File > Open to open ESRF files, though.



Thanks for the advice. I didn’t know you could run JAVA files like that (not compiled) using ImageJ. Unfortunately, still not a solution. Here is the current status. I have created the subfolder ESRF in plugins. There, I have placed the 6 files from the GitHub repository as well as the 4 files provided on the page. This results in 6 options appearing in the menu (even after renaming EdfMovie.txt to The 6 options are the following (in order): EdfRead, HSTVolReader, EDF Reader, EDF StackReader, ESRF Reader, ESRF Writer. With the exception of HSTVolReader, they all exit with a bunch of errors when I try to run them. For HSTVolReader, it opens a file selection window. After selecting a VOL file, it displays “Barf” in the status bar and exits. How do I know the plugins are done? I wait a bit and assume they exited if nothing happens.


If there is a JDK available, the files will be compiled when you are trying to execute them. In case of that process throws a lot of errors for me, which can be ignored, and opens up a dialog where I can select the filetype to open: EDF or EHF.

I have compiled the files to see if the plugins actually work for you. Could you check if you can run them if you copy this file into your plugins/ subdirectory?



Unfortunately, it appears to not work. I downloaded the JAR file and moved it into …/ To avoid potential duplicate plugins, I moved …/ up to …/ I then opened ImageJ and could not find Plugins > ESRF2 which implies that nothing from the JAR was recognized as a plugin. I tried moving the JAR up to …/ as well as renaming it to ESRF.jar (tried both locations). After each change, I closed and reopened ImageJ. I could not find entries for the ESRF plugins under Plugins. I am assuming that is where they appeared for you?


Sorry, my mistake! I had completely forgotten to mention that I had renamed the file to contain an underscore. Remove the previous file and download the new one (which essentially is a renamed version): esrf-imagej-plugins_-0.1.0-SNAPSHOT.jar. The plugins should show up in Plugins > ESRF > *.

Let me know if it works, s.t. I can file a pull request against the original project…


Just as you suspected, the issue was just the name of the JAR file. Just to be sure, I tried both the new one you provided and a renamed copy of the previous. Both worked the same. Unfortunately, it looks like HSTVolReader doesn’t show up. While the raw data and single-image files are EDFs, the reconstructed image stacks are VOL files. I am assuming I will need that other plugin to read those as ESRF Reader won’t do it. Not being able to drag-and-drop is annoying but being able to open the files through some means is far better than not being able to open them at all.


That’s true. HSTVolReader is not included in the GitHub project and its sources are not distributed.

That support could be added for ImageJ2 (which bundles ImageJ1 as you know it) if the readers and writers were implemented using SCIFIO. I have also invited the maintainer of the project (Olof Svensson) to this discussion especially with respect to implementing the readers as SCIFIO Formats.


Thanks for all your help so far.

Using Process > Batch > Virtual Stack... in a Macro

Okay, so this is going to seem really stupid but I only now realized what the issue was. The problem is not the version (ImageJ 1.51n) but the fact that I am using Fiji which is actually based on ImageJ2. The structure that the plugin was built for is used by ImageJ1 while ImageJ2 (and thus Fiji) uses a different structure. The plugin still has some bugs though.


ImageJ1 plugins work just fine in Fiji, as it is just ImageJ. In fact, still the majority of plugins in Fiji are actually ImageJ1-style plugins.

Fiji includes both ImageJ1 and ImageJ2, and a legacy layer allows to use both of them simultaneously.


Then how would you install those plugins for Fiji? We tried and couldn’t get them to work.


Am I understanding correctly that you got ESRF_Reader working correctly, and continue having issues using HSTVolReader_?

When I put the file HSTVolReader_.class from the page you linked in your other post into my ./ folder and restart Fiji, I see a Plugins > HSTVolReader entry in the menu. Is that true for you as well?


Yes, stelfrich was able to help me with most of the plugins by recompiling them. However, he was not able to help with HSTVolReader_.class since the Java file is not provided by the author. As I mentioned here (as well as in this topic), the plugin shows in the menu but doesn’t actually work. As mentioned in the other topic, I eventually decided to get my hands on a decompiler and verified that the status bar output I was seeing was the author’s creative way of indicating that the script had thrown an error. The only way I can get it to not throw an error is by using the regular ImageJ opening methods; which requires editing HandleExtraFileTypes.class. Fortunately, the author did provide this. Unfortunately, I couldn’t figure out how to get it to work with Fiji.