The Command Line OMERO.importer

The OMERO.importer command line tool (CLI) allows you to add images into an OMERO.server from the command line, and is ideally suited for anyone wanting to use a shell-scripted or web-based front-end interface for importing. Based upon the same set of libraries as the standard importer, the command line version supports the same files formats and functions in much the same way. (For a full list of supported file types, see: ImporterFormats).

Starting the Command Line Importer

There are two ways to use the importer: Either by using the included shell scripts for Linux and Macintosh, or by calling the ome.formats.importer.cli.CommandLineImporter class directly from java on the command line (you will also need to include a path to the required support jars - look inside of the importer-cli.sh scripts for an example of how to do this). It is highly recommended you give the command line importer additional memory to run using the java command line option "-Xm256m".

An example of starting the importer from the command line might look like this:

> java -Xmx256m -cp '<PATH TO JARS>' ome.formats.importer.cli.CommandLineImporter

From server installation

If you have an entire server installation, starting the ImporterCLI is simpler since all the libraries are available under lib/client:

bin/omero import -s localhost ...

This can also be used to detect what a command would import.

bin/omero import -f /path/to/file

will print on standard out a list of all the files which would be imported in groups separated by "#" comments.

Command Line Options

The CLI importer takes a number of mandatory and optional arguements to run, as follows:

 Usage:  importer-cli [OPTION]... [DIR|FILE]... 
   or:   importer-cli [OPTION]... - 

Import any number of files into an OMERO instance.
If "-" is the only path, a list of files or directories 
is read from standard in. Directories will be searched for 
all valid imports.

Mandatory arguments:
  -s    OMERO server hostname
  -u    OMERO experimenter name (username)
  -w    OMERO experimenter password
  -k    OMERO session key (can be used in place of -u and -w)
  -f    Display the used files (does not require other mandatory arguments)

Optional arguments:
  -c    Continue importing after errors
  -l    Use the list of readers rather than the default
  -d    OMERO dataset Id to import image into
  -r    OMERO screen Id to import plate into
  -n    Image name to use
  -x    Image description to use
  -p    OMERO server port [defaults to 4063]
  -h    Display this help and exit

  --debug[=0|1|2]   Turn debug logging on (optional level)
  --report          Report errors to the OME team
  --upload          Upload broken files with report
  --email=...       Email for reported errors
 
ex. importer-cli -s localhost -u bart -w simpson -d 50 foo.tiff

Report bugs to <ome-users@lists.openmicroscopy.org.uk>

These options will also be displayed on the command line by passing no arguments or "-h" to the importer.


See also: ImportLibrary, ImporterFormats

1.2.1-PRO © 2008-2009 agile42 all rights reserved (this page was served in: 0.14570 sec.)