Providing example images with a plugin : where and how?


#1

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 (https://github.com/NicoKiaru/TestImages/blob/master/StanfordBunny/Rabbit.tif). 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 ?

Thanks!


#2

This works for me for your example image:

https://raw.githubusercontent.com/NicoKiaru/TestImages/master/StanfordBunny/Rabbit.tif

See:

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


#3

Awesome, thank you!___


#4

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 https://raw.githubusercontent.com/XXX URL but users can also open it from within ImageJ/Fiji.

Best,
Stefan


#5

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:


#6

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