Region Growing Segmentation

What is the Purpose of this Application?
The purpose of this application is to show how to connect filters in a pipeline in order to complete a typical image segmentation task. The pipeline starts with a smoothing process that preserve boundaries. This filtering produces an image with more homogeneous regions. The user can select the smoothing filter among three options. Once the image has been smoothed the user selects interactively a point on the image that is then used as a seed point for growing a region. Finally the segmented regions are cleaned up using mathematical morphology operators.

About the GUI
This application presents a workbench on which an image can be read and displayed. The homogeneity of gray levels in the image is increased by passing it through a edge-preserving smoothing filter. Then the user can invoke an interactive viewer where he can click and select a seed point. Several region growing filters are tested here using this seed point as initialization. Visual feedback of the execution of the filters is managed by events sent from the Toolkit to the GUI. The GUI for this application uses FLTK which is an open source multi-platform toolkit for GUI development. It can be downloaded from

The image below shows the graphic interface of the application. The distribution of buttons on the GUI represent the internal connection of filters on the pipeline. Blue lines show the flow of image data through the pipeline. The green bar at the bottom displays the percent of progress for each filter as it runs.

Graphical User Interface
Graphic User Interface using FLTK

One slice of the images along the pipeline is shown below. From left to right, the input image, the image resulting after smoothing with the GradientAnisotropicDiffusionImageFilter, the same image with the seed point marked and finally the segmentation performed by the ConnectedThresholdImageFilter.

Graphical User Interface
Graphic User Interface using FLTK

Communication Between ITK and the GUI
Some of the components used in this GUI are available in the Insight/Auxiliary directory. In particular the fltk::LightButton and the fltk::ProgressBar. These components use the ITK mechanism of events based on the Observer/Command design pattern [2]. The basic elements for this mechanism are the ITK classes:

ITK filters invoke "Events" that can be "Observed" by "Command" classes. Typically, events are invoked when a filter is about to start, when the filter has just finished processing its data and when the output of the filter becomes invalid due to changes in the filter parameters. Sequential events are also invoked in order to indicate the filter's percent of progress. The buttons in this GUI change colors according to itk::StartEvent, itk::EndEvent and itk::ModifiedEvent events. The progress bar in the bottom reacts to the itk::ProgressEvent of the filter that is being currently executed.

What ITK Classes Made This Application Possible?
The ITK filters used to compute these images are the following:

[1] D. Eberly, "Ridges in Image and Data Analysis", Kluwer Academic Publishers, 1996.

Go to next application.