3D Slicer

This program is a good way to do combined visualization of:

  • Freesurfer cortical surfaces
    • with surface label map overlays
  • Cut out slice planes
    • with overlaid SPMs
  • Volume renderings of the skull, an SPM, etc.
  • Tractography fiber groups

http://www.slicer.org

Freesurfer integration

This video tutorial shows you how to:

  • Load/display Freesurfer cortical surfaces
  • Load/display surface overlays (in this case the aparc.annot cortex parcellations)
  • Load/display MRI volumes
  • Add slice plane clipping (i.e. brain cut-outs) to the surface models

Volume rendering

One nice feature of Slicer is that it can volume render MRI volumes. This treats the object like a translucent cloud, with the density and color at each point determined by the voxelwise intensity values and a look-up table of your creation.

fMRI results

I started with the Freesurfer cortical surface representation of a single subject. Then I added in slice views of the original T1-weighted MRI volume, and turned on clipping planes in the surface model so that it looks like a cut out. I then loaded the SPM of the subject's fMRI results and overlaid this onto the slices as well. Finally, I turned on volume rendering for the SPM, and tweaked the LUT to show translucent red at p=0.05, and a transition to solid yellow at p=0.01.

Skull

In this example, I loaded the FS cortical surface models and slice overlays like above. I then turned on volume rendering to show the outside of my face, and turned on clipping for the volume so that it looks like the top of my skull is cut off. My mouth is garbled because of my metal retainer.

Surface models

In addition to directly loading/displaying FS and other surface-based files, 3D Slicer can automatically generate surface models from masks and label maps stored as volume data. Here I generated surface models from all of the labels in the Johns Hopkins white matter label map atlas that is included with FSL at $FSLDIR/data/atlases/JHU/JHU-WhiteMatter-labels-1mm.nii.gz .

How to make screenshots

This doesn't work with newer versions of Slicer, as they are switching to Qt. I use version Slicer3-3.4-2009-05-21 for screenshots.

I found a mailing list response with a technique for saving higher resolution screenshots. www

Go to WindowTcl interactor and then option-click to paste in this code:

proc SaveLargeImage { fileName {resolutionFactor 1} } {
   set appUI $::slicer3::ApplicationGUI
   set viewerWidget [$appUI GetViewerWidget]
   set mainViewer [$viewerWidget GetMainViewer]
   set renderer [$mainViewer GetRenderer]
 
   set renderLargeImage [vtkRenderLargeImage New]
   $renderLargeImage SetMagnification $resolutionFactor
   $renderLargeImage SetInput $renderer
 
   switch { [string tolower [file ext $fileName]] } {
     "png" {
       set writer [vtkPNGWriter New]
     }
     "jpg" - "jpeg" {
       set writer [vtkJPEGWriter New]
     }
     "tif" - "tiff" {
       set writer [vtkTIFFWriter New]
     }
     "eps" - "ps" - "prn" {
       set writer [vtkPostscriptWriter New]
     }
     "pnm" - "ppm" {
       set writer [vtkPNMWriter New]
     }
     default {
       set writer [vtkPNGWriter New]
     }
   }
 
   $writer SetInput [$renderLargeImage GetOutput]
   $writer SetFileName $fileName
   $writer Write
 
   $renderLargeImage Delete
   $writer Delete
}

Once that is done, screenshots can be saved like this:

SaveLargeImage /full/path/to/image.png 2

The last number is a factor to multiply by the current resolution.

References

<bibtex> @article{gering_integrated_2001,

title = {An integrated visualization system for surgical planning and guidance using image fusion and an open MR},
volume = {13},
url = {http://onlinelibrary.wiley.com/doi/10.1002/jmri.1139/abstract;jsessionid=892F5A1B62333250EA69B9DB0EE69590.d02t02?systemMessage=There+will+be+a+release+of+Wiley+Online+Library+scheduled+for+Sunday+19th+December+2010.+Access+to+the+website+will+be+disrupted+as+follows%253A+New+York+0500+EST+to+0700+EST%253B+London+1000+GMT+to+1200+GMT%253B+Singapore+1800+SGT+to+2000+SGT},
number = {6},
journal = {J Magn Reson Imaging},
author = {D T Gering and A. Nabavi and R. Kikinis and N. Hata and L J {O'Donnell} and W E Grimson and F A Jolesz and P M Black and W M Wells},
month = jun,
year = {2001},
keywords = {Adolescent, Adult, Aged, Brain Neoplasms, Child, Child: Preschool, Computer Simulation, Female, Humans, Image Processing: {Computer-Assisted,} Imaging: {Three-Dimensional,} Magnetic Resonance Angiography, Magnetic Resonance Imaging, Male, Middle Aged, Patient Care Planning, Software, Stereotaxic Techniques},
pages = {967–75}

} </bibtex>

neuroimaging/slicer.txt · Last modified: 2010/12/17 3:15 pm PST by John Colby
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki