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
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
- In the Data panel, click Add Volume.
The Props tab of the Volumes panel will appear.

- To find the first image file, click Browse.
A dialog box will appear.
- 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.)
- Leave Image Headers on Auto.
- Using the Image Data buttons, select whether your
images are grayscale or label maps (the output of a segmentation).
- The Name field is the name that your volume will
have within Slicer. You may change this to something descriptive,
such as, "Presurgical SPGR".
- You may enter a description in the optional Description
field.
- 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:
- In the Data panel, click Add Volume.
The Props tab of the Volumes panel will appear.

- To find the first image file, click Browse.
A dialog box will appear.
- 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.)
- Set Image Headers to Manual.
- Click Apply. The Header
section of the Props tab will appear.
- 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.
|
- 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:
- Click Add Volume in the Data panel.
The Props tab of the Volumes panel will appear.

- From the Properties pull-down menu, select Dicom.
- Click Select DICOM Volume.
- 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.

- 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.
- 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.
- 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).
- The Name field is the name that your volume will
have within Slicer. You may change this to something descriptive, for
example "Presurgical SPGR".
- You may enter a description in the optional Description
field.
- Click Apply to set your Name and
Description choices.
- 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:
- In the Data panel, click Add Model.
The Props tab of the Models panel will appear.

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

- Select the model that you would like to load, and click Open.
- The Name field is the name that your model will
have within Slicer. You may change this to something descriptive, like
"Vessels".
- From the Color pull-down menu, you can select your
model's color as it will appear in the 3D Viewer.
- 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:
- Click Volumes on the Main menu. The Volumes
panel appears.
- Select the Display tab.

- From the Active Volume pull-down menu,
select a volume.
- 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.

- There are three 2D windows (red, yellow, and green).
You can select both grayscale and label map images into each of the 2D windows.
For example, Slicer will automatically put the Axial grayscale images into the first (red) 2D window as the background layer.
- In each 2D window, the slider selects which slice of the volume to display.
The numerical field shows the slice number.
- The V toggle button controls whether the selected slice is visible in the 3D viewer or not. In the figure above, only the slice from the green window is visible in the 3D viewer.
- There are Or (scan order), Bg (background), Fg (foreground),
and Lb (label map) buttons
for each of the three 2D windows.
- Use Or to change the scan order in each 2D window.
For example, you can use the Axial view in the first 2D window,
the Coronal in the second, and the Saggital in the third window.
Or you can use the Coronal view in the first and the other two views in the other two windows.
Or you can set each view individually, to suit your need.
- Use Bg to select which volume to put in the background layer.
- Use Fg to select a volume for the foreground layer,
which is superimposed over the background layer.
- Use Lb to select label map images for the label map layer,
to display results of a segmentation. Images loaded into the label map layer
will appear as outlines around the structures that were segmented.
(You can use Slicer to create label maps, and also to make models from them.
See the User's Guide for more information.)
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.

- Click Show All to display all models in the 3D Viewer.
- Click Show None to display none of the models in the 3D Viewer.
- Clicking the name of a model in the list turns its visibility on and
off.
- Right-clicking the name of a model in the list displays a menu of display
options for that model.
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:
On the Display tab of the Models panel, adjust the Opacity slider
next to the model's name in the model list.

On the Props tab of the Models panel, set the Active Model,
and use the Opacity slider below.

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:
- On the Display tab of the Models panel,
right-click the model's name in the list.

- A drop-down menu appears. Select Clipping.
To control clipping:
- Select the Clip tab of the Models panel.

- 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:
- On the Main menu, click Editor.
The Volumes tab appears.

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

- Select the path and click Save.
top
7. Saving Models
To save a model:
- On the Main menu, click ModelMaker.
- Click the Save tab.

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

- 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.
- Use Save Scene to save as an XML file.
The XML file lists the elements of the scene and their attributes.
- Use Save 3D View to save a picture of the 3D View
or Save Active Slice to save one of the slices.
- Use Save Current Options to save user preferences,
like background color or view presets, into a special
Options.xml file.
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:
- Click File. A drop-down menu appears.

- There are several ways to save the scene,
depending on your preferences for file name and options.
- To save the file with the default file name (
data.xml) and no options,
select Save Scene.
- To use another file name,
select Save Scene As and enter your own file name for the scene.
- Use Save Scene With Options to include Options in the scene description.
These include view presets, background color, and other preferences
you set in this Slicer session.
To open a scene later:
- Click File.
- Click Open Scene.
- 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:
- Click File. A drop-down menu appears.

- There are two ways to save the 3D View,
depending on your preferences for file name.
- To save the file with the default file name,
select Save 3D View.
- To use another file name,
select Save 3D View As and enter your own file name for the 3D View.

To save the Active Slice:
- Click File. A drop-down menu appears.

- There are two ways to save the Active Slice,
depending on your preferences for file name.
- To save the file with the default file name,
select Save Active Slice.
- To use another file name,
select Save Active Slice As and enter your own file name for the Active Slice.
top
8c. Save Current Options
You can save your preferences in Slicer. Among the features you can save are:
- The View Presets that you set under the Slicer
graphic in the Menu window.
- The settings from the Modules tab on the Options
panel.
- The Background Color set using View.
(Note: You can set this differently for each of your View Presets.)
To save your preferences:
- Click File.
A drop-down menu appears.

- 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