1 / 91

Diffusion Tensor Imaging: from Dicom to Nrrd

National Alliance for Medical Image Computing. Diffusion Tensor Imaging: from Dicom to Nrrd. Sonia Pujol, Ph.D. Randy Gollub, M.D., Ph.D. Acknowledgments. National Alliance for Medical Image Computing NIH U54EB005149 Neuroimage Analysis Center NIH P41RR013218

content
Télécharger la présentation

Diffusion Tensor Imaging: from Dicom to Nrrd

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. National Alliance for Medical Image Computing Diffusion Tensor Imaging: from Dicom to Nrrd Sonia Pujol, Ph.D. Randy Gollub, M.D., Ph.D.

  2. Acknowledgments National Alliance for Medical Image Computing NIH U54EB005149 Neuroimage Analysis Center NIH P41RR013218 Laboratory of Mathematics in Imaging, Brigham and Women’s Hospital Thanks to Dr. Gordon Kindlmann Dartmouth Hitchcock Medical Center Thanks to Dr. Andy Saykin

  3. Raw Data Raw Data Raw Data Dicom Header Dicom Header Dicom Header Dicom Header Raw Data Nrrd Header Goal of the Tutorial Training on how to convert DICOM DWI data to the Nrrd File format, compatible with Slicer visualization and analysis

  4. Overview • Part 1: DWI data specificity • Part 2: Nrrd description • Part 3: Generating Nrrd Files • Part 4: Working with DICOM DWI training data • Part 5: Orientation validation within Slicer

  5. Diffusion Weighted Imaging Diffusion Weighted Images Diffusion Sensitizing Gradients The signal is dimmer when the direction of the applied gradient is parallel to the principal direction of diffusion.

  6. Diffusion Weighted Imaging (DWI) Example: Correlation between the orientation of the 11th gradient and the signal intensity in the Splenium of the Corpus Callosum

  7. Diffusion Weighted Imaging (Stejskal and Tanner 1965, Basser 1994 ) Diffusion Weighted Images {Si} represent the signal intensities in presence of the diffusion sensitizing gradients gi b is the diffusion weighted parameter

  8. Background • Challenge: Concise and standardized description of the information contained in DWI data. • Current situation: • DICOM (Supplement 49) contains information on how to represent b-value and gradient directions of DWI • However every MR Scanner manufacturer has their own unique way of archiving the relevant image acquisition parameters • The definition of the coordinate frame of the diffusion gradients is not explicitly recorded in the header • Proposed Solution:Nrrd format

  9. Which image is correct ?

  10. Which image is correct ?

  11. The left one is correct

  12. Overview • Part 1: DWI data specificity • Part 2: Nrrd description • Part 3: Generating Nrrd Files • Part 4: Working with DICOM DWI training data • Part 5: Orientation validation within Slicer

  13. Raw Data Raw Data Raw Data Nearly Raw Raster Data (Nrrd) • The flexible Nrrd format includes a single header file and image file(s) that can be separate or combined. • A Nrrd header accurately represents N-dimensional raster information for scientific visualization and medical image processing. + Nrrd Header

  14. Nrrd file format • NA-MIC has developed a robust way of using the Nrrd format to represent DWI volumes

  15. Nrrd file format • DWI data written into Nrrd format with appropriate parameters can be read into 3D Slicer

  16. (X,Y,Z) (I,J,K) Coordinate Frames Courtesy G.Kindlmann Diffusion Weighted Images Diffusion Sensitizing Gradients Courtesy G.Kindlmann

  17. (X,Y,Z) (I,J,K) Coordinate Frames Diffusion Sensitizing Gradients (X,Y,Z) DWI Image Orientation (I,J,K) Patient Space Courtesy G.Kindlmann

  18. Transformation matrices T: IJKRAS (I,J,K) (X,Y,Z) T: XYZRAS (R,A,S) Courtesy G.Kindlmann

  19. Nrrd Terminology T: XYZRAS (X,Y,Z) (I,J,K) T: IJKRAS (R,A,S) Courtesy G.Kindlmann

  20. Nrrd requirements for DWI data To generate a Nrrd header for DWI data, you’ll need to know information about data representation: • DWI Volume characteristics • Data Type • Endianess • Dimensions • Disk Storage • Axis Ordering

  21. Nrrd requirements for DWI data To generate a Nrrd header for DWI data, you’ll need to know the acquisition parameters: • Coordinate Frames • DWI Image Orientation • Gradient Measurement Frame

  22. Overview • Part 1: DWI data specificity • Part 2: Nrrd description • Part 3: Generating Nrrd Files • Part 4: Working with DICOM DWI training data • Part 5: Orientation validation within Slicer

  23. Generating Nrrd Files • Nrrd files can be generated from the Tk console of Slicer using the “unu” command line tool • unu is part of set of libraries called “Teem” compiled into Slicer 2.6 http://teem.sourceforge.net/ • Slicer includes a Nrrd reader to load DWI volumes in Nrrd format

  24. Unu syntax • General Syntax: unucmd-iinput-ooutput • Tips: “unu”  list of unu commands “unucmd” help on cmd

  25. Unu syntax: ‘make’ command • ‘make’ syntax: unumake-iinput-ooutput • ‘make’ documentation: unumakehelp on make

  26. Running unu on Windows To run the unu command from the Tk console, type unu. On Windows, you do not need to be in the directory win32/bin/teem-build/bin  the unu commands run from any location.

  27. Running unu on Mac/Linux/Solaris To run the unu command from the Tk console, you need to enter the whole path to the /bin directory Ex: Mac ../slicer2.6-opt-darwin-ppc-2006-05-18/Lib/darwin-ppc/teem-build/bin

  28. Overview • Part 1: DWI data specificity • Part 2: Nrrd description • Part 3: Generating Nrrd Files • Part 4: Working with DICOM DWI training data • Part 5: Orientation validation within Slicer

  29. DICOM DWI Training Data • 2 Baselines and 12 Gradients • 504 DICOM images named S4.xxx where xxx is the image number

  30. DWI Training Data Type the command cd and enter the path to your data in the Tk Console. Type ls to list all the data files.

  31. DWI Training Data The dataset is composed of 504 images named S4.xxx

  32. Unu command (Windows) Type the unu command with the input, encoding and byteskip fields unu make -h --input S4.%03d 1 504 1 2 --encoding raw --byteskip -1 Do not hit Enter 2D Image Read backwards from end of file Min index Increment Max index

  33. Unu command (Mac/Linux) Type the unu command with the input, encoding and byteskip fields slicer2.6-opt-darwin-ppc-2006-05-18/Lib/darwin-ppc/teem-build/bin unu make -h --input S4.%03d 1 504 1 2 --encoding raw --byteskip -1 2D Image Read backwards from end of file Min index Increment Max index

  34. Numbers as file naming convention (*) unu make -h --input S4.%03d 1 504 1 2 --encoding raw --byteskip -1 • % is a special character to be replaced by the specific file number (cf C/C++ printf command) • %03d means a 3 digit number with zero “padding”: Padding means there will be zeros instead of spaces at the beginning of the number Ex: %03d  S4.001 for file number 1 %03d  S4.024 for file number 24 • This is a compact way to refer to the whole image sequence (*) Background information

  35. Read the DICOM Header Click on AddVolume

  36. Read the DICOM Header The Props panel appears. Select the Properties Dicom

  37. Read the DICOM Header The Dicom Props panel appears. Click on Select Dicom Volume and browse to load the dataset located in the directory dwi-dicom

  38. Read the Dicom Header Slicer displays the list of Dicom files in the directory. Click on OK

  39. Read the Dicom Header Click on Extract Header to display the content of the Dicom Header.

  40. Read the Dicom Header Slicer displays the content of the Dicom Header. This information will be used to generate the Nrrd header.

  41. Extracting the volume characteristics • Extract the values corresponding to the following information: • - Data Type • Endianess • Image Dimensions

  42. Extracting the volume characteristics - Data Type: Short - Endianess: Little

  43. Unu Command Add the fields endian and type to the unu command --endian little --type short

  44. Extracting the volume characteristics Image Dimensions: 256 pixels x 256 pixels The dataset was acquired with Nb=2 Baselines and Ng=12 Gradients

  45. DICOM DWI Training Data • 2 Baselines and 12 Gradients • 504 DICOM images named S4.xxx where xxx is the image number

  46. Extracting the volume characteristics Image Dimensions: 256 pixels x 256 pixels The dataset was acquired with Nb=2 Baselines and Ng=12 Gradients • n=NbxNg = 12 + 2 = 14 intensity values/voxel • NSlices= NdicomImages/n = 504/14 = 36 slices

  47. Unu Command Add the fields size and centering to the unu command Medical images are cell-centered samples --size 256 256 36 14 --centering cell cell cell none

  48. Slice Thickness Extract the slice thickness from the Dicom header

  49. Slice Thickness slice thickness = 3.00 mm

  50. Slice Thickness Add the field thickness to the unu command --thickness nan nan 3.0 nan

More Related