Introduction
BIP is a command-line interface tool for processing and analysing images, with a specific bias towards microscopy images that are typically generated in developmental and cell biology research studies. The software integrates many standard algorithms as well as specific algorithms we have developed in our own research projects. Many functionalities are quite generic image processing operators, while others address specific needs typically encountered in bioimage analysis. We initially developed BIP for our own needs and now make it available to a wider audience in the hope it will be useful to others.
Important
A key design principle in BIP is to rely on two main abstraction principles, unifying different modes of use: (1) data abstraction unifies the single image and the batch modes, and also unifies the processing of different image types (2D, 3D, 2D+t, etc.); (2) process abstraction unifies the single operation and the pipeline modes.
Thanks to these design principles, there is no difference in processing a simple 2D image or a 5D(3D+t+c) image, or in applying a simple operation to a single image or a complex pipeline to thousands of images. For example:
bip gaussian-filter 1.0 image2D.tif
bip gaussian-filter 1.0 image5D.tif
bip gaussian-filter 1.0 *.tif
bip pipeline my-pipeline.bip image.tif
bip pipeline my-pipeline.bip *.tif
Image types
The first major feature of BIP is to support all images types that are typically encountered in bioimage processing. This includes all combinations of image dimensions (2D and 3D), number of channels (such as different fluorescent channels), and number of time-points (as acquired in time-lapse experiments). Vectorial images are also supported, in which two or more values can be assigned to each image position. Such images covers true color RGB images (as typically processed in histological studies) but also gradient images (with one gradient component per image dimension), results of Fourier transforms, etc. Though such images could be represented as multi-channel images, there are some theoretical and practical motivations for having this specific representation. Among others, this also implies that multi-channel vectorial images are also supported.
Numerical types
The second major feature is that BIP supports all standard numerical types, from the most usual ones in microscopy (unsigned 8-bits and unsigned 16-bits) to less classical ones. The complete list include unsigned char (8-bits), signed char (8-bits), unsigned short (16-bits), signed short (16-bits), unsigned int, signed int, float (known as 32-bits in ImageJ/Fiji) and double (Table 1). This allows in particular to implement pipelines in which the desired numerical precision is preserved throughout. A specific operator implements conversions between all numerical types (see convert operator).
Type |
Bits |
Min |
Max |
Note |
|---|---|---|---|---|
|
8 |
0 |
255 |
A.k.a. 8 bits (Fiji) |
|
8 |
-128 |
127 |
|
|
16 |
0 |
65535 |
A.k.a. 16 bits (Fiji) |
|
16 |
-32768 |
32767 |
|
|
32 |
0 |
4,294,967,295 |
|
|
32 |
-2,147,483,648 |
2,147,483,647 |
|
|
32 |
-3.4e+38 |
3.4e+38 |
A.k.a. 32 bits (Fiji) |
|
64 |
-1.8e+304 |
1.8e+304 |
BIP operators automatically detect image type and numerical type from the input images, thus offering a user-transparent support for all possible numerical types. Almost all operators support all types and write the output image in the same numerical type as the input image. Some operators store the output image in a different type. This is the case for example for operators computing real values on output (e.g., Euclidean distance transform or Fourier transform).
Batch processing
The third major feature of BIP is to be designed for batch processing of image datasets. BIP can take as input one or several images and process them according to the specified operator. As a command-line tool, BIP can rely on the features of the shell to process complete set of images or only subsets defined using specific filename patterns. For example, to apply an operator to all images within an input directory, simply enter:
bip <operator> ../input/*.tif
Using shell wildcards allows to easily perform complex selections of files to process. For example, provided a standardized filename nomenclature (such as using the ISO 8601 standard to represent dates) has been adopted (which is more than highly recommended), the images acquired in October, November and December 2017 and 2019 on DAPI-stained samples would be typically processed by the following command:
bip <operator> ../input/*201[79]-1[012]-*DAPI*.tif
Pipelines
The fourth major feature of BIP is to allow easy definition and application of pipelines. Pipeline syntax has been designed to be as simple as possible. As a result, a pipeline is simply defined by the list of the corresponding operators, using the same syntax as the one used when invoking each operator individually. The sequence of operators composing a pipeline is typically listed in a text file. However, an option is also available to define pipeline upon invocation on the command line. See Pipelines to learn more on the advantages of pipelines and how to use them.
Image file formats
One limitation of BIP is the absence of support for a large number of image file formats. Indeed, the main supported format for input images in BIP is the TIFF file format and its BigTIFF declination. However, tools are available (for example in ImageJ/Fiji) for converting images from almost any format to TIFF. In addition, BIP also supports some formats derived from TIFF, such as Zeiss LSM image file format.
By default, BIP stores output images as compressed TIF files, using the lossless LZW compression scheme. This may be an issue for some image readers. Compression as a default writing mode can therefore be disabled using the global -u option (see Global options). In addition, users can use the BIP uncompress operator to uncompress their files at times where they process them with specific readers, before using the compress operator for long-term storage when done.
Getting help
The primary way to get help with the software is to continue reading this manual, which is available in PDF and HTML format. Note in particular the existence of a Tutorials section (Tutorials).
Invoking BIP with no argument prints all available operators and their options:
bip
Invoking BIP with an operator name but no image argument prints the options and parameters for this operator, if any, followed by the available help for this operator. This help is also the one that is found in this manual. For example:
bip otsu-thresholding