Upload
ophelia-bryant
View
220
Download
0
Embed Size (px)
Citation preview
NA-MICNational Alliance for Medical Image Computing http://na-mic.org
A DW-MRI processing and visualization pipeline for NA-MIC
Gordon KindlmannLaboratory for Mathematics in Imaging
National Alliance for Medical Image Computing http://na-mic.org
Outline
• Crash course on DWI and DTI– The necessity of 3 coordinate frames
• NRRD DWI headers– Motivation, creation, inspection
• Command-line Teem tools– “unu” + “tend” for pre-processing– relationship to other software (ITK)
• Deft: new interactive DTI visualization– Intro to underlying Teem API
National Alliance for Medical Image Computing http://na-mic.org
DWI crash course: MRI
• Diffusion: Brownian motion of one material through another
• Anisotropy: diffusion rate depends on direction
• Magnetic gradients create spatial planar waves of proton phase
• Destructive interference measures diffusion along gradient direction only
Kleenex newspaper
National Alliance for Medical Image Computing http://na-mic.org
DWI crash course: Model
Single Tensor Model (Basser 1994)
A0
gi
Ai
D
Dxx Dxy Dxz
Dyy Dyz
Dzz
Tensorestimation
National Alliance for Medical Image Computing http://na-mic.org
DWI crash course: Math
• Knowns: b, gi (or Bi)
• Measured: A0, Ai
• Find: D
• Most common: linear least squares on
• Better: non-linear least squares
National Alliance for Medical Image Computing http://na-mic.org
DWI crash course: Coordinates
rightanterior
supe
riorWorld:
e.g. “RAS”
fast=I
med
ium
=J
slow=KImage:“IJK” Gradients:
g1 = (1,0,1)g2 = (1,-1,0)… Dxx, Dxy …
x
y
z
“ImageOrientation”
“MeasurementFrame”
National Alliance for Medical Image Computing http://na-mic.org
NRRD DWI headers : Motivation
• File format need– Self-contained representation– All image values (in original files)– All DWI-specific parameters (b, gi, etc.)– All coordinates (including measurement frame!!)– DICOM is not a solution (DWI or DTI)
• Manual sign flips/transposition Store answer
• NA-MIC solution: – NRRD format + key/value pair convention– NRRD: image values + coordinates
• Explicit representation of measurement frame
– Key/value pair convention: DWI-specific parameters
National Alliance for Medical Image Computing http://na-mic.org
NRRD DWI header: Status
• See updated info on Wikihttp://www.na-mic.org/Wiki/index.php/NAMIC_Wiki:DTI:Nrrd_format
• Changes from last SLC AHM (~year ago)– “measurement frame”: NRRD0004 to NRRD0005– Key/value pair convention was broken, now fixed modality:=DW modality:=DWMRI
DW_gradient_001:= 1 0 0 DWMRI_b-value:=800
DWMRI_gradient_0001:= 1 0 0
– BWH (“HUVA…”) DWI data on BIRN needs new headers from separate tarball, also on BIRN
• Command-tool (unu/tend) usage examples:http://www.na-mic.org/Wiki/index.php/NAMIC_Wiki:DTI:TeemExamples
National Alliance for Medical Image Computing http://na-mic.org
NRRD DWI header: Generation
• Written by: hand?– Automated extraction from DICOM (for all possible
scanners) simply impossible at this point.– Would be very nice to have a DWI “wizard”– “unu make” is good for make sure individual data files
can be read in with “-bs -1” trick
unu make -i S4.130 -s 256 256 -t short \ -e raw -en little -bs -1 \ | unu quantize -b 8 | unu save -f pnm | xv - (“pv” on windows- bug me later)
unu make -i S4.1?? -s 256 256 100 -t short\ -e raw -en little -bs -1 \ | unu tile -a 2 0 1 -s 10 10 \ | unu quantize -b 8 | unu save -f pnm | xv -
National Alliance for Medical Image Computing http://na-mic.org
NRRD DWI header: Support
• Read by Teem/NrrdIO• Slicer (can read both DWI and DTI)
– See Wiki for instructions
• ITK (both DWI and DTI)– See Wiki for instructions- Insight/Code/IO/itkNrrdImageIO.cxx handles mapping
between NRRD’s N+1 logical array dimension (one axis for multi-values) to N-dimensional image.
National Alliance for Medical Image Computing http://na-mic.org
NRRD DWI header: data file possibilities
Volume interleaved, volume at a time:data file: dwi%03d.gipl 1 12 1byte skip: -1sizes: 256 256 60 12kinds: space space space list
Volume interleaved: slice at a timedata file: MR_0028_%04d.dcm 1 448 1 2byte skip: -1sizes: 128 128 64 7kinds: space space space list
Slice interleaved: slice at a timedata file: test_%04d.dcm 1 448 1 2byte skip: -1sizes: 128 128 7 64kinds: space space list space
National Alliance for Medical Image Computing http://na-mic.org
Deft: interactive tensor vis
• Deft: written in C++/OpenGL– Built on top of Teem (written in C)– Compiled with Cmake
• MIT License– Teem is LGPL+static linking exceptions
• Deft is not for clinicians– low-level data inspection: “xv for tensors” (glyphs)
– Algorithmic visualization: exploring parameters (fibers)
– Possible example of light-weight stand-alone Slicer3 data client
• Benchmarking for visualization speed (glyphs)• Comparison/”Validation” with different tractography
method
National Alliance for Medical Image Computing http://na-mic.org
Deft pointers
• Start with Deft::Viewer “Camera Reset” button• Camera control: cursor location determines effect
2D Rotate
Vertical axis rotate
Ho
rz a
xis
rota
te
Fie
ld o
f Vie
w
In-screen-plane rotate
Dolly
Translate
Horz Translate
Ve
rt T
rans
late
Fie
ld o
f Vie
w
Translate along view dir
Depth of near/far clipping planes
Left-click Right-click (Mac: cmd-click)