Title: CSci 6971: Image Registration Lecture 20: Demons Registration April 16, 2004
1CSci 6971 Image Registration Lecture 20
Demons RegistrationApril 16, 2004
Prof. Chuck Stewart, RPI Dr. Luis Ibanez, Kitware
2Deformable Registration
Deformable Registration
3Deformable Transforms
Deformable Transforms
4Deformable Transformation
y
y
Transform
x
x
Fixed Image
Moving Image
5Deformable Transformation
y
y
Transform
x
x
Fixed Image
Moving Image
6Deformable Transformation
y
y
Transform
x
x
Fixed Image
Moving Image
7Image Resampling
Interpolator
FixedImage
Resample Image Filter
MovingImage
DeformedImage
Transform
8Image Resampling
Interpolator
FixedImage
Resample Image Filter
MovingImage
High Order Polynomials
Orthogonal Basis
Splines
Explicit Vector Field
DeformedImage
Transform
9Kernel Splines Transforms
Target Landmarks
Source Landmarks
Displacement Vectors
Interpolated Values
10Kernel Spline Transforms
- Thin Plates
- Thin Plates R2 log R
- Elastic Body
- Elastic Body Reciprocal
- Volume
11Kernel Spline Transforms
InsightApplications / ThinPlateSplines
12Resampling Kernel Spline Transform
include "itkImage.h" include "itkResampleImageFi
lter.h" include "itkLinearInterpolateImageFunctio
n.h" include "itkElasticBodySplineKernelTransform
.h" typedef itkImagelt char, 2 gt
ImageType ImageTypeConstPointer fixedImage
GetFixedImage() ImageTypeConstPointer
movingImage GetMovingImage() typedef
itkLinearInterpolateImageFunctionlt
ImageType,
double gt
InterpolatorType InterpolatorTy
pePointer interpolator InterpolatorTypeNew()
typedef itkResampleImageFilterlt ImageType,
ImageType gt FilterType FilterTypeP
ointer resampler FilterTypeNew()
13Resampling Kernel Spline Transform
typedef itkElasticBodySplineKernelTransformlt
double, 2 gt
TransformType TransformTypePointer transform
TransformTypeNew() resampler-gtSetInterpolato
r( interpolator ) resampler-gtSetInput(
movingImage ) ImageTypeRegionType region
fixedImage-gtGetBufferedRegion() resampler-gtSetS
ize( region-gtGetSize() ) resampler-gtSetOutputStar
tIndex( region-gtGetIndex() ) resampler-gtSetOutpu
tSpacing( fixedImage-gtGetSpacing()
) resampler-gtSetOutputOrigin( fixedImage-gtGetOrig
in() )
14Resampling Kernel Spline Transform
resampler-gtSetTransform( transform ) typedef
TransformTypePointSetType
PointSetType PointSetTypePointer
sourceLandmarks PointSetTypeNew() PointSetTyp
ePointer targetLandmarks PointSetTypeNew()
transform-gtSetSourceLandmarks( sourceLandmarks
) transform-gtSetTargetLandmarks( targetLandmarks
) typedef PointSetTypePointsContainer
PointsContainer PointsContainerPointer
sources sourceLandmarks-gtGetPoints() PointsCont
ainerPointer targets targetLandmarks-gtGetPoint
s()
15Resampling Kernel Spline Transform
sources-gtReserve( numberOfLandmarks
) targets-gtReserve( numberOfLandmarks
) typedef PointSetTypePointType
PointType PointType source PointType
target for( int i 0 i lt numberOfLandmarks
i ) inputFile gtgt source inputFile gtgt
target sources-gtInsertElement( i, source
) targets-gtInsertElement( i, target
) transform-gtComputeWMatrix() resampler-gtUp
date() // Finally !! ImageTypeConstPointer
deformedImage resampler-gtGetOutput()
16Kernel Spline Transforms
VolView ITK Plugin
17Kernel Spline Transforms
VolView ITK Plugin
18Deformable Transforms
Deformation Fields
19Deformation Vector Field
ParaView http//www.paraview.org
20Warp Image Filter
include "itkImage.h" include "itkWarpImageFilter
.h" include "itkLinearInterpolateImageFunction.h"
typedef itkImagelt char, 2 gt
ImageType ImageTypeConstPointer fixedImage
GetFixedImage() ImageTypeConstPointer
movingImage GetMovingImage() typedef
itkLinearInterpolateImageFunctionlt
ImageType,
double gt
InterpolatorType InterpolatorTy
pePointer interpolator InterpolatorTypeNew()
typedef itkVectorlt float, 2 gt
VectorType typedef itkImagelt VectorType , 2 gt
VectorFieldType VectorFieldTypePointer
vectorField GetVectorField()
21Warp Image Filter
typedef itkWarpImageFilterlt ImageType,
ImageType, VectorFieldType gt
WarpFilterType WarpFilterTypePointer
warpFilter WarpFilterTypeNew() warpFilter-gtS
etInterpolator( interpolator ) warpFilter-gtSetInp
ut( movingImage ) warpFilter-gtSetOutputSpacing(
fixedImage-gtGetSpacing() ) warpFilter-gtSetOutputO
rigin( fixedImage-gtGetOrigin() ) warpFilter-gtSet
DeformationField( vectorField ) warpFilter-gtUpda
te() ImageTypeConstPointer deformedImage
warpFilter-gtGetOutput()
22Demons Registration
Demons Registration
23Demons Registration
Demons is a Family of Algorithms
24Demons Registration
Demons Type 0
25Demons Registration Type 0
Transform
Scene
Model
26Demons Registration Type 0
Transform
Scene
Gradients
Model
27Demons Registration Type 0
Transform
Scene
Forces
Model
28Demons Registration
Demons Type 1
29Demons Registration Type 1
Transform
Scene
Model
Vector Field
30Demons Registration Type 1
Transform
Scene
Model
Vector Field
31Demons Registration Type 1
Transform
Scene
Model
Vector Field
32Demons Registration Type 1
Transform
Scene
Model
Vector Field
33Demons Registration Type 1
Gradient
Scene
34Demons Registration Type 1
Current Estimation
Intensity
Space
Gradient
Desired Displacement
Scene
35Demons Registration Type 1
Transform
Scene
Model
Vector Field
36Demons Registration Type 1
Scene
37Demons Registration Type 1
Iterations
Previous Field
Gaussian Smoothing
38Demons Registration Type 1
( s m ) . Grad(s)
V
Grad(s)2
( s m ) . Grad(s)
V
Grad(s)2 (s-m)2
K
39Image Registration Framework
FixedImage
Increment Computation
PDE Solver
MovingImage
Interpolator
DeformationField
Transform
40Demons Registration Type 1
include "itkImage.h" include "itkDemonsRegistrat
ionFilter.h" typedef itkImagelt char, 2 gt
ImageType ImageTypeConstPointer fixedImage
GetFixedImage() ImageTypeConstPointer
movingImage GetMovingImage() typedef
itkVectorlt float, 2 gt VectorType typedef
itkImagelt VectorType , 2 gt VectorFieldType t
ypedef itkDemonsRegistrationFilterlt
ImageType, ImageType,
VectorFieldType gt DemonsType DemonsType
Pointer demons DemonsTypeNew()
41Demons Registration Type 1
demons-gtSetFixedImage( fixedImage
) demons-gtSetMovingImage( movingImage
) demons-gtSetNumberOfIterations( 200
) demons-gtSetStandardDeviations( 1.0
) demons-gtUpdate() ImageTypeConstPointer
vectorField demons-gtGetOutput()
42Demons Registration Type 1
Scene
43Demons Registration Type 1
Model
44Demons Registration Type 1
After Registration
45Demons Registration Type 1
Scene
46Demons Registration Type 1
Scene
47Requirements
Fixed and Moving images should have the same
intensity distribution !
48Eventual Preprocessing
- Histogram Matching Filter- Anisotropic
Diffusion Filtering
49Image Registration Framework
FixedImage
Increment Computation
PDE Solver
MovingImage
Interpolator
DeformationField
Transform
Resampler
MovingRegistered
50End
Enjoy ITK !