NA-MIC National Alliance for Medical Image Computing Registering Image Volumes in Slicer Steve...

21
NA-MIC National Alliance for Medical Image Computing http://na-mic.org Registering Image Volumes in Slicer Steve Pieper

Transcript of NA-MIC National Alliance for Medical Image Computing Registering Image Volumes in Slicer Steve...

Page 1: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

NA-MICNational Alliance for Medical Image Computing http://na-mic.org

Registering Image Volumes in Slicer

Steve Pieper

Page 2: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Requirements

• The tools described here are part of Slicer 2.5

http://www.na-mic.org/Wiki/index.php/Slicer:Slicer2.5_Getting_Started

Page 3: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Data to Use

• Get the two datasets:http://www.na-mic.org/Wiki/images/a/aa/Reg-sample.zip

http://www.na-mic.org/Wiki/images/5/5c/Mrt-images.zip

• These are the same subject, taken on two different scanners– 1.5 Tesla diagnostic MR scanner (low

resolution for better interactivity)– 0.5 Tesla intraoperative MR scanner

Page 4: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Load First Data Volume

1: Click Add Volume

2: Pick Nrrd

3: Browse to reg.nhdr

4: Click Apply

Page 5: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Load the Second Volume

1: Click Add Volume

4: Click Apply

3: Browse to I.001 in mrt images dir

2: Use Basic Reader

Page 6: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

View Initial (Mis)Registration

Put One Volume inBackground with Bg andOne in Foreground with Fg

Use Fade Slider andToggle to Compare

Page 7: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Add a Transformation

1: Select Volume

2: Click Add Transform

Transform and Matrix areCreated Around Selected Volume

3: Double-Click MatrixTo Enter AlignmentsModule

Page 8: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Transformation Notes

• Slicer Transforms are 4x4 matrices– Support Linear Affine Transformations

• Transformations can be Nested in a Hierarchy– But Automated Registration Requires Only One Level

(like current example)

• Transformations are RAS <-> RAS– RAS = Right, Anterior, Superior– Meaning they are in Patient Space (mm)– Scan Order (Axial, Coronal, etc) Already Taken into

Account Before Transformations are Applied

• Transformations are Stored in MRML Scene File

Page 9: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Manual Transform

Local: Moves Relative to VolumeGlobal: Moves Relative to World

Use the Sliders, Buttons andMouse Actions and WatchHow the Volume Moves

Use Left Mouse Button in SliceViews to Edit Transform

Reset to Identity

Page 10: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

See/Edit the Actual Matrix

Matrix is Shown in theProps Tab

You Can Edit the Elements(If you know what you are doing!)

The Last Column is the Translation

Page 11: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

ITK-Based Automated Registration

Go to the Auto Tab

Volume to Move is the One Inside the Transformation

Reference is the One Outside the Transformation

Use Intensity Registration, withMutual Information Method,Normal Interface. Optimized forMR-MR, but Works Well forOther Tasks Too.

Page 12: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Registration Modes

Scroll to See the Start Button if needed

Pre-Programmed Modes:-Coarse: large steps, animated-Fine: small steps, animated-Good and Slow: run tocompletion, usually gets goodresult-Very Good and Very Slow:run to completion; if this doesn’twork, use manual to get closer

Runs the Registration

Page 13: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Registration Result

• After Running Very Good and Very Slow (actually takes less than a minute on a laptop for this data)

Page 14: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Resampling Volumes

• Use the TransformVolume Module– New in Slicer 2.5

• Makes a New Slicer Volume with Dimensions, Spacing, and Orientation to Match Registration Target

Page 15: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

TransformVolume

Select Transform Node from Data Tree (NB: May Contain MultipleVolumes to Transform)

Deformation Not Yet Supported

Select ReferenceVolumeResample Mode and the Volumethe Result Should be Like (In Termsof Orientation, Dimensions, Spacing)

Generally Cubic for Image Volumes,Nearest Neighbor for Labels

Creates New Volumes with Given Prefix

Page 16: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Nonrigid Registration• Uses the AG Module

– Developed by Alexandre Guimond, PhD while working at the BWH Center for Neurological Imaging (Charles Guttmann, M.D., Director); Slicer Integration by Lifeng Liu, PhD.

– Based on Original Work Done at Inria, France– A. Guimond, A. Roche, N. Ayache, and J. Meunier.

Multimodal brain warping using the demons algorithm and adaptative intensity corrections. Technical Report 3796, Institut National de Recherche en Informatique et en Automatique, Sophia Antipolis, France, November 1999.

– ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RR/RR-3796.pdf

• Implemented Using Custom VTK Classes (not ITK)

• Nonlinear Registration Not Supported in MRML Tree, so Resampled Volumes are Created

Page 17: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

AG Basics

Select Reference Volume and Volume to Move

Create New Resampled Output

Optional Label Map (e.g. ICC)

Optional Second Channel

Run Registration

Page 18: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

AG Methods

Methods:-Initial (Optional) Uses SlicerMatrix as Starting Point; Select Matrixin Transform Tab-Linear Run Linear Alignment as Selected in Expert Tab-Non-linear Run Warp TransformRegistration as Selected in Expert Tab

NB: Registration is Multi-Step: First Linear (Translation, Rigid, Affine) Then Non-Linear Warp

Page 19: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

AG to Transform Volumes

Co-Registration:-Resamples Volumesusing Currently CalculatedTransformation (Linear andNon-linear-Run Volumes One-at-a-Time-Useful for Atlas Registration

Scroll Down

Page 20: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

AG Transform Tab

Select Matrix and Toggle On/OffButton to Use Initial Transform

Load and Use Existing Non-LinearWarp File (One Displacement Vectorper Voxel)

Export Current Linear Transformto Slicer Matrix

Save Non-Linear Warp to a File (.vtk format)

Page 21: NA-MIC National Alliance for Medical Image Computing  Registering Image Volumes in Slicer Steve Pieper.

National Alliance for Medical Image Computing http://na-mic.org

Some AG Expert Settings

Where to Stop the Linear Step

Type of Non-Linear

Intensity Compensation Function

Registration Metric (GCR is GeneralizedCorrelation Ratio;Robust for Multi-Modality)