Documentation/4.4/Modules/Volumes

From Slicer Wiki
Revision as of 06:51, 25 December 2014 by UpdateBot (talk | contribs) (Nightly -> 4.4)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < Documentation < 4.4 < Modules < Volumes


For the latest Slicer documentation, visit the read-the-docs.



Introduction and Acknowledgements





   :Title: 
   :Author(s)/Contributor(s): 
   :License: 
   :Acknowledgements: 
 


Contact: Steve Pieper, <email>pieper@bwh.harvard.edu</email>
Isomics, Inc.  
Kitware, Inc.  
National Alliance for Medical Image Computing (NA-MIC)  
Surgical Planning Laboratory (SPL)  

Module Description

Use Cases

  1. Examples:
    1. Use the SampleData module to load the MR Head volume. You can control the scalar display options using this module.
    2. Use the SampleData module to download the DTI Head volume. A tensor-specific display interface will allow you to display a variety of scalar modes and display glyphs.
  2. FAQ:
    1. How to overlay 2 volumes?
    2. How to load data from a sequence of JPG files?
  3. 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.
    1. Also use the Spacing field to enter the volumetric pixel sizes of the image data.
    2. 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).

Tutorials

Panels and their use

Parameters:





  ()
 
 
   
     * ': 
     
       ** ': 
       
        *** ': 
       
     
   
 


List of parameters generated transforming this XML file using this XSL file. To update the URL of the XML file, edit this page.

VolumesModule-2011-11-25.png
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.

Similar Modules

  • Each displayable type has a similar visualization control interface (for example, the Models, Tractography, Annotations...):
  • Volume Rendering: volume render in the 3D view(s).
  • Extensions

References

N/A

Information for Developers


How to create a volume node from scratch?

You need to create a vtkImageData, a vtkMRMLScalarVolumeNode and a vtkMRMLScalarVolumeDisplayNode.

vtkNew<vtkImageData> imageData;
imageData->SetScalarTypeToUnsignedChar();
imageData->SetNumberOfScalarComponents(1);
imageData->SetDimensions(10,10,10);
imageData->Allocate();
// initialize the pixels here.

vtkNew<vtkMRMLScalarVolumeNode> volumeNode;
volumeNode->SetAndObserveImageData(volume);
volumeNode->SetOrigin( -10., -10., -10.);
volumeNode->SetSpacing( 2., 2., 2. );
mrmlScene->AddNode( volumeNode.GetPointer() );

vtkNew<vtkMRMLScalarVolumeDisplayNode> displayNode;
mrmlScene->AddNode( displayNode.GetPointer() );
volumeNode->SetAndObserveDisplayNodeID(displayNode->GetID());

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.

IO

Here is the list of supported file formats.

Important classes:

qSlicerVolumesIO.[h/cxx]]
vtkSlicerVolumesLogic.[h/cxx]
vtkMRMLVolumeArchetypeStorageNode.[h/cxx]

The following options can be passed to load volumes programmatically:

Option Type Default Description
labelmap bool false Mark the volume a label map
center bool false Discard file origin information and move the center of the volume in 0,0,0
singleFile bool false Load the file as part of a series of 2D files that represent a 3D volume
autoWindowLevel bool true Automatically compute the window level based on the volume pixel intensities
discardOrientation bool false Discard file orientation information