ImageJ plugin for Cell Segmentation

This software is designed to process transmission electron microscopy images containing cells. It is implemented as a plugin for ImageJ (image processing and analysis program). It contains semiautomatic tools for segmentation of organelles and allows their analysis. The plugin also supports automatic cell and nucleus segmentation.

The software has been developed in terms of project MUNI/M/1050/2013 and supporded by Grant Agency of Masaryk University.

Input Images

The plugin is designed to process transmission electron microscopy images. The input images must be in TIFF format. There is an example of an input image:

fig 1

Plugin Submenu

Every plugin tool is accesible from the main menu in Plugins->TEM Images. There is a list of tools with a short description:

Image Preprocessing

Using the option Preprocess images... you can convert images to lower resolution or change their bit depth. To keep the original data, you should set a different output directory. The preprocessing preserves image calibration. The real image scale is recalculated according to change of image resolution.

Nucleus and Cell detection

The option Detect cell and nucleus... provides an automatic tool for segmentation of cell and nucleus. The tool requires single cell with single nucleus in every input image. Posslibly, there can be parts of other cells. The operation can be time consuming. In such a case, it is appropriate to convert input images to lower resolution using preprocessing.

Masks of detected cell and nucleus are stored into output image as two new image slices.

Image Viewer

The standard way to open images in ImageJ is through the File->Open... in the main menu. When using our plugin it is recomanded to use the plugin option Open Images... . For image opening, it is used the Bio-formats plugin. It garantees that image calibration is kept. The option allows to go through all images from one directory. If the images are segmented already, you can display particular cell parts. Different regions of the same type are distinguished using labels. You can show the lables and the region names. The region types (organelles or other cell structures) can be edited in the file config.txt (see Plugin Configuration). Every image can be edited using semiautomatic segmentation tools. To open the tools use the button Edit Regions.

Region Editation

To add or modify particular segment of a cell you can use the following form which is accesible from image viewer.

The form offers two semiautomatic segmentation tools (described further) and eraser. You can also modify segmented regions using standard selection tools which are in the ImageJ toolbox. To do that, choose selection tool, select a part of an image and click on Add Selection or Remove Selection button. Every change of processed image which is done using this form is reversible. The created regions are stored into image as new slices. Every slice contains all regions of the same type.

Live Wire

The tool finds a path between user defined points. The path goes more likely through points with higher intensity change (edges).

Using the tool:

Region Growing

The region growing tool is convenient for fast seleciton of cell parts which have an oval shape. A selected region is inicialized using a seed point. The region grows from the seed point to its neighbourhood according to a local intensity change. The region grows faster on flat regions and slower on edges. After the initial region growing, the region is smoothed using geodesic active contours method.

Using the tool: 1. Select one point located in a region of interest 2. Update region parameters - region size and smoothness

Graph Cut

The graphcut tool can be effectively used to separate a large segment from background. The primary usage is to separate a cell from the rest of the image. The tool cannot be combined with other tools. When using the tool all previously marked regions of the same type are removed. The segmentation is driven using initial foreground and background markers.

Using the tool: * Left mouse click - adds a foreground marker * Right mouse click - adds a background marker * Escape - removes the last marker The tool can be also adjusted using parameters. You can select the brush size, the precision of the graph cut and smoothness, which enhances the result of graphcut method.

Region Analysis

After marking organelles on a set of images, it is possible to measure a group of parameters on them. Use the option Analyse Images... in the plugin submenu. First, you should select a directory with segmented images. You can also specify which region types should be processed. By default, there are processed all region types.

You can select two default parameters - region thickness and size. The process starts if you click on Analyze button. After calculating the parameters, the results table is shown. Every region can be identified using image name, region type and ID. The measurements can be exported into XLS format.

It is also possible to analyze measurements integrated into ImageJ. These measurement can be specified using a table accessible from main menu Analyze->Set Measurements.... After setting the parameters, open the Analyze form and set the parameters as before and than click on the Analyze default IJ measurements button. The regions can be identified using a single lable containting image name, region type and ID.

Plugin Configuration

The plugin includes a configuration file "config.txt" where it is possible to define organelles or other structures which can be marked on images. The configuration file has the following structure:

, # , #
, #
...

Where is a name of an organelle and is a hexadecimal number which represents a color used to display the organelle boundary. For example, to define endoplasmic reticulum with green color, we can write:

Endoplasmic Reticulum, #00FF00

Download and Instalation

The software is distributed as a plugin for ImageJ. You can download a clean instalation of ImageJ or an extended version of Fiji (recommended) which includes several aditional plugins. One of the aditional plugins called Bio-Formats supports to load image calibration (pixel size, etc.) and it is required in our plugin. In case, you install a clean ImageJ version, you need to download the Bio-Formats plugin separately.

After ImageJ instalation, you can download our plugin and simply extract the zip file into <instal_dir>\plugins folder, where <instal_dir> is ImageJ instalation directory. A new subfolder TEM is created. The subfolder contains all necessary plugin files including config.txt which can be modified manually. The plugin should work when opening ImageJ next time. If the plugin does not work properly, please check the following instalation requirements.

Instalation requirements: * OS Windows * Java 1.8 (32-bit or 64-bit version) * ImageJ 1.49v (or newer) * Bio-Formats (ImageJ plugin)