imagej / imagej-server

A RESTful web server for ImageJ [EXPERIMENTAL]
Apache License 2.0
38 stars 17 forks source link

developer chat

ImageJ Server

This is a RESTful image server backed by ImageJ.

To provide easy-to-use and highly reusable image processing functionalities is a central goal of ImageJ. As a result, the components of ImageJ are modular, to make them easily accessible from other Java programs. However, for programs written in other languages besides Java, the interaction becomes complicated. In order to mitigate this problem, this RESTful image server is offered as a universal interfacing layer.

See the Rationale page of this repository's wiki for a longer discussion of cross-language integration and interoperability.

This is currently only a prototype! Testing needed!

Launching

The server can run with a graphical display, or in headless mode.

There are several ways to invoke the server:

If ImageJ is already running * Use _Plugins › Utilities › Start Server_ to make ImageJ start listening for remote commands. * Use _Plugins › Utilities › Stop Server_ to shut down the server. The local ImageJ will continue running. You must enable the Server [update site](https://imagej.net/Update_Sites) first.
Launch via jgo The [jgo](https://github.com/scijava/jgo) launcher makes it easy to launch the ImageJ Server. No need to explicitly clone the repository or download any JARs. After installing jgo, add the following stanza to your `~/.jgorc` file: ```ini [repositories] imagej.public = https://maven.imagej.net/content/groups/public ``` Then invoke the server with a graphical display as follows: ``` jgo net.imagej:imagej-server ``` Or in headless mode: ``` jgo -Djava.awt.headless=true net.imagej:imagej-server ```
Launch from CLI via Maven Clone this repository. Then start the server from the CLI _in headless mode_: ``` mvn -Pexec ```
Launch from IDE Clone this repository, import the project, then run the class `net.imagej.server.Main`. The server will launch _in headless mode_.
Launch via the ImageJ Launcher Enable the Server [update site](https://imagej.net/Update_Sites). Then launch ImageJ with a graphical display: ``` ./ImageJ --server ``` Or in headless mode: ``` ./ImageJ --server --headless ``` See also the [ImageJ Launcher](https://imagej.net/Launcher) documentation.
Including additional plugins If you want to make additional ImageJ plugins (e.g. plugins from [Fiji](https://github.com/fiji)) available remotely, you can include the additional components on the runtime classpath. One easy way is via the `jgo`-based launch mechanism with the `+` syntax. For example: ``` jgo sc.fiji:fiji+net.imagej:image-server ``` Another way is make your own Maven project depending on `net.imagej:imagej-server` and other things, with a `main` entry point that invokes `net.imagej.server.Main.main(String[])`.

Usage

Python Client

The pyimagej module includes a Python wrapper for the web API.

Postman Collection

A collection of sample API calls to imagej-server using Postman.

Web client with GUI

Installation

Compilation and execution (development)

APIs

Notes and memo