Home < Documentation < 4.10 < Modules < Volumes
Introduction and Acknowledgements
- Title: Volumes
- Author(s)/Contributor(s): Steve Pieper (Isomics), Julien Finet (Kitware), Alex Yarmarkovich (Isomics), Nicole Aucoin (SPL, BWH)
- License: slicer4
- Acknowledgements: This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
- Contact: Steve Pieper, <email>email@example.com</email>
National Alliance for Medical Image Computing (NA-MIC)
Surgical Planning Laboratory (SPL)
This module is used for changing the appearance of various volume types.
- Lookup tables/Colour palettes
- Information about the color nodes associated to volumes
- View volume properties such as orientation and scalar type
How to Use
- How to overlay two volumes
- How to load data from a sequence of JPG files
- When loading a 2D image(jpg, png, tiff ...), the window level(colors) might be skewed. To see the original colors switch the Window Level combobox to Manual Min/Max, then set Min to 0 and Max to 255.
- Also use the Spacing field to enter the volumetric pixel sizes of the image data.
- While you can display color volumes as slices, most slicer modules do not work natively with RGB or RGBA data, the new VectorToScalarVolume converter can be used to create a volume for use, for example, with the Editor. (added post-4.1).
Panels and their use
- Active Volume: Select the volume to display and operate on -- the module's Display interface will change to show controls appropriate for the volume type.
- Volume Information: Information about the selected volume. Some fields can be edited to correctly describe, for example, when loading incompletely specified image data such as a sequence of jpeg files. Use caution however, since changing properties such as Image Spacing will impact the physical accuracy of some calculations such as Label Statistics.
- Image Dimensions: The number of pixels in "IJK" space - this is the way the data is arranged in memory. The IJK indices (displayed in the DataProbe) go from 0 to dimension-1 in each direction.
- Image Spacing: The physical distance between pixel centers when mapped to patient space expressed in millimeters.
- Image Origin: The location of the center of the 0,0,0 (IJK) pixel expressed with respect to patient space. Patient space is organized with respect to the subject's Right, Anterior, and Superior anatomical directions. See http://www.slicer.org/slicerWiki/index.php/Coordinate_systems for more information.
- IJK to RAS Direction Matrix: The trasnform matrix from the IJK to RAS coordinate systems
- Center Volume: This button will adjust the Image Origin so that the entire volume is centered around 0,0,0 in patient space.
- Scan Order: Describes the image orientation (how the IJK space is oriented with respect to patient RAS.
- Number of Scalars: Most CT or MR scans have one scalar component (grayscale). Color images have three components (red, green, blue). Tensor images have 9 components. For diffusion weighted volumes this indicates the number of baseline and gradient volumes.
- Scalars Type: Tells the computer representation of each pixel. Most operations work independent of scalar type. Label map volumes must be of type Short for use with the Editor module.
- Filename: Path to the file which this volume was loaded from/saved to
- Window/Level Presets: Loaded from DICOM headers defined by scanner or by technician.
- LabelMap: Indicates and controls if the Volume is a label map
- Display: Set of visualization controls appropriate for the currently selected volume. Not all controls are available for all volume types.
- Lookup Table: Select the color mapping for scalar volumes to colors.
- Interpolate: When checked, slice views will display linearly interpolated slices through input volumes. Unchecked indicates nearest neighbor resampling
- Window Level Presets: Predefinied shortcuts to window/level and color table combinations for common visualization requirements.
- Window/Level Controls: Double slider with text input to define the range of input volume data that should be mapped to the display grayscale. Auto window level tries to estimate the intensity range of the foreground image data. On mouse over, a popup slides down to add support for large dynamic range by giving control over the range of the window level double slider.
- Threshold: Controls the range of the image that should be considered transparent when used in the foreground layer of the slice display. Same parameters also control transparency of slice models displayed in the 3D viewers.
- Histogram: Shows the number of pixels (y axis) vs the image intensity (x axis) over a background of the current window/level and threshold mapping.
- Diffusion Weighted Volumes: The following controls show up when a DWI volume is selected
- DWI Component: Selects the baseline or diffusion gradient direction volume to display.
- Diffusion Tensor Volumes: The following controls show up when a DTI volume is selected
- Scalar Mode: Mapping from tensor to scalar.
- Slice Visibility: Allows display of graphics visualizations of tensors on one or more of the standard Red, Green, or Yellow slice views.
- Opacity: How much of the underlying image shows through the glyphs.
- Scalar Color Map: How scalar measures of tensor are mapped to color.
- Color by Scalar: Which scalar metric is used to determine the color of the glyphs.
- Scalar Range: Defines the min-max range of the scalar mapping to color. When enabled, allows a consistent color mapping independent of the full range of the currently displayed item (if not selected color range will cover min-max of the currently displayed data).
- Glyph Type: Tubes and line show direction of eigen vector of tensor (major, middle, or minimum as selected by the Glyph Eigenvector parameter). Ellipsoid shows direction and relative scale of all three eigenvectors.
- Scale Factor: Controls size of glyphs. There are no physical units for this parameter.
- Spacing: Controls the number of glyphs on the slice view.
List of parameters generated transforming this XML file using this XSL file. To update the URL of the XML file, edit this page.
| Greyscale volume
| Label map volume display
On mouse over, a second popup appears under the window level double slider. Large dynamic range can be controlled using the slider. Moving the handles of the popup double slider changes the whole range of the window level double slider.
- Convert scalar volume to labelmap
- Load it as labelmap in the first place: In the 'Add data into the scene' dialog check 'Show Options' and enable the option named 'LabelMap'. When OK is clicked, the volume is loaded as a labelmap.
- Convert to labelmap using Cast Scalar Volume module. Select scalar volume as input, and create output by selecting 'Create new LabelMapVolume [as...]'. Output type is typically UnsignedChar.
- Each displayable type has a similar visualization control interface (for example, the Models, Tractography, Annotations...):
- Volume Rendering: volume render in the 3D view(s).
Information for Developers
How to create a volume node from scratch?
You need to create a vtkImageData, a vtkMRMLScalarVolumeNode and a vtkMRMLScalarVolumeDisplayNode.
imageData->SetDimensions(10,10,10); // image size
imageData->AllocateScalars(VTK_UNSIGNED_CHAR, 1); // image type and number of components
// initialize the pixels here
volumeNode->SetOrigin( -10., -10., -10.);
volumeNode->SetSpacing( 2., 2., 2. );
mrmlScene->AddNode( volumeNode.GetPointer() );
imageData = vtk.vtkImageData()
imageData.SetDimensions(10,10,10) # image size
imageData.AllocateScalars(vtk.VTK_UNSIGNED_CHAR, 1) # image type and number of components
# initialize the pixels here
volumeNode = slicer.vtkMRMLScalarVolumeNode()
volumeNode = slicer.mrmlScene.AddNode(volumeNode)
Note that the origin and spacing must be set on the volume node instead of the image data.
The Image Maker extension module creates a volume from scratch.
Here is the list of supported file formats.
The following options can be passed to load volumes programmatically:
||Mark the volume a label map
||Discard file origin information and move the center of the volume in 0,0,0
||Load the file as part of a series of 2D files that represent a 3D volume
||Automatically compute the window level based on the volume pixel intensities
||Discard file orientation information