volume rendering & shear-warp factorization joe zadeh january 22, 2002 cs395 - advanced graphics
Post on 22-Dec-2015
218 views
TRANSCRIPT
![Page 1: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/1.jpg)
Volume Rendering & Shear-Warp Factorization
Joe ZadehJanuary 22, 2002
CS395 - Advanced Graphics
![Page 2: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/2.jpg)
Volume Rendering (Part II)
![Page 3: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/3.jpg)
3D Radiology Lab, Stanford
![Page 4: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/4.jpg)
Start with Slices (usually)
Stanford
![Page 5: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/5.jpg)
Classification
• What does this voxel represent?• Classification via probability
• Assign (R,G,B,)• Create Isosurfaces
![Page 6: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/6.jpg)
Marching Cubes
Lorensen and Cline
![Page 7: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/7.jpg)
Watt, pg 385
IMAGE OBJECT
![Page 8: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/8.jpg)
Image Order: Ray Casting
• Cast set of parallel rays• Remain Traveling• Two Issues
– Find voxels through which the ray passes
– Find a value for the voxel
NOT RAYTRACING!!!
![Page 9: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/9.jpg)
Image Order: Casting Image
Watt, pg 386
![Page 10: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/10.jpg)
Image Order: Compositing with Resampling
Watt, pg 387
![Page 11: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/11.jpg)
Image Order: Resampling (Shear) then Compositing
Watt, pg 388
![Page 12: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/12.jpg)
Object Order: Voxel Projection
• Splatting
![Page 13: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/13.jpg)
Watt, pg 389
![Page 14: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/14.jpg)
The Paper
• “Fast Volume Rendering Using a Shear-Warp Factorization of the Viewing Transform”
• SIGGRAPH ‘94
![Page 15: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/15.jpg)
The Authors
• Philippe Lacroute– Computer Systems Laboratory, Stanford– PhD Dissertation with same title– SGI for 3 years
• Marc Levoy– Computer Science Dept, Stanford– 1996 SIGGRAPH Achievement Award for
Volume Rendering
![Page 16: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/16.jpg)
History of the Stanford Bunny O’Brien, Hodgins:
“Animating Fracture”
![Page 17: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/17.jpg)
Input Data
![Page 18: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/18.jpg)
Input Data
![Page 19: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/19.jpg)
Output Data
![Page 20: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/20.jpg)
Image Order vs. Object Order
• Image Order (ray-casting) Redundant Traversals of Spatial Data Early Ray Termination
• Object Order (splatting) Traverse through complete spatial
data Only Traverse Once
![Page 21: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/21.jpg)
The Shear-Warp Revolution
• Takes the good of both Object and Image Order Algorithms
![Page 22: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/22.jpg)
Lacroute, Levoy
![Page 23: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/23.jpg)
3 Steps
• “Factorization of the viewing matrix into a 3D shear parallel to the slices of volume data”
• “a projection to form a distorted intermediate image”
• “and a 2D warp to produce the final image”
![Page 24: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/24.jpg)
In a Nutshell
• Shear (3D)• Project (3D 2D)• Unwarp (2D)
![Page 25: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/25.jpg)
The Shear (Parallel)
Lacroute, Levoy
![Page 26: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/26.jpg)
The Shear (Perspective)
Lacroute, Levoy
![Page 27: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/27.jpg)
Sheared Object Space
• Intermediate Coordinate System• Simple mapping from object
oriented system• All viewing rays are parallel to the
third axis
![Page 28: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/28.jpg)
Properties of Sheared Object Space
1. Pixel scanlines of intermediate are parallel to voxel scanlines
2. All voxels in a slice scaled by same factor.
3. (Parallel) Every voxel slice has same scale factor (voxelpixel is one-to-one)
![Page 29: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/29.jpg)
Algorithm, again
• Transform volume to sheared object space by translation and resampling
• Project volume into 2D intermediate image in sheared object space– Composite resampled slices front-to-back
• Transform intermediate image to image space using 2D warping
![Page 30: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/30.jpg)
Three Shear-Warp Algorithms
• Parallel Projection• Perspective Projection• Fast Classification
• (SW Parallel Projection first described by Cameron and Undrill, 1992)
![Page 31: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/31.jpg)
Parallel Projection Rendering
• Recall: Voxel scanlines in sheared volume are aligned with Pixel scanlines in intermediate
• Both can be traversed in scanline order
• Simultaneously
![Page 32: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/32.jpg)
Compress Voxel Scanlines
• Run-length encoding• Skip transparent voxels
RTAAAASDEEEEE = RT*4A SD*5E
• Effectiveness depends heavily on image type
![Page 33: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/33.jpg)
Compress Intermediate Image
• Recall: Splatting doesn’t account for occlusion
• Solution: Keep run-length encoding of opacity while creating the intermediate image
• If a pixel exceeds an opacity threshold, we know we don’t have to go to deeper slices (I.e. ray termination)
![Page 34: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/34.jpg)
Lacroute, Levoy
![Page 35: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/35.jpg)
For the Uncompressed
• Recall: All voxels in a given slice are scaled by the same factor
• Other rendering algorithms require a different scaling weight for each voxel
• Use Bilinear Interpolation and backward projection– Two voxel scanlines single intermediate
scanline
![Page 36: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/36.jpg)
Warping
• We now have composited intermediate image
• Warp: Affine image warper with bilinear filter
• We now have our image
![Page 37: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/37.jpg)
Some Costs
• Run-length encoded volume– Preprocessing created– View Independent
• Three encodings (x,y,z)– Still less data than original volume
because omits transparency
![Page 38: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/38.jpg)
Lacroute, Levoy
![Page 39: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/39.jpg)
256x256x225 on SGI Indigo R4000 Lacroute, Levoy
![Page 40: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/40.jpg)
Perspective Projection
• Majority of Volume Rendering Parallel (’94)
• Perspective mostly useful in radiation beam planning
• Viewing rays diverge, complicating sampling
![Page 41: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/41.jpg)
Perspective Projection Algorithm
• Almost exactly like Parallel• In addition to translation during shear,
scale as well; then composite.• Tends to create a many-to-one mapping
from voxels to pixels• Slower in calculating: volumes and
intermediate scanlines not traversed at same rate
![Page 42: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/42.jpg)
Fast Classification Algorithm
• Recall: Previous two algorithms require intense preprocessing classification step
• Not acceptable when experimenting with different opacities
• Solution: Classification opacity via scalar function
![Page 43: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/43.jpg)
The Algorithm
Lacroute, Levoy
![Page 44: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/44.jpg)
A bit more detail
• For some block of volume, find extrema of parameters to opacity function
• If function returns transparent opacity, discard scanline portion
• Subdivide scanline and repeat recursively until size of portion is smaller than a threshold
![Page 45: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/45.jpg)
Further Analysis
• 1283: 5x speed increase over traditional ray-casting (.5 sec)
• 2563: 10x speed increase (1 sec)• General Shear-Warp: O(n)• Classification with Render: O(n2)
![Page 46: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/46.jpg)
Pitfalls of Shear-Warp
• Two resampling steps– No noticable degradation
• Uses 2D reconstruction filter to resample the volume data – Not really applicable
![Page 47: Volume Rendering & Shear-Warp Factorization Joe Zadeh January 22, 2002 CS395 - Advanced Graphics](https://reader036.vdocument.in/reader036/viewer/2022062421/56649d7b5503460f94a5f4c9/html5/thumbnails/47.jpg)
Futher Research
• Algorithm is parallelizable• Real-Time Rendering on Shared
Multiprocessors (approx 10 fps) [SGI Challenge 16 Processor multiprocessor, 256x256x223 voxel]
• Volpack