www.slicer.org Slicer Wiki pages 

We have a NEW web site, where you can find the newest relevant information on 3DSlicer. These pages are for archival purposes.

Tutorial

This tutorial will walk you through the process of loading medical image volumes and models. You will learn how to view images and how to save scenes for later use.

1. Quick Tour 2. Loading Volumes
    a. Loading Volumes with Headers
    b. Loading Volumes without Headers
    c. Loading DICOM Volumes
3. Loading Models 4. Viewing Volumes
    a. Slices
    b. Color
    c. Image Fusion
5. Viewing Models
    a. Opacity
    b. Color
    c. Clipping
6. Saving Volumes
7. Saving Models 8. Saving the Scene
    a. Save Scene
    b. Save Images
    c. Save Current Options
9. Conclusion

1. Quick Tour

Slicer is available for the Solaris 2.8 (also known as Solaris 8 or SunOS 5.8), Windows (98, NT, and 2000), Red Hat Linux 7.3, and Mac OS X operating systems.
To start Slicer, run the appropriate launcher executable for your platform (for example, slicer-solaris-sparc, slicer2-win32.exe, or slicer2-linux-x86).

After Slicer starts, two windows appear.

The Menu window provides menus for accessing the features of Slicer. A brief explanation of the Menu window will make it easier to refer to its parts later.

At the top of the Menu window there are File, View, and Help submenus.

Under the submenus is a group of buttons known as the Main menu.

Clicking a button on the Main menu will take you to the panel associated with that Slicer feature.

There are tabs along the top of each panel. The leftmost tab on each panel is the Help for that feature.

Clicking More in the Menu window lists the modules available in your version of Slicer. Since Slicer consists of many optional modules, your list of modules may not match the list below.

Here are some sample modules:

  • Locator: connects Slicer to a server that feeds a real-time stream of coordinates from a device called the locator.
  • Realtime: enables the locator's real-time coordinates to control Slicer.
  • Guidance: positions two spherical targets (red and yellow) in the 3D view window to support reformatting volumes.
  • View: customizes the size of the viewer window. The stereo mode allows viewing the 3D window in 3 dimensions, using red/blue glasses.
  • Anno: controls the annotation displayed in the 2D and 3D viewer.
  • Slices: selects the slices to display in the 3D viewer window.
  • Colors: enables you to create your own color palette.
  • EMSegment: implements the "Expectation-Maximization-Segment" algorithm.
  • Custom: enables you to create your own modules for Slicer.
  • Anatomy: saves files from a Slicer scene to use with the SPL Anatomy Browser.
  • CustomCsys: lets developers add a Coordinate System actor to their module.
  • Endoscopic: places and controls a virtual endoscope in Slicer's scene, and presents the endoscope's view in a second window.
  • Measure: provides measuring tools to calculate Surface Area, Volume, and Cross Sectional Area.
  • Fiducials: adds fiducial points on models in the 2D or 3D viewer windows.
  • MeasureVol: measures the volume of a segmented structure in a label map.
  • ModelHierarchy: displays the hierarchy of models.
  • Options: reorganizes the order of the modules and hides unnecessary modules.
  • SessionLog: records information about a segmentation session for Slicer development purposes.
  • Tester: allows the developer to test modules.
  • TetraMesh: reads in a Tetrahedral Mesh and converts it into a model.
  • VolRend: selects the volume rendering method: Composite, MIP (Maximum Intensity Projection), or Isosurface.
  • VolumeMath: adds and subtracts volumes; finds the distance between two points in a volume.
  • ModelCompare: shows point correspondences and models in 2D.

The Viewer window (below) displays volumes and models.

The upper part of the Viewer window is the 3D viewer and the lower part displays the corresponding 2D slices.

top

2. Loading Volumes

A volume is a collection of volume elements (voxels) of an image. A slice is an example of a volume.

Slicer can read medical image volumes of various types (including GE Signa and Genesis data, DICOM (digital imaging and communications in medicine) slices, and non-header image data). If Slicer does not recognize the header automatically, you may enter the necessary information manually, so that Slicer can read the volume.

To read in a volume, start at the Data panel and click Add Volume. The Props tab of the Volumes panel will appear.

top

2a. Loading Volumes with Headers

  1. In the Data panel, click Add Volume. The Props tab of the Volumes panel will appear.

  2. To find the first image file, click Browse. A dialog box will appear.
  3. Select the first image of the volume that you would like to load, and then click Open. (The number of the last image in the volume will automatically appear in the Number of Last Image field.)
  4. Leave Image Headers on Auto.
  5. Using the Image Data buttons, select whether your images are grayscale or label maps (the output of a segmentation).
  6. The Name field is the name that your volume will have within Slicer. You may change this to something descriptive, such as, "Presurgical SPGR".
  7. You may enter a description in the optional Description field.
  8. When you are done making changes, click Apply to read in the volume. Your data will now appear in the 2D portion of the Viewer window.

top

2b. Loading Volumes without Headers

To set the header information manually:

  1. In the Data panel, click Add Volume. The Props tab of the Volumes panel will appear.

  2. To find the first image file, click Browse. A dialog box will appear.
  3. Select the first image of the volume that you would like to load, and then click Open. (The number of the last image in the volume will automatically appear in the Number of Last Image field.)
  4. Set Image Headers to Manual.
  5. Click Apply. The Header section of the Props tab will appear.
  6. Change the default values to the values of your volume, namely, the physical parameters of the pixels that make up your volume. These parameters include:
    • File Pattern: The pattern for naming the files, expressed in C language syntax. For example, a file named skin.001 has a pattern of %s.%03d, and a file named skin.1 has %s.%d for a pattern.
    • Image Size: Number of pixels of the image in the x and y directions. (For square images, they are the same.)
    • Pixel Size: Size of each pixel in the x and y directions. (For square images, they are the same.)
    • Slice Thickness: The z dimension of the voxel.
    • Scan Order:
      • LR = left to right
      • IS = inferior to superior
      • PA = posterior to anterior
    • Scalar Type: The data format of the pixel. Generally, it is Short (16 bit integer).
    • Slice Tilt: The tilt of the gantry during an MRI.
    • Num Scalars: The number of scalar components for each voxel. Gray-level data has 1. Color data has 3.
    • Little Endian: In little-endian architectures, the rightmost bytes are most significant. In big-endian architectures (Slicer default), the leftmost bytes (those with a lower address) are most significant.
    • DTI data: This parameter, and the values Swap and No Swap, are placeholders for future use.
  7. When you are done, click Apply to read in the volume. Your data will now appear in the 2D portion of the Viewer window.

top

2c. Loading DICOM Volumes

Note: DICOM (digital imaging and communications in medicine) is a complicated standard. Slicer is not capable of reading all flavors of it.
Slicer assumes that the slices of the volume are stored in separate files, that they are not compressed, and that the header data is correct (contains the correct values of the study and the series UIDs).
Slicer uses the following method to determine the correct slice order. First, it tries to find the Image Number (0x0020,0x0013) data element. If that is not present, it tries the Slice Location (0x0020,0x1041) data element. If neither data element is available, the files will be ordered as they were found, possibly not in the correct order.
Also, Slicer has a restriction that the slice thickness and spacing must be the same for every slice. Also, any oblique scans are shown as the nearest approximate scan order (axial, sagittal, or coronal).

Note Also: Slicer assumes that the subject is scanned supine (face up). Scans of prone subjects (face down) may be flipped.

To load DICOM volumes:

  1. Click Add Volume in the Data panel. The Props tab of the Volumes panel will appear.

  2. From the Properties pull-down menu, select Dicom.
  3. Click Select DICOM Volume.
  4. A dialog box appears. Select the directory to start searching for volumes in, and click OK. The whole directory structure will be traversed to find every DICOM file. Important information, such as the name and ID of the patient, the study UID (unique identifier), and the series UID, will be extracted from each DICOM file. Note: if you have a large number of files, this is a  slow process.
  5. After the search, a new dialog box appears showing patient, studies, series, and files. (By default, all files of the first series of the first study of the first patient will appear.) Select a patient, a study of this patient, a series of this study, and the files of this series. Then click OK.
  6. After clicking OK, the header data of the first file will be extracted. You may select additional files. Clicking Extract Header will show their header information. You can check and modify the extracted values by clicking Header.
  7. In the Basic panel, you can use the Image Data buttons to select whether your images are grayscale or label maps (the output of a segmentation).
  8. The Name field is the name that your volume will have within Slicer. You may change this to something descriptive, for example "Presurgical SPGR".
  9. You may enter a description in the optional Description field.
  10. Click Apply to set your Name and Description choices.
  11. Finally, click Apply to read in the volume. Your data will now appear in the 2D portion of the Viewer window.

top

3. Loading Models

A model is a 3D surface.

Technical Note: The data format for the models that Slicer reads in is vtkPolyData.

To load models:

  1. In the Data panel, click Add Model. The Props tab of the Models panel will appear.

  2. To find the model file, click Browse. A dialog box appears.

  3. Select the model that you would like to load, and click Open.
  4. The Name field is the name that your model will have within Slicer. You may change this to something descriptive, like "Vessels".
  5. From the Color pull-down menu, you can select your model's color as it will appear in the 3D Viewer.
  6. Finally, click Apply to read in the model.

top

4. Viewing Volumes

After loading volumes, you can optimize how you view them.

Adjusting Window/Level

By adjusting the Window/Level of the volume, you can optimize displaying the region of interest of gray-scale images. Adjust the Level value until the dark areas become barely visible. Then adjust the Window value so that the bright areas are not saturated into white. You may need to go back and forth to readjust until you have optimally displayed your data.

To adjust the Window/Level of a volume:

  1. Click Volumes on the Main menu. The Volumes panel appears.
  2. Select the Display tab.

  3. From the Active Volume pull-down menu, select a volume.
  4. Move the sliders, or click Auto, to adjust the display properties of the volume.

top

4a. Slices

Slicer has multiple configurations to present image volumes. By default, the normal view is selected. In normal view, the viewer window is divided into two sections.
The upper portion of the view window shows the 3D formatted version. In the lower quarter of the viewer window, a 2D multi-plane formatted version of the volume is shown.

top

4b. Color

You can select colors for models.

Click Color (on the Props tab of the Models panel) to select a color. Enter a description of what that color will represent.

top

4c. Image Fusion

Use the Fade vertical slider (in the lower left of the Menu window) to fade from the images displayed in the background (Bg) layer to the images displayed in the foreground (Fg) layer. This is useful for checking alignment or coverage of a label map, for example.

In the example below, the images in the background are grayscale (non-brain) images and the images in the foreground are label map or segmented (brain) images.

top

5. Viewing Models

The Display tab of the Models panel controls which models are visible in Slicer.

top

5a. Opacity

Opacity is how non-transparent a model is. (The higher the opacity, the less transparent the model is.)

You can control the Opacity of each model.

By default, Slicer creates models that are completely opaque (opacity = 1).
Setting the opacity to 0 makes the model completely transparent.

Adjust the opacity in either of two ways:

top

5b. Color

Selecting a color for a model is very similar to selecting a color for a volume.

Use the Palette pull-down menu (on the Display tab of the Volumes panel) to select a color scheme to colorize your gray-scale volume. This can help you distinguish different regions of interest better. You can select one of seven available color schemes:
Gray, Iron, Rainbow, Ocean, Desert, InvGray, or Label.

top

5c. Clipping

Clipping is cutting away sections of a model at one or more selected slices. On one side of each selected slice, the model is removed, revealing the image of each selected slice and the rest of the visible model.

To turn clipping on:

  1. On the Display tab of the Models panel, right-click the model's name in the list.

  2. A drop-down menu appears. Select Clipping.

To control clipping:

  1. Select the Clip tab of the Models panel.

  2. Select which side of a slice to clip the model on, as follows:
      Color     Slice     + means:     - means:  
    red Axial slices Superior Inferior
    yellow Sagittal slices Right Left
    green Coronal slices Posterior Anterior
    Click + or - to select which side of each slice to clip on.

In the sample below, the right-superior-posterior part of the cortical surface has been clipped.

top

6. Saving Volumes

After creating new label map data with the Slicer edit features, it may be necessary to save the new volume of data. To save the volume:

  1. On the Main menu, click Editor. The Volumes tab appears.

  2. Click Save.
  3. From the menu, select the label map to save and click Save. The Save Volume dialog box appears.

  4. Select the path and click Save.

top

7. Saving Models

To save a model:

  1. On the Main menu, click ModelMaker.
  2. Click the Save tab.

  3. From the menu, select the model to save and click Save. The Save Model dialog box appears.

  4. Select the path and click Save. The model will be saved as a .vtk file, which identifies the file as a model.

top

8. Saving the Scene

There are several ways to save where you are in Slicer.

top

8a. Save Scene

You can save a description of the current scene. This saves the pathnames to the volumes and models in an XML file. You can later open them all again, just by opening the scene file.
Note: Before saving the scene, you should save any new volumes and models first.

To save a description of the current scene:

  1. Click File. A drop-down menu appears.

  2. There are several ways to save the scene, depending on your preferences for file name and options.

To open a scene later:

  1. Click File.
  2. Click Open Scene.
  3. Find the scene .xml file, double-click it, and wait for the volumes and models to load.

top

8b. Save Images

You can save the 3D View and the Active Slice as TIFF files.
Note that the Active Slice is the one that you clicked on last.

To save the 3D View:

  1. Click File. A drop-down menu appears.

  2. There are two ways to save the 3D View, depending on your preferences for file name.

To save the Active Slice:

  1. Click File. A drop-down menu appears.

  2. There are two ways to save the Active Slice, depending on your preferences for file name.

top

8c. Save Current Options

You can save your preferences in Slicer. Among the features you can save are:

To save your preferences:

  1. Click File. A drop-down menu appears.

  2. Click Save Current Options. This will save your preferences to a file named Options.xml in the current directory. Whenever you run Slicer from that directory, it will find the Options.xml file, and set things up using your saved preferences.

top

9. Conclusion

This tutorial was a quick walkthrough on typical uses of Slicer.
Other topics, such as segmentation of medical images and creating 3D models of segmented data with Slicer, appear in the Slicer User's Guide.

top