1 of 30

Registration: Spatial Image Definitions

2 of 30

Outline

  • Image Resampling
  • Registration Overview
  • Registration Framework

3 of 30

Image Resampling

4 of 30

Image Origin and Spacing

Origin (Ox,Oy)

Spacing (Sy)

Spacing (Sx)

x

y

5 of 30

Image Sampling Grid

Origin (Ox,Oy)

Spacing (Sy)

Spacing (Sx)

6 of 30

Image Pixel

Spacing (Sy)

Pixel Value

Pixel Region

Origin (Ox,Oy)

Spacing (Sx)

7 of 30

Image Indices

Spacing (Sy)

Spacing (Sx)

Origin (Ox,Oy)

[0,0]

[1,0]

[2,0]

[3,0]

[4,0]

[5,0]

[0,1]

[0,2]

[0,3]

[0,4]

[0,5]

[4,7]

[0,6]

[0,7]

Pixel Index

8 of 30

Index to Physical Coordinates

Spacing (Sy)

Spacing (Sx)

Origin (Ox,Oy)

[0,0]

[1,0]

[2,0]

[3,0]

[4,0]

[5,0]

[0,1]

[0,2]

[0,3]

[0,4]

[0,5]

[4,7]

[0,6]

[0,7]

Pixel Index

P[0] = Index[0] x Spacing[0] + Origin[0]

P[1] = Index[1] x Spacing[1] + Origin[1]

Index[0] = floor( ( P[0] - Origin[0] ) / Spacing[0] + 0.5 )

Index[1] = floor( ( P[1] - Origin[1] ) / Spacing[1] + 0.5 )

9 of 30

Image Region

Spacing (Sy)

Pixel Value

Pixel Region

Origin (Ox,Oy)

Spacing (Sx)

Image Region

10 of 30

Image Region

Spacing (Sy)

Pixel Value

Pixel Region

Origin (Ox,Oy)

Spacing (Sx)

Image Region

Starting Index

Region Size

[2,3]

[3,5]

11 of 30

Axes directions

Origin (Ox,Oy)

[0,0]

[1,0]

[2,0]

[3,0]

[4,0]

[5,0]

[0,1]

[0,2]

[0,3]

[0,4]

[0,5]

[4,7]

[0,6]

[0,7]

Pixel Index

x (1,0,0)

y (0,1,0)

12 of 30

Axes directions

Origin (Ox,Oy)

[0,0]

[1,0]

[2,0]

[3,0]

[4,0]

[5,0]

[0,1]

[0,2]

[0,3]

[0,4]

[0,5]

[4,7]

[0,6]

[0,7]

Pixel Index

x (0.866,0.5,0)

y (-0.5, 0.866,0)

30° rotation

13 of 30

Axes directions

Origin (Ox,Oy)

[0,0]

[1,0]

[2,0]

[3,0]

[4,0]

[5,0]

[0,1]

[0,2]

[0,3]

[0,4]

[0,5]

[4,7]

[0,6]

[0,7]

Pixel Index

x (-1,0,0)

y (0,1,0)

x axis flip

14 of 30

Basic Resampling

  • Resampling Trivial Cases

15 of 30

Image Pixel

Spacing (Sy)

Origin (Ox,Oy)

Spacing (Sx)

16 of 30

Sub-Sampling by Half

Spacing (Sy)

Origin (Ox,Oy)

Spacing (Sx)

Image Region

Spacing

( 2 x Sy )

Spacing ( 2 x Sx )

17 of 30

Sub-Sampling by Half

New Origin

(O’x,O’y)

New Spacing

S’y

New Spacing

S’x

Origin (Ox,Oy)

18 of 30

Image Pixel

Spacing (Sy)

Origin (Ox,Oy)

Spacing (Sx)

19 of 30

Super-Sampling by Double

Spacing (Sy)

Origin (Ox,Oy)

Spacing (Sx)

Image Region

Spacing ( Sy/2 )

Spacing ( Sx/2 )

20 of 30

Super-Sampling by Double

Origin (Ox,Oy)

New Spacing

S’x

New Spacing

S’y

New Origin

(O’x,O’y)

21 of 30

Resampling in ITK

  • itk.ResampleImageFilter
    • Object oriented interface
  • itk.resample_image_filter
    • Functional-style interface

22 of 30

Resampling in ITK

Transform

Interpolator

Origin

Spacing

Region Start

Region Size

Resample Filter

Input Image

Output Image

23 of 30

Coordinate System Conversions

Image Grid

j

i

y

x

Physical Coordinates

Image Grid

j

i

Space Transform

y’

x’

Physical Coordinates

x

y

24 of 30

Things I will not do…

I will not register images in pixel space

I will not register images in pixel space

I will not register images in pixel space

I will not register images in pixel space

I will not register images in pixel space

I will not register images in pix

25 of 30

Fixed Image & Moving Image

y

x

Physical Coordinates

Space Transform

y’

x’

Physical Coordinates

x

y

y

x

Physical Coordinates

Image Grid

j

i

Image Grid

j

i

26 of 30

Selecting Moving & Fixed Images

  • In principle, the denomination of Fixed Image & �Moving Image is arbitrary

  • In practice, the moving image is the one that will be resampled �into the fixed image coordinate system
  • Yet, the spatial transform maps from the fixed image to the moving image. This avoid "holes" in the image when resampling.

27 of 30

Registration Frameworks in ITK

Registration Optimization Framework

PDE Deformable Registration (Demons)

FEM Registration

28 of 30

Registration Optimization Framework

29 of 30

Parameteric Spatial Transforms

  • Translation
  • Scaling
  • Rotation
  • Rigid3D
  • Rigid2D
  • Affine
  • BSplines
  • Splines:
    • Thin plate spline
    • Elastic body spline
  • Dense displacement vector field
  • Time-varying velocity field

30 of 30

Enjoy ITK !