Unformatted text preview:

CSE 564 Scientific Visualization Lecture 11 Volume Rendering With Raycasting Klaus Mueller Stony Brook University Computer Science Department Klaus Mueller Stony Brook 2003 1 Image Order Viewing Raycasting Perspective Projection Eye Camera ri j screen in world space A ray is specified by Pi j eye position Eye y P v screen pixel location Pi j u P0 0 ray direction vector ri j of unit length object P i j Eye r i j P i j Eye z x A point P on a ray is given by P Eye t r i j t parametric variable Spacing of pixels on image plane i W Ni 1 H j Nj 1 Ni Nj image dims in pixels Image order projection scan the image row by row column by column P i j P 0 0 i v j j u i Pi j Location of image pixel i j in world space 0 i Ni 0 j Nj P0 0 image screen origin in world space u v n orthonormal image plane vectors n v u 1 Image Order Viewing Raycasting Orthographic Projection screen in world space All rays are parallel Pi j y v P object A ray is specified as u ri j P 0 0 ri j n the view direction vector n v u cross product of v u z x A point P on a ray is given by P P i j t r i j t parametric variable Spacing of pixels on image plane i W Ni 1 H j Nj 1 Ni Nj image dims in pixels Image order projection scan the image row by row column by column P i j P 0 0 i v j j u i Pi j Location of image pixel i j in world space 0 i Ni 0 j Nj P0 0 image screen origin in world space u v n orthonormal image plane vectors n v u 2 Volumetric Raycasting Continuous Form 2D Example Pi j ri j y x f x y X Ray projection L I i j f P i j t r i j dt 0 accumulate integrate the volumetric function f x y along the ray write the resulting intensity Ii j to the image at location i j Maximum Intensity Projection MIP I i j Max f P i j t r i j find the maximum of f x y along the ray and write it to image location i j 3 Volumetric Raycasting Discrete Form In a practical volume rendering situation we have discretized data on a grid obtained by some imaging or simulation modality volumetric integrals that cannot be solved in closed form i e analytically and therefore must be approximated by discrete rays Pi j ray sample point f xs ys ri j t y Discrete X Ray projection L t I i j k 0 x grid data point fd x y f P i j k t r i j t sample the volumetric function f x y at equi spaced distances t along the ray accumulate the samples and write the resulting intensity Ii j to the image at location i j Discrete Maximum Intensity Projection MIP I i j Max f P i j k t r i j 0 k L t 4 Interpolation The ray sample points do not always fall onto the known grid points most often they fall somewhere inbetween We need to estimate the values of the ray samples from the existing grid points This is done via interpolation as discussed earlier Let s start with the 1D case interpolation kernel h newly interpolated sample f x 2 1 0 1 2 3 x 0 2 center the interpolation kernel at the sample position and superimpose it onto the grid multiply the values of the grid samples with the kernel value at the superimposed position add all the products this gives the value of the newly interpolated sample in the shown case f 0 2 h 0 2 f 0 h 1 2 f 1 h 0 8 f 1 h 1 8 f 2 5 Popular Interpolation Kernels 1 Nearest Neighbor interpolated function kernel 1 0 0 5 f x 0 5 2 1 0 1 0 2 2 x 3 simply pick the value of the nearest grid point f 0 2 f trunc 0 2 0 5 f round 0 2 Linear filter interpolated function kernel 1 0 1 0 f x 1 0 2 1 0 1 0 2 2 3 x use a linear combination of the two neighboring grid values f 0 2 0 2 f 1 0 8 f 0 6 Popular Interpolation Kernels 2 Cubic filter interpolated function kernel 1 0 2 0 1 0 1 0 f x 2 0 2 1 0 1 0 2 2 3 x see equation on pg 114 in the Lichtenbelt book Discussion nearest neighbor is fastest to compute just one add but gives a sharp edges linear interpolation takes 2 mults and 1 add and gives a piecewise smooth function cubic filter takes 4 mults and 3 adds but gives an overall smooth interpolated function linear interpolation is most popular in volume rendering application 7 Fast Interpolation In Higher Dimensions 1 All interpolation kernels shown here are separable h x y h x h y and h x y z h x h y h z Linear interpolation assume grid distance 1 0 Pu is the location of the sample value P0 P0 and P1 are neighboring grid points then u Pu u Pu P0 f x f Pu 1 u f P0 u f P1 Bilinear interpolation P1 0 f P0 u 1 u f P0 0 u f P0 1 1 v f P1 u 1 u f P1 0 u f P1 1 v f Pv u 1 v f P0 u v f P1 u 1 u P1 P0 0 P1 u P1 1 Pv u uP 0 u 1 u P0 1 f x y f Pv u 1 v 1 u f P0 0 1 v u f P0 1 v 1 u f P1 0 v u f P1 1 8 Fast Interpolation In Higher Dimensions 2 P1 1 0 Trilinear interpolation v P0 1 0 w u P1 1 1 P0 1 1 P1 0 0 Pw v u P0 0 0 P1 0 1 P0 0 1 f P0 v u BilinearInterpolation P0 0 0 P0 0 1 P0 1 0 P0 1 1 f P1 v u BilinearInterpolation P1 0 0 P1 0 1 P1 1 0 P1 1 1 f x y z f Pw v u LinearInterpolation P0 v u P1 v u hence a trilinear interpolation can be decomposed into 7 linear interpolations 1 alternative form f x y z 1 1 i 1 i j 1 j k 1 k u 1 u v 1 v w 1 w P i j k i 0 j 0 k 0 Nearest neighbor in three dimensions f x y z f Ptrunc x 0 5 trunc y 0 5 trunc z 0 5 Note …


View Full Document

SBU CSE 332 - Lecture 11 - Volume Rendering With Raycasting

Download Lecture 11 - Volume Rendering With Raycasting
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 11 - Volume Rendering With Raycasting and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 11 - Volume Rendering With Raycasting and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?