Active Mask Segmentation Plugin

Download and Installation

The plugin is distributed as a jar file.

To download the file, click here.

To install do:

  1. Copy the file Segmentation_ActiveMasks.jar to the plugins directory in the ImageJ application folder. You can also create a new directory within the plugins directory (called Segmentation, for example), and then copy the plugin there.
  2. Restart ImageJ.

To run, select from the ImageJ menu Plugins –» Active Mask Segmentation.

Plugin Interface

Using the plugin is rather intuitive. To segment an image the user must open an image file, input desired parameters manually or using the interactive tool, and run the segmentation algorithm. After the segmentation process is finished, the user has the option of saving the output image containing the segmentation result and a text file with the parameters used (logfile). The following figure shows the different parts of the plugin; a description follows.

Invoking the segmentation plugin displays two windows: the ImageJ toolbar window and the main window of the plugin. The ImageJ toolbar, displayed below, is used to run the plugin only. It does not add any functionality to the plugin, but closing it will close the segmentation plugin as well (as with any other ImageJ plugin).

The Active Mask Segmentation window is the main window of the plugin and it consists of several panels described below (see figure).

  • Input image panel (Input image(s)/stack): After opening an image file using the Open button in the Commands panel, the image to be segmented is displayed here.
  • Output image panel (Output image(s)/stack): After running the segmentation algorithm, the resulting image, containing all the masks, is displayed here.
  • Segmentation mode: Currently, only one image at a time can be segmented. The mode is 2D slice. While the algorithm works in any number of dimensions (see [1] and associated Matlab code), this version of the plugin implemented 2D segmentation only.
  • Parameters: This panel contains a table of parameters. Every row corresponds to one parameter with an input text box where the value of the parameter must be specified. Upon opening the plugin, the default parameters will be present.
  • Controls: This panel contains three buttons.
    1. Save as defaults loads the default parameters to the text boxes of parameters.
    2. Interactive launches the interactive tool for selecting parameters.
    3. Help opens this help file.
  • Messages: This text window displays algorithm messages.
  • Commands: This panel contains three buttons.
    1. Open is used to load an image for segmentation. A standard open-file dialog is launched, whereby the user can select a file as with any other application.
    2. Segment runs the segmentation algorithm. A progress-bar dialog window is displayed until the segmentation process is done. Several segmentation processes can be run one after the other before saving any results. The plugin keeps the results of all the previous runs.
    3. Save button. See Displaying and Saving Results (below).

Parameter Description

A detailed description of the parameters can be found in [1]; a brief description follows. L Approximate number of objects in an image. This is used to set the initial number of masks M [1]. K Initial resolution level [1]. Must be an integer between 0 and 3. Setting resolution to 3 means that the initial segmentation is performed on the image one-eighth the original size. K0 Final resolution level [1]. Must be an integer between 0 and K. The algorithm starts with the (1/2K)-size image and ends at the (1/2K0)-size image. For example, if K = 3, K0 = 2, the initial segmentation is performed on the image one-eight the original size and ends at one-fourth the original size. a Average radius (in pixels) of cells at original resolution (it is called scale of the region-based lowpass filter in [1]). I If a is underestimated, cells are likely to be split. If a is overestimated, cells are likely to be merged. Adjust a using the segmentation result as a reference. alpha Skewing factor [1]. Must be in the interval (-1,0) and closer to -1 (default is -0.9). bg,fg These must be between 0 and 255, and are used to compute the harshness of the threshold beta and average border intensity gamma in [1]. While the algorithm is rather insensitive to other parameters, it is sensitive to these two. bg is the approximate grayscale value of pixels in the background, while fg is the approximate grayscale value of pixels in the foreground. As the assumption is that we are dealing with fluorescence microscope images, fg must be higher than bg; for other modalities (such as brightfield) one can invert the image first and then use the same algorithm. For larger white (foreground) regions, reduce fg. For smaller white regions, increase fg.

Parameter Interactive Tool

Clicking on the Interactive button in the Controls panel launches an interactive tool for selecting the bg and fg parameters. The window of the interactive tool is shown below. It contains an example of the image used to separate foreground from the background, usage suggestions, and a panel where one can interactively change the values for bg and fg using the input text boxes. The idea here is to adjust the parameters so that white regions cover most of cell regions.

Displaying and Saving the Results

If the segmentation process terminates successfully, a summary of the results is displayed in the Messages text box and the output image containing the masks specifying the achieved segmentation is displayed in the Output image(s)/stack panel.

The user may click on any of the mask areas, which will prompt a message in the Messages text-box containing the numeric result for the area of the mask. This is shown in the figure below.

At this point, the user may change the parameters and re-run the segmentation process, or save the results to a file.

To save the results of the current run to a file, click Save. This launches a standard dialog window where the user selects a directory where the results will be saved with the following formats. For an input image with name inputname and a segmentation with time stamp timestamp (a string generated automatically to reflect the date and time of the segmentation process), the plugin will save 3 files:

  1. A tiff format image file with the segmentation output as displayed in the GUI, named inputname_timestamp_output.tiff.
  2. A tiff format image stack file (this is a single file) containing as many images as there are masks found by the segmentation algorithm. Each image in the stack corresponds to each mask found, displayed alone against the background. The name of the file will be inputname_timestamp_output_stack.tiff.
  3. A log file with name inputname_timestamp.txt in standard text format for every output image segmented in the current session, containing the parameters used in each case.

Known Issues

The plugin was compiled using the JavaVM version 1.5. Machines with an older Java version will not be able to run the plugin. Mac The plugin has been tested on a MacBook Pro running MacOS X v10.5 (Leopard).

  1. The Help button may not respond. The Help file (this file) must be opened manually (it is located in the plugin directory, subdirectory segment_activemasks_help, file help_index.html).

Release Notes

Version 1.2 The plugin was compiled using the JavaVM version 1.5. Machines with an older Java version will not be able to run the plugin. Now the saved output text file corresponds with the actual variable names displayed. Fixed negative alpha value minor GUI malfunctioning.

Version 1.1 The plugin was compiled using the JavaVM version 1.5. Machines with an older Java version will not be able to run the plugin. All The following are known issues on all platforms.

  1. The parameter list in the Parameters panel, Messages window, and the log file are inconsistent. The parameter L is not saved, insted P appears (should be ignored). The parameter a is saved as b and alpha appears as ? in the log file. Parameters fg, bg are displayed/saved as foreground, background.

Mac The plugin has been tested on a MacBook Pro running MacOS X v10.5 (Leopard).

  1. The Help button may not respond. The Help file (this file) must be opened manually (it is located in the plugin directory, subdirectory segment_activemasks_help, file help_index.html).

Version 1.0 The plugin was compiled using the JavaVM version 1.5. Machines with an older Java version will not be able to run the plugin. On platforms other than Windows the plugin may not be fully functional. All The following are known issues on all platforms.

  1. The default parameter for alpha is set to 0.9 instead of -0.9. There will be an error warning. Changing alpha to -0.9 in the Parameters panel solves the problem.
  2. The parameter list in the Parameters panel, Messages window, and the log file are inconsistent. The parameter L is not saved, insted P appears (should be ignored). The parameter a is saved as b and alpha appears as ? in the log file. Parameters fg, bg are displayed/saved as foreground, background.

Mac The plugin has been tested on a MacBook Pro running MacOS X v10.5 (Leopard).

  1. The Help button does not work. The Help file (this file) must be opened manually (it is located in the plugin directory, subdirectory segment_activemasks_help, file help_index.html).
  2. The progress-bar dialog window is small and cannot be resized.

Contact

Comments/suggestions/question, please contact Prof. Jelena Kovačević (jelenak at cmu dot edu), or visit the bimagicLab site.

Credits

The active mask segmentation algorithm was the PhD thesis work of Gowri Srinivasa, while working under the supervision of Prof. Jelena Kovačević in the bimagicLab, Center for Bioimage Informatics, Department of Biomedical Engineering, Carnegie Mellon University. Gunhee Kim and Kun Qian developed this plugin starting from the original Matlab code, under the supervision of Amina Chebira, Pablo Hennings Yeomans and Anupama Kuruvilla.

References

[1] G. Srinivasa, M. C. Fickus, Y. Guo, A. Linstedt and J. Kovačević, “Active Mask Segmentation of Fluorescence Microscope Images”, IEEE Trans. on Image Proc., 2009. paper site

[2] G. Srinivasa, “Active Mask Framework for Segmentation of Fluorescence Microscope Images”, PhD Thesis. Carnegie Mellon University, Pittsburgh, PA, 2008.

plugin/segmentation/active_mask_segmentation_of_fluorescence_microscope_cell_images_/start.txt · Last modified: 2010/09/14 22:01 by glandini
Back to top
CC Attribution-Noncommercial-Share Alike 3.0 Unported
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0