+ All Categories
Home > Documents > Converting DTI data into Nrrd file format

Converting DTI data into Nrrd file format

Date post: 21-Mar-2016
Category:
Upload: rocio
View: 50 times
Download: 0 times
Share this document with a friend
Description:
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, - PowerPoint PPT Presentation
38
Surgical Planning Laboratory http://www.slicer.org -1- Brigham and Women’s Hospital Converting DTI data into Nrrd file format Sonia Pujol, Ph.D. Gordon Kindlmann, Ph.D. Randy Gollub, M.D, Ph.D.
Transcript
Page 1: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-1-

Brigham and Women’s Hospital

Converting DTI data into Nrrd file format

Sonia Pujol, Ph.D.Gordon Kindlmann, Ph.D.Randy Gollub, M.D, Ph.D.

Page 2: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-2-

Brigham and Women’s Hospital

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

Page 3: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-3-

Brigham and Women’s Hospital

Goal of the Tutorial

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

Page 4: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-4-

Brigham and Women’s Hospital

Which image is correct ?

Page 5: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-5-

Brigham and Women’s Hospital

The right one is correct

Page 6: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-6-

Brigham and Women’s Hospital

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

Page 7: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-7-

Brigham and Women’s Hospital

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

Page 8: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-8-

Brigham and Women’s Hospital

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

Page 9: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-9-

Brigham and Women’s Hospital

DTI Pipeline

DWI imagesDiffusion Sensitizing Gradients

Dxx Dxy Dxz

Dyy Dyz

Dzz

DTI images

Page 10: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-10-

Brigham and Women’s Hospital

Coordinate frames

DWI and DTI Image Orientation

(I,J,K)

Diffusion Sensitizing Gradients

(X,Y,Z) (X,Y,Z) (I,J,K)

Patient Space

(R,A,S)

Page 11: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-11-

Brigham and Women’s Hospital

Transformation matrices

(X,Y,Z) (I,J,K)

(R,A,S)

T: XYZRAS

T: IJKRAS

Page 12: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-12-

Brigham and Women’s Hospital

NRRD Terminology

(X,Y,Z) (I,J,K)

(R,A,S)

T: XYZRAS T: IJKRAS

Page 13: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-13-

Brigham and Women’s Hospital

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

Page 14: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-14-

Brigham and Women’s Hospital

DTI RequirementsTo 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 OrderingCoordinate Frames• DTI Image Orientation• Gradient Measurement FrameTensor coefficients• Order of the tensor coefficients

Page 15: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-15-

Brigham and Women’s Hospital

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

Page 16: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-16-

Brigham and Women’s Hospital

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

Page 17: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-17-

Brigham and Women’s Hospital

Unu syntax• General Syntax:unu cmd -i input -o output

• Tips:“unu” list of unu commands“unu cmd” help on cmd

Page 18: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-18-

Brigham and Women’s Hospital

Unu syntax: ‘make’ command

• ‘make’ syntax:unu make -i input -o output

• ‘make’ documentation:unu make help on make

Page 19: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-19-

Brigham and Women’s Hospital

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

Page 20: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-20-

Brigham and Women’s Hospital

Creating NRRD header for the DTI Training Data

From the Analyze header, extract the:

• DTI Volume characteristicsData Type: Float “--type float”Endianess: Big Endian “--endian big”Dimensions: 91 109 91 6 “--size 91 109 91 6”

• Disk StorageAxis Ordering: columns, rows, slices, tensor elements “--kinds space space space 3d-symmetric-matrix”

• Tensor coefficientsOrder of the tensor coefficients: Dxx, Dyy, Dzz, Dxy,Dxz, Dyz

Page 21: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-21-

Brigham and Women’s Hospital

DTI Training Data• Coordinate FramesDTI Image Orientation: Right-Anterior-Superior “--space ras”

• Tensors Measurement FrameT: XYZRAS “--measurement frame (1,0,0) (0,1,0) (0,0,1)”

• Space Direction and SpaceOrigin

T: IJKRAS --directions "(-1.98901,0.0,0.0) (0.0,1.99083,0.0)

(0.0,0.0,2.0) --origin "(0,0,0)"

Page 22: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-22-

Brigham and Women’s Hospital

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

Page 23: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-23-

Brigham and Women’s Hospital

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

Page 24: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-24-

Brigham and Women’s Hospital

Step1: Unu Command into Slicer

Type the unu command directly in the Tk console of Slicer

Page 25: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-25-

Brigham and Women’s Hospital

Step 2: Adding axis descriptionYou 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)

Page 26: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-26-

Brigham and Women’s Hospital

Step 2: Adding axis descriptionType the following Tcl commands:

set file [open myTensors.nhdr a]

puts $file “kinds: space space space 3d-symmetric-matrix”

close $file

Page 27: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-27-

Brigham and Women’s Hospital

Step 2: Axis description

In this example kinds states that the data is stored with the tensors coefficients in the slowest axis.

Page 28: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-28-

Brigham and Women’s Hospital

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

Page 29: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-29-

Brigham and Women’s Hospital

Step 3: Viewing the Nrrd Header

Slicer displays the content of the Nrrd header

Page 30: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-30-

Brigham and Women’s Hospital

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

Page 31: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-31-

Brigham and Women’s Hospital

Loading a NRRD Volume

Click on Add Volume in the Main Panel of Slicer

Page 32: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-32-

Brigham and Women’s Hospital

Loading a NRRD Volume

Select Nrrd Reader in the Properties field

Click on Browse and load the file myTensors.nhdr

Click on Apply

The Props Panel of the module Volumes appears.

Page 33: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-33-

Brigham and Women’s Hospital

Loading a NRRD Volume

Slicer loads the Nrrd Tensor

Page 34: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-34-

Brigham and Women’s Hospital

Fractional Anisotropy

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

Page 35: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-35-

Brigham and Women’s Hospital

Corpus Callosum Tracts

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

Page 36: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-36-

Brigham and Women’s Hospital

Corpus Callosum Tracts

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

Page 37: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-37-

Brigham and Women’s Hospital

The right one is correct

Page 38: Converting DTI data into Nrrd file format

Surgical Planning Laboratoryhttp://www.slicer.org-38-

Brigham and Women’s Hospital

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/


Recommended