1 / 38

Converting DTI data into Nrrd file format

Converting DTI data into Nrrd file format. Sonia Pujol, Ph.D. Gordon Kindlmann, Ph.D. Randy Gollub, M.D, Ph.D. Acknowledgments. National Alliance for Medical Image Computing NIH U54EB005149 Neuroimage Analysis Center NIH P41RR013218 Laboratory of Mathematics in Imaging,

rocio
Download Presentation

Converting DTI data into Nrrd file format

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. Converting DTI data into Nrrd file format Sonia Pujol, Ph.D. Gordon Kindlmann, 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 Gordon Kindlmann

  3. Goal of the Tutorial Training on how to generate NRRD headers DTI data and validate the orientation information within Slicer.

  4. Which image is correct ?

  5. The right one is correct

  6. Overview • Part 1: NRRD description • Part 2: NRRD requirements • Part 3: Generating NRRD Files • Part 4: NRRD training data • Part 5: Orientation validation within Slicer

  7. Background • Challenge: Concise and standardized description of the information contained in DWI and DTI data. • Current situation: • DICOM (Supplement 49) contains information on how to represent b-values and gradient directions of DWI • However no-one uses it: every vendor has their own unique way of archiving the relevant image acquisition parameters • The definition of the coordinate frame of the diffusion gradients (or the resulting estimated tensor) is not explicitly recorded in the header. • DICOM has no standard for tensors • Proposed Solution:Nrrd format

  8. Nearly Raw Raster Data • Image files that include a NRRD header to accurately represent N-dimensional raster data for scientific visualization and medical image processing. • NA-MIC has developed a way of using the NRRD format to represent Diffusion Weighted Images (DWI) volumes and Diffusion Tensor Images (DTI) • NRRD DWI and NRRD DTI data can be read into 3D Slicer: the software provides you a visual tool to confirm that the orientation of the tensors is consistent with expected neuroanatomy

  9. DTI Pipeline Dxz Dxx Dxy Dyy Dyz Dzz Diffusion Sensitizing Gradients DWI images DTI images

  10. (X,Y,Z) (I,J,K) Coordinate frames Diffusion Sensitizing Gradients (X,Y,Z) DWI and DTI Image Orientation (I,J,K) Patient Space (R,A,S)

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

  12. NRRD Terminology T: XYZRAS (X,Y,Z) (I,J,K) T: IJKRAS (R,A,S)

  13. Overview • Part 1: NRRD description • Part 2: NRRD requirements • Part 3: Generating NRRD Files • Part 4: NRRD training data • Part 5: Orientation validation within Slicer

  14. DTI Requirements To generate a NRRD header for DTI data, you’ll need to know about the data representation and acquisition: DTI Volume characteristics • Data Type • Endianess • Dimensions Disk Storage • Axis Ordering Coordinate Frames • DTI Image Orientation • Gradient Measurement Frame Tensor coefficients • Order of the tensor coefficients

  15. Overview • Part 1: NRRD description • Part 2: NRRD requirements • Part 3: Generating NRRD Files • Part 4: NRRD training data • Part 5: Orientation validation within Slicer

  16. 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 NRRD reader to load DTI volumes in Nrrd format

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

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

  19. Overview • Part 1: NRRD description • Part 2: NRRD requirements • Part 3: Generating NRRD Files • Part 4: NRRD training data • Part 5: Orientation validation within Slicer

  20. Creating NRRD header for the DTI Training Data From the Analyze header, extract the: • DTI Volume characteristics Data Type: Float “--type float” Endianess: Big Endian “--endian big” Dimensions: 91 109 91 6 “--size 91 109 91 6” • Disk Storage Axis Ordering: columns, rows, slices, tensor elements  “--kinds space space space 3d-symmetric-matrix” • Tensor coefficients Order of the tensor coefficients: Dxx, Dyy, Dzz, Dxy,Dxz, Dyz

  21. DTI Training Data • Coordinate Frames DTI Image Orientation: Right-Anterior-Superior • “--space ras” • Tensors Measurement Frame T: XYZRAS “--measurement frame (1,0,0) (0,1,0) (0,0,1)” • Space Direction and SpaceOrigin T: IJKRAS  --directions "(-1.98901,0.0,0.0) (0.0,1.99083,0.0) (0.0,0.0,2.0)--origin "(0,0,0)"

  22. Complete unu Command unu make -h -i Tensors.img --size 91 109 91 6 --type float --encoding raw --endian big --space ras --spaceunit mm mm mm --measurementframe "(1,0,0)(0,1,0)(0,0,1)“ --directions "(-1.98901,0.0,0.0) (0.0,1.99083,0.0) (0.0,0.0,2.0) none" --origin "(0,0,0)" | unu shuffle -a 3 -p 0 3 4 1 5 2 -o myTensors.nhdr

  23. Reordering the Tensor Coefficients Initial tutorial dataset 0:Dxx 1:Dyy 2:Dzz 3:Dxy 4:Dxz 5:Dyz Final tutorial dataset 0:Dxx 3:Dxy 4:Dxz 1:Dyy 5:Dyz 2:Dzz unu shuffle –a 3 –p 0 3 4 1 5 2

  24. Step1: Unu Command into Slicer Type the unu command directly in the Tk console of Slicer

  25. Step 2: Adding axis description You need to add an additionnal kinds field to the generated NRRD header to specify how the data is stored to disk (This is analogous to the “Intent” field in NIfTI file format)

  26. Step 2: Adding axis description Type the following Tcl commands: set file [open myTensors.nhdr a] puts $file “kinds: space space space 3d-symmetric-matrix” close $file

  27. Step 2: Axis description In this example kinds states that the data is stored with the tensors coefficients in the slowest axis.

  28. Step 3: Viewing the NRRD Header Type more MyNrrdFile.nhdr in the Tk console to display the content of the NRRD header you just made

  29. Step 3: Viewing the Nrrd Header Slicer displays the content of the Nrrd header

  30. Overview • Part 1: NRRD description • Part 2: NRRD requirements • Part 3: Generating NRRD Files • Part 4: NRRD training data • Part 5: Orientation validation within Slicer

  31. Loading a NRRD Volume Click on Add Volume in the Main Panel of Slicer

  32. Loading a NRRD Volume The Props Panel of the module Volumes appears. Select Nrrd Reader in the Properties field Click on Browse and load the file myTensors.nhdr Click on Apply

  33. Loading a NRRD Volume Slicer loads the Nrrd Tensor

  34. Fractional Anisotropy Compute the Fractional Anisotropy from the Nrrd Tensor Volume using the DT-MRI module (Slicer Training 4)

  35. Corpus Callosum Tracts Seed tracts in the Corpus Callosum using the tractography tools from the DT-MRI module (Slicer Training 4)

  36. Corpus Callosum Tracts The orientation of the tracts within the Corpus Callosum confirms that the orientation information contained in the Nrrd file is correct.

  37. The right one is correct

  38. Conclusion • Standardized description of the information contained in DWI and DTI data. • Rapid, intuitive visual assessment of orientation results within Slicer • Open-Source: http://teem.sourceforge.net/nrrd/

More Related