ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file ·...
Transcript of ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file ·...
![Page 1: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/1.jpg)
ITK-SNAP Training Course at NCI
May 25, 2010Paul Yushkevich, Ph.D.
Tuesday, May 18, 2010
![Page 2: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/2.jpg)
Course Aims
• Review basic image segmentation theory
• Demonstrate main ITK-SNAP features
• Image viewing and navigation
• Manual segmentation
• Automatic segmentation
• Practice using hands-on exercises
Tuesday, May 18, 2010
![Page 3: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/3.jpg)
About Me
• Assistant Professor of Radiology at Penn
• Research interests:
• MRI segmentation, morphometry
• Neuroimaging biomarkers for AD
• Hippocampus
• Mostly brain, some cardiac MRI
• Lead developer of ITK-SNAP from 2003
Tuesday, May 18, 2010
![Page 4: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/4.jpg)
About ITK-SNAP
• Launched by Guido Gerig (UNC, Utah) in late 90s as a series of student projects
• From the beginning, meant to be accessible to clinical users
• Continued development funded by NLM in 2004, NIBIB in 2007-9.
Tuesday, May 18, 2010
![Page 5: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/5.jpg)
Course Modules
• Module 1: Introduction
• Module 2: Image Viewing and Navigation
• Module 3: Manual Segmentation
• Module 4: Automatic Segmentation
• Module 5: Advanced Topics
Tuesday, May 18, 2010
![Page 6: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/6.jpg)
Module 1. Introduction
• Review of basic imaging concepts
• Where to get help?
Tuesday, May 18, 2010
![Page 7: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/7.jpg)
What is a 3D Image?
• A set of physical measurements organized in space and time
• Organization is highly regular:
• A rectangular grid of measurements
• A cone of measurements
Tuesday, May 18, 2010
![Page 8: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/8.jpg)
Images as Arrays of Volume Elements (Voxels)
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
Image IntensityTuesday, May 18, 2010
![Page 9: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/9.jpg)
Properties of a Voxel
• Intensity: value of the voxel
• Dimensions: size of the voxel in (mm3)
• Physical coordinates: position of voxel in a scanner-based coordinate system
• Image coordinates:column, row, slice of the voxel in the image volume
Tuesday, May 18, 2010
![Page 10: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/10.jpg)
3D Image Properties
• Spatial Resolution
• Spectral Resolution
• Signal, Noise, Contrast
• Spatial Orientation
Tuesday, May 18, 2010
![Page 11: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/11.jpg)
Spatial Resolution
• Number of voxels per unit of distance
• Low resolution: can’t resolve nearby objects
High Resolution Image
Low Resolution Image
Tuesday, May 18, 2010
![Page 12: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/12.jpg)
Isotropic vs. Anisotropic
• Resolution may be different in each dimension of the image
• Isotropic image: all three dimensions of the voxel are the same
• e.g., 0.8mm x 0.8mm x 0.8mm
• Anisotropic: dimensions of the voxel are different
• e.g., 1.2mm x 1.2mm x 5mm
Tuesday, May 18, 2010
![Page 13: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/13.jpg)
Spectral Resolution
• Number of different intensity levels
256 levels 8 levels 2 levels
Tuesday, May 18, 2010
![Page 14: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/14.jpg)
Signal, Noise, Contrast• Signal
• intensity due to sample
• Noise
• intensity due to other sources, measurement errors, etc.
• Signal to Noise Ratio
• higher values = better images
• Contrast
• difference between intensity of relevant tissues, relative to noise
Tuesday, May 18, 2010
![Page 15: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/15.jpg)
Low vs. High Contrast
Tuesday, May 18, 2010
![Page 16: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/16.jpg)
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
• Image is encoded in disk/memory as a list of numbers
Images in the Computer
12 31 224 12 32 ...
Tuesday, May 18, 2010
![Page 17: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/17.jpg)
3D Image File Formats• DICOM (.dcm/.0234123534):
• Industry standard
• Each 2D slice stored in a separate file
• SNAP can read (usually)
• if not, try dcm2nii from MRIcron
• NIFTI (.nii):
• Widely used in image analysis field for MRI, CT, PET
• Image stored as 3D (or 4D) volume
• SNAP can read, write - along with most other tools
• Analyze (.hdr/.img)
• Not recommended (superseded by NIFTI)
Tuesday, May 18, 2010
![Page 18: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/18.jpg)
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
• Each voxel has a coordinate in “image space”
• x: column
• y: row
• z: slice
Spatial Orientation
Tuesday, May 18, 2010
![Page 19: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/19.jpg)
• But it also has a location in the physical space
• (x,y,z) of the corresponding location in the scanner
Spatial Orientation
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
Tuesday, May 18, 2010
![Page 20: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/20.jpg)
Spatial Orientation
• Transformation from voxel coordinates to physical coordinates is typically linear, given by the form y = Ax + b
• In SNAP, we assume that coordinate axes in voxel space are parallel to the coordinate axes in physical space
Tuesday, May 18, 2010
![Page 21: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/21.jpg)
Orientation in SNAP
Voxel Axis FROM TO
x posterior anterior
y inferior superior
z left right
Voxel Axis FROM TO
x right left
y anterior posterior
z superior inferior
...
(48 different orientations)
PIL
RAS
Tuesday, May 18, 2010
![Page 22: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/22.jpg)
Visualization of 3D Image Volumes
Image Volume Volume Rendering Orthogonal Slices
Tuesday, May 18, 2010
![Page 23: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/23.jpg)
Visualization in SNAP
Tuesday, May 18, 2010
![Page 24: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/24.jpg)
Review Questions
• How would we go about measuring SNR and contrast in a medical image?
• Can the spatial resolution of the image be changed? How? Is it a good idea?
Tuesday, May 18, 2010
![Page 25: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/25.jpg)
Where to Go for Help?
• http://www.itksnap.org
• Tutorials
• Discussion list
• Bug tracker
• Technical documentation
• Information on how to cite ITK-SNAP
Tuesday, May 18, 2010
![Page 26: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/26.jpg)
Course Modules
• Module 1: Introduction
• Module 2: Image Viewing and Navigation
• Module 3: Manual Segmentation
• Module 4: Automatic Segmentation
• Module 5: Advanced Topics
Tuesday, May 18, 2010
![Page 27: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/27.jpg)
Module 2: Image Viewing and Navigation
• Load images into SNAP
• Navigation
• Image Contrast Adjustment
• Image Information Console
Tuesday, May 18, 2010
![Page 28: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/28.jpg)
GUI Demo
Tuesday, May 18, 2010
![Page 29: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/29.jpg)
Image Contrast Dialog
• The screen can show 256 shades of gray
• Human eye has limited spectral resolution
• Often only a range of the image spectrum is interesting
• Image contrast dialog maps input image intensities into 256 shades of gray on the screen
Tuesday, May 18, 2010
![Page 30: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/30.jpg)
Image Contrast Dialog
Tuesday, May 18, 2010
![Page 31: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/31.jpg)
Window and Level
0
255
level window
Tuesday, May 18, 2010
![Page 32: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/32.jpg)
Window and Level• Example: level=500, window=600
• Intensities below 500 map to 0
• Intensities from 500 to 1100 map linearly to range [0 255]
• Intensities above 1100 map to 255
Tuesday, May 18, 2010
![Page 33: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/33.jpg)
Fine-Scale Image Contrast Adjustment
0
255
Tuesday, May 18, 2010
![Page 34: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/34.jpg)
Fine-Scale Image Contrast Adjustment
Tuesday, May 18, 2010
![Page 35: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/35.jpg)
Image Information PageImage dimension in units of voxels
Voxel size in units of mm Physical coordinate of voxel (0,0,0)
Describes how axes in voxel space (column, row, slice)
map to physical x, y, z axes
Voxel coordinates (column, row, slice)of the crosshairs
Physical coordinate of the crosshairs in RAS space
(x=R->L, y=A->P, z=S->I)
Minimum and maximum intensities in the image
Intensity of voxel under the cross-hairs
Tuesday, May 18, 2010
![Page 36: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/36.jpg)
Hands-On Exercise (10 minutes)
1. Load NIFTI image mouse_brain_t1.nii
2. Adjust contrast using level & window controls
3. Guesstimate the intensity range of the cortex, ventricles, background by moving the crosshairs around the image
4. Use curve contrast control to maximize the contrast in the cortex
5. What are the physical coordinates of voxel (40,30,55)?
6. Save image in Analyze format (.hdr extension)
Tuesday, May 18, 2010
![Page 37: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/37.jpg)
Course Modules
• Module 1: Introduction
• Module 2: Image Viewing and Navigation
• Module 3: Manual Segmentation
• Module 4: Automatic Segmentation
• Module 5: Advanced Topics
Tuesday, May 18, 2010
![Page 38: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/38.jpg)
Module 3: Manual Segmentation
• How segmentation is represented in SNAP
• Polygon tool
• Paintbrush tool
• 3D visualization and tools
Tuesday, May 18, 2010
![Page 39: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/39.jpg)
What’s Segmentation?
• Delineation of structures of interest
• In SNAP, each voxel in the input image is assigned a unique label
• Labels are numbers from 0 to 255
• A segmentation, then, is just an image with 256 intensity levels
Tuesday, May 18, 2010
![Page 40: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/40.jpg)
What’s Segmentation?5: liver 2: bone
1: kidney
0: “clear” label
Tuesday, May 18, 2010
![Page 41: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/41.jpg)
What’s Segmentation?
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
12 31 224 ...
234 123 434 ...
234 453 23 ...
... ... ... ...
0 2 2 ...
0 2 5 ...
5 5 5 ...
... ... ... ...
Tuesday, May 18, 2010
![Page 42: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/42.jpg)
Drawing Operations
• Polygon Tool
• Trace outlines of structures
• Paintbrush Tool
• Touch up segmentations
• Other tools (later)
Tuesday, May 18, 2010
![Page 43: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/43.jpg)
Drawing Operations
• Initially all voxels are assigned clear label (0)
• Drawing operation replace the existing label with the active label
• User can protect some existing labels by choosing draw-over labels
Tuesday, May 18, 2010
![Page 44: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/44.jpg)
Draw-Over Label
Draw-Over Protection
“All Labels” No labels are “protected”
“Visible labels” Labels tagged as “hidden” are protected
“Clear label” Labels 1-255 are protected
“Label 2”, e.g. All labels except 2 are protected
Tuesday, May 18, 2010
![Page 45: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/45.jpg)
Properties of Segmentation Labels
• Name (e.g., “Hippocampus”)
• Id (0-255)
• Display color
• Display opacity
• User can define and change these properties
Tuesday, May 18, 2010
![Page 46: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/46.jpg)
GUI Demo:Polygon Tool
Tuesday, May 18, 2010
![Page 47: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/47.jpg)
GUI Demo:Label Management
Tuesday, May 18, 2010
![Page 48: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/48.jpg)
Paintbrush Tool
• Quick touch-up with brushes of different shapes and sizes
• Quickly switch between drawing and erasing with R/L mouse buttons
• Adaptive brush for semi-automatic segmentation
Tuesday, May 18, 2010
![Page 49: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/49.jpg)
Adaptive Paintbrush
• Brush shape sets the boundary of the region where segmentation is performed
• Center of the brush is the reference voxel
• A contiguous set of voxels with intensity similar to the reference voxel is labeled
• Uses watershed algorithm
Tuesday, May 18, 2010
![Page 50: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/50.jpg)
Adaptive Paintbrush
Tuesday, May 18, 2010
![Page 51: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/51.jpg)
GUI Demo:Paintbrush Tool
Tuesday, May 18, 2010
![Page 52: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/52.jpg)
GUI Demo:Segmentation Files and
3D Visualization
Tuesday, May 18, 2010
![Page 53: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/53.jpg)
Volumes and Statistics
Tuesday, May 18, 2010
![Page 54: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/54.jpg)
Volumes and Statistics
Tuesday, May 18, 2010
![Page 55: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/55.jpg)
Hands-on Exercise(20 minutes)
1. Load image in the DICOM directory
2. Correct image orientation
3. Set contrast automatically
4. Create labels for left lung, right lung and tumor
5. Use polygon tool to trace left and right lungs. Use the scaffolding technique
6. Use paintbrush tool to touch up your lung segmentations
7. Use the adaptive paintbrush to segment the tumor
8. Save volumes and statistics
Tuesday, May 18, 2010
![Page 56: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/56.jpg)
Course Modules
• Module 1: Introduction
• Module 2: Image Viewing and Navigation
• Module 3: Manual Segmentation
• Module 4: Automatic Segmentation
• Module 5: Advanced Topics
Tuesday, May 18, 2010
![Page 57: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/57.jpg)
Module 4: Automatic Segmentation
• Theory of active contour segmentation
• Automatic segmentation demos
Tuesday, May 18, 2010
![Page 58: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/58.jpg)
Automatic Segmentation
• Rule #1: Garbage In = Garbage Out
• Automatic segmentation is weaker than manual segmentation, but it saves you time
Tuesday, May 18, 2010
![Page 59: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/59.jpg)
Active Contour Evolution
Tuesday, May 18, 2010
![Page 60: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/60.jpg)
Active Contour is Controlled by Forces
Image-driven force pushes the contour
towards the boundaries of the object of interest
Shape-driven force pushes the contour towards maintaining a simple shape
Tuesday, May 18, 2010
![Page 61: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/61.jpg)
Active Contour is Controlled by Forces
Image-driven force pushes the contour
towards the boundaries of the object of interest
Shape-driven force pushes the contour towards maintaining a simple shape
Tuesday, May 18, 2010
![Page 62: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/62.jpg)
Forces
• Forces act perpendicular to the contour
• Shape force is proportional to the curvature of the contour
Tuesday, May 18, 2010
![Page 63: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/63.jpg)
Forces
• Image force is proportional to the value of the speed image under the contour
• Speed image is derived from the grayscale image in various ways
Tuesday, May 18, 2010
![Page 64: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/64.jpg)
Region-Based vs. Edge-Based Speed Functions• Region-based:
• Objects of interest have roughly uniform intensity values
• Edge-based:
• Objects of interest are separated from other objects in the image by edges, i.e., strong discontinuities in intensity
Tuesday, May 18, 2010
![Page 65: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/65.jpg)
Region-Based Speed Function
-1 10
Tuesday, May 18, 2010
![Page 66: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/66.jpg)
Region-Based Speed Function
Positive: expandNegative: contract
Tuesday, May 18, 2010
![Page 67: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/67.jpg)
Edge-Based Speed Function
0 10.5
Tuesday, May 18, 2010
![Page 68: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/68.jpg)
Edge-Based Speed Function
Tuesday, May 18, 2010
![Page 69: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/69.jpg)
Edge-Based Speed Function
Slower expansion at the edges of the image
Tuesday, May 18, 2010
![Page 70: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/70.jpg)
Edge-Based Speed Function
Slower expansion at the edges of the image
Edge-based contour will “leak” past weak
edges
Tuesday, May 18, 2010
![Page 71: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/71.jpg)
Edge-Based Speed Function
Slower expansion at the edges of the image
Edge-based contour will “leak” past weak
edges
Use additional “advection”
force to push back on the contour at edges
Tuesday, May 18, 2010
![Page 72: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/72.jpg)
Level Set Method• Contour is represented by a 3D image
• |intensity| at a voxel = distance to contour
• positive = outside contour; negative = inside
• This “implicit” representation of the contour improves numerical stability
Tuesday, May 18, 2010
![Page 73: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/73.jpg)
Level Set Method• Contour is represented by a 3D image
• |intensity| at a voxel = distance to contour
• positive = outside contour; negative = inside
• This “implicit” representation of the contour improves numerical stability
Tuesday, May 18, 2010
![Page 74: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/74.jpg)
Level Set Method• Contour is represented by a 3D image
• |intensity| at a voxel = distance to contour
• positive = outside contour; negative = inside
• This “implicit” representation of the contour improves numerical stability
Tuesday, May 18, 2010
![Page 75: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/75.jpg)
Active Contour Segmentation
• Step 1: set up the speed function
• Step 2: place initial contour(s)
• Step 3: watch contour evolve
Tuesday, May 18, 2010
![Page 76: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/76.jpg)
Segmentation Example
Tuesday, May 18, 2010
![Page 77: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/77.jpg)
GUI Demo:Automatic
Segmentation
Tuesday, May 18, 2010
![Page 78: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/78.jpg)
Hands-on Exercise(20 minutes)
1. Load image mouse_brain_t1_region_bc.nii
2. Define bounding box around the ventricles
3. Segment the ventricles using region-based method
4. Use 3D cut plane tool to label left/right ventricles
5. Use manual tools to touch up your segmentation
6. Report the volumes of the ventricles
7. Segment left hippocampus using region-based method
8. Use 3D tools to remove gray matter adjacent to it
Tuesday, May 18, 2010
![Page 79: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/79.jpg)
Course Modules
• Module 1: Introduction
• Module 2: Image Viewing and Navigation
• Module 3: Manual Segmentation
• Module 4: Automatic Segmentation
• Module 5: Advanced Topics
Tuesday, May 18, 2010
![Page 80: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/80.jpg)
Module 5
• Changing appearance preferences
• Generating figures for publication
• Overlays and color maps
• Multiple SNAP sessions
Tuesday, May 18, 2010
![Page 81: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/81.jpg)
GUI Demo:Advanced Features
Tuesday, May 18, 2010
![Page 82: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/82.jpg)
What’s Left?
• Lot more to learn about SNAP
• Check out documentation, mailing lists
• Power users might like
• SNAP command-line options
• Convert3D - SNAP’s versatile companion
Tuesday, May 18, 2010
![Page 83: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/83.jpg)
Bugs, etc.
• SNAP has some bugs. Sorry!
• Often it’s the graphics card. Or too little memory. Try another machine.
• Please report bugs. Give as many details as you can. Otherwise, we can’t fix them.
Tuesday, May 18, 2010
![Page 84: ITK-SNAP Training Course at NCI - National Cancer Institute · PDF file · 2012-10-01ITK-SNAP Training Course at NCI May 25, 2010 ... 0.8mm x 0.8mm x 0.8mm ... window=600 • Intensities](https://reader034.fdocuments.net/reader034/viewer/2022051406/5aafaed67f8b9a22118d83b0/html5/thumbnails/84.jpg)
Thank you and enjoy!
Tuesday, May 18, 2010