The eye of a human being is a microscope, which makes the world seem bigger than it really is.
Kahlil Gibran
Microscopy for 3DSlicer
The work has been developed specifically with histological sections of regenerated skin after injury. These images have been obtained from an optical microscope, and Masson’s trichrome stain has been used. This is a three-colour staining protocol used in histology, suited for distinguishing cells from surrounding connective tissue. This project in its first stage has adapted a segmentation algorithm in a new 3DSlicer module.
The framework used consists of the tools: Spyder cross-platform on Windows with WinPython as the main IDE, OpenCV, VTK and ITK libraries, and finally, 3DSlicer –version 4.10.0-, the application to run the adapted algorithms. This application supports python 2.7, and is the version being used.

The segmentation is the process used to simplify or change the representation of an image into another image easier to analyze. It allows the localization of objects and boundaries in the image. With the segmentation process labels are assigned to pixels that in an image share certain characteristics. The result of an image segmentation process is a set of segments that collectively cover the entire image, it could also be a set of contours (contour lines also called isoline, isopleth, or isarithm), extracted from the image.
In a first stage, the method applied is the watershed transformation, where a gray scale image can be seen as a topographic relief, and markers are seen as water sources. The relief is progressively flooded, creating larger and larger lakes. The algorithm supposes that the higher gray level of a pixel is probably the relief that separates two or more regions. The barriers created give the segmentation result.
Here are the main steps followed for this segmentation:
- Implementation of the threshold segmentation to obtain binary images.
- Labeled of regions:
- Regions which we are sure of being objects (color 1).
- Regions which we are sure of being background or non-objects (color 2).
- Regions which we are not sure of anything (label 0).
- Implementation of the watershed algorithm.
- Coloured of the pixels of the image where the marker is equal to -1.
The watershed, thus obtained, corresponds to the region of the partition.
In a second stage it’s been implemented the thresholding method, based on a clip-level (threshold value), it turns the gray-scale image into a binary one. The key element of this method is the selection of the threshold value for an only level, or values when multiple-levels are selected. These values must be established so that the pixels that are between each pair of limits will form an object. The Otsu method has been used to define the threshold value. This method is based on the selection of a minimum between two modes (peaks), which amount to minimizing intra-class variances.