34
An Architecture for Real-Time Vertebrae An Architecture for Real-Time Vertebrae Drilling Simulation Drilling Simulation

An Architecture for Real-Time Vertebrae Drilling Simulation

Embed Size (px)

Citation preview

Page 1: An Architecture for Real-Time Vertebrae Drilling Simulation

An Architecture for Real-Time Vertebrae Drilling SimulationAn Architecture for Real-Time Vertebrae Drilling Simulation

Page 2: An Architecture for Real-Time Vertebrae Drilling Simulation

Virtual WHAT?

• When a patient ruptures a disc, it has to be removed and the surrounding vertebrae are fused together using a piece of bone

• Pedicle screws are inserted into the vertebrae to stabilize it during fusion

Pictures from www.spine-health.com

Page 3: An Architecture for Real-Time Vertebrae Drilling Simulation

Why simulate this?

• Pedicle screw insertion is inherently dangerous, so it’s difficult to get experience

• Training options are poor

• Simulation is cheap*!

* Haptic drill may in fact not be cheap…

Page 4: An Architecture for Real-Time Vertebrae Drilling Simulation

How to simulate Spinal Drilling:

1) Make a Virtual Vertebrae

2) Make a Virtual Drill

3) Virtually Drill the Virtual Drill into the Virtual Vertebrae

– (It’s virtually that simple)

Page 5: An Architecture for Real-Time Vertebrae Drilling Simulation

Step 2: A Virtual Drill

• Only the drill bit actually ‘drills’

• The drill bit is a cylinder with a conical end cap– we ignore the threads on the drill bit

Page 6: An Architecture for Real-Time Vertebrae Drilling Simulation

Step 3: Virtual Drilling

• General problem: We have a volume we want to decimate with our Virtual Drill Bit

• General Solution: Fill the volume with volume elements and throw them away when they intersect with the Virtual Drill Bit

Page 7: An Architecture for Real-Time Vertebrae Drilling Simulation

A note about speed

• We are using haptic feedback devices– Need high feedback rates (300Hz-10000Hz)

• This implies the intersection test has to be very fast

• Volume element with the fastest intersection test: Points!– Fast geometric test w/cylinder and cone– Small memory footprint

Page 8: An Architecture for Real-Time Vertebrae Drilling Simulation

Just how many points?

• That depends on the haptic drill– Our guess (so far): 0.1mm between points

• Vertebrae volume is ~100,000mm3

– we can’t fill the whole thing

• We can cheat because surgeons are meticulous– They plan surgeries before-hand– We know where the drill is going!

Page 9: An Architecture for Real-Time Vertebrae Drilling Simulation

Where do we put the points?

• Bad Idea: voxels

• Good Idea: cylindrical point volume– Drill bit is a cylinder, so fill a bigger cylinder

with points, and align it with the planned path

• Where in the cylinder?– Structure can speed up collision algorithm

Page 10: An Architecture for Real-Time Vertebrae Drilling Simulation

The Cylinder/Disc/Ring Paradigm

Page 11: An Architecture for Real-Time Vertebrae Drilling Simulation

Off-Path Drilling

• Simple algorithm rewards on-path drilling

• Can avoid this by traversing ring in both directions

Page 12: An Architecture for Real-Time Vertebrae Drilling Simulation

Testing the System

• No haptic drill!

• Try to simulate haptic drill input– Drill input should be asynchronous– Very difficult, Linux is not an RTOS

• Fallback method:– Move drill, test for collisions, move drill, test

for collisions, etc …

Page 13: An Architecture for Real-Time Vertebrae Drilling Simulation

Simulation Results

Page 14: An Architecture for Real-Time Vertebrae Drilling Simulation

Step 1: A Virtual Vertebrae

• Point inside/outside test– Implicit surfaces are good for this

• Smooth, accurate polygonized surface– Implicits work well here, too

• Reconstruction from CT slices– People have been using Radial Basis Functions

with good results

Page 15: An Architecture for Real-Time Vertebrae Drilling Simulation

Computed Tomography

• AKA CT or CAT Scanning

• Greyscale slices of biological volume

• Isolating surface contours

• Segmenting is done by hand

Page 16: An Architecture for Real-Time Vertebrae Drilling Simulation

Ugly Contours

Page 17: An Architecture for Real-Time Vertebrae Drilling Simulation

Radial Basis Functions

• Radial Basis Function a continuous function that interpolates through an (almost) arbitrary set of data points

• The RBFs we are interested in are classified as the ‘smoothest interpolants’ – they minimize surface curvature:

• In pictures….

222222 2223

yzxzxyzzyyxx ssssss

Page 18: An Architecture for Real-Time Vertebrae Drilling Simulation

An RBF takes these points:

Page 19: An Architecture for Real-Time Vertebrae Drilling Simulation

And gives you this surface:

Page 20: An Architecture for Real-Time Vertebrae Drilling Simulation

Definition of an RBF

)( :Biharmonic

on depends and polynomial degree low a is

)( :3D

)ln()( :2D

:Biharmonic theuse we,function' basic' theis

)()()( :Form General

2

1

dzcybxaxP

P

dd

ddd

xxcxPxsn

iii

Page 21: An Architecture for Real-Time Vertebrae Drilling Simulation

Finding the coefficients

• We specify a set of N point/value pairs (xi,fi)– s(xi) = fi (these are called ‘centers of the RBF’)

• By plugging the xi’s back into the general form, we get a linear system of equations in N variables– The coefficients of P go in there too, so actually N+4

• Solving this system is O(N3) w/ O(N2) memory, and evaluation is O(N)– That’s too slow to be practical, but Fast Multipole

Methods reduce evaluation to O(1), with an O(NlogN) setup time, so iterative solving is O(NlogN)

Page 22: An Architecture for Real-Time Vertebrae Drilling Simulation

Hole Filling Property

• The biharmonic has non-compact support, it can be used for mesh repair or to fill holes

• Vertebrae point set has two large holes:

Page 23: An Architecture for Real-Time Vertebrae Drilling Simulation

Off Surface Points

• For 3D biharmonic RBFs, specify a set of surface points with value f = 0

• Also need inside and outside points with positive and negative values– Trivial solution s = 0 if we only specify surface points

• The distance between surface and off-surface points has a large effect on smoothness of the final surface

Page 24: An Architecture for Real-Time Vertebrae Drilling Simulation

Why does OSP distance matter?

• When the distance is small, thesurface is restricted:

• As the distance increases, there is more freedom:

• This is why the pixel-basedfitting method failed

Page 25: An Architecture for Real-Time Vertebrae Drilling Simulation

Center Reduction

• RBF center reduction throws away redundant centers that the RBF willinterpolate anyway:

• Reduces N, which makesevaluation faster

Page 26: An Architecture for Real-Time Vertebrae Drilling Simulation

RBF Smoothing

• Introduce smoothing factor into RBF

• Reduces solution accuracy at the expense of increased smoothness

• Can set smoothness foreach center individually

Page 27: An Architecture for Real-Time Vertebrae Drilling Simulation

Dangers of RBF Smoothing

• A High smoothing factor can cause serious volume change:

Page 28: An Architecture for Real-Time Vertebrae Drilling Simulation

FastRBF

• FastRBF from FarFieldTechnology– FMM, reduction, smoothing, automatic normal

generation, optimized triangle polygonizer

• www.fastrbf.com

Page 29: An Architecture for Real-Time Vertebrae Drilling Simulation

Vertebrae Model Results

Page 30: An Architecture for Real-Time Vertebrae Drilling Simulation

Rendering the Point Volume

Page 31: An Architecture for Real-Time Vertebrae Drilling Simulation
Page 32: An Architecture for Real-Time Vertebrae Drilling Simulation
Page 33: An Architecture for Real-Time Vertebrae Drilling Simulation
Page 34: An Architecture for Real-Time Vertebrae Drilling Simulation

Questions?