pozitron-emission tomography reconstruction ( a computer graphics view )

56
Pozitron-Emission Tomography Reconstruction (A computer graphics view) Szirmay-Kalos László

Upload: ebony

Post on 12-Jan-2016

23 views

Category:

Documents


0 download

DESCRIPTION

Pozitron-Emission Tomography Reconstruction ( A computer graphics view ). Szirmay-Kalos László. Scalar fields. 3D tér pontjaiban egy skalár érték. v ( x,y,z ). v ( x,y,z ). z. y. x. Skalár: hőmérséklet, sűrűség nyomás, potenciál, … Származás: Euler-i szimuláció, - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Pozitron-Emission TomographyReconstruction

(A computer graphics view)

Szirmay-Kalos László

Page 2: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Scalar fields3D tér pontjaiban egy skalár érték

• Skalár: hőmérséklet, sűrűség nyomás, potenciál, …• Származás: Euler-i szimuláció, Rekonstrukció (tomográfia)

tárolás: 3D textúravagy „voxel tömb”

x

y

z

v(x,y,z)

v(x,y,z)

Page 3: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Visualization of scalar fields• Megjelenítés fényszóró anyag (participating

media) analógiáját felhasználva (belsejébe belelátunk)

• Adott szintfelület kiemelése (külsőt lehámozzuk)

Transzferfüggvény

Sűrűség + deriváltak

v

grad v

Optikai paraméterek

Képszintézis

Kép

Page 4: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Fényszóró közeg

• Albedo a: az elnyelődés valószínűsége feltéve, hogy az ütközés bekövetkezett

• Fekete test: albedo = 0

ds A=

1

Hatáskeresztmetszet,alias kioltási tényező

·ds = P(ütközés)

Page 5: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Sugársűrűség változása

ds

L(s)

s

L(s+ds)

L(s+ds)= L(s) – L(s)·(s)·ds + Le(s)·ds + (s)·a(s)·ds·f(‘,)Li(‘)d‘

// Kiszóródás+abszorbció// Emisszió // Beszóródás

dL(s)/ds = –L(s)·(s) +Le(s)+Linscatter(s)

Megoldás fényelnyelő közegre (emisszió és beszóródás nincs):L(s)= L(0)·exp(–

s (s)ds)

Page 6: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Tomography

L(s)= L(0)·exp(–(s)ds)(s)ds = – log L(s)/L(0)

L(s)= Le(s)ds

Absorption Emission

PNP

NPN

Ne- e+

Mediso NanoPETTM/CT

Page 7: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Reconstruction

Page 8: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

FBP = Filtered backprojection

Measurement + back projection

w(x,y)=w(r) 1/ri(x,y)=(x,y)

w(x,y) dxdy=2Rw(r) rdrd=

=2 Rw(r)r dr R

Circle of radius R:

Impulse response:

Correction in frequency domain

o(x,y)=i(x,y) w(x,y) FxFy o[x,y] = FxFy i[x,y]FxFyw[x,y]

1/| |FxFy i[x,y] = FxFy o[x,y] | |

dr

rd

r

Ramp filtering

Page 9: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Algebric back projection

v1 v1

v3 v4

d1 = A11v1 +A13v3

d2

d3

d4

Lin egyenlet (V<D): d = A v, d = [d1,..., dD]

v = [v1,..., vV]

Moore féle pseudo-inverz:

AT d = ATA v

v = (ATA)-1AT d = A+ d

(D) (D×V) (V)

(V×D) (D)(V×V)

Page 10: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Iteratív séma

Skalármező

Skalármező korrekciója

Projekció: vonalintegrálok

Összevetés a mért értékekkel

Page 11: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Light photons

• Relativistic mass is small: E = mc2 = hf• Photon’s energy (wavelength) does not

change upon elastic collision• Absorption probability is energy dependent• Wavelengts can be handled

independently

e- e-

Page 12: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Gamma photons

• Relativistic mass is significant• Photon’s energy (wavelength) changes

upon collision• Absorption probability is energy dependent• Wavelengts cannot be handled

independently

e- e-

Page 13: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Compton scattering and the Klein-Nishina phase function

cos11

1'

2

cmEE

E

e

incident photon

scatteredphoton

z

x

y

φ

collisionE

E’

2

23

sin'''

)(E

E

E

E

E

ECP

Klein-Nishina differential cross section(extinction coefficient):

Compton formula:

P(E, ) = … Rejection sampling

cos

u

Table driven sampling

Electron density

E/mec2

Cross section

E/mec2

1

C(1+cos2)

Page 14: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Gamma photon transport

Compton scattering +Klein-Nishina formula = New

– Direction– Energy (freq)

Detectorgrid

Page 15: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Why is it important?

Measureddetectorresponse

Source distribution

???

Density distribution from CT

Page 16: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Iterative reconstruction

Source estimation

Measureddetectorresponse

Source correctionSource

distribution???

Compute detector response

Estimateddetector response

Density distribution from CT

Page 17: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

PET

e-

e+

LOR: y

Intensity: x

Page 18: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Finite-element approximation

x (v) NxV bV (v)

1b1

b2

b3

constant

1 b1

b2

b3

Tri-linear

box tent

Higher order filter• more accurate• more sensitive to noise

Non-CC grid?

Page 19: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

BCC and FCC grids

CC

BCC FCC

Page 20: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

System matrix

108 LOR responses: 107 voxel intensities:

Probabilities that a photon pairemitted in voxel V is detected by LOR L

• Problems:– Huge matrix: 108×107

– A matrix element is an infinite-dimensional integral– Matrix element depends on the measured object (CT)

• Compute matrix elements on-the-fly (like in radiosity)

voxel

Page 21: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Iterative solver

CorrectionBack-projection

Measures LORs

Computed LORs~ ~ ~ ~

Forward-projection

Current voxelintensities

Page 22: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Back-projectionMaximum likelihood estimation

What is x based on y?

Find x that maximizes P(y|x)

State: x Measurement result: y

Bayes estimation:P(x|y)=P(y|x)P(x)/P(y)

Page 23: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Back-projection• Measured LOR hits have

Poisson-distribution with means of the current estimate:

• Joint probability:

• Likelihood: logarithm of the joint probability:

• Estimate x maximizes the likelihood:

L

Ly

L

yL

L ey

yyP

~

!

~}hits {

~~

L

Ly

L

yL ey

y ~

!

~log

ek

kPk

!}{

+const

Page 24: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

• Gathering not shooting! – Forward: voxels to LORs– Backward: LORs to voxels

Parallel implementation issues

~~

Ratios:Same relative error in all

detector pairsFor each LOR L:

For each voxel V:

Page 25: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Solution alternatives for gamma photon transport

• Physicists’ approach:1. Direct mathematical model of a phenomenon

2. Solution algorithm is the simulation of the nature

3. Porting to the computer

4. Performance tuning

• Computer graphics approach:1. Computer architecture

2. Algorithm that is efficient on this architecture

3. Tuning to the problem

Page 26: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Physicists’ approachDetector grid

Page 27: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Physicists’ approachDetector grid

Page 28: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Physicists’ approachDetector grid

Page 29: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Physicists’ approachDetector grid

Page 30: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Woodcock tracking: Free path length sampling in heterogeneous medium

e-maxx

max

s

max

s

CG approach:x

S

Page 31: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Physicists’ approach• Pros

– Direct simulation of nature– Rejection sampling can mimic the Klein-Nishina phase

function and free path length.– Paths are computed independently, so it scales well

on MIMD (multi-CPU = slow and expensive)

• Cons– Bad on SIMD (rejection sampling is a loop)– Similar absolute error in detectors, the relative error is

1/n where n is the number of hits.– Paths are computed independently, so it cannot

exploit coherence (cannot reuse information)– Random writes

Page 32: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Computer graphics approach

• SIMD-like algorithm (GPU)– Independent threads (gathering)– “No” conditional statements or variable length loops

• Reuses paths– Detector view (gathering)

• Same relative error in all detector pairs– Same number of samples in all detector pairs– Detector view (gathering)

• Solve the adjoint problem – Like path tracing instead of photon tracing– Integral transformation (Jacobi determinant)

Page 33: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

CUDA: implementation platform

GPUCPU +Host

program

Kernel programs:

Threads

Thread blocks

Warps, …

Thread block

Fast sharedmemory

SIMD

Quasi-SIMD

Page 34: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Adding two N-element vectors

__global__ void AddVectorGPU( float *C, float *A, float *B, int N ) { int i = blockIdx.x * blockDim.x + threadIdx.x; // thread id if (i < N) C[i] = A[i] + B[i]; }

float C[100000], A[100000], B[100000];

int main ( ) { … int N = 100000; … int blockDim = 256; // number of threads per block int gridDim = (N + blockDim – 1) / blockDim; // number of thread blocks AddVectorGPU<<<gridDim, blockDim>>>(C, A, B, N); …}

Runs on GPU, called from CPU

0 ,…, blockDim.x-10 ,…, gridDim.x-1

Page 35: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Path reuse!

Detector 1 Detector 2

Page 36: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Integral transformation

dz1

dz2

dA: perpendicular area

dv: differentialvolume

dl: chord length

emissionpoint

d2: solid angle in which dz2 is visible from

v

2z

1z

1z

D2

D1 d: solid angle in whichdz1 and dz2 are visible from v

1

θz

2θz

1dz

2dz

21221

21 ddd||

coscosdd zzl

zzv

Page 37: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Forward projection

Detector 1 Detector 2

voxel

Nt

Na

=

=

Page 38: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Back projection

Detector 1 Detector 2

voxel

Nt

Na

~~

It can change in time!• OSEM• sample perturbation

~

Solid angle of the farther detector:

Page 39: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Detector sampling

Page 40: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Rnd Poisson-disk

Page 41: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Detector modeling

Page 42: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Measurements and phantoms

• 18x324 LOR• 1283 … 2563 voxel

Page 43: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Time: NV GeForce GTX 285

GPU utilization: 25%

Page 44: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

GPU optimization

• Registers assigned to a thread (32->64)

• Forward and back-projection re-structuring– Forward:

– Back:

Page 45: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Error: 1283 voxels

Page 46: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Reconstruction quality

N_detline=1N_detline=16, Poisson diszk

ref

Page 47: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Single scatter compensation

Sample the location ofthe scattering point

Reusing rays:Evaluate many

integrals in parallel

What to sample?What mimics all

integrands?

Scattering point =+ 3 dimensions

Page 48: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Single scatter compensation

1z

2z

s

accumulatedemission

accumulatedattenuation

accumulatedattenuation

Importance sampling:

Page 49: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

General scatter compensation

1s

2s

1. Scattering points

1z

2. Ray marching from detector to scattering points

1s

2s

1z

2z

3. Combination of paths

1s

2s

Page 50: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Scatter compensation

Page 51: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Stochastic iteration

• EM objective function (likelihood):

Expected value has some error!• Deterministic error

• Convergent but to a bad value • Random error

• Not convergent

Page 52: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Stochastic iteration

• New likelihood

• Only in forward projection

Page 53: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Likelihood

Page 54: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Reconstruction error

Page 55: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

100 iterations, 1 sample/LOR2 billion photons pair/iteration

FP=4 sec, BP=5 sec

ref n=2/n

n=3/n

n=1/n

Without stochastic iteration

Det

Rand

Page 56: Pozitron-Emission Tomography Reconstruction ( A computer graphics view )

Scatter compensation

Geometria Single scattering Double scattering