Is there a way that we can add plugins from Fiji update site from within pyimagej?
As far as I can tell, in
scyjava you have to add plugins via their Maven artifact when you initialize
Alternatively, if you use a local Fiji installation from Python, you’ll have to run the updater separately, e.g. from the command line, or via UI and restarting Fiji.
I don’t think there’s currently a way to add plugins/scripts from update sites that are not maven artifacts.
Which plugin(s) would you like to use?
Right, I know the maven artefact method, but it’s rather limited because not every plugin are maven artefacts yet. So now I am trying to use script to download a fiji folder, but I need to find a way to dynamically configure fiji to recapitulate what is being done with fiji updates sites. If I understand correctly, nowadays, fiji updates is the only way to get some plugins to imagej, or at least people don’t document other ways for manual installation.
For example, if I want to build a binder image for noise2void, I would like to either instruct Fiji to download it, or figure out what files should I download if I want to have noise2void installed in my Fiji.app folder.
Is there a general solution for this, eventually, I would like to build a tool in ImJoy that users can give a plugin name or fiji update sites name, and it automatically download the plugin files.
Here a example notebook on binder I am building:
In the case of N2V, it is probably sufficient to initialize with
de.csbdresden:n2v:0.8.4, as the N2V update site seems to ship just that artifact and its dependencies.
If you anyhow download Fiji when building the image, you could also start the updater from the command line:
There are plans to allow using plain (maven-enabled) git repositories as update sites, I hope that would make it easier for the use cases you describe. @ctrueden might want to comment on this.
Great, the Fiji updater works! I tried:
$HOME/Fiji.app/ImageJ-linux64 --update add-update-site Noise2Void https://sites.imagej.net/CSBDeep/ $HOME/Fiji.app/ImageJ-linux64 --update update
I think this should be enough for my case, especially when you will also support github repos.
One more question, when run the updater in command line, can I tell it resolve conflicts automatically and not asking any question? It’s not clear to me how the issues we often see from the GUI are resolved in CLI.
I am not sure, but did you check out these options:
update-force [<files>] update-force-pristine [<files>]