An Introduction to 3D Slicer

A brief overview of an open source image segmentation tool for biomedical imaging data

David Simms
11 min readApr 28, 2023
Figure 1: 3D Slicer

This is the first in a series of blog posts describing 3D Slicer biomedical image viewer and its applications, progressing from installation and basic use to using automated segmentation extensions. The second part of the series can be found here, and the third, fourth and fifth parts of the series discuss using the MONAI framework in 3D Slicer.

3D Slicer is a free, open-source software platform for visualization, processing, segmentation, registration, and analysis of medical, biomedical, and other 3D images.

Slicer’s capabilities include¹:

● Reading/writing DICOM images and a variety of other formats;

● Interactive visualization of volumetric voxel images, polygonal meshes, and volume renderings;

● Manual editing and mark-up of images;

● Fusion and co-registering of data using rigid and non-rigid algorithms;

● Automatic image segmentation;

● Tracking of devices for image-guided procedures.

3D Slicer should look familiar at first glance to a user with some experience viewing medical imaging data. The display consists of 3 orthogonal views (axial, sagittal, and coronal) along with a 3D view, and is similar to what would be displayed on a MRI or CT workstation or most other DICOM image viewer. Users with prior experience using similar software will become quickly familiar while those with no experience can benefit from the several training documents and videos provided in this article.

Why Use 3D Slicer?

3D Slicer was created to solve advanced image computing challenges with a customizable platform created and maintained by a strong community of knowledgeable users and developers working together to improve medical imaging². It allows for easy manipulation of imaging data and in this way can be useful for research purposes, surgical planning, and more.

While 3D Slicer has many uses, it has proven to be very useful for the creation of image segmentation files for use in training machine learning models. Medical imaging is among the disciplines utilizing machine learning. Artificial intelligence models, however, require large amounts of imaging data for training and validation. 3D Slicer and it’s broader research community have developed automated image segmentation tools using a deep learning method known as a 3D Convolutional Neural Network to make it possible to quickly segment small amounts of images to train models to automatically segment images to than be used in further machine learning models.

3D Slicer and automated image segmentation tool enable users to segment and save biomedical image data in a variety of file formats to prepare the data to be used in machine learning pipelines.

Slicer is supported by an active discourse community with ongoing collaborative development.

Figure 2: 3D Slicer Community Forum

With the proliferation of machine learning, a very active community has formed to drive the development of automated tools for use in 3D Slicer. A number of these community-contributed projects are integrated directly into 3D Slicer through user developed extensions that are simple to install and easy to use. Because of the ease of use and effectiveness of using 3D Slicer to prepare and segment medical imaging data for machine learning, it has become an important part of the pipeline for automated tasks in medical imaging using machine learning.

In this series of articles, we will learn the basics of 3D Slicer and become familiar with its built-in modules, extensions, and image manipulation tools. Becoming familiar with these tools and the 3D Slicer workflow will allow us to learn about automated segmentation extensions in parts 2 and 3 of this series.

While there are a number of official 3D Slicer training documents, learning to use 3D Slicer is best done by watching video demonstrations and using the software. You can follow along the videos with the sample data provided with the 3D Slicer and quickly learn to use the many tools available.

The aim of this article is to provide a brief overview of the layout and functioning of 3D Slicer which will allow you to learn the basic tools available in 3D Slicer quickly. The goal is that upon completion of this article, the reader will feel comfortable enough using 3D Slicer to be able to read the following articles in the series, and to use automated image segmentation tools in preparing images for use in machine learning pipelines and models.

System Requirements³

3D Slicer should run on any desktop or laptop computer built after 2015 or so. Older computers may work, depending primarily on their graphics capabilities. There are versions of 3D slicer for Windows (10 or 11), Mac (High Sierra or later), or Linux operating systems, all of which should work with the extensions described in this series of blog posts.

Slicer can also run on virtual machines and docker containers. For example, 3D Slicer + Jupyter notebook in a web browser is available for free via Binder service (no installation needed, the application can run in any web browser).

Running 3D Slicer does require a 1024x768 pixel display and more than 4 GB of RAM. A dedicated graphics card (graphical processing unit; GPU) is not an absolute requirement but is recommended for fast rendering of 3D volumes. At minimum, discrete GPU must support OpenGL 3.2. In practical application, integrated graphics cards found on most recent laptops is sufficient for basic visualization. Discrete graphics card (such as a NVidia GPU) is recommended for interactive 3D volume rendering and fast rendering of complex scenes.

How To Download 3D Slicer

Head to the download page to download 3D Slicer. You can find the download instructions here.

This series of blog posts will cover using 3D slicer in Windows. The Windows download is a simple .exe that you can run and install once the file is downloaded. There are 2 versions of 3D Slicer — Stable Release and Preview Release. The Preview Release is updated daily and will have the newest features being tested. We will download the Stable Release — as of writing (March 2023), this is Slicer 5.2.1.

Alternatively, you can now run 3D Slicer in your browser. This will take 1–2 minutes to load.

Module Overview³

With 3D Slicer downloaded and installed, you can begin to explore the software.

Figure 3: The “Welcome” Module — 3D Slicer’s Home Page

View data

Tools in 3D Slicer are organized into modules. Upon opening 3D Slicer, you will see the “Welcome” module. Use the drop-down menu at the top of the window to explore and navigate to other modules, such as the “Data” module. From the Welcome module you can quickly load data or download sample DICOM datasets. In the next article of the series, we will download one of these sample datasets and use automated segmentation extensions to segment structures in the images.

Figure 4: Data Module

You can customize views (show orientation marker, ruler, change orientation, transparency) by clicking on the push pin in the top left corner of viewer. In the slice viewers, the horizontal bar can be used to scroll through slices or select a slice.

A quick overview of basic controls:

right-click + drag up/down -> zoom image in/out

Ctrl + mouse wheel -> zoom image in/out

middle-click + drag -> pan/drag view

left arrow / right arrow -> move to previous/next slice or view

Shift + mouse move — > move crosshair in all views

Check the official documents for a full list of controls and keyboard shortcuts.

Process data

The most important modules are the following (complete list is available in Modules section):

Welcome: The default module when 3D Slicer is started. The panel features options for loading data and customizing 3D Slicer. Below those options are drop-down boxes that contain essential information for using 3D Slicer.

Data: acts as a central data-organizing hub. Lists all data currently in the scene and allows basic operations such as search, rename, delete and move.

Figure 5: Data Module

DICOM: Import and export DICOM objects, such as images, segmentations, structure sets, radiation therapy objects, etc.

Figure 6: DICOM data module

Volumes: Used for changing the appearance of various volume types. Unlike the Volume Rendering module, a 3D representation of the data is not rendered. Rather, the visual appearance in the 2D slice views changes.

Volume Rendering: Provides interactive visualization of 3D image data.

Segmentations: Edit display properties and import/export segmentations.

Segment Editor: Segment 3D volumes using various manual, semi-automatic, and automatic tools. This, or a similar looking extension based on this module (eg. MONAILabel), is where you will spend the majority of your time while segmenting. I recommend watching the provided tutorials or reading the documents to become familiar with the various segmentation tools available. You will use these tools even when working with automated segmentation extensions. They are very simple to use.

Figure 7: Segment Editor Module

Markups: Allows the creation and editing of markups associated with a scene.

Models: Loads and adjusts display parameters of models. Allows the user to change the appearance of and organize 3D surface models.

Extensions

Figure 8: List of Extensions

3D Slicer supports plug-ins that are called extensions. An extension could be seen as a delivery package bundling together one or more Slicer modules. After installing an extension, the associated modules will be presented to the user as built-in ones. Extensions can be downloaded from the extensions manager to selectively install features that are useful for the end-user.

Figure 9: Extension Manager

For details about downloading extensions, see Extensions Manager documentation. Click here for a full list of extensions. We will discuss extensions for automated segmentation in the next parts of this series.

3D Slicer Tutorials

You learn both basic concepts and highly specialized workflows from the numerous available step-by-step and video tutorials provided by 3D Slicer.

Try the Welcome Tutorial and the Data Loading and 3D Visualization Tutorial to learn the basics.

For more of the provided tutorials, visit the Tutorial page.

Youtube Tutorials

Now that you are familiar with the basic layout of 3D Slicer, it is a wise idea to explore various tutorials that are available on Youtube. Any of these playlists will prepare you with all the tools that you need to use 3D slicer efficiently, and allow you to be able to use available automated extensions for quick image segmentation.

I recommend this quick series of tutorials (11 videos — 55 minutes) on the basics of 3D Slicer. This series of tutorials is comprehensive and covers the basics, tools, appearance and usage of 3D Slicer and prepares the viewer to use 3D Slicer very well. Please note that the layout of some modules have changed in Slicer 5.0.

Here is another playlist (3 videos — 40 minutes) of basic tutorials. This playlist covers volume rendering and segmentations. This is another video describing basic segmentation tools — threshold, scissors, and paint/draw/erase.

This video is a good tutorial on how to use the “Grow From Seeds” Segmentation tool. Grow from Seeds is a powerful semi-automatic segmentation tool that we can utilize later to prepare segmentations for training a fully automatic machine learning tool.

Finally, this video on smoothing will show you how to use the built-in smoothing methods to improve and refine the segmented model so that it is accurate enough for use and looks appropriate for presentation.

Figure 10: “Grow From Seeds” Segmentation

That covers the introduction to 3D Slicer and the tools available for segmenting and smoothing structures. Once you become proficient in these tools you can use them to segment whatever structures you prefer and save them for use in other applications or workflows.

Saving and Loading Data

Saving Data

The final step in the manual segmentation process is to save your model or the structures and labels that you segmented.

This video covers exporting and saving your segmentation into files. See the Slicer documentation on Data Loading and saving and on segmentations.

To save your segmentations, head to the Segmentation module. Under Export to File you will see the available options. Choose a format and directory and hit Export.

Figure 11: Select a format to save your segmentation in

When saved, the segmentations can be found in the appropriate folder to be loaded into Slicer or whatever other software you have.

Figure 12: Exported segmentation files in file Explorer in STL format.

Save as DICOM

You can also save the segmentations as DICOM data with DICOM metadata.. To do so, head to the Data module and right click the segmentation file.

Figure 13: Select Export to DICOM
Figure 14: Saving as DICOM data

Alternatively, this video details converting your segmentation into a 3d model, which you can also save.

Loading Data

3D Slicer can be loaded with DICOM data as well as Non-DICOM data, covering all types of data ranging from images (nrrd, nii.gz, …) and models (stl, ply, obj, …) to tables (csv, txt), point lists (json), etc.

You can drag and drop files from outside the window into 3D Slicer to load data. Alternatively head to the ADD DICOM Data module and import entire folders of scans into 3D Slicer.

In future articles in this series, we will load custom datasets into 3D Slicer and segment structures in these datasets using automated tools.

Figure 15: Import DICOM Data into 3D Slicer

Conclusion

After watching the tutorials linked above and checking out the official 3D Slicer documentation, you should have been exposed to much of the functionality of 3D Slicer. I recommend that you download some sample DICOM data and familiarize yourself with the controls and layout of 3D Slicer, as well as trying out the various segmentation tools available in the Segment Editor module on the sample data.

Once you feel comfortable using the software, check out the next parts of the series which cover using automated segmentation extensions and training a model on your own data for automated segmentation.

Up Next: Extensions For Automatic Segmentation in 3D Slicer

In the next article in this series we will discuss using extensions for automated image segmentation in 3D Slicer using 3D Convolutional Neural Networks. In the third part of the series, we will install the MONAILabel plugin for 3D Slicer.

Resources

  1. Getting Started” — A step by step walk-through of using 3D Slicer.
  2. 3D Slicer Github

References

[1] Pieper, S.; Lorensen, B.; Schroeder, W.; Kikinis, R. (2006). The NA-MIC Kit: ITK, VTK, Pipelines, Grids and 3D Slicer as an Open Platform for the Medical Image Computing Community. Proceedings of the 3rd IEEE International Symposium on Biomedical Imaging: From Nano to Macro 2006 (Report). pp. 1:698–701

[2] 3D slicer image computing platform. 3D Slicer. (n.d.). Retrieved April 28, 2023, from https://www.slicer.org/

[3] Getting started. Getting Started — 3D Slicer documentation. (n.d.). Retrieved April 28, 2023, from https://slicer.readthedocs.io/en/latest/user_guide/getting_started.html

--

--