1 / 57

Advanced Iso-Surfacing Algorithms

Advanced Iso-Surfacing Algorithms. Jian Huang, CS594, Spring 2002 This set of slides are developed and used by Prof. Han-Wei Shen at Ohio State University. Iso-contour/surface Extractions. 3D Iso-surface. 2D Iso-contour. p5. p4. Iso-contour (0). Remember bi-linear interpolation. p2. p3.

mikkel
Download Presentation

Advanced Iso-Surfacing Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advanced Iso-Surfacing Algorithms Jian Huang, CS594, Spring 2002 This set of slides are developed and used by Prof. Han-Wei Shen at Ohio State University.

  2. Iso-contour/surface Extractions 3D Iso-surface 2D Iso-contour

  3. p5 p4 Iso-contour (0) Remember bi-linear interpolation p2 p3 To know the value of P, we can first compute p4 and P5 and then linearly interpolate P P =? p1 p0

  4. p2 p3 p1 p0 Iso-contour (1) Consider a simple case: one cell data set The problem of extracting an iso-contour is an inverse of value interpolation. That is: Given f(p0)=v0, f(p1)=v1, f(p2)=v2, f(p3)=v3 Find the point(s) P within the cell that have values F(p) = C

  5. p2 p3 p1 p0 Iso-contour (2) We can solve the problem based on linear interpolation (1) Identify edges that contain points P that have value f(P) = C (2) Calculate the positions of P (3) Connect the points with lines

  6. If v1 < C < v2 then the edge contains such a point v1 v2 Iso-contouring – Step 1 (1) Identify edges that contain points P that have value f(P) = C

  7. Use linear interpolation: P = P1 + (C-v1)/(v2-v1) * (P2 – P1) p1 P p2 v1 v2 C Iso-contouring – Step 2 (2) Calculate the position of P

  8. Connect the points with line(s) p2 p3 p1 p0 Iso-contouring – Step 3 Based on the principle of linear variation, all the points on the line have values equal C

  9. p2 p2 p3 p3 p1 p1 p0 p0 - - + outside cell inside cell Inside or Outside? • Just a naming convention • If a value is smaller than the iso-value, we call it “Inside” • If a value is greater than the iso-value, we call it “Outside”

  10. Iso-surface Extraction • Extend the same divide-and-conquer algorithm to three dimension • 3D cells • Look at one cell at a time • Let’s only focus on voxel

  11. _ + + _ _ + + _ _ + + _ _ + + _ Divide and Conquer (2 triangles)

  12. Now we have 8 vertices So it is: 2 = 256 8 How many unique topological cases? How many cases?

  13. _ _ + + _ + + _ _ _ + + _ + _ + Case Reduction (1) Value Symmetry

  14. _ _ _ _ _ + _ + _ _ _ _ _ _ + + Case Reduction (2) Rotation Symmetry By inspection, we can reduce 256 14

  15. Iso-surface Cases Total number of cases: 14 + 3

  16. Marching Cubes Algorithm A Divide-and-Conquer Algorithm Vi is ‘1’ or ‘0’ (one bit) 1: > C; 0: <C (C= iso-value) Each cell has an index mapped to a value ranged [0,255] Index = v8 v7 v6 v5 v4 v3 v2 v1 v8 v7 v4 v3 v6 v5 v2 v1

  17. Marching Cubes (2) Given the index for each cell, a table lookup is performed to identify the edges that has intersections with the iso-surface Index intersection edges 0 e1, e3, e5 e7 … 1 e11 e8 e12 e6 2 e3 e5 3 e2 e4 e9 e10 e1 14

  18. + _ + _ + _ + _ Marching Cubes (3) • Perform linear interpolations • at the edges to calculate the • intersection points • Connect the points

  19. Why is it called marching cubes? • Linear search through cells • Row by row, layer by layer • Reuse the interpolated points • for adjacent cells

  20. Iso-surface cell search • Iso-surface cells: cells that contain iso-surface. min < iso-value < max • Marching cubes algorithm performs a linear search to locate the iso-surface cells – not very efficient for large-scale data sets.

  21. Iso-surface Cells • For a given iso-value, only a smaller portion of cells are iso-surface cell. • For a volume with n x n x n cells, the average number of the iso-surface cells is O(n x n) (ratio of surface v.s. volume) n n n

  22. Efficient iso-surface cell search • Problem statement: Given a scalar field with N cells, c1, c2, …, cn, with min-max ranges (a1,b1), (a2,b2), …, (an, bn) Find {Ck | ak < C < bk; C=iso-value}

  23. Efficient search methods • Spatial subdivision (domain search) • Value subdivision (range search) • Contour propagation

  24. Domain search • Subdivide the space into several sub-domains, check the min/max values for each sub-domain • If the min/max values (extreme values) do not contain the iso-value, we skip the entire region Min/max Complexity = O(Klog(n/k))

  25. Range Search (1) Subdivide the cells based on their min/max ranges Global minimum Global maximum Hierarchically subdivide the cells based on their min/max ranges Isovalue

  26. Min and Max values Max M5 M2 M6 M4 M1 M3 M7 M8 M11 M10 M9 Min m5 m1 m6 m3 m8 m7 m2 m9 m11 m4 m10 Range Search (2) Within each subinterval, there are more than one cells To further improve the search speed, we sort them. Sort by what ? G1 G2 Isosurface cells = G1 G2

  27. Range Search (3) A clean range subdivision is difficult … Difficult to get an optimal speed ?

  28. Range Search: Span Space Span Space: Instead of treating each cell as a range, we can treat it as a 2D point at (min, max) This space consists of min and max axes is called span space Any problem here?

  29. Span Space What are the iso-surface cells? max How to search them? min C

  30. Span Space Search (1) With the point representation, subdividing the space is much easier now. Search method 1: K-D tree subdivision (NOISE algorithm) • K-d tree: • A multi-dimensional version of binary tree • Partition the data by alternating between each • each of the dimensions at each level of the tree

  31. NOISE Algorithm (K-d tree) Median point Min Construction Max left right ? max up down … … … * One node per cell min

  32. Complexity = O( N + k) NOISE Algorithm (Query) Median point Min • If ( iso-value < root.min ) • check the ?? Sub-tree • If (iso-value > root.min) • Check the ?? Sub-tree • Don’t forget to check the • root‘s interval as well. Max left right ? up down … … …

  33. O(log(N/L)) O(1) ? O(log(N/L)) Span Space Search (2) Search Method (2): ISSUE, discretized span space Complexity = ?

  34. Id I right I left Range Search: Interval Tree Sort all the data points (x1,x2,x3,x4,…. , xn) Let d = x (mid point) Interval Tree: n/2 We used to divide the cells into three sets Id, I left, and I right Id : cells that have min < d < max I left: cells that have max < d I right: cells that have min >d … …

  35. Id I right I left Interval Tree • Now, given an isovalue C • If C < d • If C > d • 3) If C = d … … Complexity = O(log(n)+k) Optimal!! Id : cells that have min < d < max I left: cells that have max < d I right: cells that have min >d

  36. Range Search Methods In general, range search methods all are super fast – two orders of magnitude faster than the marching cubes algorithm in terms of cell search But they all suffer a common problem … Excessive extra memory requirement!!!

  37. FIFO Queue A B C C C D …. C A E B D Contour Propagation Basic Idea: Given an initial cell that contains iso-surface, the remainder of the iso-surface can be found by propagation Initial cell: A Enqueue: B, C Dequeue: B Enqueue: D … Breadth-First Search

  38. Challenges Need to know the initial cells! For any given iso-value C, finding the initial cells to start the propagation is almost as hard as finding the iso-surface cells. You could do a global search, but …

  39. Solutions • Extrema Graph (Itoh vis’95) • Seed Sets (Bajaj volvis’96) Problem Statement: Given a scalar field with a cell set G, find a subset SG, such that for any given iso-value C, the set S contains initial cells to start the propagation. We need search through S, but S is usually (hopefully) much smaller than G. We will only talk about extrema graph due to time constraint

  40. Extrema Graph (1) Basic Idea: If we find all the local minimum and maximum points (Extrema), and connect them together by straight lines (Arcs), then any closed Iso-contour is intersect by at least one of the arcs.

  41. Extrema Graph (2)

  42. Extrema Graph (3) Extreme Graph: { E, A: E: extrema points A: Arcs conneccts E } E2 E1 a1 a2 a3 E3 E4 a5 An ‘arc’ consists of cells that connect extrema points (we only store min/max of the arc though) a4 E7 a7 E5 a6 E6 E8

  43. Extrema Graph (4) • Algorithm: • Given an iso-value • Search the arcs of the extrema graph (to find the arcs that have min/max contains the iso-value • Walk through the cells along each of the arcs to find the seed cells • Start to propagate from the seed cells • …. There is something more needs to be done…

  44. We are not done yet … What ?! We just mentioned that all the closed iso-contours will intersect with the arcs connecting the extrema points How about non-closed iso-contours? (or called open iso-contours)

  45. Boundary Cells!! Extrema Graph (5) Contours missed These open iso-contours will intersect with ?? cells

  46. Extrema Graph (6) • Algorithm (continued) • Given an iso-value • Search the arcs of the extrema graph (to find the arcs that have min/max contains the iso-value • Walk through the cells along each of the arcs to find the seed cells • Start to propagate from the seed cells • Search the cells along the boundary and find seed cells from there • Propagate open iso-contours

  47. Extrema Graph • Efficiency - Number of cells visisted: • extrema graph - N0.33 • boundary - N 0.66 • Iso-surface - N 0.66 • based on tetrahedra - will create more surface triangles ... • should extract the same number of cells/ triangulation as Marching Cubes

  48. Ambiguity Problem Certain Marching Cube cases have more than one possible triangulation Mismatch!!! Hole! + + Case 6 Case 3 + +

  49. The Problem Ambiguous Face: a face that has two diagonally opposing points with the same sign + + Connecting either way is possible

  50. To fix it … Match!!! + + Case 6 Case 3 B + + The goal is to come up with a consistent triangulation

More Related