Title: ITK Deformable Registration
1ITK Deformable Registration
Demons Methods
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 itkImage
ImageType ImageTypeConstPointer fixedImage
GetFixedImage() ImageTypeConstPointer
movingImage GetMovingImage() typedef
itkLinearInterpolateImageFunction ImageType,
double
InterpolatorType InterpolatorTy
pePointer interpolator InterpolatorTypeNew()
typedef itkResampleImageFilter ImageType FilterType FilterTypeP
ointer resampler FilterTypeNew()
13Resampling Kernel Spline Transform
- typedef itkElasticBodySplineKernelTransform double, 2
TransformType - TransformTypePointer transform
TransformTypeNew() - resampler-SetInterpolator( interpolator )
- resampler-SetInput( movingImage )
- ImageTypeRegionType region fixedImage-GetBuff
eredRegion() - resampler-SetSize( region-GetSize() )
- resampler-SetOutputStartIndex(
region-GetIndex() ) - resampler-SetOutputSpacing( fixedImage-GetSpacin
g() ) - resampler-SetOutputOrigin( fixedImage-GetOrigin(
) )
14Resampling Kernel Spline Transform
resampler-SetTransform( transform ) typedef
TransformTypePointSetType
PointSetType PointSetTypePointer
sourceLandmarks PointSetTypeNew() PointSetTyp
ePointer targetLandmarks PointSetTypeNew()
transform-SetSourceLandmarks( sourceLandmarks
) transform-SetTargetLandmarks( targetLandmarks
) typedef PointSetTypePointsContainer
PointsContainer PointsContainerPointer
sources sourceLandmarks-GetPoints() PointsCont
ainerPointer targets targetLandmarks-GetPoint
s()
15Resampling Kernel Spline Transform
- sources-Reserve( numberOfLandmarks )
- targets-Reserve( numberOfLandmarks )
- typedef PointSetTypePointType PointType
- PointType source
- PointType target
- for( int i 0 i
-
- inputFile source
- inputFile target
- sources-InsertElement( i, source )
- targets-InsertElement( i, target )
-
- transform-ComputeWMatrix()
- resampler-Update() // Finally !!
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 itkImage
ImageType ImageTypeConstPointer fixedImage
GetFixedImage() ImageTypeConstPointer
movingImage GetMovingImage() typedef
itkLinearInterpolateImageFunction ImageType,
double
InterpolatorType InterpolatorTy
pePointer interpolator InterpolatorTypeNew()
typedef itkVector
VectorType typedef itkImage
VectorFieldType VectorFieldTypePointer
vectorField GetVectorField()
21Warp Image Filter
- typedef itkWarpImageFilter
- ImageType,
- VectorFieldType WarpFilterType
- WarpFilterTypePointer warpFilter
WarpFilterTypeNew() - warpFilter-SetInterpolator( interpolator )
- warpFilter-SetInput( movingImage )
- warpFilter-SetOutputSpacing( fixedImage-GetSpaci
ng() ) - warpFilter-SetOutputOrigin( fixedImage-GetOrigin
() ) - warpFilter-SetDeformationField( vectorField )
- warpFilter-Update()
- ImageTypeConstPointer deformedImage
warpFilter-GetOutput()
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 itkImage
ImageType ImageTypeConstPointer fixedImage
GetFixedImage() ImageTypeConstPointer
movingImage GetMovingImage() typedef
itkVector VectorType typedef
itkImage VectorFieldType t
ypedef itkDemonsRegistrationFilter ImageType, ImageType,
VectorFieldType DemonsType DemonsType
Pointer demons DemonsTypeNew()
41Demons Registration Type 1
- demons-SetFixedImage( fixedImage )
- demons-SetMovingImage( movingImage )
- demons-SetNumberOfIterations( 200 )
- demons-SetStandardDeviations( 1.0 )
- demons-Update()
- ImageTypeConstPointer vectorField
demons-GetOutput()
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
50Enjoy ITK !