Short Description

This plug-in implements fast active contours for image segmentation. Their representation in terms of spline curves allows for a natural and intiutive manipulation of the active contour through control points.


This software implements an active contour (a.k.a. snake) segmentation method using exponential splines as basis functions to represent the outline of the shape. While the snake is versatile enough to provide a good approximation of any closed curve in the plane, its most important feature is that it perfectly reproduces circular and elliptical shapes. These features are very appropriate to delineate cross sections of cylindrical-like conduits and to outline blob-like objects.

Written by Ricard Delgado-Gonzalo at the Biomedical Image Group (BIG), EPFL, Switzerland.
This software is also part of the E-Snake plug-in for ImageJ/Fiji.

Technical Details

Among all different possible curve representations, we use a B-spline representation characterized by control points. These points (red/green crosses) define a control polygon (yellow line) that controls the continuous representation of the snake (red line). The evolution of the curve is formulated as a minimization problem. The associated cost function is called snake energy. In our case we make use of a convex combination of contour and region energies, i.e. α Econtour + (1-α) Eregion. The contour energy corresponds to the integral of the projection of the image gradient onto the curve. This energy uses a smoothed version of the input image with a Gaussian kernel of standard deviation σ. The region energy maximizes the difference of intensity between the region enclosed by the curve, and the intensity of a region within and an extended shell. For a formal definition of the different energy terms as well as the B-spline representation, refer to the publications on the reference section.



The plug-in requires no image at launch. All image types are accepted, except for 3D image z-stacks. For z-stacks, consider using our Active Cells 3D plug-in. In the case of multi-channel images, the processing is performed on the channel selected on the main plug-in interface.

Main Panel

The main interface window is divided in three differentiated panels: the image panel, the snake options panel, and the interaction panel. When the plug-in is initiated, each panel is set to basic mode. In this mode, only the most important options are shown. Each panel switches to advanced mode when the user clicks on any empty region of the panel (see Fig. 1 and Fig. 2).

Figure 1. Main panel in basic mode. Figure 2. Main panel in advanced mode.

Image panel

This panel contains the options and parameters related to the active image; that is, the image that is being analyzed. When a new image is selected, the parameters in the panel update accordingly.

  • Image: This non-editable text field contains the name of the active image.
  • Channel: This option determines the channel in which the processing is performed. The combo box updates automatically when a different image is selected.
  • Smoothing: Standard deviation σ of the Gaussian kernel that is used to smooth the image when computing the contour energy.

Snake options panel

This panel contains the options and parameters related to the active snake; that is, the snake that the user can interact with. When a new snake is selected or created, the parameters in the panel update accordingly.

  • Target brightness: This option determines if the snake will be attracted to Dark or Bright targets.
  • Control points: Number of control points that define the control polygon.
  • Energy type: This option determines if the snake evolves following the Contour energy, the Region energy, or a Mixture of both.
  • Alpha: Trade-off parameter that balances the contribution of the contour energy and the region energy when the mixture is used. The values of α are inside the interval [0,1].
  • Max iterations: Number of iterations of the optimizer when evolving the snake.
  • Immortal: If checked, the optimizer will stop when the snake has totally converged; that is, when the snake has reached the minimum of the energy functional.

Interaction panel

This panel contains a set of buttons for creating, interacting, and deleting snakes.

The 'plus' button creates a new snake in the active image with the parameters of the Snake Options Panel. If a ROI is present in the active image, the snake will be created with the same position. Otherwise, the snake is initialized in the center of the image.

When this tool is selected, the mouse interaction switches to move mode. When the cursor is on top of a control point, it will become green (selected) informing that it is draggable. If all control points appear as selected, the curve itself will be draggable.

When this tool is selected, the mouse interaction switches to resizing mode. To resize the snake, drag it. All control points will appear as selected and the curve will be scaled with respect to the center of gravity of the snake.
When this tool is selected, the mouse interaction switches to rotation mode. To rotate a snake, drag it. All control points will appear as selected and the curve will be rotated with respect to the center of gravity of the snake.
The 'play' button (a right-pointing black triangle) is used to start optimizing the active snake.
The 'ff' button (a double right-pointing black triangle) is used to start optimizing in parallel all snakes within the active image.
The "trash bin" button erases the active snake from the image.

User Interaction

Any snake can be manipulated thanks to the combination of mouse actions and the set of tools present in the Interaction Panel. The image canvas provides real-time feedback of how the actions are being performed.

Activate snake

A snake within an image is said to be active when it can be manipulated by mouse actions. To activate a snake, click anywhere within the region enclosed by the snake curve. Then, the associated control polygon will appear, and the previous active snake are set to inactive.

Move a control point

To move a control point, simply drag it. The point closest to where you clicked will change color and be moved to the position where you release the mouse.

Move a snake

To move a snake, drag it within the image. All the control points of the selected snake will change color and be moved to the position where you release the mouse. Alternatively, you can use the keyboard arrow keys to get a finer control over the position of the snake.

Copy/paste a snake

To copy the shape and attributes of the active snake, press Ctrl+C. Press Ctrl+V to paste it in the active image. Note: the copied snake can be pasted in a different image from where it was originally copied.

Menu bar


  • Measure: Launches the ROI Statistics plug-in. This plug-in computes several image-based statistics of the regions enclosed by the snakes.


  • Documentation (online): This is a link to this manual in the official Icy repository.
  • About: Opens a window with the logo of the plug-in.


R. Delgado-Gonzalo, V. Uhlmann, D. Schmitter, M. Unser, "Snakes on a Plane: A Perfect Snap for Bioimage Analysis," IEEE Signal Processing Magazine, vol. 32, no. 1, pp. 41-48, January 2015.

R. Delgado-Gonzalo, M. Unser, "Spline-Based Framework for Interactive Segmentation in Biomedical Imaging," IRBM—Ingénierie et Recherche Biomédicale / BioMedical Engineering and Research, , vol. 34, no. 3, pp. 235-243, June 2013.

R. Delgado Gonzalo, "Segmentation and Tracking in High-Throughput Bioimaging," Swiss Federal Institute of Technology Lausanne, EPFL Thesis no. 5657 (2013), 186 p., March 15, 2013.

R. Delgado-Gonzalo, P. Thévenaz, C.S. Seelamantula, M. Unser, "Snakes with an Ellipse-Reproducing Property," IEEE Transactions on Image Processing, vol. 21, no. 3, pp. 1258-1271, March 2012.

R. Delgado-Gonzalo, P. Thévenaz, M. Unser, "Exponential Splines and Minimal-Support Bases for Curve Representation," Computer Aided Geometric Design, vol. 29, no. 2, pp. 109-128, February 2012.


This work would not have been possible without the contribution of

  • Anaïs Badoual (
  • Emrah Bostan (
  • Nicolas Chenouard (
  • Ricard Delgado-Gonzalo (
  • Ulugbek S. Kamilov (
  • Ramtin Madani (
  • Masih Nilchian (
  • Philippe Thévenaz (
  • Cédric Vonesch (
  • Virginie Uhlmann (
  • Michael Unser (

4 reviews on “Active Cells

  1. r
    The review author didn't let any comment.
  2. D
    The review author didn't let any comment.

Leave a Review

Leave a review
Cancel review
View full changelog
Close changelog


  • Version • Released on: 2018-07-17 17:27:12

    Fixed issues with snake interaction on recent version of Icy.

  • Version • Released on: 2015-05-24 18:57:15

    - Fixed bug to access snake ROIs from outside of the plugin
    - Included methods for subdivision
    - JFileChooser is now threadsafe
    - Saving/loading operations conserve the last used path

  • Version • Released on: 2015-02-11 23:42:43

    - Fixed multiple bugs related to the compatibility with Protocols
    - Fixed bug in the GUI
    - Modified deprecated methods from icy

  • Version • Released on: 2014-12-08 23:27:21

    Expanded the options on shape-priors

  • Version • Released on: 2014-05-03 01:33:43

    Adapted to VTK6

  • Version • Released on: 2014-04-01 23:23:18

    Minor changes (out of beta)

  • Version • Released on: 2014-02-09 20:01:46
  • Version • Released on: 2013-12-04 12:08:58

    - Fixed bug with threading
    - Performance improvements
    - Snakes stay as ROIs in the image when the plugin is closed

  • Version • Released on: 2013-11-13 17:31:27

    - Support to save snakes
    - Support to load snakes
    - Support to load arbitrary prior shapes. These shapes can come from saved snakes using the Active Cells plugin, or arbitrary spline curves coming from the new Shape Designer plugin.

  • Version • Released on: 2013-11-11 14:34:33

    Implemented loading/saving of snakes

  • Version • Released on: 2013-10-30 19:50:54

    Minor code changes

  • Version • Released on: 2013-10-30 17:43:55

    - Modifications to comply with icy

  • Version • Released on: 2013-10-24 17:00:27

    Rolled back to Java 6

  • Version • Released on: 2013-10-22 15:41:10

    Refactored dependencies

  • Version • Released on: 2013-09-12 13:11:08

    - Minor improvements

  • Version • Released on: 2013-05-28 09:16:33

    - Fixed bug in copy/paste operation.
    - Modified the help website.
    - Corrected deprecated icy methods.
    - Updated javadoc.

  • Version • Released on: 2013-04-26 10:30:42

    Code reorganization. Some classes have been moved to the SDK.

  • Version • Released on: 2013-04-16 19:19:02

    - Modified the sampling scheme of the snake such that the computational load does not depend on the number of control points.

    - The method for resampling polygons has been moved to the Active Cells Framework.

  • Version • Released on: 2013-04-11 11:37:46

    - Rolled back to comply with the release branch of Icy

  • Version • Released on: 2013-04-11 10:47:17

    - Updated javadoc style
    - Corrected deprecated methods.

  • Version • Released on: 2012-11-01 16:25:08

    Removed the shell in the display for the region and mixture energies.

  • Version • Released on: 2012-10-23 15:41:55

    Updated javadoc

  • Version • Released on: 2012-10-22 15:30:34
  • Version • Released on: 2012-10-16 17:17:27

    Various GUI improvements

  • Version • Released on: 2012-09-26 17:28:02

    Added labels to identify the active cells

  • Version • Released on: 2012-09-18 12:31:14

    Fixed all the issues with the icons.

  • Version • Released on: 2012-09-18 12:17:44
  • Version • Released on: 2012-09-18 12:13:27
  • Version • Released on: 2012-09-18 12:05:36
  • Version • Released on: 2012-09-18 12:05:21
  • Version • Released on: 2012-09-18 12:01:56

    Solved the icon issue

  • Version • Released on: 2012-09-18 10:53:11
  • Version • Released on: 2012-09-18 09:55:45
  • Version • Released on: 2012-09-18 09:53:22
  • Version • Released on: 2012-09-18 09:49:54

    Different handling of the icons

  • Version • Released on: 2012-09-17 12:04:13

    Changed the cursors

  • Version • Released on: 2012-09-16 16:38:54

    Initial submit

  • Version • Released on: 2012-09-12 15:46:09
  • Version • Released on: 2012-09-12 15:45:45
  • Version • Released on: 2012-09-12 15:09:51