Modules:Loading-Data-3.6

From Slicer Wiki
Jump to: navigation, search
Home < Modules:Loading-Data-3.6

Return to Slicer 3.6 Documentation

Introduction

Slicer can load a variety of file formats. The data module allows to load scenes and individual datasets of many types, and to view the scene's data hierarchy. The Data Module's "Display & Modify" panel that displays the MRML Scene hierarchy is described, and its "Load Panel" is shown and described below, option by option.

DICOM images can be read into Slicer using the "add volume" module. The "add data" module can be used to load virtually all other types of data formats that Slicer can handle, including tiff, jpeg, nrrd, .vtk and many other formats. For some of the more complicated formats (DWI in particular) it is recommended to first convert the DICOM data into the nrrd file using the DICOM to nrrd converter and to then load the nrrd file into slicer.

If you have raw data, you might be able to load them directly. If that does not work, manual creation of a nrrd header, which has a fairly simple format, might do the job. Please see the following for more information:

Terminology: MRML, MRML Scene Description, MRML Tree, MRML Nodes

  • MRML (pronounced mur-muhl) stands for the "Medical Reality Markup Language"; and is an XML-based representation of a a MRML Scene.
  • MRML Scene is the collection of datasets and their current state, viewing parameters, semantic descriptions, and also algorithm parameterization. A MRML Scene may also contain a set of alternate state configurations (scene snapshots) of interest.
  • MRML Scene description is the XML-based file (with extension .mrml) that contains the complete MRML Scene specification, and which references all datasets present in the MRML Scene. Slicer loads and saves MRML Scene description files. In order to load a MRML Scene from a description file, Slicer requires that all the datasets it references must be present in their referenced directory or file path.
  • MRML Tree is the hierarchical description of how data in a MRML Scene is represented. For instance, a Transformation Matrix may apply to multiple datasets, so these datasets are represented as children of the transform in the Data Module's tree-view of the scene.
  • MRML Nodes are data and parameter containers in the MRML Scene. Nodes may contain volumetric data (e.g. ScalarVolumeNodes or ScalarVolumeStorageNodes) or polygonal data (e.g ModelNodes or ModelStorageNodes) or the state of a particular Slicer software module (e.g. EMSSegmenterNode). MRML Nodes that describe/represent data have names, and are displayed in the Data Module's MRML Scene Tree panel. All nodes are saved into the MRML Scene description.

Displaying and Modifying the MRML Scene Hierarchy

The Data Module's MRML Scene Tree viewer shows how datasets in the MRML Scene are represented and offers options for deleting data, moving it to a different location in the hierarchy, adjusting its parameters and toggling its visibility, as shown in the figure below.

Show all loaded data

For Developers or anyone interested, a checkbox toggles the display of each dataset's MRML ID, and each selected dataset's unique MRML ID is displayed in the MRML Node Inspector below the MRML Tree viewer.

Load Data GUI

Loading Scenes & Datasets, and Viewing the MRML Scene Hierarchy using the Data Module

The panel beneath the MRML Scene Tree viewer provides convenient access to tools for loading many different types of data. Note that this collection of load options is a temporary placeholder for a more generalized scene & data loading interface, which we are working on for future versions of the Slicer software. The load panel is shown below:

Load Data Panel

The options it contains duplicate load options currently exposed in other parts of the Slicer software. Here, we'll briefly describe each option and mention where else in Slicer the functionality can be found. This information can also be found in the Main Application GUI section of Slicer 3.6 documentation.

Loading New Scenes

Data-3.4-LoadScene.png

This command, also invoked from the Application File Menu using File->Load Scene, raises the file browser shown below. Slicer's file browser has a 'favorites' icon that allows you to save often-visited directories on the browser's left panel. Other features, including icons that allow you to navigate your browsing history, pop up a level in the directory structure (or folder hierarchy) and create new folders. To load a scene, navigate to a file of the appropriate format (.mrml, .xcat (XCEDE catalog file), or .xml (Slicer2 scene file) and select it for loading into Slicer. As indicated, the command first clears any existing scene in Slicer and resets the application state.

Note: .xcat loading module is currently being modified to track new changes in XNAT Enterprise Version 1.4. This option is not guaranteed to work properly in Slicer 3.6; a post-release software patch will provide this updated functionality. Only catalogs of single-file file formats are working reliably; for example, use .nrrd files rather than a collection of .dcm files when representing a volume.

FileBrowser.png



Adding a Scene

Data-3.4-AddScene.png

This command, also invoked through the Application GUI's File menu using File->Import Scene, raises the same file browser shown above. Use the browser to navigate to and select a scene file to be added to the existing Slicer scene. Note: this option does not clear the existing scene.



Adding Individual Datasets, or a Directory of Data

Data-3.4-AddData.png

This command, also invoked through the Application GUI's File menu using the File->Add Data command, raises an "Add Data" widget (shown below) that allows you to select individual datasets to add to the existing scene. It exposes the following functionality:

  • The "Add Directory" button adds all files within the selected directory to the file list.
  • The "Add File(s)" button adds all selected files to the file list.
  • The array of buttons across the top allow you to select and deselect files in the file list, remove selected files from the list, or describe how files should be loaded.
  • The "Apply" button loads all datasets in the list, and
  • The "Cancel" button aborts the entire load.

AppAddData.png




Loading DICOM Image Data

Data-3.4-AddVolume.png

DICOM data can be loaded into Slicer by using the Application GUI File Menu's File->Add Volume option. This mechanism raises an "Add Volume" widget that allows you to

  • browse your directory tree,
  • select a study folder,
  • parse DICOM header information, and
  • select a DICOM series or instance to load.
  • specify some load parameters if required.

These steps are shown in the images below:

Browse the Directory Tree in the left panel.

Data-3.6-AddDICOMVolume1.png

Selecting a study folder will populate the middle panel.

Data-3.6-AddDICOMVolume2.png

Optionally parse the DICOM header for information about study contents.

Data-3.6-AddDICOMVolume3.png

Selecting any instance within a series sets up the option of loading the entire series, or just the instance.

Data-3.6-AddDICOMVolume4.png

Use the lower panel to specify whether to load the selected instance or the series, and whether Slicer should center the image or respect RAS coordinates.

Data-3.6-AddDICOMVolume5.png

For more information about using the interface's DICOM browser, see the following detailed documentation.

Adding Scalar and Tensor Volumes

Data-3.4-AddVolume.png

This command, also raised through by using the Application GUI File Menu's File->Add Volume option, raises an "Add Volume" widget (shown below). This interface allows you to select scalar or tensor volume data and add it to the existing scene. Its "Volume Options" panel can be used to clarify how a selected dataset should be loaded and displayed.

For more information about using the interface's DICOM browser, see the following detailed documentation.

AppAddVolume.png




Adding 3D Models, or a Directory of Models

Data-3.4-AddModel.png

Use this option, also available in the Models Module's Load Panel, to raise a dialog that allows you to load models into the scene.



Adding a Scalar Overlay to a Model

Data-3.4-AddOverlay.png

Use this option, also available in the Models Module's Load Panel, to add a scalar overlay to a model already present in the scene. Selecting the button raises a dialog that lets you specify a model first, and then select a scalar overlay to be applied to that model.



Adding a Transformation Matrix

Data-3.4-AddMatrix.png

Use this option, also available in the Transforms Module's Load Panel, to add a new transform to the scene. After the transform is loaded, you may use the Data Module's MRML Scene Tree viewer to apply the transform to data in your scene.



Adding a Fiducial List

Data-3.4-AddFiducialList.png

Use this option to raise a dialog that allows you to select a fiducial list file (format .fcsv) to load into the scene.



Adding a Custom Color Table

Data-3.4-AddColorTable.png

Use this option, also available in the Color Module's Load Panel, to add new Color look-up tables to the scene (files with extension .txt). Custom color files can be created by hand and loaded into slicer; a simple example is shown below:

# Color table file ./simpleExample.txt
# 3 values
0 name1 6 6 6 255
1 name2 102 255 255 255
2 anotherName 157 225 255 255

To generate your own custom colors:

To install a new defaul color file, commit it to the source code repository in Base/Logic/Resources/ColorFiles. The Slicer3/Base/Logic/CMakeLists.txt will automatically detect and install all *.txt files to the appropriate binary directory.



Adding a DTI Fiber Bundle

Data-3.4-AddFiberBundle.png

Use this option, also available in the FiberBundles Module's Load Panel to load a DTI Fiber Bundle.