AI

Comparison of ITK-SNAP and 3D Slicer for medical image segmentation

  • Julie Desternes
  • 2021/05/20
  • 2021/10/18に更新

After identifying the best medical image annotation software, we have selected ITK-SNAP and 3D Slicer and will compare them to simplify your choice of software for your project. Both software are appropriate for an automatic segmentation project.

The annotation phase, and more specifically the segmentation of medical images, is carried out within the framework of data preparation for deep learning. It is with this objective in mind that the ITK-SNAP and 3D Slicer software were compared to determine which would be the most appropriate for the proper performance of this step. This piece is a logical continuation of the article on free software for annotating medical images for deep learning. The segmentation tools available with these software are presented based on user experience and documentation that comes with these software. Other advantages and disadvantages that seem relevant to the envisaged application domain will also be explained.

ITK-SNAP: testing of the image segmentation software

  • Manual segmentation tools:

Among the manual segmentation tools, two exist: 

1. Paintbrush Mode (and eraser using the right click): several parameters within this tool can be modified (size, shape (volume)...), it will allow small adjustments as well as the segmentation of smaller areas.

ITK Snap - Paintbrush mode settings menu

Screenshot of the "paintbrush mode" settings menu

2. Polygon Mode enables you to draw the outline of the area to be segmented and fill it in automatically. This will facilitate the segmentation of large areas.

ITK Snap - Polygon mode settings menu

Screenshot of the "Polygon mode" settings menu

To simplify this manual segmentation, it is possible to segment certain strategic slices and interpolate the segmentation between them. To access interpolation, go to the "Tools" drop-down menu, then click on "Interpolate labels...".

ITK Snap - Morphological Interpolation settings menu

Morphological Interpolation settings menu

ITK SNAP - Screenshot before and after the interpolation

Screenshot before starting the interpolation (left) and the result after interpolation (right)

  • Semi-automatic segmentation tools:

ITK-SNAP has a semi-automatic region segmentation tool: the Snake. It is used in four steps:

  1. Reduce the area of interest by defining the contours with a bounding box.
  2. Pre-segmentation of the area of interest according to 4 different methods (threshold, classification, region and edge detection) to be chosen according to the desired application.
  3. Initialization of snakes from bubbles.
  4. Propagation of the snakes by an active contour evolution algorithm until a precise segmentation of the area is obtained. For this last step, there are various speed parameters that can be modified to influence the propagation and limit the escape from the area of interest.
  • Test result: our opinion on the tool

Strengths: ITK-SNAP is a segmentation-only software and has interesting tools for this task. The tools are few, which makes it easy for the user to learn. Moreover, the keyboard and mouse shortcuts (zoom, navigation between slices...) are similar to those used in the medical imaging field, allowing a certain fluidity in the use.

Weaknesses: This small number of tools penalizes the user when faced with a segmentation difficulty, since he has no other tools at his disposal to establish a workaround.

Compatibility of segmentation data with deep learning methods: 

The software is complete and allows the segmentation of many anatomical structures. The segmentation labels are numbered, it is possible to rename them and to assign them a color. Data export can be done in different formats including those commonly used in data analysis (NIfTI, NRRD, VTK).

3D Slicer: testing the image segmentation module

  • Manual segmentation tools:

3D Slicer includes three manual segmentation tools: 

  1. Paint, which is of particular interest for the segmentation of small regions
  2. Erase
  3. Draw, which can be used to trace the outline of an anatomical structure and fill it automatically with a simple right click. It facilitates the segmentation of large regions. 

The first two can be configured (volume and diameter) and can also be used on the 3D view in addition to the cross-sectional images.

3 D Slicer - Paint and erase tool settings menu

Screenshot of the paint and erase tool settings menu

To complete the drawing tool, when drawings have been made at a few strategic intervals, it is possible to interpolate with the "fill between slices" tool.

  • Semi-automatic segmentation tools:

A number of tools can be described as semi-automatic are available to the user, among them:

             - Level tracing incorporates in a single region all the pixels of the region having a uniform level of intensity. Its objective is to find a closed path with the same intensity value. As with the drawing tool, it is possible to interpolate between 2 slices.

3D Slicer level tracing tool with the area selected  and the result

Screenshots of the "level tracing" tool with the area selected (left) and the result (right)

  - Growing from seeds [6] enables the segmentation of several anatomical structures simultaneously by positioning seeds inside each of the regions thanks to the paint tool and also in the background region (which can be deleted). Each anatomical structure/region that we want to segment must have a label as growing will be done from these seeds. This method uses a region growing algorithm.

3D Slicer segmentation seeds and of the result obtained with the growth from seeds tool

Screenshots of the application of the segmentation seeds (top), and of the result obtained with the "growth from seeds" tool (bottom)

- The threshold separates the voxels of the image into two categories according to their intensity. By setting the threshold or thresholds (upper and/or lower), we define an intensity range belonging to the region to be segmented. Several thresholding methods are available in 3D Slicer (Otsu, Huang, Isodata...).

3D Slicer Threshold tool settings menu

Screenshot of the "Threshold" tool settings menu

3D Slicer: results obtained from the Threshold tool

Screenshot of the results obtained from the "Threshold" tool

- The scissors eliminate the elements located inside (or outside depending on the selected parameter) the whole specific area. Their advantage is that they can also be used on the reconstructed image in 3D, which saves time in the removal of elements not belonging to the area of interest.

3D Slicer Scissors tool settings

Screenshot of the "Scissors" tool settings

- With the islands tool the notion of connectedness is central. Indeed, the connected voxels are grouped in a single region. The user has various options, he can keep the largest island (region), delete all the small islands (with the possibility to change the minimum size) or divide the islands into different segments...

3D Slicer Islands tool settings

Screenshot of the "Islands" tool settings

  • Test result: our opinion on the tool

Pros: 3D Slicer is an extensive software, including several modules for image processing. One of its modules is entirely dedicated to segmentation, with many interesting tools that facilitate the segmentation of medical images. The segmentation tools detailed above are also complemented by other tools such as filters (median, closing, opening...), logical operators (addition, subtraction...), interpolations... Moreover, all the tools available with 3D Slicer can be configured to edit a segmentation only between the selected thresholds, outside of the other segmentations already edited, on the whole image or even within a particular segmentation. The choice of tools available with 3D Slicer allows the user to approach segmentation in different ways.

Cons: The user needs some time to get the hang of the software. This is due to the quantity of modules and tools available. The 3D display slows down the actions of segmentations carried out, it is important to think of deactivating it to work in an optimal way.

Compatibility of segmentation data with deep learning methods: 

The labels can be renamed, the desired color can be assigned to each label and there is a whole panel of pre-registered anatomical structures with their associated color. Data export can be done in different formats including one of the most common formats used in data analysis (NRRD).

Comparative table

 ITK Snap3D slicer
Specificity of the softwareSpecific to segmentationSeveral modules available, including one specifically dedicated to segmentation
Manual segmentation toolsPaint brush
Polygon
Erase
Paint
Draw 
Erase
Semi-automatic segmentation toolsThe SnakeLevel tracing
Growth from seed
Thresholding
Scissors
Islands
Complementary tools to segmentationInterpolationFill between slices (interpolation)
Filters (median, gaussian, closing, opening...)
Logical operators (addition, subtraction...)
Types of segmentationManual and semi-automaticManual and semi-automatic
BugsOccasional with the Snake tool 
Analysis and export of segmented dataNiFTI
NRRD
VTK Image
NRRD
DICOMYesYes

Summary of the comparison

3D Slicer is a global and general software in the field of image processing, while ITK-SNAP is oriented only on image segmentation. The semi-automatic segmentation method proposed by ITK-SNAP is very complete and allows to obtain good results once the tool is understood and mastered by the user. 3D Slicer provides the user with a variety of tools based on different approaches, which the user can combine to obtain the desired result. It is largely due to the presence of all these segmentation tools that 3D Slicer can take a little longer to learn than ITK-SNAP. 

Regarding the support of medical images (especially in DICOM format), the results of the segmentations and the available formats for data export, both software are appropriate and compatible in an automatic segmentation project using deep learning methods. 

A comparison table was made in order to justify the choice of one software over the other by the user in the context of medical image annotations for deep learning. 

After experimenting with the segmentation of several abdominal organs as well as the skeleton and comparing these two software, 3D Slicer was selected. 

The Snake tool from ITK-SNAP is very powerful and allows precise segmentations (figure 1). But the approach of a segmentation can only be make from one angle and when faced with a difficulty, the user must therefore refer to the manual segmentation.

3D Slicer has been able to distinguish itself on several points, and particularly on the variety and performance of the tools available (manual, semi-automatic and complementary segmentation); this allows us to obtain an accurate segmentation of the anatomical structures (figure 2), while maintaining a reasonable processing time. This variety of tools offers the user some freedom on the choice of a segmentation as well as on the possible solutions, when he is faced with a difficulty during the segmentation.

Cross-sectional and 3D view of segmented anatomical structures on ITK-SNAP.

Figure 1: Cross-sectional and 3D view of segmented anatomical structures on ITK-SNAP

Cross-sectional and 3D view of segmented anatomical structures on 3D Slicer

Figure 2: Cross-sectional and 3D view of segmented anatomical structures on 3D Slicer

[1] SNAP Tutorial and User's Manual.
http://www.itksnap.org/docs/fullmanual.php 

[2] ITK-SNAP Version 3.x Video Library. (2020, October 28). 
http://www.itksnap.org/pmwiki/pmwiki.php?n=Videos.SNAP3

[3] RSNA ITK-SNAP Course. (2016). MODULE II Semi-Automatic Segmentation [Slides].
http://www.itksnap.org/pmwiki/uploads/Train/RSNA2016-Auto-Paul-Final.pdf 

[4] Segment editor - 3D Slicer documentation. (2020). 
https://slicer.readthedocs.io/en/latest/user_guide/modules/segmenteditor.html

[5] Documentation/4.6/Modules/SegmentEditor - Slicer Wiki. (2019, November 27). 
https://www.slicer.org/wiki/Documentation/4.6/Modules/SegmentEditor

[6] Documentation/Nightly/Modules/GrowCutSegmentation - Slicer Wiki. (2019, November 27). 
https://www.slicer.org/wiki/Documentation/Nightly/Modules/GrowCutSegmentation

その他のおすすめ記事

Free software for annotating DICOM in deep learning

Deep learning algorithms for the detection of objects (abnormality, anatomical structure) in medical imaging require datasets annotated with precision to achieve acceptable results for medical use. This annotation is very time-consuming and requires the expertise of radiologists.

Sarah Madeleine