volume visualization 2 - university of manchester
TRANSCRIPT
Volume Visualization (2)
Louise M. LeverW T Hewitt
November 2006MSC ACS CS605Manchester
2vol viz/03Supercomputing, Visualization & e-Science 52
Surface Extraction MethodsDividing Cubes[7]
Observation: the size of many polygons produced by Marching Cubes are often smaller than pixel size
Basic idea1. Classify each voxel as inside, outside or on the surface2. Subdivide surface voxels to image resolution3. Output points with normals
2vol viz/03Supercomputing, Visualization & e-Science 53
Surface Extraction MethodsDividing Cubes
1. Classify each voxel in a volumeVoxel is interior if all data values are above surface valueVoxel is exterior if all data values are below surface valueOtherwise surface intersects the voxel
2vol viz/03Supercomputing, Visualization & e-Science 54
Surface Extraction MethodsDividing Cubes
2. Subdivide Surface voxels to image resolutionIn x, y, and z create small voxels that correspond to the final image resolution. If original data is 256x256x256 and final image is 512x512, subdivide twice in x, y and z
Resample the intensities for the new voxels using tri-linear interpolation
For each new voxel, test if surface voxel as in step 1
2vol viz/03Supercomputing, Visualization & e-Science 55
Surface Extraction MethodsDividing Cubes
3. Calculate NormalsFor each surface voxel interpolate gradient vectors for surface intersections using central differencesCalculated surface normal at each surface pointOutput points with normal, points are pixel sized.
2vol viz/03Supercomputing, Visualization & e-Science 56
Surface Extraction MethodsMarching Cubes vs. Dividing Cubes
Both extract surface models from volume dataMarching Cubes
Creates trianglesModels rendered using conventional graphics techniquesEfficient for small volumes
Dividing CubesCreates points with normalsEfficient for larger volumes
2vol viz/03Supercomputing, Visualization & e-Science 57
Surface Extraction MethodsSummary
AdvantagesRendering methods are known: shadows, depth cueing etc.Changing views/lights requires only re-rendering of geometric primitivesCan be done in hardware
DisadvantagesCan introduce artifacts and ambiguitiesThrows away data between surfacesNot capable of imaging volume interiorsNot capable of imaging continuum
2vol viz/03Supercomputing, Visualization & e-Science 58
Direct Rendering MethodsIntroduction
To render the volume directly without recourse to intermediate geometryTo allow the display of weak and fuzzy surfacesCan relax the condition that a surface is either present or notTwo methods will be covered
Ray Casting [1]Splatting [10]
2vol viz/03Supercomputing, Visualization & e-Science 59
Direct Rendering MethodsRay Casting
Basic idea1. Shade the acquired data to obtain a volume of colour values2. Classify the data to obtain a volume of opacity values3. Cast a ray through both volumes and takes samples along the ray4. At each sample point calculate the colour and opacity using tri-linear
interpolation5. Composite the colour and opacity samples along the ray to produce a
total colour for the ray.
2vol viz/03Supercomputing, Visualization & e-Science 60
Direct Rendering MethodsRay Casting
1. Shade the acquired data to obtain a volume of colour valuesCalculate normals for each voxel using central differencesusing Phong or some other shading method, calculate a colour for each voxel, creating a volume of colours
2. Classify the data to obtain a volume of opacity valuesUse one of the classification techniques shown earlier (binary, region boundary surfaces etc.) to assign an opacity for each sample locationIsovalue contour surfaces — Good for display of multiple concentric surfacesRegion boundary surfaces — Good for data with lots of fuzzy surfaces
2vol viz/03Supercomputing, Visualization & e-Science 61
Direct Rendering MethodsRay Casting
Opacity Classification — Isovalue Contour SurfacesEnsures that data values near to fv are mapped to similar opacities Tails off in inverse proportion to gradient magnitude i.e surface strength
αv
α(xi) gradientmagnitude | ∇ f(xi)|
fv acquiredvalue f(xi)
a(xi) = αv
1
1 - 1 |fv - f(xi)|
|∇f(xi)|r
0{ if f(xi) = fv
if within range
otherwise
opacity
2vol viz/03Supercomputing, Visualization & e-Science 62
Direct Rendering MethodsRay Casting
Opacity Classification - Region Boundary SurfacesAssigns opacities to a number of fixed sample values Interpolates between them so that every voxel has an opacity
αva
α(xi)gradientmagnitude | ∇ f(xi)|
fvaacquiredvalue f(xi)
opacity
αvb
αvc
fvb fvc
2vol viz/03Supercomputing, Visualization & e-Science 63
Direct Rendering MethodsRay Casting
3. Cast a ray through the volume of opacities and colours and take samples along the ray
4.
At each sample point, calculate the colour and opacity using trilinearinterpolation of the voxel vertex values
pixel p(i,j)
image plane
viewpoint
data volume
sample points
entry point
exit point
ray
2vol viz/03Supercomputing, Visualization & e-Science 64
2vol viz/03Supercomputing, Visualization & e-Science 65
Direct Rendering MethodsRay Casting
5. Composite the colour and opacity along each rayComposite along each ray to give a total colour for the ray and hence the originating pixelUses the Porter and Duff “Over” operator[27]
C(0)inC(N)out C(i), α(i))
Cout Cin 1 α i( )–( ) C i( )α i( )+=
2vol viz/03Supercomputing, Visualization & e-Science 66
2vol viz/03Supercomputing, Visualization & e-Science 67
Direct Rendering MethodsRay Casting — Serial optimizations
Early Ray Termination [19]Stop tracing when total opacity = 1, since no point tracing any further
Hierarchical Spatial Enumeration [18]Pyramids, Octrees,Avoids tracing through parts of the volume that don’t contain any relevant data
2vol viz/03Supercomputing, Visualization & e-Science 68
Direct Rendering MethodsRay Casting — Serial optimizations
Adaptive Screen Sampling[18]
Calculate a subset of the pixels Interpolate intermediate values Replace interpolated values in areas of high gradient
Calculated from ray
interpolated pixels
2vol viz/03Supercomputing, Visualization & e-Science 69
Direct Rendering MethodsRay Casting — Serial optimizations
Adaptive Ray Sampling [20]
Sampling rate is adjusted according to the significance of the traversed data
Sampling rate <-> gradient magnitudeSampling rate <-> material opacity
5
6 5
5
5
55
6
6
6
6
3 233
2
2
3
3
3
3
3
3
3
2vol viz/03Supercomputing, Visualization & e-Science 70
Direct Rendering MethodsRay Casting — Serial optimizations
Templates [21]rays in parallel viewing perform the same set of steps which is saved as a template
Space leaping [22]techniques to construct a bounding object around the interesting part of the volume, so that empty space can be quickly traversed
template
2vol viz/03Supercomputing, Visualization & e-Science 71
Direct Rendering MethodsSplatting [8][9][10]
Can be likened to throwing a snowball onto a glass plateBasic Idea
Determine in what order to traverse the volumeClassify and shade the voxels in each sliceProject or splat each slice onto the image planeDetermine the extent of the splat’s contribution and attenuate according to some filterMerge the attenuated splats to calculate the pixel contributions
2vol viz/03Supercomputing, Visualization & e-Science 72
Direct Rendering MethodsSplatting
1. Determine in what order to traverse the volumeVoxels are projected in order of their distance from the image plane aslice at a timeTherefore need to calculate which slice is nearest the image planeThis ensures that close voxels obscure distant voxels
2. Classify and Shade the voxels in each sliceClassify the voxels according to some opacity transfer function or look up tableCalculate the gradient using central differences and use this information in the shading formula
2vol viz/03Supercomputing, Visualization & e-Science 73
Direct Rendering MethodsSplatting
3. Project each voxel in a slice onto the image planeA reconstruction filter, usually a Gaussian is used to determine the extent of the splat (its footprint) on the image plane
Voxel(r,g,b,α)
Projection
planeon image
2vol viz/03Supercomputing, Visualization & e-Science 74
Direct Rendering MethodsSplatting
4. Attenuate according to the filterThe classified, shaded voxels (r,g,b,a tuples) are then attenuated according to where they fall within the footprintVoxels projected into the middle of the footprint will have the highest contribution
5. Merge the attenuated splatsComposite the attenuated r,g,b,a tuples that fall within footprint to give a pixel value for the image buffer
2vol viz/03Supercomputing, Visualization & e-Science 75
Direct Rendering MethodsSummary
AdvantagesNon-binary classificationShows structure between surfacesDisplays small and poorly defined featuresReadily parallelisable
DisadvantagesExpensive - cost is proportional to volume size (n3)Combining volume and geometry data is difficultCan’t take advantage of computer graphics hardware
2vol viz/03Supercomputing, Visualization & e-Science 76
Mixing Volume and Geometry DataSurface Based Intermixing [24]
Convert volume data to geometric data using surface reconstruction algorithms Mix with the required geometry and renderAdvantages
Can use graphics hardware and normal computer graphics techniquesLow memory and storage needs
DisadvantagesCan’t see internal dataSensitive to object complexity
2vol viz/03Supercomputing, Visualization & e-Science 77
Mixing Volume & Geometry DataVolume Based Intermixing [23]
Voxelise the geometry dataMix with the sampled volume & render using direct methodsAdvantages
Access to entire volume not just surfacesInsensitive to object complexity
DisadvantagesLarge amount of memory and storageLong processing timeClassification is difficult
2vol viz/03Supercomputing, Visualization & e-Science 78
Volume and Geometry DataPoint Based Intermixing [25]
Adds a “point” to the set of geometric primitives where a point is a 3D location and normal
Normals are calculated for each voxel using central differencesThresholding can be used to cut down the number of points
AdvantagesInteractiveCan take advantage of computer graphics hardware
DisadvantagesRepeated normal estimation for every changeHoles may appear
2vol viz/03Supercomputing, Visualization & e-Science 79
Volume and Geometry DataZ-merging [23]
Render volume using surface reconstruction or direct methodsRender geometry separatelyMerge using some depth storing technique
AdvantagesCan use either direct or indirect methodsCan be implemented in hardwareInteraction
DisadvantagesRe-renders all the data if the model is changed
2vol viz/03Supercomputing, Visualization & e-Science 80
Volume and Geometry DataRay Merging [28]
Trace rays through volume and geometry datasets producing two vectors of valuesCombine the two vectors to produce pixel valuesAdvantages
Handles transparencyUses complete volumeHandles small features and complex objects
Disadvantages Not interactiveLots of memory required
2vol viz/03Supercomputing, Visualization & e-Science 81
APIs for Volume Visualization
OpenGL Volumizer (www.sgi.com/software/volumizer)Developed by SGILibrary of C++ classesAimed at O2, Octane and Onyx2I.e., needs 2D and/or 3D texture hardware
Adds volumetric primitive
2vol viz/03Supercomputing, Visualization & e-Science 82
Volumizer Supports
Mixing primitivesVolume deformationCo-resident volumesTime-varying volumesArbitrary regions of interest
2vol viz/03Supercomputing, Visualization & e-Science 83
Cochlea Implant
2vol viz/03Supercomputing, Visualization & e-Science 84
2vol viz/03Supercomputing, Visualization & e-Science 85 2vol viz/03
Supercomputing, Visualization & e-Science 86
2vol viz/03Supercomputing, Visualization & e-Science 87
Aneurisms in the Brain
2vol viz/03Supercomputing, Visualization & e-Science 88
2vol viz/03Supercomputing, Visualization & e-Science 89 2vol viz/03
Supercomputing, Visualization & e-Science 90
2vol viz/03Supercomputing, Visualization & e-Science 91 2vol viz/03
Supercomputing, Visualization & e-Science 92
My Mummy
2vol viz/03Supercomputing, Visualization & e-Science 93 2vol viz/03
Supercomputing, Visualization & e-Science 94