ITUppsala universitet Data representation and fundamental algorithms Filip Malmberg

Slides:



Advertisements
Similar presentations
Reconstruction from Voxels (GATE-540)
Advertisements

Yingcai Xiao Chapter 6 Fundamental Algorithms. Types of Visualization Transformation Types 1.Data (Attribute Transformation) 2.Topology (Topological Transformation)
Graphics Pipeline.
Direct Volume Rendering. What is volume rendering? Accumulate information along 1 dimension line through volume.
Visualization Data Representation Ray Gasser SCV Visualization Workshop – Fall 2008.
CLASS 9 ADVANCE RENDERING RAY TRACING RADIOSITY LIGHT FIELD CS770/870.
Isocontour/surface Extractions 2D Isocontour 3D Isosurface.
3DSkeleton-based Human Modeling with Metaballs 18 April 2008 Donghun Kim Robot Vision Lab.
Volume Rendering Volume Modeling Volume Rendering Volume Modeling Volume Rendering 20 Apr
Dual Marching Cubes: An Overview
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2013.
CDS 301 Fall, 2009 Scalar Visualization Chap. 5 September 24, 2009 Jie Zhang Copyright ©
University of British Columbia CPSC 314 Computer Graphics Jan-Apr 2005 Tamara Munzner Information Visualization.
HCI 530 : Seminar (HCI) Damian Schofield.
lecture 4 : Isosurface Extraction
Surface Reconstruction from 3D Volume Data. Problem Definition Construct polyhedral surfaces from regularly-sampled 3D digital volumes.
Advanced Iso- Surfacing Algorithms Mengxia Zhu, Fall 2007.
Introduction to Volume Visualization Mengxia Zhu Fall 2007.
Tetra-Cubes: An algorithm to generate 3D isosurfaces based upon tetrahedra BERNARDO PIQUET CARNEIRO CLAUDIO T. SILVA ARIE E. KAUFMAN Department of Computer.
Feature Sensitive Surface Extraction from Volume Data Leif P. Kobbelt Mario Botsch Ulrich Schwanecke Hans-Peter Seidel Computer Graphics Group, RWTH-Aachen.
Seminar 1 Surface Rendering, Decimation Presented By Sonali Barua Date:10/31/2005.
Fluid Surface Rendering in CUDA Andrei Monteiro Marcelo Gattass Assignment 4 June 2010.
Part I: Basics of Computer Graphics Rendering Polygonal Objects (Read Chapter 1 of Advanced Animation and Rendering Techniques) Chapter
Marching Cubes A High Resolution 3D Surface Construction Algorithm.
Scientific Data Representation and Mapping
Continuous Scatter Plot Paper by: Sven Bachthaler and Daniel Weiskopf Presented by: Ayan Biswas.
Modeling and representation 1 – comparative review and polygon mesh models 2.1 Introduction 2.2 Polygonal representation of three-dimensional objects 2.3.
Marching Cubes: A High Resolution 3D Surface Construction Algorithm
Volumetric and Blobby Objects Lecture 8 (Modelling)
Lecture 2 : Visualization Basics Bong-Soo Sohn School of Computer Science and Engineering Chung-Ang University.
lecture 2 : Visualization Basics
COMP 175: Computer Graphics March 24, 2015
Scalar Visualization Chap. 5 September 23, 2008 Jie Zhang Copyright ©
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
Computer Graphics Computer Graphics is everywhere: Visual system is most important sense: High bandwidth Natural communication Fast developments in Hardware.
VTK: Data Shroeder et al. Chapter 5 University of Texas – Pan American CSCI 6361, Spring 2014 After Taku Komura and other lecture sets
Scientific Visualization An Introduction Michel O. R. Eboueya Computer Sciences Department Pôle Sciences et Technologies Université de La Rochelle.
Graphics Graphics Korea University cgvr.korea.ac.kr Creating Virtual World I 김 창 헌 Department of Computer Science Korea University
19/18/ :34 Graphics II Volume Rendering Session 10.
Lecture 3 : Direct Volume Rendering Bong-Soo Sohn School of Computer Science and Engineering Chung-Ang University Acknowledgement : Han-Wei Shen Lecture.
COLLEGE OF ENGINEERING UNIVERSITY OF PORTO COMPUTER GRAPHICS AND INTERFACES / GRAPHICS SYSTEMS JGB / AAS 1 Shading (Shading) & Smooth Shading Graphics.
Scientific Visualization Module 6 Volumetric Algorithms (adapted by S.V. Moore – slides deleted, modified, and added) prof. dr. Alexandru (Alex) Telea.
University of Coimbra Reconstruction of Voxels from Sensor Data Ricardo Martins Coimbra, 19 th January 2010 Doctoral Programme in Electrical Engineering.
C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 C O M P U T E R G R A P H I C S Guoying Zhao 1 / 14 Going-through.
ITUppsala universitet Advanced Computer Graphics Filip Malmberg
2D/3D Shape Manipulation, 3D Printing Shape Representations Slides from Olga Sorkine February 20, 2013 CS 6501.
Marching Cubes: A High Resolution 3D Surface Construction Algorithm William E. Lorenson Harvey E. Cline General Electric Company Corporate Research and.
CMSC 635 Volume Rendering. Volume data  3D Scalar Field: F(x,y,z) = ?  Implicit functions  Voxel grid  Scalar data  Density  Temperature  Wind.
Volume Rendering CMSC 491/635. Volume data  3D Scalar Field: F(x,y,z) = ?  Implicit functions  Voxel grid  Scalar data  Density  Temperature  Wind.
CS559: Computer Graphics Lecture 24: Shape Modeling Li Zhang Spring 2010.
3D Object Representations
3D Volume Visualization. Volume Graphics  Maintains a 3D image representation that is close to the underlying fully-3D object (but discrete)  경계표면 (Boundary.
Volume Visualization Presented by Zhao, hai. What’ volume visualization Volume visualization is the creation of graphical representations of data sets.
CSE554ContouringSlide 1 CSE 554 Lecture 4: Contouring Fall 2015.
CHAPTER 5 CONTOURING. 5.3 CONTOURING Fig 5.7. Relationship between color banding and contouring Contour line (isoline): the same scalar value, or isovalue.
CS559: Computer Graphics Final Review Li Zhang Spring 2010.
Data Visualization Fall The Data as a Quantity Quantities can be classified in two categories: Intrinsically continuous (scientific visualization,
CDS 301 Fall, 2008 Domain-Modeling Techniques Chap. 8 November 04, 2008 Jie Zhang Copyright ©
Solid Modeling Dr. Scott Schaefer.
3D Object Representations 2009, Fall. Introduction What is CG?  Imaging : Representing 2D images  Modeling : Representing 3D objects  Rendering : Constructing.
Visualization Fundamentals
VTK: The Visualization Toolkit
POLYGON MESH Advance Computer Graphics
CSc4730/6730 Scientific Visualization
Domain-Modeling Techniques
Volume Rendering.
Lecture 3 : Isosurface Extraction
Volume Graphics (lecture 4 : Isosurface Extraction)
Visualization CSE 694L Roger Crawfis The Ohio State University.
Chapter 14 Shading Models.
Presentation transcript:

ITUppsala universitet Data representation and fundamental algorithms Filip Malmberg

UU/IT | UU/IT Data representation  Data is discrete, i.e., we only know the data at a finite set of locations.  Interpolation is used to find data values between sampled points.

UU/IT | UU/IT Data representation Data consists of  structure (regular or irregular)  geometry (Sample locations)‏  attributes (Data at sample locations)‏

UU/IT | UU/IT Uniform grid Regular structure Regular geometry

UU/IT | UU/IT Image data

UU/IT | UU/IT Multi-dimensional images  A multi-dimensional image can be considered as a function f(x,y,z,t,b), where z: third spatial direction t: time sequence b: spectral bands  Different combinations, for example f(x,y,z,t) is a 4D image representing a time sequence of volume images

UU/IT | UU/IT Volume images  There are several different tomographic devices: Computed Tomography (CT)‏ Magnetic Resonance Imaging (MRI)‏ Positron Emission Tomography (PET)‏ and others

UU/IT | UU/IT Computed tomography  CT produces anatomical images (attenuation maps)‏  Low contrast in soft tissue  Bone is visible  High resolution

UU/IT | UU/IT Magnetic Resonance Imaging  MRI produces anatomical images  Very good contrast in soft tissue

UU/IT | UU/IT Positron Emission Tomography  PET shows the concentration of a positron emitting tracer given to patient  Functional images (show physiological parameters)  Low resolution

UU/IT | UU/IT Rectilinear grid Regular structure “Partially” regular geometry

UU/IT | UU/IT Structured grid Regular structure Irregular geometry

UU/IT | UU/IT Unstructured points Irregular geometry No structure

UU/IT | UU/IT Unstructured grid The most general form of a dataset A collection of vertices, edges, faces, any cell type Connectivity information must be explicitly stored

UU/IT | UU/IT Example: Polygon mesh

UU/IT | UU/IT How are unstructured meshes different than regular grids? Regular Grids  mesh info accessed implicitly using grid point indices  efficient in both computation and storage  typically use finite difference (FD) discretization  Cartesian grids or logically rectangular grids

UU/IT | UU/IT How are unstructured meshes different than regular grids? Unstructured Meshes mesh connectivity information must be stored handles complex geometries and grid adaptivity typically use finite volume or finite element (FE) discretization mesh quality becomes a concern

UU/IT | UU/IT Data attributes  Scalar  Vector magnitude and direction  Normal a vector of magnitude 1 used for lighting  Texture coordinate mapping data points into a texture space  Tensor

UU/IT | UU/IT Operations on datasets Geometric transformations Topological transformations Attribute transformations Combined transformations

UU/IT | UU/IT Scalar algorithms: Color mapping  Colour mapping is a common scalar visualization technique that maps scalar data to colours  The scalar values serve as indices into a colour lookup table  Or mapping through a transfer function

UU/IT | UU/IT Colour mapping

UU/IT | UU/IT Scalar algorithms: Isocontour/Isosurface Extractions 2D isocontours 3D isosurface

UU/IT | UU/IT Surface rendering of volume data  The data must be converted to an intermediate surface description using geometric primitives

UU/IT | UU/IT Surface versus Volume rendering  Surface Rendering We assume that data to be visualized can be modelled by surfaces. Normally, we model the object with geometric primitives such as points, lines, triangles or polygons and use standard Computer Graphics techniques to render the data  Volume Rendering operates on the data itself and takes into account the changing properties inside the object

UU/IT | UU/IT Surface reconstruction from volumes  The by far most popular method is the Marching Cubes algorithm (MC) (Lorensen et al., SIGGRAPH 1987)‏  MC uses the grey-scale information in the data to build triangulated surfaces  MC works by looking at each element of the volume dataset one at a time to decide whether its vertices are inside or outside the isosurface  This decision is made by comparing the values at the vertices of the volume elements with the value which has been defined as the surface value  If the surface passes through the volume element, the approximate position of the isosurface intersection is calculated, normally using trilinear interpolation

UU/IT | UU/IT Isocontour vs interpolation Remember bi-linear interpolation? p2 p3 p0 p1 P = ? p4 p5 To know the value of P, we can first compute p4 and p5 and then linearly interpolate P The problem of extracting an isocontour is the inverse of value interpolation

UU/IT | UU/IT Isocontour, cont’d p2 p3 p0 p1 (2) Calculate the positions of P (3) Connect the points with lines We can solve the problem based on linear interpolation (1) Identify edges that contain points P with value C, i.e., if pi < C < pj

UU/IT | UU/IT In how many ways can a contour intersect a 2D cell? Two contours pass through the cell In fact, there are only 4 unique topological cases Contour completely outside cell One vertex inside, three vertices outside (or vice versa)‏ Two vertices inside, two vertices outside

UU/IT | UU/IT Marching Squares 4 pixels in a 2 x 2 neighbourhood 8 of 16 possible configurations

UU/IT | UU/IT Divide-and-conquer Algorithm Look at one cell at a time Compare the values at 4 vertices with the isovalue C Linearly interpolate along the edges Connect the interpolated points together

UU/IT | UU/IT Boundary representations Pixel edges Marching squares

UU/IT | UU/IT Marching Cubes A marching cube is bounded by the 8 voxels in a 2 x 2 x 2 neighbourhood If object (value=1) and background (value=0) are considered, then there are 28 = 256 possible configurations of the 8 voxels

UU/IT | UU/IT Conversion of voxel data to triangulated surfaces

UU/IT | UU/IT MC algorithm Step 1 – Create the cubes using the centres of 8 voxels; four from slice k four from slice k

UU/IT | UU/IT MC algorithm Step 2 - Classify each vertex of the cube 1 = inside the object 0 = outside the object Step 3 - Build an index The classification gives an 8-bit index number (e.g., , ) for each cube

UU/IT | UU/IT Cube example Marching cube configuration = 50, Case 5, 3 triangles

UU/IT | UU/IT MC algorithm Step 4 – Get the edge list For a given index, access a list of cube edges (a lookup table) that contains triangle vertices

UU/IT | UU/IT MC algorithm Step 5 - Interpolate the triangle vertices For the cube edges, find the intersection points using (linear) interpolation of the density values The midpoint of the cube edge may be chosen for the triangle vertex

UU/IT | UU/IT MC algorithm, final step Step 6 - Calculate a unit normal for each triangle vertex Estimate a gradient vector G at each cube vertex using central differences of the density data D Gx(i,j,k) = D(i+1, j, k) - D(i-1, j, k) ‏ Gy(i,j,k) = D(i, j+1, k) - D(i, j-1, k) ‏ Gz(i,j,k) = D(i, j, k+1) - D(i, j, k-1) ‏ Interpolate the gradient at the intersection, i.e., the triangle vertex Rendering algorithms use the normals to produce, e.g., Gouraud shading

UU/IT | UU/IT Marching Cubes - Algorithm in summary 1. Create a cube 2. Classify each vertex 3. Build an index 4. Get edge list 5. Interpolate triangle vertices 6. Calculate and interpolate normals

UU/IT | UU/IT More cube examples Case 1Case 2Case 8

UU/IT | UU/IT Non-boundary cubes Completely outside object Completely inside object

UU/IT | UU/IT Tricky configurations Case 6 5 triangles

UU/IT | UU/IT MC – Pros and cons ? Straightforward to implement Fast to generate Generates many, many triangles Does not always connect things in a correct way (ambiguities)‏ The generated surfaces are not perfectly smooth

UU/IT | UU/IT MC – Pros and cons

UU/IT | UU/IT Voxel examples: sphere and cube

UU/IT | UU/IT MC examples: sphere and cube

UU/IT | UU/IT Vector algorithms Vector data is a 3D representation of direction and magnitude Like scalar fields, vectors are defined at discrete points

UU/IT | UU/IT Vector field visualization challenges Displaying a vector requires more visual attributes (u,v,w) has direction and magnitude Displaying a vector requires more screen space more than one pixel is required to display an arrow It becomes more challenging to display a dense vector field

UU/IT | UU/IT Glyphs A general visualization technique used to represent data using a meaningful shape or pictorial representation Each glyph is generally a function of its input data and may change size, orientation, colour, and shape Example: oriented arrows, cones, etc.

UU/IT | UU/IT Animated particles Advection of (massless) particles through the vector field

UU/IT | UU/IT Streamlines Curves that connect particle positions Start from one or more seed-points

ITUppsala universitet Data representation and fundamental algorithms Filip Malmberg