Overview

The Bio-Formats command line tools provide a simple yet powerful suite of utilities for working with microscopy file formats. FARSIGHT provides access to the Bio-Formats command line tools through its Python command line.

Using the tools, you can read and display pixels and metadata, convert between formats, manipulate OME-XML, and more. This document provides an overview of the available commands, and describes some useful techniques for working with microscopy data from the command line.

showinf – Prints information about a given image file to the console, and displays the image itself in the Bio-Formats image viewer.

tiffcomment – Dumps the comment from the given TIFF file's first IFD entry; useful for examining the OME-XML block in an OME-TIFF file.

xmlindent – A simple XML prettifier similer to xmllint --format but more robust in that it attempts to produce output regardless of syntax errors in the XML.

xmlvalid – A command-line XML validation tool, useful for checking an OME-XML document for compliance with the OME-XML schema.

Supported file formats

You can generate a list of supported file formats using the formatlist command. The command allows for three different output formats—plain text, HTML, and XML—using the -txt, -html and -xml flags, respectively. If no arguments are provided, plain text output is used:

Displaying pixels

The bfview command launches the Bio-Formats Image Viewer, a simple tool for visualizing images. Optionally, you can specify a filename as an argument, to load it into the viewer. Or you can use the Open command on the File menu to load an image file.

The showinf command is similar, but has many more features from the command line. Type showinf with no arguments for a complete list of options. The following are some examples of showinf in action, using sample data from the LOCI web site.

In the example above, each Bio-Rad PIC file contains 33 image planes corresponding to the focal planes, with each file representing a single time point in an 85 point time series.

Bio-Formats is pretty smart about detecting the "file pattern" of a collection of files. The result is expressed with a notation using angle brackets indicating the first and last numbers of the collection (in the example above: "dub<01-85>.pic"). More complex patterns are possible as well—e.g.: "tubhiswt_C<1-2>_TP<1-43>.ome.tif" or "nd40<01-60>0<2-3>.pic" or "<00-36:3>m.tiff" (00m.tiff, 03m.tiff, 06.tiff, etc., through 36m.tiff).

Other options

There are several other options that affect how the pixel data is read or displayed: