lecture 4 : Isosurface Extraction

49
lecture 4 : Isosurface Extraction

description

lecture 4 : Isosurface Extraction. Isosurface Definition. Isosurface (i.e. Level Set ) : Constant density surface from a 3D array of data C(w) = { x | F(x) - w = 0 } ( w : isovalue , F(x) : real-valued function , usually 3D volume data ). isosurfacing. < ocean temperature function >. - PowerPoint PPT Presentation

Transcript of lecture 4 : Isosurface Extraction

Page 1: lecture 4 : Isosurface Extraction

lecture 4 : Isosurface Extraction

Page 2: lecture 4 : Isosurface Extraction

Isosurface Definition

Isosurface (i.e. Level Set ) :

Constant density surface from a 3D array of data C(w) = { x | F(x) - w = 0 }( w : isovalue , F(x) : real-valued function , usually 3D volume data )

< ocean temperature function > < two isosurfaces (blue,yellow) >

isosurfacing

Page 3: lecture 4 : Isosurface Extraction

Isosurface Triangulation

• Idea:– create a triangular mesh that will approximate the iso-surface– calculate the normals to the surface at each vertex of the triangle

• Algorithm:– locate the surface in a cube of eight pixels – calculate vertices/normals and connectivity– march to the next cube

Page 4: lecture 4 : Isosurface Extraction

Marching Cubes

• [Lorensen and Cline, ACM SIGGRAPH ’87]• Goal

– Input : 2D/3D/4D imaging data (scalar)– Interactive parameter : isovalue selection– Output : Isosurface triangulation

isosurfacing

Page 5: lecture 4 : Isosurface Extraction

Isosurface Extraction

2. Isocontouring [Lorensen and Cline87,…]

• Definition of isosurface C(w) of a scalar field F(x)

C(w)={x|F(x)-w=0} , ( w is isovalue and x is domain R3 )

( Isocontour in 2D function: isovalue=0.5 )

• Marching Cubes for Isosurface Extraction

1. Dividing the volume into a set of cubes

2. For each cubes, triangulate it based on the 2^8(reduced to 15) cases

0.7 0.6 0.75 0.4

0.40.80.40.6

0.4 0.3 0.35 0.25

1.0 0.8 0.4 0.3

0.7 0.6 0.75 0.4

0.40.80.40.6

0.4 0.3 0.35 0.25

1.0 0.8 0.4 0.3

0.7 0.6 0.75 0.4

0.40.80.40.6

0.4 0.3 0.35 0.25

1.0 0.8 0.4 0.3

Page 6: lecture 4 : Isosurface Extraction

Surface Intersection in a Cube

• assign ZERO to vertex outside the surface• assign ONE to vertex inside the surface• Note:

– Surface intersects those cube edges where one vertex is outside and the other inside the surface

Page 7: lecture 4 : Isosurface Extraction

Surface Intersection in a Cube

• There are 2^2=256 ways the surface may intersect the cube• Triangulate each case

Page 8: lecture 4 : Isosurface Extraction

Patterns

• Note:– using the symmetries reduces those 256 cases to 15 patterns

Page 9: lecture 4 : Isosurface Extraction

Marching Cubes table : 15 Cases

• Using symmetries reduces 256 cases into 15 cases

Page 10: lecture 4 : Isosurface Extraction

Surface intersection in a cube

• Create an index for each case:

• Interpolate surface intersection along each edge

Page 11: lecture 4 : Isosurface Extraction

Calculating normals

• Calculate normal for each cube vertex:

• Interpolate the normals at

the vertices of the triangles:

Page 12: lecture 4 : Isosurface Extraction

Summary

• Read four slices into memory• Create a cube from four neighbors on one slice and four

neighbors on the next slice• Calculate an index for the cube• Look up the list of edges from a pre-created table• Find the surface intersection via linear interpolation• Calculate a unit normal at each cube vertex and

interpolate a normal to each triangle vertex• Output the triangle vertices and vertex normals

Page 13: lecture 4 : Isosurface Extraction

Ambiguity Problem

Page 14: lecture 4 : Isosurface Extraction

Trilinear Function

• Trilinear Function

• Saddle point– Face saddle– Body saddle

Page 15: lecture 4 : Isosurface Extraction

Trilinear Isosurface Topology

Page 16: lecture 4 : Isosurface Extraction

Triangulation

Page 17: lecture 4 : Isosurface Extraction

Acceleration Techniques

• Octree• Interval Tree• Seed Set and Contour Propagation

• How to handle large isosurfaces?– Simplification– Compression– Parallel Extraction & Rendering

• How to choose isovalue?– Contour Spectrum

Page 18: lecture 4 : Isosurface Extraction

Interval Tree for Isocontouring

• Interval Tree– An ordered data structure that holds intervals– Allows us to efficiently find all intervals that overlap with any

given point (value) or interval

– Time Complexity of query processing : O (m + log n) • Output-sensitive• n : total # of intervals• m : # of intervals that overlap (output)

– Time Complexity of tree construction : O (nlog n)

• How can we apply interval tree to efficient isocontouring?

Page 19: lecture 4 : Isosurface Extraction

Seed Set for Isocontouring

• Main Idea– Visit the only cells that intersect with isocontour– Interval tree for entire data can be too large– Use the idea of contour propagation

• Seed Set– A set of cells intersecting every connected component of every

isocontour

• Seed Set Generation : refer to Bajaj96 paper

Page 20: lecture 4 : Isosurface Extraction

Seed Set Isocontouring Algorithm

• Algorithm– Preprocessing

• Generate a seed set S from volume data• Construct interval tree of seed set S

– Online processing• Given a query isovalue w,• Search for all seed cells that intersect with isocontour with

isovalue w by traversing interval tree• Perform contour propagation from the seed cells that were

found from interval tree.

Page 21: lecture 4 : Isosurface Extraction

Contour Propagation

• Given an initial cell which contains the surface of interest• The remainder of the surface can be efficiently traced

performing a breadth-first search in the graph of cell adjacencies

< Contour Propagation >

Page 22: lecture 4 : Isosurface Extraction

Seed Set Generation (k seeds from n cells)

• 238 seed cells

• 0.01 seconds

Domain Sweep

177 seed cells0.05 seconds

Responsibility Propagation

59 seed cells1.02 seconds

O(n) O(n) O(n log n)O(k) O(k) O(n)

Time

Space

? ? 2 kmink =

Test

Range Sweep

Seed Set Generation

Page 23: lecture 4 : Isosurface Extraction

Seed Set Computation using Contour Tree

Contour Tree generates minimal seed set generation

Page 24: lecture 4 : Isosurface Extraction

Contour Tree

h(x,y)

x

y

• Definition : a tree with (V,E)– Vertex ‘V’

• Critical Points(CP) (points where contour topology changes , gradient vanishes)

– Edge ‘E’: • connecting CP where an infinite contour class is created and CP where the

infinite contour class is destroyed.• contour class : maximal set of continuous contours which don’t contain

critical points

Page 25: lecture 4 : Isosurface Extraction

Contour Tree

Page 26: lecture 4 : Isosurface Extraction

2D Example

• Height map of Vancouver

Page 27: lecture 4 : Isosurface Extraction

Contour Tree

Page 28: lecture 4 : Isosurface Extraction

Join Tree

Page 29: lecture 4 : Isosurface Extraction

Split Tree

Page 30: lecture 4 : Isosurface Extraction

Merge to Contour Tree

• Merge Join Tree and Split Tree to construct Contour Tree [Carr et al. 2010]

+ =

Page 31: lecture 4 : Isosurface Extraction

Properties• Display of Level Sets Topology (Structural Information)

– Merge , Split , Create , Disappear , Genus Change (Betti number change)

• Minimal Seed Set Generation

• Contour Segmentation– A point on any edge of CT corresponds to one contour component

Page 32: lecture 4 : Isosurface Extraction

Contour Tree Drawing and UI

Page 33: lecture 4 : Isosurface Extraction

Hybrid Parallel Contour Extraction

• Different from isocontour extraction• Divide contour extraction process into

– Propagation• Iterative algorithm -> hard to optimize using GPU• multi-threaded algorithm executed in multi-core CPU

– Triangulation• CUDA implementation executed in many-core GPU

33< propagation > < performance of our hybrid parallel algorithm >

Page 34: lecture 4 : Isosurface Extraction

Hybrid Parallel Contour Extraction

Page 35: lecture 4 : Isosurface Extraction

Results

Page 36: lecture 4 : Isosurface Extraction

Interactive Interface with Quantitative Information

• Geometric Property as saliency level– Gradient(color) + Area (thickness)

36

Page 37: lecture 4 : Isosurface Extraction

Segmentation of Regions of Interest

• Mass Segmentation from Mammograms• Minimum Nesting Depth (MND)

– Measured for each node of contour tree– MND = min (depth from current node to terminal node of every

subtree)– High MND contour represents the boundaries of distinctive

regions with abrupt intensity changes retaining the same topology

– Successfully applied to mass detection from 400 mammograms in USF database.

37

Page 38: lecture 4 : Isosurface Extraction

Salient Isosurface Extraction

• How to select isovalue?

• Contour Spectrum– [ Bajaj et al. VIS97 ]– shows quantitative properties (area, volume, gradient) for all

isovalues– allows semi-automatic isovalue selection

Page 39: lecture 4 : Isosurface Extraction

Isovalue Selection

• The contour spectrum allows the development of an adaptive ability to separate interesting isovalues from the others.

Page 40: lecture 4 : Isosurface Extraction

Contour Spectrum (CT scan of an engine)

• The contour spectrum allows the development of an adaptive ability to separate interesting isovalues from the others.

Page 41: lecture 4 : Isosurface Extraction

Salient Contour Extraction Using Contour Tee

41

Page 42: lecture 4 : Isosurface Extraction

Motivation

• Infinitely many isocontours defined in an image• An isocontour may have many contours• Contour– Connected component of an isocontour– Often represents an independent structure

42

Ex) mammogram (X-ray exam of female breast)

Page 43: lecture 4 : Isosurface Extraction

Motivation

• Salient Contour Extraction – Useful for segmentation, analysis and visualization of

regions of interest– Can be applied to CAD(Computer Aided Diagnosis) for

detecting suspicious regions

43mass (tumor) dense tissue dense tissuebreast boundary pectoral muscle

Page 44: lecture 4 : Isosurface Extraction

3D Examples

44

<Head MRI> <isocontour> <ventricle contour>

<mass segmentation from breast MRI>

Page 45: lecture 4 : Isosurface Extraction

Past Contour Tree Approach

• Contour Tree– Represents topological changes of contours

according to isovalue change.– Property

• structure (topology) of level sets• contour extraction• seed set generation for fast extraction

45

Page 46: lecture 4 : Isosurface Extraction

Our Approach

• Interactive Contour Tree Interface– Performance Improvement of Extraction Process– Utilizing Quantitative Information

• Development of Saliency Metric– MND(Minimum Nesting Depth)– Apply to medical images

46

Page 47: lecture 4 : Isosurface Extraction

Hybrid Parallel Contour Extraction

• Different from isocontour extraction• Divide contour extraction process into

– Propagation• Iterative algorithm -> hard to optimize using GPU• multi-threaded algorithm executed in multi-core CPU

– Triangulation• CUDA implementation executed in many-core GPU

47< propagation > < performance of our hybrid parallel algorithm >

Page 48: lecture 4 : Isosurface Extraction

Interactive Interface with Quantitative Information

• Geometric Property as saliency level– Gradient(color) + Area (thickness)

48

Page 49: lecture 4 : Isosurface Extraction

Saliency Metric

• Minimum Nesting Depth (MND)– Measured for each node of contour tree– MND = min (depth from current node to terminal node of every

subtree)– High MND contour represents the boundaries of distinctive

regions with abrupt intensity changes retaining the same topology

– Successfully applied to mass detection from 400 mammograms in USF database.

49