Providing example images with a plugin : where and how?



Hello everybody,

I would like to make a tutorial for a Fiji plugin. As part of this tutorial, I would like the user to access easily some test images (a few MB), fitted for this plugin. Here’s what I tried:

  • I checked the standard sample images but none is fitted with what I want.
  • I added the file direclty in the resources of my plugin, but it is a mess to be able to open it both in an ide and within a fiji user install
  • I made a github repo and put the file in it ( However when I tried to open it in fiji with File > Import > URL…, I don’t have any error but nothing shows up. What am I doing wrong ?

Any suggestions ?



This works for me for your example image:


However I use ,e.g., a github page for my ImageJ Eclipse plugin for downloads from a URL.


Awesome, thank you!___


Just as an additional idea, you could place the image in the resources folder of your project but also provide a short script to open the image, which you put into the resources/scripts/File/Samples/ folder of your project. This way, you can still link to it via the URL but users can also open it from within ImageJ/Fiji.



For consistency, it should be resources/scripts/File/Open_Samples/, so that the generated menu entry ends up in the File > Open Samples menu :slight_smile:


You are perfectly right, @imagejan! Two weeks without ImageJ and I start forgetting the menu structure :scream: